face landmark detection with helen database - python

I'm going to use CNNs for face landmark detection.(python and tensorflow)
The problem is images in Helen database have different scales.
I think I cannot just resize or crop images because the data is the positions of images.((x,y) coordinates)
however, I found a lot of papers(CNNs) tested their model with Helen dataset.
Does anyone have idea how to deal with helen dataset?
I really appreciate it.

What I would suggest to do:
detect faces with open-cv (here)
crop bounding box for every face
resize the cropped images to the resolution which is needed for the cnn

Related

Making colour-based masks on regions of interest with drone imagery

I am currently working on a project that requires me to segment parts of drone imagery into their regions of interest and to create masks based on them.
Below is a hand made example on what the best output should be like
Original image
Image with water body mask
Image with crops masks
Image with tillage masks
Image with road masks
Image with building masks
I am aware that the best way to do this is through semantic segmentation using convolutional neural networks with training data, but the task that was allocated to me was to do a more basic separation through colour segmentation, so ideally I can make a mask of all the green foliage and trees on a layer, the roads on another layer, the water bodies on their own layers, and buildings and others on a layer based on their colours and contours after cleaning the noise.
Enhanced contours
I increased the contrast of this image and used canny contour detection after clearing out some noise to apply enhanced contours to this image, so that it would be easier to pick out different instances of objects.
What I would like to try and do is to create a mask based on the contours of an object, then check the colour underneath to assign it a specific colour layer. Could anyone provide any ideas as to what sort of algorithm I could use to achieve this?
Also, I understand that the colour of the water and the roads could be very similar depending on the location, so this is not a very good solution. Any advice on how I could make a better distinction between the two?
Any insights into this would be much appreciated, thanks!

Extract irregularly shaped region from image using openCV

I am trying to learn OpenCV as I have an interest in Computer Vision and one kind of issue I am trying to tackle is extracting irregularly shaped regions from a given image. For example if I have a picture of this shoe:
Is there a way in which I can apply a mask to the image to extract ONLY the big Nike logo from the shoe image? Any insight will be much appreciated!

How to get human face feature's size in Python using face recognition?

I have face recognition model in Python which detects face and differentiates the features like eyes, nose, mouth from a face. I want to filter-out the face features (face parts) depending upon their sizes, so that I can easily get persons if they have big eyes or small eyes without displaying the whole data.
Can anyone suggest what should I use to detect facial feature's size?

Using a different face detector with dlib's landmark detector

I am currently working on a python implementation of Adrian Rosebrock's video blink detector with dlib blog post:
https://www.pyimagesearch.com/author/adrian/
Basically, I am using dlib's frontal face detector and passing the bounding box around the face to dlib's landmark detector as seen in this picture:
https://imgur.com/xvkfNeG
Sometimes dlib's frontal face detector doesn't find a face, but other face detectors like OpenCV's do. Adrian's blog made it sound like I could use openCV's frontal face detector and pass the bounding box along instead.
However when I do this the landmark detector can't find the eyes of the person correctly as seen in this photo:
https://imgur.com/3eAFFsQ
Is there way I could use an alternative face detector with dlib's landmark detector? Or am I stuck using dlib's frontal face detector because the bounding box passed by a different face detector will be ever so slightly incorrect for the dlib landmark detector?
Thank you for your time!
Checking the images you are providing it just look like you are not passing the correct parameters to the plotting method. The results look correct, just upside-down.
You can use your own face detector. You just have to use dlib.rectangle() function. First, find the bounding boxes from your face detector and after that map them to dlib.rectangle(x,y,w,h).
Then you can pass the bounding boxes from this list to predictor(img, rect).

OpenCv Python (CTypes) detection of tilted face

I have a not-so-simple question.
The Situation:
I'm working on robust facial detection API in python written on top of OpenCV (cv not cv2).
I am using Haar Cascades for face detection specially
front - haarcascade_frontalface_default.xml
profile - haarcascade_profileface.xml
Each worker is using different harr classifier (front/profile) and produce the set of ROI (Region of Interests) then do a uion on them and merge all overlaping bouding boxes.
The result is "your casual red square" around a face with 70% accuracy and not so may phantom faces.
The problem:
Simply tilting the face. My algorithm cannot detect a tilted face.
For profile detection I did a simple flip of a image to detect both left and right profile.
I was thinking there "should" be a better way to detect a tilted face than to call algorithm multiple times for multiple slightly rotated images. (This is a only solution that came to my mind).
The question:
Is there a approach or a way or a specific harr classifier for detection of tilted faces?
Thank you :)

Categories

Resources