Open ybdesire opened 5 years ago
@SrikarNamburu no needed. Convert.py change from darknet to keras your model.
The architecture in yolov3.cfg is defined for 80 classes, right? Also, I have edited 'model_data/coco_classes.txt' to my dataset -- removed 80 classes and have put only my 15 classes.
yes, for training yo need to change that .cfg.
@robisen1 there should be no problem in angle of the image. detection will be done as long as you data is good.
@SrikarNamburu no needed. Convert.py change from darknet to keras your model.
The architecture in yolov3.cfg is defined for 80 classes, right? Also, I have edited 'model_data/coco_classes.txt' to my dataset -- removed 80 classes and have put only my 15 classes.
yes, for training yo need to change that .cfg.
@robisen1 there should be no problem in angle of the image. detection will be done as long as you data is good.
ok thank you I will attempt.
@SrikarNamburu no needed. Convert.py change from darknet to keras your model.
The architecture in yolov3.cfg is defined for 80 classes, right? Also, I have edited 'model_data/coco_classes.txt' to my dataset -- removed 80 classes and have put only my 15 classes.
yes, for training yo need to change that .cfg.
@robisen1 there should be no problem in angle of the image. detection will be done as long as you data is good.
Thanks for the suggestions. Now I am training the model, but the val_loss = nan why is this happening? And what's the optimal loss value to stop the training?
@fnando1995
Also after saving the model after training how to test it?
@SrikarNamburu Im afraid that not good sitution, because nan means the val_loss can not be presented, usually caused by divided by zero in the loss function, lowing the learning rate maybe helped. after training, you should use the new generated weight file .h5 to test just following the README, but dont forget the anchor I hope it may little help for you.
@aimxu @fnando1995 When training, my loss=21, what does 21 mean? What does it say?
Thank you
@SrikarNamburu It happen all the time
python yolo_video.py --image
, while testing you should type image path following the prompt
, and you can change the detect_img
function in yolo_video.py
to suit you application.Thank you so much For val_loss = nan you have suggested lowering the learning rate, in yolov3.cfg its by default 0.001 should I lower it even further to like 0.0001?
@SrikarNamburu yes, general speaking we try 1/10 of the learning rate. But the side effect of lower the learning rate is the process for converge is slow. So if you dataset is not so big, You can try several times!
@fnando1995 @aimxu I have reduced the learning rate to 0.0005 still no luck. I am using pre-trained coco weights. My train dataset size is 176 images with 15 classes. Only 2 classes are new i.e which are not in coco. 13 classes already there in coco so I just took 2 to 5 images for those 13 classes. Does the val_loss = nan have anything to do with this?
You may try 1 class, with the pretrain weight, you should easy to train even with few data, maybe
class.name
, anchor
or something?
good luck@SrikarNamburu no needed. Convert.py change from darknet to keras your model.
The architecture in yolov3.cfg is defined for 80 classes, right? Also, I have edited 'model_data/coco_classes.txt' to my dataset -- removed 80 classes and have put only my 15 classes.
yes, for training yo need to change that .cfg.
@robisen1 there should be no problem in angle of the image. detection will be done as long as you data is good.
I actually found it a huge issue. I experimented with multiple approaches but determined you need imagery that would match the angles the drone would fly. Unfortunately there are no good annotated datasets so I had to get a few 10's of thousands of images annotated. I then trained on the data and yolo worked very well.
Which code should I modify if I want to train my own dataset?