- Usage
-
Generate frames, will save the frames under
../dataset/frames/
cd ./tools/ python generate_frames.py path/to/videos --cpu_num 48
-
Generate face patches, will save the patches under
../dataset/patches/
and will save a csv filepatch_image_statics.csv
.cd ./tools/ python generate_patches.py path/to/frames/
patch_image_statics.csv
containsPatchName
andScore
:PatchName Score uaspniazcl_002_face_0.jpg 0.9996267557144165 uaspniazcl_003_face_0.jpg 0.9994097948074341 uaspniazcl_001_face_0.jpg 0.9971966743469238 Remember to collect this file after a batch of computation.
-
Generate training label csv.
cd ./tools/ python anno_parse.py path/to/patch/file path/to/jsonfile --saving_path path/to/save
- Name rules
-
Frame images:
VideoName_FrameId.jpg
eg.rmufsuogzn_006.jpg
,vxawghqzyf_007.jpg
. -
Patch images:
VideoName_FrameId_face_FaceId.jpg
eg.ucthmsajay_008_face_0.jpg
,zzlsynxeff_008_face_0.jpg
Train the Exception Net. Need to change some path in the code.
cd ./tools/
python train_net.py
While using single GPU training please use:
cd ./tools/
CUDA_VISIBLE_DEVICES=1,2,3 python train_net.py
After training, the best model and checkpoints will saved under ./saved_models/model.pth
Do inference on video level.
cd ./tools/
python infer_net.py
After inference, the result will be saved under ./dataset/submission.csv
- XceptionNet
- Basic training logic
- Weighted training
- Inference
- Data augmentation
- Better face detection model/ finetune face detection model