0

I want my weight file to detect person, car, and my custom objects. I know the pretrained weight file for YOLOv4-tiny is trained for 80 objects which include person and car.

If I want my weight file to detect person, car, and my custom objects, am I suppose to train my weight file for person, car, and my custom objects from the start, or can I just train for my custom objects and it will detect all three of them. If I am able to just train for my custom objects and it will detect all three of them, how should I do it?

Also, if I train my weight file and done with training, can I extra train that weight file?

Thanks!

AbdelAziz AbdelLatef
  • 3,650
  • 6
  • 24
  • 52
xor
  • 79
  • 7

1 Answers1

2

Yes, you need to train it from start on the selected classes you need, this question may help you.

If you need to add extra train to the same classes you can do it, but make sure you put new and old images together, and have enough training steps.

AbdelAziz AbdelLatef
  • 3,650
  • 6
  • 24
  • 52
  • Thanks for answering the question AbdelAziz AbdelLatef! The "this question" link you posted says that it is possible to detect the reduce number of classes by modifying cfg file. Isn't that mean I can train just custom objects to pre trained file and just detect 3 of them by modifying cfg file? If this is true, how do I achieve that? – xor Oct 12 '20 at 13:38
  • @xor Not only changing cfg file, you need also to train your model with this new file with the dataset they provide, this will give you a new weight file that you can use to detect your 3 classes. – AbdelAziz AbdelLatef Oct 12 '20 at 14:07
  • Is that mean I have to train lots of person images, car images, and custom objects images? Since the training is taking too much time and labeling hundreds of images also takes too much time, I want to take full advantage of pre-trained weight file. I am also confused since your link says that we can detect limited objects that we want. – xor Oct 12 '20 at 14:19
  • @xor Unfortunately, you have to do this training again, there is no other way, for labelling, you can use their labeled dataset if it contains the classes you need out of their 80 classes. – AbdelAziz AbdelLatef Oct 12 '20 at 16:14
  • Thank you so much for the help? Do you know if I can get the labeled image data of the pretrained yolo weight file? – xor Oct 13 '20 at 13:05
  • @xor It is already in the answer of the question I gave you. – AbdelAziz AbdelLatef Oct 13 '20 at 17:36
  • have python opencv cv2.dnn.readNet("weights/yolov3-tiny.weights", "cfg/yolov3-tiny.cfg") is there a ready to swap files on the standard coco list with new yolov4-tiny? please share link if so or demo on python – kristoph Dec 08 '20 at 04:39