I am familiar only with basic AI/NN concepts but never worked with any libraries/tools as tensor flow. Currently, I have a task for which AI might be ideal: detection of a certain image artifact in a picture (lets say I want to detect a black circular spot of a variable size). Because the spot can be very small or very large, I guess the NN would have to somehow process the whole picture and then proceed in smaller regions? Anyway, for such a task, do I need to learn more about machine learning or there are already tools that I could simply train (e.g. providing "clear" and "stained" image samples in their training sets) without worrying about internal details?


For detecting something like a circle, or other geometric shapes, modern machine learning may be a bit overkill.

You should look at Haar Cascades, which you can find implemented in OpenCV. These are the reason cameras have been able to detect faces since the early naughts; They are efficient and easy to train; They are trained by providing positive and negative examples. They also scale better than something like a convolutional neural network; The implementation in OpenCV is made specifically to be able to detect objects of different sizes.

Here is OpenCVs tutorial to get started.

This, of course, assumes that the artifact is of a known geometric shape. If not, you'll probably have to look at convolutional neural networks and anomaly detecting autoencoders.

Object detection with neural networks is generally done with RCNNs; These break up the image into regions using various methods and do object detection on these regions. The most popular algorithm in this family is probably YOLO, which learns how to break up the image. Many other approaches exist.

  • $\begingroup$ Thank you! I will certainly look into Haar Cascades and YOLO, as you advised. In general, do I need to study some theory or these can be used directly (configured and fed data)? $\endgroup$
    – John V
    Nov 18 '21 at 10:59
  • $\begingroup$ @JohnV Both have open implementations; So, you can find tutorials online on how to train Cascade classifiers and YOLO using OpenCV and Yolov5, respectively; Follow the links in my answer. Both contain tutorials. $\endgroup$
    – Avatrin
    Nov 18 '21 at 11:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.