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

Suggestion to distinguish digital digit 2 and 5 in images. #1428

Open
dsbyprateekg opened this issue Jan 23, 2023 · 10 comments
Open

Suggestion to distinguish digital digit 2 and 5 in images. #1428

dsbyprateekg opened this issue Jan 23, 2023 · 10 comments

Comments

@dsbyprateekg
Copy link

dsbyprateekg commented Jan 23, 2023

Hi,

I need your suggestion to improve my custom-trained model based on YOLOv7W.
In the following type of images, my model is getting confused between the digits 2 and 5-
image

The model is creating 2 bbox around digit 2. The confidence score for digit 2 is 82% and for digit 5 it is 87% although digit 5 is not present here.
In my training, I only enabled the rotation hyperparameter to 90.0, the rest are default settings.

Please suggest to me how to fix this issue?

@faizan1234567
Copy link

When you rotate 2, it will be like 5. It is recommended to use data augmentation options that capture your real-world scenario. Further, add more images of digit 2 in the training dataset to make it diverse. Hope it helps

@faizan1234567
Copy link

did you enable horizontal flip? This might cause making making 5 from 2.

@dsbyprateekg
Copy link
Author

@faizan1234567 I had enabled the rotation option and disabled the fliplr option but issue still exists.

@faizan1234567
Copy link

Could you please tell what's your performance metric on training, val, and test. And are you testing on a video? Do you have enough images that differentiate 5 from 2. Could you reduce your rotation range? I think adding more data for 2 and 5 in different settings will improve.

@dsbyprateekg
Copy link
Author

dsbyprateekg commented Jan 25, 2023

I am testing on images only.
And this was the metric result when I trained with no rotation (0.0) and no fliplr option:
image

@faizan1234567
Copy link

is it on test set?

@dsbyprateekg
Copy link
Author

No, training and val accuracy.

@faizan1234567
Copy link

Your model has good performance on validation set on 2 and 5 classes. Did you measure it's accuracy on test set? Where does it make errors?

@dsbyprateekg
Copy link
Author

Yes, I tested 185 images and among them, in 27 images it is failing.

@damvantai
Copy link

damvantai commented Feb 3, 2023

@faizan1234567 I had enabled the rotation option and disabled the fliplr option but issue still exists.

You disable in file hyp.scratch.p5 or in code with option --evolve?
you should access /run/train/name_train{}/train_batch_{}.jpg? to watch image have flipup or flipleft right?

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

3 participants