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

2 different yolov4-tiny configs #165

Open
FrancoisThibeau opened this issue Feb 5, 2021 · 6 comments
Open

2 different yolov4-tiny configs #165

FrancoisThibeau opened this issue Feb 5, 2021 · 6 comments

Comments

@FrancoisThibeau
Copy link

Hi!
I am currently going back and forth between this repository and your other repository PyTorch_YOLOv4.
I am a bit confused as to how your tiny configs came about. I saw that the config in this repository is the same one as the one in the original Darknet repository. The fields for group_id and groups are not implemented in this repository, nor in the PyTorch_YOLOv4 repository.
So basically my questions are:

  1. How can I use the yolov4-tiny config based on the Scaled YOLOv4 paper with Pytorch in PyTorch_YOLOv4 or in this one ScaledYOLOv4?
  2. Do you have a literature reference on what your yolov4-tiny config in PyTorch_YOLOv4 is based on? I couldn't find a source so far.
  3. What's the difference between the 2 yolov4-tiny configs in your 2 repositories?

Thanks by the way for your great repository! Helped me out a lot so far!

@FrancoisThibeau
Copy link
Author

I went through the implementations of models.py and layers.py again.
I think the only difference between the 2 is that in your PyTorch_YOLOv4 repository, you used the a separate module named [route_lhalf] instead of extending [route] with groups and group ids. If I understood your implementation in layers.py and models.py correctly, you are basically implementing what [route] group and group_id is supposed to achieve, namely tensor splitting (by groups=2) an routing.
Is that correct?

@WongKinYiu
Copy link
Owner

yes, due to original implementation of [route] group and group_id will get differentiated input is unreachable error in pytorch 1.6 or 1.7, I implemented [route_lhalf] instead. However, it caused weights incompatible between darknet and pytorch version.

@FrancoisThibeau
Copy link
Author

Thanks your your answer!
This means both models are the same architecture and just different way of implementation?

@philipp-schmidt
Copy link

@WongKinYiu Hello WongKinYiu, I am using your repo to load darknet weights and export them into ".wts" format so I can parse and load them into TensorRT.

Unfortunately I can not load my darknet networks because group and group_id are not supported, like you say in the posts above.
Is there a way to load the network? Changing the [route] layer to [route_lhalf] works but the weight file seems to be incorrect as you say

However, it caused weights incompatible between darknet and pytorch version.

Can you help? I don't need execution or training in pytorch - I only want to load the network to export the correct weights into a new format, similar to this: https://github.com/tjuskyzhang/Scaled-YOLOv4-TensorRT/blob/master/yolov4-csp-tensorrt/gen_wts.py

@philipp-schmidt
Copy link

Similar issue: tjuskyzhang/Scaled-YOLOv4-TensorRT#5

@GreenTeaHua
Copy link

pytorch 1.9 is ok?

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

4 participants