Skip to content

Conversation

@avsthiago
Copy link
Owner

No description provided.

import cv2, os, multiprocessing
from tqdm import tqdm

PATH = '/home/avsthiago/tese_thiago/thesis/thesis-deepbee/data/processed/human_test_set/size_220'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about remove hard coded configuration?
Use https://pypi.org/project/environs/ instead.

if not os.path.exists(path):
os.makedirs(path)

PATH = '/home/avsthiago/tese_thiago/thesis/datasets/images_and_annotations/labels_one_file/train_test_val'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

externalise configuration?
https://pypi.org/project/environs/

max_x = p[1]+size if p[1]+size <= height else height

roi = img[min_y:max_y,min_x:max_x]
#print(os.path.join(data[2],str(p[0])+'.JPG'))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dead code?

img = cv2.imread(data[-2])
size = int(data[-1] // 2)
for p in data[1]:
#print(p)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dead code?

p2 = return_tuple_int(*line[6:8])

# TODO: fazer isso com uma normalização gaussiana
#noise_x = random.randint(-10, 10)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dead code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants