I am doing a project for recognizing expressions.my plan is to use LBP and SVM.For Implementing I choose Opencv and Python.I know that there is a inbuilt function createLBPHFaceRecognizer in opencv for LBP calculations.Which training method is used in createLBPHFaceRecognizer.train, is it SVM or K nearest or anything else?
I worked on a similar problem and if I was you, I would first detect face landmarks (best is DLib: http://dlib.net/webcam_face_pose_ex.cpp.html but in C++) then classify face points to get expression. They made something great in JavaScript (face landmarks, expressions classification - https://github.com/auduno/clmtrackr) but it is not pretty robust in detecting face landmarks.
Related
As an example I have two pictures with a particular type of clothing of a certain brand.
I can download a lot of different images of this same piece, and color, of clothing
I want to create a model which can recognize the item based on a picture.
I tried to do it using this example:
https://www.tensorflow.org/tutorials/keras/classification.
This can recognize the type of clothing (eg shirt or shoe or trousers, etc) But not a specific item and color.
My goal is to have a model that can tell me that the person on my first picture is wearing the item of my second picture.
As mentioned I can upload a few variations of this same item to train my model, if that would be the best approach.
I also tried to use https://pillow.readthedocs.io
This can do something with color recognition but does not solve my initial goal.
i don't think that CNN can help you in your problemes, take a look at the SIFT Technique see this for more détails.it is used for image matching and i think it's better in your cas. if your not looking to get in to much detailes the opencv is a python (and c++ i think) library that has image matching function that are easy to use more détails .
As mentionned by #nadji mansouri, I would use SIFT technique as it suits your need. But I want just to correct something, CNN is also a thing in this case. This being said, I wouldn't tackle the problem as a classification problem, but rather using Distance Metric Learning, i.e, training a model to generate embeddings that are similar in the space when the inputs are similar, and distant otherwise. But to do this you need a large representative dataset.
In short, I suggest starting with SIFT, using OpenCV, or open source implementations on GitHub, playing around with the parameters and see what fits your case best, and then see if it's really necessary to switch to a neural network, and in this case tackling the problem as a metric learning task, maybe with something like siamese networks.
Some definitions:
Metric learning is an approach based directly on a distance metric that aims to establish similarity or dissimilarity between data (images in your case). Deep Metric Learning on the other hand uses Neural Networks to automatically learn discriminative features from the data and then compute the metric. source.
The Scale-Invariant Feature Transform (SIFT) is a method used in computer vision to detect and describe local features in images. The algorithm is invariant to image scale and rotation, and robust to changes in illumination and affine distortion. SIFT features are represented by local image gradients, which are calculated at various scales and orientations, and are used to identify keypoints in an image. These keypoints and their associated descriptor vectors can then be used for tasks such as image matching, object recognition, and structure from motion. source, with modification.
Goodnight,
I have a body thermo image and I need to do a segmentation based on a body map.
I am attaching the images.
[body] (https://storage.googleapis.com/kaggle-forum-message-attachments/536018/13283/body.jpeg)
[map] (https://storage.googleapis.com/kaggle-forum-message-attachments/536018/13284/map.png)
Anyone have any clue and can help-me?
I have tried to overlay the images but, how they are not perfect fit it not worked.
I expected to have a series of images, one for each region.
If you want to use deep learning technique, its Generative adversarial network (GAN) based method. you can search online, its all over the place. Search keyword: deep fake, GAN
The traditional technique is to use shiftmap based method, e.g object rearrangement using shiftmap technique. opencv has simple for impainting/retargeting implementation you can convert this to deformable model rearrangement case
the detailed work can be found at.
http://www.vision.huji.ac.il/shiftmap/inpainting/
I am running the code provided by Adrian in this link https://www.pyimagesearch.com/2018/06/25/raspberry-pi-face-recognition/#comment-473194.
I have a dataset containing 6 faces of 3 people each. I ran this code and it works fine when detecting my face and my friend’s face. It faces trouble while detecting the third person’s face. It detects it as my face. Does this algorithm work only for binary classification? Will the accuracy improve if I improve if I make the dataset bigger?
If you increase your database. It will increase the accuracy for sure. Also opencv is not a good solution if you want to detect a face in real time for the sake of accuracy.Cause, when an object is moving, then the cascade function shows some kind of miss classification.
However you can use dlib function to make your processing robust. Or you can use yolo for face recognition.
I am currently working on a project for identification of mood/emotions of a person .
As the first step we are working on a image recognition , detection and tracking python code.
I went through the various different approach towards this problem and found out.
1)Haar cascade method (fast but no scope for recognition and reading expressions ).
2)Neural networks(Great at image recognition ie for details such as smile/ anger..... ).
I am confused with neural networks , ie the approach.
We can first use haar cascade to detect the faces with ease(really fast) then use either canny edge detection or Cropping to crop out the part of the face.
After that is done i have no clue on how to proceed .
This is my idea of it.
continue using haar cascade method to detect the features of the face like eyes, nose ,cheek ,lips....
then find out the distance between them to find out ratios which we can further use to form a neural network .
Different internal layers would be used to detect different features.
We can use differential method to optimize the cost by altering the weights of the synapses .
How good is the approach and is there a better way to do it .
Like say we can use canny edge to detect the edges and then make a new matrix just out of the edges and then use this to train the data.
I dont know , i am really confused.
Anyways thanks in advance for all answers
Image processing libraries such as scikit-image or OpenCV are a good place to start. For example, here's an example of canny edge detection in OpenCV.
Regarding neural networks, as lejlot pointed out, you've got to ask yourself how much you want to build from scratch.
An example for building your own neural network based on some parameters (which you'd have to define for your facial features), I suggest you read through A Neural Network in 11 lines of Python which illustrates some of problems you might face (especially part 2 where it's about image processing too).
What you seem to need are Convolutional Neurl Networks (check this http://cs231n.github.io/convolutional-networks/ to learn about them).
Convolutional Neural Networks (CNN for short) are a kind of neural nets that learn to extract visual features from an image and how to relate those features to recognize what's on the image, so you don't need to detect all the features, just give a CNN a bunch of labeled face pictures and it will learn to identificate the mood of the eprson.
What you can do is to detect the face in every picture (openCV is good enough at detecting faces) and then crop and align each face so all the faces have the same size. Then feed the CNN with all the faces, and it will gradually learn to recognize the emotions of a person.
I am working on a computer vision/machine learning problem in python and have so far not needed opencv. However, I now need to use a fast cascade classifier to detect objects in a set of images. I came across the Haar based classifier written in C++. The testing phase can be called from Python, but I cannot find a way to train the classifier to recognize other objects from Python (I was only able to find this, which uses C++).
Is the training functionality of the Haar cascade only available through C++ or can it be used with Python?
If only C++, any pointers on what I need to install to get started?
Thanks!