๐—›๐—ฎ๐—ฎ๐—ฟ ๐—–๐—ฎ๐˜€๐—ฐ๐—ฎ๐—ฑ๐—ฒ๐˜€๐Ÿ‘จโ€๐Ÿ’ป

- Arguably OpenCVโ€™s ( Open source Computer Vision ) most popular object detection algorithm.

-What is it?
-Algorithm
-Limitation
-Applications

A BIG Thread ๐Ÿงต๐Ÿ‘‡
We are living in an era, where object detection is used everywhere.

From security cameras to our mobile phones, it is used everywhere.

Haar classifiers, classifiers were used in the ๐—ณ๐—ถ๐—ฟ๐˜€๐˜ ๐—ฟ๐—ฒ๐—ฎ๐—น-๐˜๐—ถ๐—บ๐—ฒ ๐—ณ๐—ฎ๐—ฐ๐—ฒ ๐—ฑ๐—ฒ๐˜๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ.
๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—›๐—ฎ๐—ฎ๐—ฟ ๐—–๐—ฎ๐˜€๐—ฐ๐—ฎ๐—ฑ๐—ฒ โ”

Haar Cascade classifiers are an effective way for object detection.

This method was proposed by Paul Viola and Michael Jones in their paper Rapid Object Detection using a Boosted Cascade of Simple Features.
Haar Cascade is a machine learning-based approach where a lot of positive and negative images are used to train the classifier.

๐—ฃ๐—ผ๐˜€๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ถ๐—บ๐—ฎ๐—ด๐—ฒ๐˜€- These images contain the images which we want our classifier to identify

๐—ก๐—ฒ๐—ด๐—ฎ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ถ๐—บ๐—ฎ๐—ด๐—ฒ๐˜€- Everything else
๐—”๐—น๐—ด๐—ผ๐—ฟ๐—ถ๐˜๐—ต๐—บ ๐Ÿ“ฑ

The algorithm can be explained in four stages-

1โƒฃCalculating Haar Features
2โƒฃCreating Integral Images
3โƒฃUsing Adaboost
4โƒฃImplementing Cascading Classifiers
1โƒฃ ๐—–๐—ฎ๐—น๐—ฐ๐˜‚๐—น๐—ฎ๐˜๐—ถ๐—ป๐—ด ๐—›๐—ฎ๐—ฎ๐—ฟ ๐—™๐—ฒ๐—ฎ๐˜๐˜‚๐—ฟ๐—ฒ๐˜€

In easy language,

It is basically the calculation of the features we want to extract from an image.

For example, in face recognition, it can be the nose, eyes, etc.
2โƒฃ ๐—–๐—ฟ๐—ฒ๐—ฎ๐˜๐—ถ๐—ป๐—ด ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ฎ๐—น ๐—œ๐—บ๐—ฎ๐—ด๐—ฒ๐˜€

So to speed up those calculations, we use integral images.

Instead of computing every pixel, it creates sub-rectangles and creates array references for each of those sub-rectangles
3โƒฃ ๐—”๐—ฑ๐—ฎ๐—ฏ๐—ผ๐—ผ๐˜€๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด

Adaboost essentially chooses the best features and trains the classifiers to use them.

It uses a combination of โ€œweak classifiersโ€ to create a โ€œstrong classifierโ€ that the algorithm can use to detect objects.
4โƒฃ ๐—œ๐—บ๐—ฝ๐—น๐—ฒ๐—บ๐—ฒ๐—ป๐˜๐—ถ๐—ป๐—ด ๐—–๐—ฎ๐˜€๐—ฐ๐—ฎ๐—ฑ๐—ถ๐—ป๐—ด ๐—–๐—น๐—ฎ๐˜€๐˜€๐—ถ๐—ณ๐—ถ๐—ฒ๐—ฟ๐˜€

The cascade classifier is made up of a series of stages, where each stage is a collection of weak learners.

Weak learners are trained using boosting, which allows for a highly accurate classifier.
๐—Ÿ๐—ถ๐—บ๐—ถ๐˜๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐Ÿšซ

Haar cascades are notoriously prone to false positives

The Viola-Jones algorithm can easily report a face in an image when no face is present.
๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐—ผ๐—ณ ๐—›๐—ฎ๐—ฎ๐—ฟ ๐—–๐—ฎ๐˜€๐—ฐ๐—ฎ๐—ฑ๐—ฒ๐˜€

-Autonomous Vehicles
-Facial Recognition
-Image Search
-Agriculture
-Industries
-Security
Here is my project based on Haar Cascade-

Face-Lock using OpenCV ๐Ÿ”’

๐Ÿ”— GitHub Link

github.com/souravjain540/โ€ฆ
Hey,

Thanks for coming to the end of the thread โค๏ธ

It was one of the longest threads by me!!

If you like my content then
- Retweet the first tweetโœ…
- Follow @sauain ๐Ÿ’ช

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with Saurav Jain

Saurav Jain Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Sauain

13 Jul
Learn Python while playing games ๐ŸŽฏ

Five Ideas to make a game using Python๐Ÿ

๐Ÿงต
1โƒฃ Dice Roller

Have no dice for your ludo game?

No worries you can create one using Python in just a few minutes.

Just use a random library and make one for yourself๐Ÿ˜‰
2โƒฃ Hangman

You can make this game in Python too ;)

The word to guess is represented by a row of dashes.

If the player guesses a letter that exists in the word, the script writes it in all its correct positions. The player has 10 turns to guess the word.
Read 7 tweets
12 Jul
Seven Python Math Library Functions ๐Ÿงฎ ๐Ÿ

A beginner should know about these important functions, it will make your work easy!!

Thread ๐Ÿ˜๐Ÿงต Image
1โƒฃ ๐˜€๐—พ๐—ฟ๐˜

In python, to find the square root of any number ( 3 is the square root of 9 ) you don't have to use power operator.

There is a special function " sqrt " which square roots the number given it as a parameter :)

๐Ÿ”— Code Image
2โƒฃ ๐—ฝ๐—ผ๐˜„

In the above tweet, we have learned how to square root a given number.

A square root is actually a number raised to a power of 0.5

But what if we want 3 or something as power.

Here we use " pow(x,y) " it returns x raised to power y.

๐Ÿ”— Code Image
Read 9 tweets
10 Jul
Five Python Libraries for Machine Learning ๐Ÿ

Thread ๐Ÿงต๐Ÿ‘‡
1โƒฃ ๐—ง๐—ฒ๐—ป๐˜€๐—ผ๐—ฟ๐—™๐—น๐—ผ๐˜„

It is an open-source library created by the Google Brain team.

It is very popular for high-performance numerical computation.

It has an ecosystem of tools, libraries, and community resources for building and deploying powerful ML applications.
2โƒฃ ๐—ž๐—ฒ๐—ฟ๐—ฎ๐˜€

Keras is a deep learning API written in Python, running on top of the machine learning platform TensorFlow.

It is a high-level neural networks API capable of running on top of TensorFlow, CNTK, or Theano.

It can run seamlessly on both CPU and GPU.
Read 7 tweets
9 Jul
How to make a simple Rock, Paper, Scissor game using Python? โœŠ๐ŸคšโœŒ๏ธ

Here in this thread, I will try to make the process easier for you :)

PS - Github link for the project in the last tweet of the thread.

Thread ๐Ÿงต๐Ÿ‘‡ Image
๐—œ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐—ถ๐—ป๐—ด ๐—น๐—ถ๐—ฏ๐—ฟ๐—ฎ๐—ฟ๐—ถ๐—ฒ๐˜€

As usual, in every project, the first step is to upload the required libraries for our project

So here we are going to import the random library of python.

Random is widely used to select randomly a choice from all the choices.

๐Ÿ”—Code Image
๐—ง๐—ฎ๐—ธ๐—ถ๐—ป๐—ด ๐—ถ๐—ป๐—ฝ๐˜‚๐˜ ๐—ณ๐—ฟ๐—ผ๐—บ ๐˜‚๐˜€๐—ฒ๐—ฟ

So the next step is to taking input from the user.

The possible choices here are rock, paper, scissors.

We will use the input function to do so.

๐Ÿ”—Code Image
Read 9 tweets
6 Jul
๐—œ๐—ป๐˜๐—ฟ๐—ผ ๐˜๐—ผ ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด ๐Ÿ’ก

Let me introduce you to the absolute starting of Machine Learning

-What is ML?
-Its types
-Some real-world applications
๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐— ๐—Ÿ? ๐Ÿ’ป

I have said this earlier too that I have done various ML courses but one of the best definition is from Andrew Ng course-

"Machine learning is the science of getting computers to act without being explicitly programmed."
๐—ง๐˜†๐—ฝ๐—ฒ๐˜€ ๐—ผ๐—ณ ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด

-Supervised
-Unsupervised
-Reinforcement
-Semi-supervised
Read 9 tweets
5 Jul
5 Free Courses/Sites for Beginners to learn Python ๐Ÿ’ป

๐Ÿงต๐Ÿ‘‡
1โƒฃ ๐—น๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ฝ๐˜†๐˜๐—ต๐—ผ๐—ป .๐—ผ๐—ฟ๐—ด

The best way to learn python is to read docs and do the hands-on.

And this site is perfect to get started with python.

This site is supported by Datacamp.

๐Ÿ”—learnpython.org Image
2โƒฃ ๐—œ๐—ป๐—ณ๐˜†๐—ง๐—ค

This learning platform is created by one of India's topmost tech company Infosys.

If you are planning to learn python in deep, you should start with InfyTQ courses for python.

You should start with Foundation courses.

๐Ÿ”—infytq.onwingspan.com/en/page/home Image
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(