Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/adding training sources #5

Open
wants to merge 3 commits into
base: release-0.1
Choose a base branch
from

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