Does anyone know where can I download a trained object detector? One that I can use to find objects in my data.
Check out the pytorch SSD GitHub:
There’s links to the modelweights in the readme, but for example:
Already tried it, unfortunately, it didn’t detect any of the objects (on my data). I actually don’t need a complicated one that also does recognition, just one that detects the object.
If the objects you want to detect/classify/recognize are different from what has been seen during the training of the pre-trained network, then you will most probably need to to adapt the model to your dataset. You can, for exmaple, only replace the last layer with a new one and train it on a smaller portion of your dataset.
What kind of objects are you looking to detect? SSD was trained on VOC0712. It should give reasonable results for objects that are relatively related, but for a completely different domain (i.e., medical image data, etc) then it will not work so well. In case your objects are from a different domain, you can always fine-tune the weights on smaller amount of data, or try some domain adaption methods (for example DANN) which do not require labels in your new desired image domain.
As I mentioned before I’m not looking to do any kind of recognition, only detection. My domain is different and I’m not interested in doing finetuning on my new task, just use a model that was trained to find objects, for example by learning the edges or something like that. Think about the traditional image processing methods that exist for that…I’m looking for that same thing but one that was trained using neural networks.
Faster R-CNN, for example, has a region proposal network, which you might be able to use. However, as far as I know, most region of interest (ROI) or region proposal networks (RPN) are still biased towards detecting objects which are close to the task (and hence classification) they were trained on. You could also use a standard object detection model, like Yolo, and reduce the threshold of the classification to be low enough to propose object location without needing a high confidence. You can then simply discard the proposed classification and only keep the bounding box localization.
Indeed. In order to train a supervised detector using neural networks you must have labeled bounding boxes on objects. Most detectors have at least weak supervision (which would be the class instead if the bounding box). So by definition, a pretrained detector was trained to detect something. So, in short - I don’t believe you will have much success taking pretrained models off the shelf (without any additional fine tuning or domain adaption) for use in a completely different domain. This is where the data driven NN and classical approaches diverge… Learn from the data, not from human generated heuristics.
As @Steve_Cruz mentioned above you can lower the confidence threshold of yolo, and in my experience that leads to too many false positives to be useful. But combining with some heuristics and some classical vision algorithms (e.g., tracking if there’s video) can give a reasonable result.
YOLO works pretty well for me, thank you both