Open bittergourd1224 opened 3 years ago
I have the same problem. @WongKinYiu The linked code only support .weights files and not .pt?
you could convert .pt to .weights first. https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-csp/models/models.py#L647
I get problems when converting the tiny model to .weights, related to https://github.com/WongKinYiu/ScaledYOLOv4/issues/165.
@WongKinYiu Is there any way of training yolov4-tiny in python and convert to .weights?
currently yolov4-tiny, group convolution, depthwise convolution, ... are not compatible between pytorch and darknet.
I tried to run models/export.py to covert the model to torchscript. The command I used is:
python3 export.py --weights ../runs/exp3_yolov4-csp/weights/best.pt --img-size 640 640 --batch-size 1
An error occured:
It seams like the model isn't loaded in the right format. Maybe there's something wrong with the code?