Smile Recognition using TensoFlow, Opencv

in #computervision7 years ago (edited)

Hello World!

In this post, I am going to explain about how to train logistic/softmax regression model using TensorFlow, to predict if the input is a neutral face or smiling face. About the dataset, I collected images from Google Images and cropped the mouth part is manually put them into two separate folders. This is developed in Python 2.7.10 and Tensorflow 1.2.1.

Idea here's to flat the images into 1-Dimension, and train it via logistic regression.

STEPS:

  • Loading data and resize
  • Check dimension of our data
  • Splitting the data using sklearn
    X_train, X_test, y_train, y_test = train_test_split( X, Y, test_size=0.33, random_state=42)
  • Flatting the data into 1 dimension
    While we implement Softmax regression, it needs 1 dimension array as an Input, It's important to convert our 2-D array to 1-D array

  • Building the softmax regression using TensorFlow

All the above steps have been well explained in the video below:

If you like the video please give a thumbs up and subscribe to the channel: https://www.youtube.com/channel/UC97_pHqfRIp6h-E30jj5JRw

Sort:  

Congratulations @aquib, this post is the sixth most rewarded post (based on pending payouts) in the last 12 hours written by a Dust account holder (accounts that hold between 0 and 0.01 Mega Vests). The total number of posts by Dust account holders during this period was 4003 and the total pending payments to posts in this category was $780.46. To see the full list of highest paid posts across all accounts categories, click here.

If you do not wish to receive these messages in future, please reply stop to this comment.

Thank you so much @bitgeek 😊