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

I cannot get good loss with yolov4-mish compared with yolov4. #7131

Closed
shigeomi-t opened this issue Dec 15, 2020 · 5 comments
Closed

I cannot get good loss with yolov4-mish compared with yolov4. #7131

shigeomi-t opened this issue Dec 15, 2020 · 5 comments
Labels
Training issue Training issue - no-detections / Nan avg-loss / low accuracy:

Comments

@shigeomi-t
Copy link

I tried yolov4x-mish, but could not get good results.
I use my own data to learn and my losses do not go down from around 20. With YOLOv4, the loss is below 1 at about 5000 iterations, and good detection accuracy can be obtained. I use the same training data and the same PC environment when training with yolov4 and yolov4x-mish.

Why is it that yolov4x-mish is less accurate than yolov4? Am I doing something wrong?
Can anyone give me some ideas?

This is a chart of training my data with yolov4-mish.

localhost

  • I pulled latest code at 2020-12-15 23:00 JST.
  • I changed classes=1, filters=18
  • my conf yolov4x-mish.cfg
    [net]
    batch=64
    subdivisions=8
    width=416
    height=416
    channels=3
    momentum=0.949
    decay=0.0005
    angle=0
    saturation = 1.5
    exposure = 1.5
    hue=.1
    
    learning_rate=0.001
    burn_in=1000
    max_batches = 300000
    policy=steps
    steps=240000,270000
    scales=.1,.1
    
    mosaic=0
    ...
    
  • I have no bad.list and bad_label.list .
  • my cuda info
     CUDA-version: 10020 (10020), cuDNN: 7.6.5, GPU count: 1   
     OpenCV version: 4.3.0
     0 : compute_capability = 610, cudnn_half = 0, GPU: GeForce GTX 1080 Ti  
     layer   filters  size/strd(dil)      input                output
    
@shigeomi-t shigeomi-t added the Training issue Training issue - no-detections / Nan avg-loss / low accuracy: label Dec 15, 2020
@AlexeyAB
Copy link
Owner

Training goes well.
Look at the accuracy (mAP) instead of Loss.

@shigeomi-t
Copy link
Author

@AlexeyAB
Thanks for your reply. I'll look at the mAP.
However, using the same data set, YOLOv4x-mish yielded mAPs of 81% at best, while YOLOv4 yielded mAPs of 86% at best. I wonder why YOLOv4x-mish has a lower mAP than YOLOv4.
Doesn't YOLOv4x-mish work well for simple object detection tasks? For example, the task of object detection for human hands only. Is the model too large for the object detection task?
I want to benefit from the improved accuracy of yolov4x-mish.

@AlexeyAB
Copy link
Owner

  • YOLOv4x-mish - should be trained longer. Also if you use 416x416 or 512x512, then try to use anchors from yolov4.cfg.

  • YOLOv4x-mish improves only ~+1% AP50 and ~+5% AP50...95 if you use the same 512x512 resolution as yolov4.cfg. So it will detect approximately the same number of objects, but with more accurate coordinates.

  • YOLOv4x-mish is more suitable for high resolutions 640x640 - 832x832 than yolov4.cfg, so you will get more than +1% AP50 improvement.

@shigeomi-t
Copy link
Author

I understood why I can't get better mAP. I will use YOLOv4x-mish when I want to train 640x640 - 832x832 images, and YOLOv4 when the training data is low enough resolution like 416px.

I've received enough answers so I close this issue.
Thank you very much.

@akashAD98
Copy link

  • YOLOv4x-mish - should be trained longer. Also if you use 416x416 or 512x512, then try to use anchors from yolov4.cfg.
  • YOLOv4x-mish improves only ~+1% AP50 and ~+5% AP50...95 if you use the same 512x512 resolution as yolov4.cfg. So it will detect approximately the same number of objects, but with more accurate coordinates.
  • YOLOv4x-mish is more suitable for high resolutions 640x640 - 832x832 than yolov4.cfg, so you will get more than +1% AP50 improvement.
  1. youv4.cfg & yolov4x-mish both having the same anchors ?? why you said use yolov4 anchors ? can you please elaborate on this ?thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Training issue Training issue - no-detections / Nan avg-loss / low accuracy:
Projects
None yet
Development

No branches or pull requests

3 participants