-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
model struggles with long objects #617
Comments
As noone really comments on this - it may be a data problem. |
you can check this issue ultralytics/yolov5#5556 for more information @holger-prause |
Data is definitivly loaded correctly - but yes i have really many image with different aspect ratios - and they are very different from the coco dataset. I have / had the hope that the auto anchor box calculation should take care of this. However - i am getting rid of many small objects(noise created by synthetic sampling images) right now so maybe this fixes this implicitly. |
Ok the i solved the problem the following way: Open the file ./utils/datasets.py and replace ar_thr=20 with ar_thr=100. A quick look at my training output shows me 0.91 map where it previously was 0.1. I see a quite big fluctuation in the map but this could be related to other things as well. Its left to see how it performs in reality and after converting the model to onnx and also training on a real dataset where i also have very small objects in it. But small and long object were fine on yolov5 so i expect same or better results on yolov7. In general i am pretty happy with yolov7 as it seems to generalize better and the bounding box quality is also way better than on yolov5. @trungpham2606 After reading another post - see #760 (comment) i concluded that adding more anchors to fit the object better would be the right thing to do. If you ever need my help let me know - i wont forget and keep my word (i am serious). Thank you so much! |
@holger-prause Hello, I am trying to train ui elements like you did. I changed ar_thr to 100 and added more anchors. But map scores got worse and they are unstable like this My dataset consists of 17 classes of mostly wide ui elements and images are 3840x512. Used the following command with no augmentation. Other parameters were default. !python train.py --batch 4 --epochs 60 --data t-1/data.yaml --weights 'yolov7_training.pt' --device 0 --img-size 3840 --rect --hyp data/hyp.scratch.custom.yaml What might be the problem? |
Hello,
I trained a custom model(full yolov7 model and also tiny) for ui detection and its working pretty ok.
However , i am facing the same problem as with yolov4 - long textinputs or comboboxes or menu items are not recongized at all - when i decrease the the dimensions its picked up pixel perfect.
Is yolov7 capable of picking up such long objects or is there a conceptional problem because of the usage of anchor boxes ?
There is a possibility these long object are underrepresented (actually they are) but i got the feeling this is more of a conceptional problem as this happens across multiple classes. Is there anything i can do about this?
Any comment on this would be highly welcome.
The text was updated successfully, but these errors were encountered: