Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does ScaledYOLOv4 use the same encoding of bounding box coordinates as YOLOv3 #90

Open
songyuc opened this issue Dec 11, 2020 · 5 comments

Comments

@songyuc
Copy link

songyuc commented Dec 11, 2020

Hi, guys,
I want to know whether ScaledYOLOv4 uses the same encoding of bounding box coordinates as YOLOv3, like,
image

Any answer or idea will be appreciated!

@WongKinYiu
Copy link
Owner

No, the encoding/decoding method is changed in yolov4.
yolov4-tiny used same encoding/decoding method as yolov4.
the encoding/decoding method is proposed by glenn, which solved the grid sensitivity problem.
glenn further replaced exponential function by sigmoid function to avoid nan problem in training process.
yolov4-csp and yolov4-large models use this new encoding/decoding method.

reference: AlexeyAB/darknet#3293 AlexeyAB/darknet#6987 (comment)

@songyuc
Copy link
Author

songyuc commented Dec 11, 2020

Hi, @WongKinYiu
Today I read the code of ScaledYOLOv4, and translate the decoding as these formulas,
image
I hope you can give me more correction advices.

@WongKinYiu
Copy link
Owner

yes, the formulas are totally same as AlexeyAB/darknet#6987 (comment)

@songyuc
Copy link
Author

songyuc commented Dec 16, 2020

@WongKinYiu , I am not sure about why there is a factor of 2. Is this factor of 2 would help mitigate the issue of sigmoid's gradiet vanishing?

@saikrishnadas
Copy link

saikrishnadas commented Dec 17, 2020

So, Is it possible to use the same yolo annotations(.txt) as YOLOv4 darknet in Scaled-Yolov4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants