yolov5 icon indicating copy to clipboard operation
yolov5 copied to clipboard

How to improve the MAP ?

Open devendraswamy opened this issue 3 years ago • 10 comments

Search before asking

  • [X] I have searched the YOLOv5 issues and discussions and found no similar questions.

Question

I had trained the model with single class with YOLOV5n and I completed the model with MAP of

val: Scanning D:\raghavi\28_11_2022\yolov5\dataset\V7\val\labels... 56 images, 0 backgrounds, 0 corrupt: 100%|██████████| 56/56 00:05 val: New cache created: D:\raghavi\28_11_2022\yolov5\dataset\V7\val\labels.cache Class Images Instances P R mAP50 mAP50-95: 100%|██████████| 56/56 00:06 all 56 600 0.306 0.327 0.241 0.0768 foreignparticle 56 600 0.306 0.327 0.241 0.0768 Speed: 1.1ms pre-process, 30.7ms inference, 4.6ms NMS per image at shape (1, 3, 640, 640)

Please help me to analyse the MAP and let me know is it the model given MAP 0.0768 its mean 76% . please let me know am i right or not ? and if i am wrong how to improve the MAP.

Additional

No response

devendraswamy avatar Dec 05 '22 12:12 devendraswamy

@devendraswamy can you please provide more information on your result like the result.png or image of confusion matrix even image of validation also ok.

cool112624 avatar Dec 05 '22 14:12 cool112624

confusion_matrix results image

Please refer above images for results and MAP values of model . kindly review it and if any files required please let me know. thanking you in advance.

devendraswamy avatar Dec 05 '22 14:12 devendraswamy

for your answer about map Yolov5 result are normalized, so it is 0 to 1 so your map 0.0768 should be 7.68% #Correct me if I am wrong

So far I can know from your result is that your have 4 classes which is not single class and the result is very poor

Can I know your total number of train images, and how many for each class and some example of your labelled datasets of each classes if is it ok for you to show your datasets

cool112624 avatar Dec 05 '22 14:12 cool112624

Thank you for your valuable reply . Dataset: 593 train and 56 validation images and all labels had only one class is "foreign particle", for inference purpose i kept remaining five classes but i trained with only one class "foreignparticle".

Please let me know where i can make changes or any suggestions regarding train, testing.

devendraswamy avatar Dec 05 '22 14:12 devendraswamy

I see, so what is your batch size, epoch and other paramter that you use for training

cool112624 avatar Dec 05 '22 14:12 cool112624

--batch size : 64 --epochs : 1000 --patience :100

hyp.txt

Please refer the hyp file and above parameters , Thank you for support.

devendraswamy avatar Dec 06 '22 06:12 devendraswamy

Maybe you can try --batch size 32 --epoch 300 --patience 300 and see the result again

Do you label your picture as tight as possible? below are guide to good labelling crowdsourcing-labeling-example-bad-good

cool112624 avatar Dec 06 '22 07:12 cool112624

Thank you , i will with those argument values and let you know and I did labeling practice is good , its tight and accurate.

devendraswamy avatar Dec 06 '22 13:12 devendraswamy

@devendraswamy Do you got any improvement?

cool112624 avatar Dec 09 '22 02:12 cool112624

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

  • Wiki – https://github.com/ultralytics/yolov5/wiki
  • Tutorials – https://docs.ultralytics.com/yolov5
  • Docs – https://docs.ultralytics.com

Access additional Ultralytics ⚡ resources:

  • Ultralytics HUB – https://ultralytics.com/hub
  • Vision API – https://ultralytics.com/yolov5
  • About Us – https://ultralytics.com/about
  • Join Our Team – https://ultralytics.com/work
  • Contact Us – https://ultralytics.com/contact

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

github-actions[bot] avatar Jan 09 '23 00:01 github-actions[bot]