项目作者: KingJoySaiy
项目描述 :
Implementation of face-gender-classification by ResNet-50 (machine learning).
高级语言: Python
项目地址: git://github.com/KingJoySaiy/genderClassification.git
Gender Classification
Implementation of face-gender-classification by ResNet-50 (machine learning).
1. Requirement
- Python 3.7
- CUDA 10.0
- torch 1.2.0
- torchvision 0.4.0
2. data
- train.csv - training set, including 2 columns( id: name of the face image, label: gender label, 0 means male, 1 means female)
- test.csv - test set, only includes a column of id, that is, the numbers of all face images in the test set. No gender label in the test set
- train/train/ - folder of all training images, the extension is jpg, and each name is the same as the id in train.csv
- test/test/ - folder of all test images, the extension is jpg, and each name is the same as the id name in test.csv
- sampleSubmit.csv - a sample of the submitted file including 2 columns( id: name of the test-face-image, label: gender label output by the model, 0 means male, 1 means female)
- to download full data click here
3. Get started
- set some constants in
genderClassification/constant/constPath
- run
python train.py
, model will be saved in genderClassification/savedModel
- run
python predict.py [name of savedModel]
, default is model-1.pkl
- definition of some net in ‘genderClassification/myModel’ is usless now
MIT License
Copyright (c) 2020 KingJoySaiy