theAIGuysCode / yolov4-deepsort

Object tracking implemented with YOLOv4, DeepSort, and TensorFlow.
GNU General Public License v3.0
1.31k stars 745 forks source link

custom cfg file #149

Open ErenKaymakci opened 1 year ago

ErenKaymakci commented 1 year ago

I changed .cfg file for small objects like here: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection and when I run python save_model.py --model yolov4 , I got this error: File "/content/yolov4-deepsort/core/utils.py", line 63, in load_weights conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0]) ValueError: cannot reshape array of size 8192 into shape (24,1024,1,1)

I suggest updating the repo as we can add the cfg file path and the algorithm gets all the parameters there.

guillermoecn commented 1 year ago

Hi, did you find a solution?

mg-12345 commented 1 year ago

What is the input image size of your YOLOv4 network (from the .cfg file)?

If it's different than 416, you will need to specify that with the run command. Such as:

python save_model.py --model yolov4 --input_size 512