-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: release-0.1
Are you sure you want to change the base?
Conversation
import cv2, os, multiprocessing | ||
from tqdm import tqdm | ||
|
||
PATH = '/home/avsthiago/tese_thiago/thesis/thesis-deepbee/data/processed/human_test_set/size_220' |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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')) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove dead code?
No description provided.