AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.8k stars 7.97k forks source link

what is the use of new_coords=1 ?? in previous version we have not tried this but in yolov4-csp,yolov4-mish we used this new_coords concept. #7645

Open akashAD98 opened 3 years ago

akashAD98 commented 3 years ago

what is the impact of using new_coords=1 ?? can someone please explain this concept in detail?? why sigmoid instead of liner activation function before yolo layer??

bulatnv commented 3 years ago

same question.

bulatnv commented 3 years ago

Hello, @akashAD98. You'd better merge you last two issies into single one.

bulatnv commented 3 years ago

@akashAD98 Some answers about new_coords=1 in mish and csp models.

[convolutional] activation=logistic and [yolo] new_coords=1 should be used together.

https://github.com/AlexeyAB/darknet/issues/7141#issuecomment-747806742

Shortly, main difference btw old version and new_coords=1 is how at the end bbox is calculated. In new yolov4_mish and yolov4_csp models for x, y, w, h logistic regression is used:

We use Logistic (sigmoid) not only for x,y, but for x,y,w,h

x_bbox = sigmoid(x) y_bbox = ... w_bbox = sigmoid(w) sigmoid(w) 4 h_bbox = ...

In contrast, in older versions yolov4, yolov4 tiny here was linear regression. x_bbox = sigmoid(x) y_bbox = ... w_bbox = exp(w) h_bbox = ...

Read more about it here:

https://github.com/AlexeyAB/darknet/issues/6987#issuecomment-729218069

Hope I could help you. All the best.