1
$\begingroup$

In this case I have a challenge of inspecting a recently mounted product, using computer vision, to detect the absence of any component that I have to check.

For this task, I tried the concept of detection of regions of interest, which in this case are the components I want to check. I moved to an approach using tensorflow's object detection API, which I would train a model to detect the components I wanted to check using annotated images. In this case, all images contained just the presence of the component.

The results were very good using validation images, but unfortunately produces a lot of false positives (cases that the component is not present but it still writes a box on its area), sometimes with 99%+ confidence (so discarding my chance to filter these cases) and, on other side, there's cases that it can't find at all a, for an human view, very clear component.

With these results, I tried to train the model with both positive and negative cases (presence/absence), hoping that it would learn the difference between them. Again, the false positives appeared, this time with a smaller frequency, but considering that my validation set is very small (about 10 images), in a global situation this error frequency can be very high, thus discarding the viability to use the model in production.

After several iterations of experiments, I'm starting to notice that the model is very unstable on its results to use in production. Is this approach the best way to solve this type of problem?

Unfortunately I don't have many examples to show the problem I'm facing at the moment, but just to illustrate my problem, here's two results of the approaches I listed:

enter image description here enter image description here

I already tried using all models supported by the api, which includes several types of faster_rcnn and ssd. The one I stick with, with the best trade of training time and results, is the faster_rcnn_resnet101 with COCO training as the pre-training.

$\endgroup$
  • $\begingroup$ Interesting problem, and I strongly believe your approach is correct, and it might be that the nature of the problem is giving a hard time to differentiate. Which components are the false positives? Also I may ask, how many training images you have? Certainly 10 in validation is limited. To my experience, I started seeing better results with 400+ training images. BTW, there is a very recent OD model by Google that you may want to check it out too: github.com/google/automl/tree/master/efficientdet, I have not tried it yet myself, happy to your feedback! $\endgroup$ – TwinPenguins Apr 23 at 21:56
  • $\begingroup$ @TwinPenguins Thanks a lot for interacting! And appreciated the reference! I will definitely do an experimentation with this model. About the problem, actually I am working on it for almost five months and tried a lot of things around the object detection world. I tried to resume it all on the post. And, talking briefly about the dataset, I concluded that with just 8 images and proper augmentation it can reach pretty good results (very similar to the images attached). Due to the business case, a small number of images to train AND processing is a requirement, so I have to minimize it... :( $\endgroup$ – denisb411 Apr 24 at 1:44
  • $\begingroup$ Pleasure. Fair enough, but still quite supervising to see it works good enough with only 8 images, my experience was different. Also noted that 'pretty good results' is quite subjective, sometimes improving last few % in recall is trickier or reducing all false positives. Give that model a shot, they claim to have much improvements over Yolo3, Faster RCNN (see here bit.ly/34ZNxmY). It is the only thing I can recommend for now. Write here once you have a progress. $\endgroup$ – TwinPenguins Apr 24 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.