experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
MIT License
1.73k stars 787 forks source link

"mean-squared error" #379

Open alem88 opened 5 years ago

alem88 commented 5 years ago

First of all, I apologize if there is already similar issue here. I tried to find it, but cound't, so please, if there is, tell me. I see in your code that you don't use tf.sqrt at all for square root of width and height. Is YOLO v2 and v3 just like that that they don't use it at all or did I miss something? I see that you do "mean squared error" for x,y,w,h, but I tried to find "mean-squared" in YOLO v2 and v3 papers and couldn't find it. What is actually going on with this YOLO v2 and v3 loss function. I studied YOLO for about four months and I'm still confused with those things. Please help.

robertlugg commented 5 years ago

I believe this: https://hackernoon.com/understanding-yolo-f5a74bbc7967

and this quote:

Our error metric should reflect that small deviations in large boxes matter less than in small boxes. To partially address this we predict the square root of the bounding box width and height instead of the width and height directly.

will help you.

I consider the difference "fine tuning".