/Human_Portrait_Pytorch

人脸肖像生成、图像分割、人脸编辑

Primary LanguagePython

Human Portrait Drawing

├── README.md
├── configs                         some config files          
│     ├── infer_config.json        
│     ├── model_config.json        
│     ├── server_config.json       
├── datasets    
│     ├── APDrawingDB               the data for trianing and validation          
├── face_detect                       
├── model_logs                      checkpoint and some log files  
├── modules
│     ├── data_trans.py             data augmentation
│     ├── dataloader.py                    
│     ├── losses.py                 
│     ├── metrics.py                miou
│     ├── networks.py               an implentation for u2net 
│     ├── trainer.py                custom class for model training  
├── samples                         networks for Unet, UnetPlus, Resnet50FCN, ResnetFPN
│     ├── inputs                    input samples  
│     ├── outputs                   model prediction for input samples
├── utils                    
├── train.py                        model training
├── inference.py                    model infernece
├── flask_server.py                 a simple flask api for human portrait drawing
├── server_test.py       

data

  • APDrawingDB

trian

1.use default paramters

python train.py

2.use specific config file

python train.py --config configs/model_config.json

3.resume checkpoint

python train.py --config config_path --resume checkpoint_path

inference

best model(10.10.101.15): /data/changqing/Human_Portrait_Pytorch/model_logs/U2NET/1125_210759/best_model.pth

use default params

python inference.py

use specific config file

python inference.py --path ./configs/infer_config.json