Tianxiaomo / pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4
Apache License 2.0
4.47k stars 1.49k forks source link

any guess why I can't convert weight of yolo to pt extension? #474

Open kotran88 opened 2 years ago

kotran88 commented 2 years ago

I saw https://medium.com/analytics-vidhya/train-a-custom-yolov4-tiny-object-detector-using-google-colab-b58be08c9593 article and with my custom data, it infer very well !

now I'm trying to convert my weight file to pt file so that I can use it in raspberry pi.


from tool.darknet2pytorch import Darknet
print("gogo")
WEIGHTS = Darknet("C:\\Users\\pedro\\Downloads\\pytorch-YOLOv4-master\\yolov4-tiny-custom.cfg")
WEIGHTS.load_weights("C:\\Users\pedro\\Downloads\\pytorch-YOLOv4-master\\yolov4-tiny-custom_best.weights")

I execute above python file to get pt file but I got error convalution havn't activate linear convalution havn't activate linear why is it happened even if I infer quite well on colab?

Thank you !