简体   繁体   中英

tensorflow object detection trained model not working

I trained my dataset for tensorflow object detection using both ssd and faster r-cnn model.There were 220 train and 30 test images in my dataset. I trained the model for 200k steps and got loss under 1.But when i tested my trained model on video it was detecting and labelling almost everything in the video. Can anyone tell me why is that happening? Thank you

The number of classes you are using is just one and you trained your model with images belonging to the same class and tested it for the same.

So the problem is the model is skewed(predicts the same for all images) No matter whatever image you test it on, you will get the same output.

Solution:

Train you model with an nearly equal number of negative images.

Ex:220 images containing the object to be identified(label them as 1) and another nearly 220 images not containing the object(label them as 0)

Use F1 score to check your accuracy because it will help you understand if the dataset is skewed or not.

Check this to learn about different kinds of accuracy measures. Take this course to learn more about CNNs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM