Found 39 repositories(showing 30)
mrnugget
Learn how to train your own OpenCV Haar classifier
amannirala13
🖼️ This is a HAAR Cascade Classifier training GUI application for Linux. This application make it really easy to train classifiers for object detection and tracking using opencv by providing a Graphical user interface to set parameters and perform necessary steps.
gale31
ObjectDetector uses OpenCV Haar cascade classifiers to detect different objects in images and videos with Python. For now, this repository includes my trained haar cascade classifier for detecting cars, the default haar cascade classifier for human faces (haarcascade_frontalface_default), a classifier for bananas from CodingRobin and a classifier for wallclocks which are used and tested in programs, detecting the objects from image/video, comparison between different human body parts classifiers and some other programs, which (will) help training the classifiers (for example, a program downloading the "cat box" synset images from ImageNet).
Facial-Expression-Detection . Facial Expression or Facial Emotion Detector can be used to know whether a person is sad, happy, angry and so on only through his/her face. This Repository can be used to carry out such a task. It uses your WebCamera and then identifies your expression in Real Time. Yeah in real-time! PLAN This is a three step process. In the first, we load the XML file for detecting the presence of faces and then we retrain our network with our image on five diffrent categories. DEPENDENCIES Hit the following in CMD/Terminal if you don't have already them installed: pip install tensorflow pip install opencv-python That's it for now. So let's take a brief look at each step. STEP 1 - Implementation of OpenCV HAAR CASCADES I'm using the "Frontal Face Alt" Classifier for detecting the presence of Face in the WebCam. This file is included with this repository. You can find the other classifiers here. Next, we have the task to load this file, which can be found in the label.py program. E.g.: # We load the xml file classifier = cv2.CascadeClassifier('haarcascade_frontalface_alt.xml') Now everything can be set with the emoji.py Program. So let's move to the next Step. STEP 2 - ReTraining the Network - Tensorflow Image Classifier We are going to create an Image classifier that identifies whether a person is sad, happy and so on and then show this text on the OpenCV Window. This step will consist of several sub steps: We need to first create a directory named images. In this directory, create five or six sub directories with names like Happy, Sad, Angry, Calm and Neutral. You can add more than this. Now fill these directories with respective images by downloading them from the Internet. E.g., In "Happy" directory, fill only those images of person who are happy. Now run the "train.py" program as suggested in the video Once you have only cleaned images, you are ready to retrain the network. For this purpose I'm using Mobilenet Model which is quite fast and accurate. To run the training, hit the got to the parent folder and open CMD/Terminal here and hit the following That's it for this Step. STEP 3 - Importing the ReTrained Model and Setting Everything Up Finally, I've put everything under the "train.py" file from where you can get everything. Now run the "emoji.py" program by typing the following in CMD/Terminal: python label.py It'll open a new window of OpenCV and then identifies your Facial Expression. We are done now! PLEASE DO STAR THIS REPO IF YOU FOUND SOMETHING INTERESTING. <3
sonusuman202
The steps of the method are as follows. In the first phase, the method takes the input image and it checks for face region in the image. If the face is detected, then it applies image processing techniques to extract features and provides it to next step for training the neural network. Facial features extraction is a process of locating specific regions, point, landmarks or curves in 2D or 3D image. This is actually done with the help of OpenCV library which consists haar cascade classifier and pre-trained facial landmark predictor, haar features helps to identify the features such as lips, eyes, eyebrows, nose etc. CNN architectures are used for facial expression recognition, the input images considered are of size 48x48 pixels. Architectures are composed of convolution layers, pooling layers, and fully connected layers. After each convolutional layer and fully connected layer (except the output layer), the activation function is applied. The output layer consists of 7 neurons corresponding to 7 emotional labels: angry, disgust, fear, happy, sad, surprise and neutral. We have used two different datasets for different stages. This model is first fitted to a training set which is made from collecting various examples that are used to match the limitations of the model. The fitted model will normally use to predict the responses of the second dataset i.e., validation dataset observations. The validation dataset offers an assessment of a model that is fit for the training dataset. For regularization we may use early stopping of validation of datasets. This dataset comprises 35,887 face crops with 28,821 training and 7066 validation photos. Images are resolutions of 48x48 pixels, and grayscale. This dataset 's human accuracy was about 70%.
A Deep Learning model which uses the Convolutional Neural Network algorithm to detect whether the driver in a vehicle is drowsy or not,performed data augmentation on the training set and trained the model using CNN under different lightning conditions and used openCv along with Haar Cascade Classifier to detect the movements of the eye lids.
wincle626
No description available
fythatthepce
OpenCV-haar-classifier-training for easy to use by Feez ce KMITL
SaiBhaskar009
Built a Facial Recognition system using the Opencv Libraries of python for the identification of faces for registering attendance. Applied Haar Cascade Classifier for classification of faces after training and recognizing the face. Built a Python-based GUI Application Interface for the attendance system for making registrations of users.
aswinapk
Object Detection using Haar feature-based cascade classifiers is an effective object detection method proposed by Paul Viola and Michael Jones in their paper, "Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001. It is a machine learning based approach where a cascade function is trained from a lot of positive and negative images. It is then used to detect objects in other images. Here we will work with face detection. Initially, the algorithm needs a lot of positive images (images of faces) and negative images (images without faces) to train the classifier. Then we need to extract features from it. For this, haar features shown in below image are used. They are just like our convolutional kernel. Each feature is a single value obtained by subtracting sum of pixels under white rectangle from sum of pixels under black rectangle. haar_features.jpg image Now all possible sizes and locations of each kernel is used to calculate plenty of features. (Just imagine how much computation it needs? Even a 24x24 window results over 160000 features). For each feature calculation, we need to find sum of pixels under white and black rectangles. To solve this, they introduced the integral images. It simplifies calculation of sum of pixels, how large may be the number of pixels, to an operation involving just four pixels. Nice, isn't it? It makes things super-fast. But among all these features we calculated, most of them are irrelevant. For example, consider the image below. Top row shows two good features. The first feature selected seems to focus on the property that the region of the eyes is often darker than the region of the nose and cheeks. The second feature selected relies on the property that the eyes are darker than the bridge of the nose. But the same windows applying on cheeks or any other place is irrelevant. So how do we select the best features out of 160000+ features? It is achieved by Adaboost. haar.png image For this, we apply each and every feature on all the training images. For each feature, it finds the best threshold which will classify the faces to positive and negative. But obviously, there will be errors or misclassifications. We select the features with minimum error rate, which means they are the features that best classifies the face and non-face images. (The process is not as simple as this. Each image is given an equal weight in the beginning. After each classification, weights of misclassified images are increased. Then again same process is done. New error rates are calculated. Also new weights. The process is continued until required accuracy or error rate is achieved or required number of features are found). Final classifier is a weighted sum of these weak classifiers. It is called weak because it alone can't classify the image, but together with others forms a strong classifier. The paper says even 200 features provide detection with 95% accuracy. Their final setup had around 6000 features. (Imagine a reduction from 160000+ features to 6000 features. That is a big gain). So now you take an image. Take each 24x24 window. Apply 6000 features to it. Check if it is face or not. Wow.. Wow.. Isn't it a little inefficient and time consuming? Yes, it is. Authors have a good solution for that. In an image, most of the image region is non-face region. So it is a better idea to have a simple method to check if a window is not a face region. If it is not, discard it in a single shot. Don't process it again. Instead focus on region where there can be a face. This way, we can find more time to check a possible face region. For this they introduced the concept of Cascade of Classifiers. Instead of applying all the 6000 features on a window, group the features into different stages of classifiers and apply one-by-one. (Normally first few stages will contain very less number of features). If a window fails the first stage, discard it. We don't consider remaining features on it. If it passes, apply the second stage of features and continue the process. The window which passes all stages is a face region. How is the plan !!! Authors' detector had 6000+ features with 38 stages with 1, 10, 25, 25 and 50 features in first five stages. (Two features in the above image is actually obtained as the best two features from Adaboost). According to authors, on an average, 10 features out of 6000+ are evaluated per sub-window. So this is a simple intuitive explanation of how Viola-Jones face detection works. Read paper for more details or check out the references in Additional Resources section. Haar-cascade Detection in OpenCV OpenCV comes with a trainer as well as detector. If you want to train your own classifier for any object like car, planes etc. you can use OpenCV to create one. Its full details are given here: Cascade Classifier Training. Here we will deal with detection. OpenCV already contains many pre-trained classifiers for face, eyes, smile etc. Those XML files are stored in opencv/data/haarcascades/ folder. Let's create face and eye detector with OpenCV.
vgpprasad91
No description available
No description available
bluerythem
No description available
train your own haarclassifier
No description available
rainarit
No description available
ranickpatra
No description available
No description available
ouahuahuahuah
duyhenryer
training with durian
authentic4269
Repository to synchronize access to OpenCV Haar classifier training with lightbulb images
animeshsahu80
Using Haar Cascades Classifier to detect face and training the OpenCV Recognizer to identify images
lightwolfz
use trainer file from opencv-haar-classifier-training-master and fill up image by myself
sharunas11
copy of https://github.com/spmallick/opencv-haar-classifier-training with small changes in code and additional datasets
cembit
This project demonstrates how to train a Haar Cascade classifier using OpenCV. It covers creating positive and negative sample files, training the classifier, and generating a model file (cascade.xml) for object recognition, aiming to teach the fundamentals of Haar Cascade training.
An OpenCV Haar/LBP Cascade Classifier to detect mugs, including dataset preparation, annotation, and training. Most preprocessing steps are automated using precascade.py.
vramachand
Real-time object detection using Haar cascade classifiers with OpenCV. Includes training, testing, and deployment scripts for Raspberry Pi integration.
salonigoyal95
Developed real-time face recognition system using OpenCV. Phases: face detection, training the recognizer, and face recognition. Utilized Haar Cascade classifier for detection, trained OpenCV Recognizer with image dataset. Achieved accurate, real-time face recognition for diverse applications.
vignesh3399
A complete Face Recognition System built using Python and OpenCV, which supports face dataset creation, training, and real-time face recognition with names. The project uses the LBPH (Local Binary Patterns Histograms) algorithm for face recognition and Haar Cascade Classifier for face detection.
kashifghadeeri
Face detection using Haar cascades is a machine learning-based approach that involves training a cascade function with a set of input data. Many pre-trained classifiers for face, eyes, smiles, and other features are already included in OpenCV. We'll be using the face classifier today. You can also experiment with different classifiers.