Darknet: unsatisfiable condition in the new loss function

Created on 30 Mar 2018  路  5Comments  路  Source: pjreddie/darknet

In the config file of YOLOv3 (https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg), the truth_threshold is set to 1. This parameter is used in a conditional statement in the new loss function to compare with best_iou, which is ALWAYS no greater than 1.

https://github.com/pjreddie/darknet/blob/259be3217b0331d07c8c5c1995d90ab9f3b768c1/src/yolo_layer.c#L182

This condition will never be satisfied. Am I wrong? @pjreddie

Most helpful comment

truth_thresh doesn't have to be set to 1, you could change it to whatever you want! But i never got very good results with trying to use it. I left in thruth_thresh so i could keep playing around with it to see if I could get it to work better, it is something other people use with good results. but yeah, if you don't change the cfg that check will never be true.

All 5 comments

Isn't it the reason why we are getting less counts and eventually when count becomes zero, we gat NaNs displayed on the terminal

truth_thresh doesn't have to be set to 1, you could change it to whatever you want! But i never got very good results with trying to use it. I left in thruth_thresh so i could keep playing around with it to see if I could get it to work better, it is something other people use with good results. but yeah, if you don't change the cfg that check will never be true.

Thanks, @pjreddie!

I have another question regarding warming up training. It's in region_layer.c, but no longer there in yolo_layer.c.

https://github.com/pjreddie/darknet/blob/259be3217b0331d07c8c5c1995d90ab9f3b768c1/src/region_layer.c#L254

You also find this not helpful?

in iou_loss, label of positive anchor is 1, not overlaps like yolo2? thanks!

@pjreddie Hi! Can you help me please? i want to send my detection results through http, how i can do it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spaul13 picture spaul13  路  3Comments

job2003 picture job2003  路  3Comments

HoracceFeng picture HoracceFeng  路  3Comments

sujithm picture sujithm  路  3Comments

arianaa30 picture arianaa30  路  3Comments