What are the terms "Cascade" and "Classifier" in relation to computer vision?

Asked

Viewed 1,704 times

13

Always when I read something about Opencv and computer vision I come up with two terms that are Cascade and Classifier, these terms leave me very confused as to what they may be or mean.

Therefore, I would like the following doubts to be clarified:

  1. What is Cascade?
  2. What is Classifier?
  3. There are differences between Cascade and Classifier or both represent the same things?
  • Actually I think "Cascade Classifier" is a one-time thing, cascade classifier, so they’re not different but something like "cascade classifier", or is something that will cascade something, but I do not understand the context there to be able to explain something.

  • @Guilhermenascimento sometimes appear together but have moments that seem separate with different meanings, this in the context of Opencv and computer vision.

  • 1

    I found about both in some readings, really worth talking about them, the +1 is guaranteed, favorite to follow :)

  • I gave a -1 because I did not find mt useful the question. I will reserve myself on the reason, but I will accompany.

  • @Didn’t you find it useful because it would be about [tag:terminology]? This kind of subject seems to me well accepted in the community, even you asked a question about terminology, of course the reason may be different, I’m just trying to assume something to help the author improve the question.

  • @Guilhermenascimentop. No, I like terminology a lot. But I found the question somewhat meaningless. I’ve been reading about and it seemed to me that "Cascade classifier" is one thing, it would be, "Cascade classifier".. So, in my opinion, the question became meaningless in asking what one thing or the other is. For me it would be more interesting (my opinion) if the question was something like: "What does Cascade Classifier mean"...

  • @Well, yes, from what I read, as in my first comment it’s one thing only in that context, but Gato, Luiz and Ramaral maybe, are the only ones I know that dominate this subject, aside from the fact that Gato talked to me and said that actually this question will serve as a rebound to another, summing up he may already know the correlation of words within this context

  • @Ẓvý edited question

Show 3 more comments

1 answer

16


Classifiers

A classifier is a computational system that, having some input data that characterizes an example of something, classifies this something among some options.

The use of classifiers in Computer Vision is the most diverse. Famous illustrative examples are those machines that separate ripe tomatoes from green tomatoes or ripe green coffee beans, commonly based on color analysis. They are also used in the detection of intruders, from fires, face recognition (identity), nudity detection, recognize digits, and so on.

However, classifiers are also useful in many other tasks that do not involve image processing. They may, for example, be used to classify a stock as a purchase or sale based on its transaction history, a player as a novice or expert based on their game history, flowers in different categories based on their physical characteristics, different orthographic structures in a sentence written based on text only, different voice commands based on voice frequency variations, and so on.

This term is traditionally used in Artificial Intelligence, especially in the Machine learning. What happens is that Machine Learning is quite popular nowadays, especially in image processing, and it can create confusion that the term Classifier is unique to this area. To learn how a classifier works, take a look in this and also in this another question.

Cascade

Cascade (cascade in Portuguese) or Haar Cascade is the "nickname" of a famous image object search algorithm, whose official name is Algorithm by Viola-Jones (due to the names of the authors).

This algorithm uses masks (the calls Haar Features) to characterize an object by means of luminosity variations (mainly at edges). Masks capture these variations in different amplitudes and directions, and the values that characterize a certain type of object (an entire face or only one eye, for example) are learned with a machine learning algorithm called Adaboost to generate several classifiers, one for each Haar Feature. Once these classifiers are produced - that is, trained from example images (in the case of Cascade, with positive images - which have the object - and negative - which do not have the object), it finds the object in a new image running the various mini classifiers "cascading" (hence the algorithm nickname):

  1. The algorithm sets a window size, scales the Haar Features to that size, and scans the image being searched from that window. (It is much more efficient to scale Features than the image, because Features can already be pre-scaled).
  2. In each window, the algorithm selects and executes one of the mini classifiers (for a given Feature) based on the pixel values in the image under that window.
  3. If Feature returns false (that is, it is not the object from her point of view), the algorithm goes to the next window. If he ran out of windows, he concludes that he does not have the object searched in the image.
  4. If Feature returns true (i.e., it is the object from her point of view), the algorithm passes to the next classifier and repeats from step 2. If there are no more mini classifiers to run, the algorithm concludes by finding the object in that window.

The following image illustrates this process in Opencv face detector (Features are reproduced from the Opencv page).

inserir a descrição da imagem aqui

The use of Adaboost is important for performance, as this algorithm iteratively searches the image with windows of various sizes. That is why he is able to find objects with quite robustness on different scales (that is, with different sizes). An important point is that its accuracy in finding objects depends heavily the images used in the training. If images with the object are used in only one orientation in training, the algorithm will not be able to identify the object in other orientations (for example, an algorithm of banana detection trained with bananas in the horizontal will not recognize them in any orientation other than this).

Completion

Definitely the terms don’t mean the same thing. Classifiers are algorithms used to predict classes in input data. The Viola-Jones algorithm, or Haar Cascade, or just Cascade, is an object detection algorithm, which uses several classifiers.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.