EthinicAPI is a RESTful API which is written in Python and predicts the ethinicity, age and gender from an image provided by the user.
Table of Contents
I was working on an Android-app that promoted equality and I wanted to use the pytorch model that I had but there were a lot of issues and very less support. This was the reason I built this API. Ethinic-API was built so that I could predict the race, age and gender of a person in my Android-app. A funny story I guess.
Follow the instructions to setup the project locally!
Make sure to have virtualenv package from python installed before proceeding to installation.
pip install virtualenv
- Clone the repo
git clone https://github.com/lazyCodes7/EthinicAPI.git
- Activate the virtual environment
cd EthinicAPI virtualenv venv . venv/bin/activate
- Install the required packages using pip
pip install -r requirements.txt
- Run the app
python app.py
- Start using the API at '/predict' endpoint in Postman
- Use the RaceClassifier inside the 'classifier' directory to make predictions
# image = cv2.imread(cvImage) (uncomment this line in RaceClassifier.py)
# then import it
from classifier.RaceClassifier import *
clf = RaceClassifer(model_path="fair_face_models/res34_fair_align_multi_7_20190809.pt")
clf.predict(image_path="path to your desired image")
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Rishab Mudliar - @cheesetaco19 - rishabmudliar@gmail.com
Telegram: lazyCodes7