- To classify the gender by uploading a image and model will predict the gender whether Male or Female
- Object detection using Haar Casacade
- For the preprocess images, we will extract features from the images, ie. computing Eigen images using principal component analysis
- Developed web server gateway interphase in flask by rendering HTML CSS and bootstrap in the frontend and in the backend written in Python
- Optimized Linear SVM algorithm using GridsearchCV to reach the best model
- Integrating the machine learning model to Flask App.
Python Version: 3.7
Packages: pandas, numpy, sklearn, matplotlib,scipy,opencv
Get the data from : https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/ Data files :
- Divided into two folders male and female
- Both folder contains 7,000 images of male and female
After understanding business requirements, I needed to clean it up so that it was usable for our model.
- Handle the unstructured data
- First convert into grayscale image
- Then crop the faces
- Preprocess the data such as normalize and resize image(100x100)
- Flatten the Image
- Implement feature selection
- Splitting the dataset into train and test
Upload Image -> Crop image -> Data prerocessing -> Feature extraction -> ML model -> Output
I split the random data into train and tests sets with a test size of 30% and applied pca Implement Linear support vector machine and used hyperparameter tuning GridsearchCv and ROC AUC Score - 0.91
- Linear SVM : accuracy = 0.8186
In this step, I built a flask API endpoint that was hosted on a local webserver