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 785 forks source link

loss_wh in custom_loss function not matching the formula? #363

Open graftedlife opened 5 years ago

graftedlife commented 5 years ago

In the custom_loss function in Yolo Step-by-Step.ipynb, it seems that loss_wh is calculated as below:

loss_wh = tf.reduce_sum(tf.square(true_box_wh-pred_box_wh) * coord_mask) / (nb_coord_box + 1e-6) / 2.

This however doesn't match the formula noted above the codes since there are squre roots for these terms?