I am looking to start learning openCV to perform a car detection program. Should I know data science and/or machine learning stuff before going for openCV?

If not, where can I start learning openCV with Python?


1 Answer 1


OpenCV has a module to detect faces, eyes etc. With pretrained models you may also be able to detect cars. https://www.pyimagesearch.com/2018/11/12/yolo-object-detection-with-opencv/

There are many good tutorials online. Just have a look.

So if you are happy with this, you don‘t need to know much about data science. However, if you want to go a step further and train your own models, you will need to look into e.g. Keras (with pretrained models). https://keras.rstudio.com/articles/applications.html

My view is that OpenCV is a cool tool and you can do a lot with it. However, off-the-shelf applications have their limitations (of course).

  • $\begingroup$ So let's say I didn't get the results I want from opencv, can I do better with sickit learn. Or should I go with neural networks as keras ? $\endgroup$ May 16, 2019 at 18:59
  • $\begingroup$ scikit learn may be one option, but in the moment Keras is really en vogue and it is relatively easy. It really depends on what you want to do. If you want to classify images with high flexibility, Keras is really good. Plus, you can use pretrained models, which give you a powerful tool. BUT: to work with Keras on "larger" problems, a GPU is required. Check out this link for a start: blog.keras.io/… $\endgroup$
    – Peter
    May 16, 2019 at 19:20
  • $\begingroup$ Good example for pretrained models: github.com/fchollet/deep-learning-with-python-notebooks/blob/… $\endgroup$
    – Peter
    May 16, 2019 at 19:21
  • $\begingroup$ Example how to predict classes in Keras using the generator function: stackoverflow.com/a/55991598/9524424 $\endgroup$
    – Peter
    May 16, 2019 at 19:22
  • $\begingroup$ BTW: pretrained models might already have a good predictive capability to detect cars (since cars are a common class). Check this: keras.io/applications $\endgroup$
    – Peter
    May 16, 2019 at 19:24

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