AlexeyAB / darknet

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

Convert pytorch's .pth to darnet's .weights #3851

Open LifeIsSoSolong opened 5 years ago

LifeIsSoSolong commented 5 years ago

1.I have trained yolov3 to detect person(only one class) in pytorch using project: https://github.com/eriklindernoren/PyTorch-YOLOv3

2.The trained paraments is .pth format, and I convert it to .weights(In up project, load .pth and save as .weights), then I use it in this darknet project detecting person but result is always None.

  1. The .weights of up project's author can work normal in this darknet project.

it seems that my converted weights has some bug. Who can give me some advice , thanks~

AlexeyAB commented 5 years ago

Try to use this PyTorch implementation and (.pth -> weights -> .pth) coverter: https://github.com/ultralytics/yolov3#darknet-conversion

More about other recommended frameworks: https://github.com/AlexeyAB/darknet#yolo-v3-in-other-frameworks

LifeIsSoSolong commented 5 years ago

Try to use this PyTorch implementation and (.pth -> weights -> .pth) coverter: https://github.com/ultralytics/yolov3#darknet-conversion

More about other recommended frameworks: https://github.com/AlexeyAB/darknet#yolo-v3-in-other-frameworks

thanks, I have tried project ultralytics before I open this issue, but it didn't work. Whatever , thank you very much . I will try to find other methods~

varghesealex90 commented 5 years ago

I had the same issue, I solved it by cloning to the latest repo of Alexy's.

LifeIsSoSolong commented 5 years ago

I had the same issue, I solved it by cloning to the latest repo of Alexy's.

Thanks, your .pth file is trained from project ultralytics or project erik?

Sudhakar17 commented 5 years ago

Please clone the latest repo of ultralytics and alexey's darknet. It's working.