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

negative samples #69

Open
hdm30 opened this issue Nov 15, 2023 · 4 comments
Open

negative samples #69

hdm30 opened this issue Nov 15, 2023 · 4 comments

Comments

@hdm30
Copy link

hdm30 commented Nov 15, 2023

Hi,

I've tried to add negative samples to the training data by adding the images and leaving the labels (.txt files) empty, However, i encountered the following errors:
File "/home/XXXX/yolov7-segmentation/utils/plots.py", line 90, in box_label
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
and
File "/home/XXXX/yolov7-segmentation/utils/segment/augmentations.py", line 21, in mixup
segments = np.concatenate((segments, segments2), 0)
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 1 dimension(s) and the array at index 1 has 3 dimension(s)

I would like to ask whether your code supports adding negative samples.
Many thanks in advance.

@ortizTorresJJ
Copy link

Did you already solve this issue? I have read about other repositories and they do it by adding images without the label info. Nevertheless, this does not work for this repository but I wonder if it is any way to add negative samples

@hdm30
Copy link
Author

hdm30 commented Dec 5, 2023

i solve it by disabling mixup augmentation

@ortizTorresJJ
Copy link

@hdm30 And how did you setup the mixup augmentation? in the hyps? or in the arguments in train.py? also did you add images without the label info? or did you add a void .txt?. Thanks in advance!!

@hdm30
Copy link
Author

hdm30 commented Dec 13, 2023

i've just commented the line of mixup augmentation i can't remember where exactly but you could find it easily. yes i've added void txt files

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

No branches or pull requests

2 participants