This is an implementation of domain adaptation for anime face detection on Pytorch.
We referred hdjsjyl/face-faster-rcnn.pytorch.
First of all, clone the code
git clone https://github.com/kanosawa/anime-face-faster-rcnn-da.pytorch.git
Then, create a folder:
cd anime-face-faster-rcnn-da.pytorch && mkdir data
- WIDER Face dataset
- CelebA dataset : img_align_celeba.zip
- animeface-character-dataset
Download above data and extract to data folder as below structure.
- data
- WIDER2015
- eval_tools
- wider_face_split
- WIDER_test
- WIDER_train
- WIDER_val
- img_align_celeba
- animeface-character-dataset
- WIDER2015
Download VGG16 and put them into the data/pretrained_model/
cd lib
python setup.py build develop
python trainval_net.py
Put images to images folder and execute below command.
python demo.py --checksession $SESSION --checkepoch $EPOCH --checkpoint $POINT
if you want to use output/vgg16/wider_face/faster_rcnn_1_3_6439.pth, substitute $SESSION=1, $EPOCH=3, $POINT=6439