4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

Smile Recognition using TensoFlow, Opencv

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

https://raw.githubusercontent.com/aquibjaved/Real-time-Smile-Recognition/6fcf0b3e79b2fc6fe71c1ea19ab8979ef0150bb7/flattened_image.jpg

  • 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

78 upvotes $6.12

Replies (2)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: