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

Difference in results #7

Open
Compaile opened this issue Jul 29, 2021 · 5 comments
Open

Difference in results #7

Compaile opened this issue Jul 29, 2021 · 5 comments

Comments

@Compaile
Copy link

The result of this repository and the original darknet are slightly different (a bit worse detection some objects missing).
It works 90% but isn't quite as good.

I converted the weights file with the project and loaded it.
Its all pretty straight forward, also stable but the detection is a bit worse.

I also tried to do a fixed resize before the image but that doesnt do the trick.
Any ideas where the slight difference come from?

@pfeatherstone
Copy link
Contributor

What model are you using? yolov3, yolov4, ... ?

@pfeatherstone
Copy link
Contributor

So dlib's upsample layers use bilinear interpolation. In darknet, the upsample layers use "nearest" interpolation. So there are at least 3 slightly different computational layers, the upsampling layers. The darknet-trained models are optimized for "nearest" interpolation, so it's expected for performance to drop slightly.

@pfeatherstone
Copy link
Contributor

For yolov3 model, I think the upsampling is the only difference. For yolov4 models, i'm not sure, there could be other slight differences.

@pfeatherstone
Copy link
Contributor

Do you get exactly the same performance drop if you load the model using the weights visitor directly compared to first converting the weights to dlib format, then loading that? In theory, you should get exactly the same performance drop. Otherwise, the weight converter could have an issue.

@arrufat
Copy link
Member

arrufat commented Jul 30, 2021

I've never done a proper evaluation of the ported model. Visually, however, they seemed to work fine.
Anyway, for a few minutes now, the YOLO loss has been merged in dlib, so you can train your own YOLO detectors.
Maybe at some point, if I will try to add a nearest neighbors up-sampling layer...

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