i have been working on an project which requires to extract the facial features in python. I will be using openCV in this project too. I have found a deep learning model, is there any other way to extract facial features other than that?
It seems that, haar cascades don't work in this case. You can use this link: https://www.pyimagesearch.com/2017/04/10/detect-eyes-nose-lips-jaw-dlib-opencv-python/
This uses a pretrained deep learning model that can be used. The features extracted are store / given in a list of coordinates. Hence they ca be manipulated by the opencv.
this model is very accurate and hepful.
Related
I am detecting hand gestures using tensorflow object detection api but I want to apply condition to this detection means I want to detect hand gesture of a person when a person is wearing a whistle otherwise no detection. Can I achieve this using Tensorflow object detection api. If no suggest me some good methods of achieving this. thanks :)
the first thing that you should perform is customizing a pre-trained Tensorflow model with one class, using this technique you can generate a model which has only one class, named "hand" for example. but how to do this? don't worry, just simply follow the below steps:
download Tensorflow model master from GitHub and build it. (you can clone it using git instead of downloading it).
after your building is accomplished, you have to label your train image using label image software as well. the output of the label image is a CSV file.
in the next step you have to convert this CSV file to the record file.
and then train your own model.
after that your model is being trained, you have to export your model and do the target detection simply.
it is good to say that if you don't have an Nvidia GPU, use google Colab because this process is very time-consuming by making use of CPU.
best wishes to you.
you can prepare the dataset (1) labeling the hand as wearing a whistle and (2) not wearing a whistle after that training with the classification model and not forgetting to preprocess before training
I am new to computer vision, and I still didn't try any kind of neural network detections such as yolo, however, I am wishing to do object tracking before entering the field of detection. I started reading about deep sort and all the projects use deep learning detections that needs training. My question is, can I give an ROI result to my deep SORT tracker instead of detections using YOLO and it continues tracking the object selected with ROI.
Here is a link that i found information about the code of DeepSORT.DeepSORT: Deep Learning to Track Custom Objects in a Video
In DeepSORT, you need to have detection in order to perform tracking. It is a tracking-by-detection method. The detection results are input to the Kalman filter component of DeepSORT. The filter generates tracking predictions. Also, the bounding boxes from detection are used to extract crops of RoI from the input image. These image crops are used by the trained Siamese model for feature extraction. The feature extraction by the Siamese model helps in reducing ID Switch.
If you are only interested in doing tracking and ID switch in case of occlusion is not your concern then you can have look at CenterTrack. It does joint detection and tracking in a single model. In this case, you can avoid model training from scratch. The authors provide pre-trained models for tracking both pedestrians and vehicles. As compared to DeepSORT the CenterTrack is pretty fast.
[Sorry for the late reply] I think you should try Siamese Network for tracking by selecting the ROI region. You can find many variants in this given link.
https://github.com/HonglinChu/SiamTrackers.
I started to do the medical image analysis for a project.
In this project I have images of human kidney(s) with and without stones. The aim is to predict if the given new image has stone or not.
I chose the KNN classifier model to do classification but I do not understand the image processing. I have some knowledge on segmentation. I can convert it into array for processing but I need some pointers to understand the process.
Image - https://i.stack.imgur.com/9FDUM.jpg
For image classification I would recommend you to use pre-trained neural networks like Resnet etc.
Frameworks like Tensorflow give a good API to re-train pre-trainined neural networks for a different use-case.
You can follow below link:
https://www.tensorflow.org/hub/tutorials/image_retraining
Image Processing is done to convert the digital images into a format which would be easier for a computer to calculate statistics on.
Images do not always contain the necessary information, there is noise and lots of unnecessary background information available in the image which won't be required for a specific purpose.
The Goal of processing an image is to extract the region of interest from the whole image.
Along with this various enhancements are done to the image so that we get features that are useful in calculating inferences
Processing an image consists of various image enhancement techniques and segmentation and other stuff like maybe a histogram equalization which in the end would be used to extract features. Doing this processing yields better features generally.
Also Image processing in itself is a vast topic. I recommend you read about it in papers from Google scholar
For example, using OpenCV and haarcascade_frontal_face.xml, we can predict if a face exists in an image. I would like to know if such a thing (detecting an object of interest) is possible with Tensorflow and if yes, how?
Yes and no. Tensorflow is a graph computation library mostly suited for neural networks.
You can create a neural network that determines if a face is in the image or not... You can even search for existing implementations that use Tensorflow...
There is no default Haar feature based cascade classifier in Tensorflow...
Is it possible to have bounding boxes prediction using TensorFlow?
I found TensorBox on github but I'm looking for a better supported or maybe official way to address this problem.
I need to retrain the model for my own classes.
It is unclear what exactly do you mean. Do you need object detection? I assume it from the 'bounding boxes'. If so, inception networks are not directly applicable for your task, they are classification networks.
You should look for object detection models, like Single Shot Detector (SSD) or You Only Look Once (YOLO). They often use pre-trained convolutional layers from classification networks, but have additional layers on the top of it. If you want Inception (aka GoogLeNet), YOLO is based on that. Take a look at this implementation: https://github.com/thtrieu/darkflow or any other you can find in Google.
The COCO2016 winner for object detection was implemented in tensorflow. Some state of the art techniques are Faster R-CNN, R-FCN and SSD. Check the slides from http://image-net.org/challenges/talks/2016/GRMI-COCO-slidedeck.pdf (Slide 14 has key tensorflow ops for you to recreate this pipeline).
Edit 6/19/2017:
Tensorflow released some techniques to predict bboxes:
https://research.googleblog.com/2017/06/supercharge-your-computer-vision-models.html