This project predicts whether a person is Male or Female based on facial features using Machine Learning. The model is trained using the Logistic Regression algorithm and deployed with Streamlit for an interactive web application.
- Predicts gender from facial features
- User-friendly Streamlit web application
- Data preprocessing using Label Encoding and StandardScaler
- Logistic Regression classification model
- Simple and interactive interface
The dataset contains the following features:
| Feature | Description |
|---|---|
| Long Hair | Indicates whether the person has long hair |
| Forehead Width (cm) | Width of the forehead |
| Forehead Height (cm) | Height of the forehead |
| Nose Wide | Indicates whether the nose is wide |
| Nose Long | Indicates whether the nose is long |
| Thin Lips | Indicates whether the lips are thin |
| Distance Nose to Lip Long | Indicates whether the distance from nose to lip is long |
| Gender | Target Variable |
- Python
- Pandas
- NumPy
- Scikit-learn
- Streamlit
- Pickle
- Data Collection
- Data Preprocessing
- Label Encoding
- Feature Scaling using StandardScaler
- Train-Test Split
- Model Training (Logistic Regression)
- Model Evaluation
- Model Deployment using Streamlit
Gender-Classification/
│
├── app.py
├── gender_classification_v7.csv
├── logistic_regression_model.pkl
├── scaler.pkl
├── labelencoders.pkl
├── requirements.txt
Clone the repository:
git clone https://github.com/your-username/Gender-Classification-ML.gitGo to the project folder:
cd Gender-Classification-MLInstall dependencies:
pip install -r requirements.txtRun the Streamlit application:
streamlit run app.pyAlgorithm Used
- Logistic Regression
Preprocessing
- Label Encoding
- StandardScaler
The application predicts one of the following:
- Male 👨
- Female 👩