Anurag Gupta
Anurag Gupta

Reputation: 21

Creating YOLO Weights file for custom dataset

enter image description hereI have used tiny YOLO to create a custom model. 4 files were generated in the ckpt folder corresponding to my final checkpoint. The object detection is working correctly when i give the .cfg file and load number.

I have to use cv2.dnn.readnet() to load the model and cfg file to use in raspberrypi, but the readnet fuction takes only 2 arguments, the .weights file and the .cfg file. So how do i convert my model to a single weights file?enter image description here

I am using python 3.7 and opencv 4.

Upvotes: 1

Views: 9133

Answers (1)

B200011011
B200011011

Reputation: 4268

This is not an exact answer, but the repository you are using looks old. If you have the data you can retrain your custom model in yolo v3. This repository has all necessary information to train custom model including yolo v3 tiny, https://github.com/AlexeyAB/darknet.

This will generate a .weights every 1000 iterations in backup folder and last weights for resuming training. You can use these weights after sufficient iterations along with the .cfg file in cv2.dnn.readnet().

Upvotes: 2

Related Questions