项目作者: KingJoySaiy

项目描述 :
Implementation of face-gender-classification by ResNet-50 (machine learning).
高级语言: Python
项目地址: git://github.com/KingJoySaiy/genderClassification.git
创建时间: 2020-10-08T06:59:07Z
项目社区:https://github.com/KingJoySaiy/genderClassification

开源协议:MIT License

下载


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

  1. set some constants in genderClassification/constant/constPath
  2. run python train.py, model will be saved in genderClassification/savedModel
  3. run python predict.py [name of savedModel], default is model-1.pkl
  4. definition of some net in ‘genderClassification/myModel’ is usless now

MIT License

Copyright (c) 2020 KingJoySaiy