Detecting a single object

So i went through Lesson 1 an i have a very basic doubt,What if i want to train the network on only one category like just a dog and have something like a bounding box or heat map where that dog is.Also would training it on a single category would cause a problem?Wouldn’t the neural net always try to predict something and since i trained it only on one category what if i pass in the image of something that is not a dog?

To detect whether (and where) an image has a dog, you still have two classes: dog and not-dog (usually called “background”). The trick here is that you need a lot of not-dog images for the neural net to learn the difference between dog and not-dog, because there are a lot more things that are not dogs than are dogs.

I cannot possible give it all the images of not dog and train it like to an accuracy of like 95-100%?Also how do i have a bounding box like in tensorflow’s object detection API

I also want to do something like this. But we need to use a diferent neural net architecture such as SSD (single shot detection) or YOLO (you only look once) that is not available in the framework. I’m not sure on the best approach on how to integrate such a model into the FASTAI framework. Is there a recommendation on how to accomplish this, other than just using Pytorch directly? I’d love to maintain all the latest features available in the FASTAI framework.

1 Like

I have heard of YOLO but never tried it however i have tried tensorflow’s object detection api and for a single class prediction results weren’t accurate atleast for the dataset i was working upon.It detecting some non class category to that category(like it would detect any random image as the single class i was training upon)

I also tried TensorFlows object detection, there are a few pretrained models to choose from. One of them is SSD.

Jeremy tweeted that he is implementing SSD for the next course!

1 Like