Darknet: What happend if there are many trained images which no object exist in?

Created on 27 Mar 2018  ·  6Comments  ·  Source: pjreddie/darknet

What happend if there are many trained images of no object exist?Will it make the gradients update badly?
default

Most helpful comment

@bubulv
Hi, bubulv. I have trained my model for about 2hour.There are some tricks for you.

  1. I think you may change your anchors for different yolo layer of downsample scale, because your image is much bigger than 416*416.
  2. The trained images in which almost no object exist in seems no influence on my model,but actually yolov3 is not very stable when your learning rate is too big. So reduce learning rate if your training loss become Nan or other performance(like iou) deteriorate, and increase it after thousand of iterations. Also, you could use adam instead to optimize your model, which works for me!

All 6 comments

@pjreddie I train the network with -nan, but the final model can't detect any boxes! How can solver this problem? I display the resizing images, some too small. My original image size is 1920*1080,
“ int dim = (rand() % 10 + 10) * 32;” can change the input size. In cfg file : width=416, height=416, what's mean, no use...?

@bubulv
Hi, bubulv. I have trained my model for about 2hour.There are some tricks for you.

  1. I think you may change your anchors for different yolo layer of downsample scale, because your image is much bigger than 416*416.
  2. The trained images in which almost no object exist in seems no influence on my model,but actually yolov3 is not very stable when your learning rate is too big. So reduce learning rate if your training loss become Nan or other performance(like iou) deteriorate, and increase it after thousand of iterations. Also, you could use adam instead to optimize your model, which works for me!

@ersanliqiao

  1. I set width=416, height=416 in my cfg file. Darknet can't resize my original image by itself ? Also I think the box is resize too.
  2. I don't know where to set the optimization option, can you help me? thanks very much!

@bubulv

  1. Darknet will resize input image if image size is not equal with input size of network.So that is my misunderstood, sorry!
  2. You can set adam=1 (which is 0 default) in yolov3.cfg.

@ersanliqiao ok! I try it with adam. thanks very much!

Maybe you can try cfg/yolo3.voc.cfg ,and modify it to train. @ersanliqiao

Was this page helpful?
0 / 5 - 0 ratings