Commit 57dc7eca authored by 宋柯's avatar 宋柯

add

parent 03952cf7
MIT License
Copyright (c) 2019
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# BeautyGAN # BeautyGAN
Official implementation of ACM MM 2018 paper: "BeautyGAN: Instance-level Facial Makeup Transfer with Deep Generative Adversarial Network"
Dataset can be found in project page: http://colalab.org/projects/BeautyGAN
## still in construction
from easydict import EasyDict as edict
default = edict()
default.snapshot_path = './snapshot/'
default.vis_path = './visulization/'
default.log_path = './log/'
default.data_path = './data/'
config = edict()
# setting for cycleGAN
# Hyper-parameters
config.multi_gpu = False
config.gpu_ids = [0,1,2]
# Setting path
config.snapshot_path = default.snapshot_path
config.pretrained_path = default.snapshot_path
config.vis_path = default.vis_path
config.log_path = default.log_path
config.data_path = default.data_path
# Setting training parameters
config.task_name = ""
config.G_LR = 2e-5
config.D_LR = 2e-5
config.beta1 = 0.5
config.beta2 = 0.999
config.c_dim = 2
config.num_epochs = 200
config.num_epochs_decay = 100
config.ndis = 1
config.snapshot_step = 260
config.log_step = 10
config.vis_step = config.snapshot_step
config.batch_size = 1
config.lambda_A = 10.0
config.lambda_B =10.0
config.lambda_idt = 0.5
config.img_size = 256
config.g_conv_dim = 64
config.d_conv_dim = 64
config.g_repeat_num = 6
config.d_repeat_num = 3
config.checkpoint = ""
config.test_model = "51_2000"
# Setting datasets
dataset_config = edict()
dataset_config.name = 'MAKEUP'
dataset_config.dataset_path = default.data_path
dataset_config.img_size = 256
def generate_config(_network, _dataset):
for k, v in dataset_config[_dataset].items():
if k in config:
config[k] = v
elif k in default:
default[k] = v
def merge_cfg_arg(config, args):
config.gpu_ids = [int(i) for i in args.gpus.split(',')]
config.batch_size = args.batch_size
config.vis_step = args.vis_step
config.snapshot_step = args.vis_step
config.ndis = args.ndis
config.lambda_cls = args.lambda_cls
config.lambda_A = args.lambda_rec
config.lambda_B = args.lambda_rec
config.G_LR = args.LR
config.D_LR = args.LR
config.num_epochs_decay = args.decay
config.num_epochs = args.epochs
config.whichG = args.whichG
config.task_name = args.task_name
config.norm = args.norm
config.lambda_his = args.lambda_his
config.lambda_vgg = args.lambda_vgg
config.cls_list = [i for i in args.cls_list.split(',')]
config.content_layer = [i for i in args.content_layer.split(',')]
config.direct = args.direct
config.lips = args.lips
config.skin = args.skin
config.eye = args.eye
config.g_repeat = args.g_repeat
config.lambda_his_lip = args.lambda_his
config.lambda_his_skin_1 = args.lambda_his * args.lambda_skin_1
config.lambda_his_skin_2 = args.lambda_his * args.lambda_skin_2
config.lambda_his_eye = args.lambda_his * args.lambda_eye
print(config)
if "checkpoint" in config.items():
config.checkpoint = args.checkpoint
if "test_model" in config.items():
config.test_model = args.test_model
return config
/Users/edz/Downloads/makeupdataset/all/images/makeup/4298ad4c38d17597-5c06c575c1723922-e8ae039f36c74c4286242f9dab93abb1.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/4298ad4c38d17597-5c06c575c1723922-e8ae039f36c74c4286242f9dab93abb1.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX733.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX733.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG680.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG680.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX575.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX575.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG126.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG126.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX777.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX777.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX498.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX498.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG103.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG103.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/1ca3a0a3de6bc50f6af176e4c02e8c38.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/1ca3a0a3de6bc50f6af176e4c02e8c38.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX916.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX916.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX390.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX390.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX571.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX571.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX188.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX188.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX167.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX167.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX144.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX144.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG717.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG717.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG121.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG121.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX193.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX193.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-073.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-073.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX861.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX861.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG148.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG148.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX908.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX908.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG505.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG505.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX622.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX622.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG387.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG387.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX244.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX244.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG9.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG9.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-364.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-364.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX460.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX460.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG239.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG239.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG712.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG712.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG760.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG760.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX662.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX662.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX405.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX405.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG798.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG798.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX489.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX489.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX403.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX403.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/ac75323d6b6de243-7728d900ea0dce1d-e801f8a3ef5d0944015418d2e68dcb80.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/ac75323d6b6de243-7728d900ea0dce1d-e801f8a3ef5d0944015418d2e68dcb80.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG28.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG28.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/a5bef619b76daca3bba80131bb55b2eb.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/a5bef619b76daca3bba80131bb55b2eb.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX798.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX798.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX523.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX523.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX339.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX339.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX21.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX21.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX587.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX587.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-117.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-117.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG204.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG204.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG40.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG40.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG93.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG93.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-118.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-118.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG238.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG238.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX217.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX217.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX522.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX522.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-120.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-120.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG767.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG767.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG36.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG36.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG339.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG339.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX273.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX273.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/8ed6feb8f72b89632d02fbafcc2511a9.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/8ed6feb8f72b89632d02fbafcc2511a9.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/YUEHUI-114.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/YUEHUI-114.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/31bdcd86ffa8cc91444ec6ca921e32e5.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/31bdcd86ffa8cc91444ec6ca921e32e5.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG421.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG421.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX290.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX290.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX62.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX62.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX149.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX149.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX233.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX233.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX73.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX73.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG340.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG340.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX576.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX576.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG502.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG502.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG449.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG449.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG237.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG237.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX514.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX514.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX115.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX115.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG744.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG744.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX648.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX648.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX717.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX717.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG644.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG644.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX780.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX780.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX494.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX494.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX211.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX211.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG693.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG693.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG451.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG451.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX391.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX391.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX666.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX666.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX411.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX411.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG342.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG342.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-119.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-119.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX246.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX246.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG211.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG211.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX323.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX323.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG429.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG429.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG294.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG294.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX445.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX445.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/QQ20171214193917.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/QQ20171214193917.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX4.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX4.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX235.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX235.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG777.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG777.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG338.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG338.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX116.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX116.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX546.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX546.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG432.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG432.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-304.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-304.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX145.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX145.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG679.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG679.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX434.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX434.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX152.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX152.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX199.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX199.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG614.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG614.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG244.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG244.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX772.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX772.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX697.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX697.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX752.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX752.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX909.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX909.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX299.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX299.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG310.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG310.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG684.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG684.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX417.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX417.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX465.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX465.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX675.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX675.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-130.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-130.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX443.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX443.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/4131180f8bd977424bee61c6db075f6e.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/4131180f8bd977424bee61c6db075f6e.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX699.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX699.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-071.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-071.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG130.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG130.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG62.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG62.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-252.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-252.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/6db04069ad1af6ec976e31b7e9e6cb0a.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/6db04069ad1af6ec976e31b7e9e6cb0a.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX621.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX621.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX819.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX819.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX683.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX683.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG243.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG243.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG186.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG186.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX213.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX213.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX746.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX746.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX843.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX843.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX738.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX738.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX333.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX333.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX23.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX23.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/8fb420459611cbe7e1e87f04abaa505f.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/8fb420459611cbe7e1e87f04abaa505f.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG810.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG810.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX177.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX177.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG274.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG274.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG326.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG326.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX723.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX723.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX879.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX879.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-003.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-003.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-042.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-042.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX741.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX741.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX731.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX731.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG175.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG175.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-266.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-266.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG558.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG558.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG82.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG82.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG671.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG671.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG844.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG844.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG576.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG576.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG608.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG608.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX344.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX344.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX25.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX25.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-027.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-027.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-046.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-046.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX257.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX257.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX634.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX634.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG709.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG709.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX551.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX551.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG763.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG763.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX455.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX455.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-038.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-038.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX653.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX653.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX611.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX611.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX347.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX347.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG797.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG797.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX580.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX580.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX91.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX91.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX761.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX761.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG551.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG551.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/3a178e2dceaec352a4bda7ab686f970e.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/3a178e2dceaec352a4bda7ab686f970e.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG601.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG601.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX46.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX46.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX543.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX543.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX396.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX396.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG659.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG659.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG300.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG300.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG355.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG355.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX186.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX186.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX264.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX264.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG561.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG561.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX425.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX425.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX166.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX166.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG524.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG524.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG135.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG135.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX297.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX297.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/6d8b3d09feb4a574042b431ed3f29f0f.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/6d8b3d09feb4a574042b431ed3f29f0f.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG823.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG823.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG428.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG428.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX37.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX37.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX762.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX762.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX339.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX339.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG292.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG292.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX266.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX266.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX867.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX867.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX402.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX402.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG66.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG66.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX271.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX271.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX223.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX223.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX700.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX700.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-019.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-019.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX380.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX380.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG177.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG177.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-024.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-024.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG500.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG500.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX134.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX134.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX133.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX133.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX180.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX180.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-402.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-402.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG377.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG377.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX263.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX263.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/c848f905077d16f15ddac5208498e1c0.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/c848f905077d16f15ddac5208498e1c0.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-053.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-053.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/15d06c640213f4d70d42bf6a8ae28d05.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/15d06c640213f4d70d42bf6a8ae28d05.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/bbddd296c79d8edf6520e8673861bc52.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/bbddd296c79d8edf6520e8673861bc52.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX529.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX529.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG715.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG715.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/522a70de6befeb69d197ce74256fc71d.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/522a70de6befeb69d197ce74256fc71d.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG574.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG574.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG336.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG336.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX413.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX413.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX168.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX168.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX56.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX56.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX11.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX11.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/08d07734712422248a6af552f03453ea.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/08d07734712422248a6af552f03453ea.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX335.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX335.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG434.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG434.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX631.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX631.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/khkukyuky.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/khkukyuky.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX138.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX138.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG196.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG196.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG172.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG172.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG225.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG225.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/YH-118.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/YH-118.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX616.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX616.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX107.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX107.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX618.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX618.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX293.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX293.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX822.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX822.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX131.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX131.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX758.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX758.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX524.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX524.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX779.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX779.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/t01f0988463efd03350.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/t01f0988463efd03350.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX187.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX187.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX540.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX540.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX804.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX804.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX158.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX158.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-048.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-048.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/yrtyryt.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/yrtyryt.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX680.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX680.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX788.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX788.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG8.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG8.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG203.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG203.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-230.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-230.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/ef22531c99c63c3c31b2e3dce6926e59.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/ef22531c99c63c3c31b2e3dce6926e59.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG458.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG458.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-002.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-002.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX193.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX193.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX54.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX54.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG185.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG185.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG537.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG537.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX547.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX547.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ271.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ271.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ781.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ781.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ472.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ472.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ762.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ762.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0423.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0423.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0016.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0016.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ94.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ94.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ299.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ299.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0494.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0494.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ93.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ93.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ95.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ95.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ159.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ159.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0506.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0506.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ244.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ244.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ113.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ113.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0170.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0170.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ805.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ805.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ181.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ181.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ662.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ662.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ918.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ918.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ156.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ156.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ247.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ247.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ902.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ902.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0503.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0503.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ856.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ856.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ86.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ86.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ733.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ733.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ455.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ455.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0135.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0135.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0149.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0149.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ944.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ944.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0239.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0239.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ789.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ789.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0522.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0522.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0220.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0220.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0168.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0168.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ376.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ376.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ260.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ260.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0084.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0084.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0363.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0363.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0124.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0124.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ217.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ217.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ384.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ384.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0268.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0268.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ790.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ790.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0492.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0492.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0267.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0267.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ90.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ90.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ96.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ96.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0404.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0404.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0416.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0416.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/XYUH-001.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/XYUH-001.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ595.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ595.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ84.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ84.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0461.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0461.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0157.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0157.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0019.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0019.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ588.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ588.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0027.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0027.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0119.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0119.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ874.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ874.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ916.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ916.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ465.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ465.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ209.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ209.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ230.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ230.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ751.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ751.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0384.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0384.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ685.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ685.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ295.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ295.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ40.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ40.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0005.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0005.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ871.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ871.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0443.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0443.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0092.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0092.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0470.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0470.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0223.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0223.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ799.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ799.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ816.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ816.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ204.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ204.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ538.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ538.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ133.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ133.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ641.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ641.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ910.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ910.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ678.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ678.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0185.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0185.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0094.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0094.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0032.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0032.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0186.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0186.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ625.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ625.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0006.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0006.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ467.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ467.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ482.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ482.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ371.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ371.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ408.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ408.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ699.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ699.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0277.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0277.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ554.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ554.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ494.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ494.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ715.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ715.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ15.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ15.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ362.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ362.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ61.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ61.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ175.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ175.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ428.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ428.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ76.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ76.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ137.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ137.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0428.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0428.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ266.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ266.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ219.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ219.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ142.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ142.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ74.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ74.png
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
from .makeup import MAKEUP
import os
import torch
import random
import linecache
from torch.utils.data import Dataset
from PIL import Image
class MAKEUP(Dataset):
def __init__(self, image_path, transform, mode, transform_mask, cls_list):
self.image_path = image_path
self.transform = transform
self.mode = mode
self.transform_mask = transform_mask
self.cls_list = cls_list
self.cls_A = cls_list[0]
self.cls_B = cls_list[1]
for cls in self.cls_list:
setattr(self, "train_" + cls + "_list_path", os.path.join(self.image_path, "train_" + cls + ".txt"))
setattr(self, "train_" + cls + "_lines", open(getattr(self, "train_" + cls + "_list_path"), 'r').readlines())
setattr(self, "num_of_train_" + cls + "_data", len(getattr(self, "train_" + cls + "_lines")))
for cls in self.cls_list:
if self.mode == "test_all":
setattr(self, "test_" + cls + "_list_path", os.path.join(self.image_path, "test_" + cls + "_all.txt"))
setattr(self, "test_" + cls + "_lines", open(getattr(self, "test_" + cls + "_list_path"), 'r').readlines())
setattr(self, "num_of_test_" + cls + "_data", len(getattr(self, "test_" + cls + "_lines")))
else:
setattr(self, "test_" + cls + "_list_path", os.path.join(self.image_path, "test_" + cls + ".txt"))
setattr(self, "test_" + cls + "_lines", open(getattr(self, "test_" + cls + "_list_path"), 'r').readlines())
setattr(self, "num_of_test_" + cls + "_data", len(getattr(self, "test_" + cls + "_lines")))
print ('Start preprocessing dataset..!')
self.preprocess()
print ('Finished preprocessing dataset..!')
def preprocess(self):
for cls in self.cls_list:
setattr(self, "train_" + cls + "_filenames", [])
setattr(self, "train_" + cls + "_mask_filenames", [])
lines = getattr(self, "train_" + cls + "_lines")
random.shuffle(lines)
for i, line in enumerate(lines):
splits = line.split()
getattr(self, "train_" + cls + "_filenames").append(splits[0])
getattr(self, "train_" + cls + "_mask_filenames").append(splits[1])
for cls in self.cls_list:
setattr(self, "test_" + cls + "_filenames", [])
setattr(self, "test_" + cls + "_mask_filenames", [])
lines = getattr(self, "test_" + cls + "_lines")
for i, line in enumerate(lines):
splits = line.split()
getattr(self, "test_" + cls + "_filenames").append(splits[0])
getattr(self, "test_" + cls + "_mask_filenames").append(splits[1])
if self.mode == "test_baseline":
setattr(self, "test_" + self.cls_A + "_filenames", os.listdir(os.path.join(self.image_path, "baseline", "org_aligned")))
setattr(self, "num_of_test_" + self.cls_A + "_data", len(os.listdir(os.path.join(self.image_path, "baseline", "org_aligned"))))
setattr(self, "test_" + self.cls_B + "_filenames", os.listdir(os.path.join(self.image_path, "baseline", "ref_aligned")))
setattr(self, "num_of_test_" + self.cls_B + "_data", len(os.listdir(os.path.join(self.image_path, "baseline", "ref_aligned"))))
def __getitem__(self, index):
if self.mode == 'train' or self.mode == 'train_finetune':
index_A = random.randint(0, getattr(self, "num_of_train_" + self.cls_A + "_data") - 1)
index_B = random.randint(0, getattr(self, "num_of_train_" + self.cls_B + "_data") - 1)
image_A = Image.open(os.path.join(self.image_path, getattr(self, "train_" + self.cls_A + "_filenames")[index_A])).convert("RGB")
image_B = Image.open(os.path.join(self.image_path, getattr(self, "train_" + self.cls_B + "_filenames")[index_B])).convert("RGB")
mask_A = Image.open(os.path.join(self.image_path, getattr(self, "train_" + self.cls_A + "_mask_filenames")[index_A]))
mask_B = Image.open(os.path.join(self.image_path, getattr(self, "train_" + self.cls_B + "_mask_filenames")[index_B]))
return self.transform(image_A), self.transform(image_B), self.transform_mask(mask_A), self.transform_mask(mask_B)
if self.mode in ['test', 'test_all']:
#"""
image_A = Image.open(os.path.join(self.image_path, getattr(self, "test_" + self.cls_A + "_filenames")[index // getattr(self, 'num_of_test_' + self.cls_list[1] + '_data')])).convert("RGB")
image_B = Image.open(os.path.join(self.image_path, getattr(self, "test_" + self.cls_B + "_filenames")[index % getattr(self, 'num_of_test_' + self.cls_list[1] + '_data')])).convert("RGB")
return self.transform(image_A), self.transform(image_B)
if self.mode == "test_baseline":
image_A = Image.open(os.path.join(self.image_path, "baseline", "org_aligned", getattr(self, "test_" + self.cls_A + "_filenames")[index // getattr(self, 'num_of_test_' + self.cls_list[1] + '_data')])).convert("RGB")
image_B = Image.open(os.path.join(self.image_path, "baseline", "ref_aligned", getattr(self, "test_" + self.cls_B + "_filenames")[index % getattr(self, 'num_of_test_' + self.cls_list[1] + '_data')])).convert("RGB")
return self.transform(image_A), self.transform(image_B)
def __len__(self):
if self.mode == 'train' or self.mode == 'train_finetune':
num_A = getattr(self, 'num_of_train_' + self.cls_list[0] + '_data')
num_B = getattr(self, 'num_of_train_' + self.cls_list[1] + '_data')
return max(num_A, num_B)
elif self.mode in ['test', "test_baseline", 'test_all']:
num_A = getattr(self, 'num_of_test_' + self.cls_list[0] + '_data')
num_B = getattr(self, 'num_of_test_' + self.cls_list[1] + '_data')
return num_A * num_B
from torchvision import transforms
from torch.utils.data import DataLoader
from torchvision.datasets import ImageFolder
from data_loaders.makeup import MAKEUP
import torch
import numpy as np
import PIL
def ToTensor(pic):
# handle PIL Image
if pic.mode == 'I':
img = torch.from_numpy(np.array(pic, np.int32, copy=False))
elif pic.mode == 'I;16':
img = torch.from_numpy(np.array(pic, np.int16, copy=False))
else:
img = torch.ByteTensor(torch.ByteStorage.from_buffer(pic.tobytes()))
# PIL image mode: 1, L, P, I, F, RGB, YCbCr, RGBA, CMYK
if pic.mode == 'YCbCr':
nchannel = 3
elif pic.mode == 'I;16':
nchannel = 1
else:
nchannel = len(pic.mode)
img = img.view(pic.size[1], pic.size[0], nchannel)
# put it from HWC to CHW format
# yikes, this transpose takes 80% of the loading time/CPU
img = img.transpose(0, 1).transpose(0, 2).contiguous()
if isinstance(img, torch.ByteTensor):
return img.float()
else:
return img
def get_loader(data_config, config, mode="train"):
# return the DataLoader
dataset_name = data_config.name
transform = transforms.Compose([
transforms.Resize(config.img_size),
transforms.ToTensor(),
transforms.Normalize([0.5,0.5,0.5],[0.5,0.5,0.5])])
transform_mask = transforms.Compose([
transforms.Resize(config.img_size, interpolation=PIL.Image.NEAREST),
ToTensor])
print(config.data_path)
#"""
if mode=="train":
dataset_train = eval(dataset_name)(data_config.dataset_path, transform=transform, mode= "train",\
transform_mask=transform_mask, cls_list = config.cls_list)
dataset_test = eval(dataset_name)(data_config.dataset_path, transform=transform, mode= "test",\
transform_mask=transform_mask, cls_list = config.cls_list)
#"""
data_loader_train = DataLoader(dataset=dataset_train,
batch_size=config.batch_size,
shuffle=True)
if mode=="test":
data_loader_train = None
dataset_test = eval(dataset_name)(data_config.dataset_path, transform=transform, mode= "test",\
transform_mask =transform_mask, cls_list = config.cls_list)
data_loader_test = DataLoader(dataset=dataset_test,
batch_size=1,
shuffle=False)
return [data_loader_train, data_loader_test]
\ No newline at end of file
import os
import numpy as np
images_data_path = '/Users/edz/Downloads/makeupdataset/all/images'
segs_data_path = '/Users/edz/Downloads/makeupdataset/all/segs'
images_makeup = os.path.join(images_data_path,"makeup")
segs_makeup = os.path.join(segs_data_path,"makeup")
images_nonmakeup = os.path.join(images_data_path,"non-makeup")
segs_nonmakeup = os.path.join(segs_data_path,"non-makeup")
images_makeup_files = os.listdir(images_makeup)
images_nonmakeup_files = os.listdir(images_nonmakeup)
segs_makeup_files = os.listdir(segs_makeup)
segs_nonmakeup_files = os.listdir(segs_nonmakeup)
print("images_makeup_files:{}个".format(len(images_makeup_files)))
print("images_nonmakeup_files:{}个".format(len(images_nonmakeup_files)))
print("segs_makeup_files:{}个".format(len(segs_makeup_files)))
print("segs_nonmakeup_files:{}个".format(len(segs_nonmakeup_files)))
images_makeup_files = list(set(images_makeup_files)&set(segs_makeup_files))
images_nonmakeup_files = list(set(images_nonmakeup_files)&set(segs_nonmakeup_files))
print("images_makeup_files:{}个".format(len(images_makeup_files)))
print("images_nonmakeup_files:{}个".format(len(images_nonmakeup_files)))
np.random.shuffle(images_makeup_files)
np.random.shuffle(images_nonmakeup_files)
with open("./train_makeup.txt","w") as f:
for images_makeup_file in images_makeup_files[:2448]:
f.write("{} {}\n".format(os.path.join(images_makeup,images_makeup_file),os.path.join(segs_makeup,images_makeup_file)))
with open("./test_makeup.txt","w") as f:
for images_makeup_file in images_makeup_files[2448:]:
f.write("{} {}\n".format(os.path.join(images_makeup,images_makeup_file),os.path.join(segs_makeup,images_makeup_file)))
with open("./train_nonmakeup.txt","w") as f:
for images_nonmakeup_file in images_nonmakeup_files[:1004]:
f.write("{} {}\n".format(os.path.join(images_nonmakeup,images_nonmakeup_file),os.path.join(segs_nonmakeup,images_nonmakeup_file)))
with open("./test_nonmakeup.txt","w") as f:
for images_nonmakeup_file in images_nonmakeup_files[1004:]:
f.write("{} {}\n".format(os.path.join(images_nonmakeup,images_nonmakeup_file),os.path.join(segs_nonmakeup,images_nonmakeup_file)))
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
import torch
import torch.nn as nn
import torch.nn.functional as F
from ops.spectral_norm import spectral_norm as SpectralNorm
# Defines the GAN loss which uses either LSGAN or the regular GAN.
# When LSGAN is used, it is basically same as MSELoss,
# but it abstracts away the need to create the target label tensor
# that has the same size as the input
class ResidualBlock(nn.Module):
"""Residual Block."""
def __init__(self, dim_in, dim_out):
super(ResidualBlock, self).__init__()
self.main = nn.Sequential(
nn.Conv2d(dim_in, dim_out, kernel_size=3, stride=1, padding=1, bias=False),
nn.InstanceNorm2d(dim_out, affine=True),
nn.ReLU(inplace=True),
nn.Conv2d(dim_out, dim_out, kernel_size=3, stride=1, padding=1, bias=False),
nn.InstanceNorm2d(dim_out, affine=True))
def forward(self, x):
return x + self.main(x)
class Generator(nn.Module):
"""Generator. Encoder-Decoder Architecture."""
def __init__(self, conv_dim=64, repeat_num=6):
super(Generator, self).__init__()
layers = []
layers.append(nn.Conv2d(3, conv_dim, kernel_size=7, stride=1, padding=3, bias=False))
layers.append(nn.InstanceNorm2d(conv_dim, affine=True))
layers.append(nn.ReLU(inplace=True))
# Down-Sampling
curr_dim = conv_dim
for i in range(2):
layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1, bias=False))
layers.append(nn.InstanceNorm2d(curr_dim*2, affine=True))
layers.append(nn.ReLU(inplace=True))
curr_dim = curr_dim * 2
# Bottleneck
for i in range(repeat_num):
layers.append(ResidualBlock(dim_in=curr_dim, dim_out=curr_dim))
# Up-Sampling
for i in range(2):
layers.append(nn.ConvTranspose2d(curr_dim, curr_dim//2, kernel_size=4, stride=2, padding=1, bias=False))
layers.append(nn.InstanceNorm2d(curr_dim//2, affine=True))
layers.append(nn.ReLU(inplace=True))
curr_dim = curr_dim // 2
layers.append(nn.Conv2d(curr_dim, 3, kernel_size=7, stride=1, padding=3, bias=False))
layers.append(nn.Tanh())
self.main = nn.Sequential(*layers)
def forward(self, x):
out = self.main(x)
return out
class Generator_makeup(nn.Module):
"""Generator. Encoder-Decoder Architecture."""
# input 2 images and output 2 images as well
def __init__(self, conv_dim=64, repeat_num=6, input_nc=6):
super(Generator_makeup, self).__init__()
layers = []
layers.append(nn.Conv2d(input_nc, conv_dim, kernel_size=7, stride=1, padding=3, bias=False))
layers.append(nn.InstanceNorm2d(conv_dim, affine=True))
layers.append(nn.ReLU(inplace=True))
# Down-Sampling
curr_dim = conv_dim
for i in range(2):
layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1, bias=False))
layers.append(nn.InstanceNorm2d(curr_dim*2, affine=True))
layers.append(nn.ReLU(inplace=True))
curr_dim = curr_dim * 2
# Bottleneck
for i in range(repeat_num):
layers.append(ResidualBlock(dim_in=curr_dim, dim_out=curr_dim))
# Up-Sampling
for i in range(2):
layers.append(nn.ConvTranspose2d(curr_dim, curr_dim//2, kernel_size=4, stride=2, padding=1, bias=False))
layers.append(nn.InstanceNorm2d(curr_dim//2, affine=True))
layers.append(nn.ReLU(inplace=True))
curr_dim = curr_dim // 2
self.main = nn.Sequential(*layers)
layers_1 = []
layers_1.append(nn.Conv2d(curr_dim, 3, kernel_size=7, stride=1, padding=3, bias=False))
layers_1.append(nn.Tanh())
self.branch_1 = nn.Sequential(*layers_1)
layers_2 = []
layers_2.append(nn.Conv2d(curr_dim, 3, kernel_size=7, stride=1, padding=3, bias=False))
layers_2.append(nn.Tanh())
self.branch_2 = nn.Sequential(*layers_2)
def forward(self, x, y):
input_x = torch.cat((x, y), dim=1)
out = self.main(input_x)
out_A = self.branch_1(out)
out_B = self.branch_2(out)
return out_A, out_B
class Generator_branch(nn.Module):
"""Generator. Encoder-Decoder Architecture."""
# input 2 images and output 2 images as well
def __init__(self, conv_dim=64, repeat_num=6, input_nc=3):
super(Generator_branch, self).__init__()
# Branch input
layers_branch = []
layers_branch.append(nn.Conv2d(input_nc, conv_dim, kernel_size=7, stride=1, padding=3, bias=False))
layers_branch.append(nn.InstanceNorm2d(conv_dim, affine=True))
layers_branch.append(nn.ReLU(inplace=True))
layers_branch.append(nn.Conv2d(conv_dim, conv_dim*2, kernel_size=4, stride=2, padding=1, bias=False))
layers_branch.append(nn.InstanceNorm2d(conv_dim*2, affine=True))
layers_branch.append(nn.ReLU(inplace=True))
self.Branch_0 = nn.Sequential(*layers_branch)
# Branch input
layers_branch = []
layers_branch.append(nn.Conv2d(input_nc, conv_dim, kernel_size=7, stride=1, padding=3, bias=False))
layers_branch.append(nn.InstanceNorm2d(conv_dim, affine=True))
layers_branch.append(nn.ReLU(inplace=True))
layers_branch.append(nn.Conv2d(conv_dim, conv_dim*2, kernel_size=4, stride=2, padding=1, bias=False))
layers_branch.append(nn.InstanceNorm2d(conv_dim*2, affine=True))
layers_branch.append(nn.ReLU(inplace=True))
self.Branch_1 = nn.Sequential(*layers_branch)
# Down-Sampling, branch merge
layers = []
curr_dim = conv_dim*2
layers.append(nn.Conv2d(curr_dim*2, curr_dim*2, kernel_size=4, stride=2, padding=1, bias=False))
layers.append(nn.InstanceNorm2d(curr_dim*2, affine=True))
layers.append(nn.ReLU(inplace=True))
curr_dim = curr_dim * 2
# Bottleneck
for i in range(repeat_num):
layers.append(ResidualBlock(dim_in=curr_dim, dim_out=curr_dim))
# Up-Sampling
for i in range(2):
layers.append(nn.ConvTranspose2d(curr_dim, curr_dim//2, kernel_size=4, stride=2, padding=1, bias=False))
layers.append(nn.InstanceNorm2d(curr_dim//2, affine=True))
layers.append(nn.ReLU(inplace=True))
curr_dim = curr_dim // 2
self.main = nn.Sequential(*layers)
layers_1 = []
layers_1.append(nn.Conv2d(curr_dim, curr_dim, kernel_size=3, stride=1, padding=1, bias=False))
layers_1.append(nn.InstanceNorm2d(curr_dim, affine=True))
layers_1.append(nn.ReLU(inplace=True))
layers_1.append(nn.Conv2d(curr_dim, curr_dim, kernel_size=3, stride=1, padding=1, bias=False))
layers_1.append(nn.InstanceNorm2d(curr_dim, affine=True))
layers_1.append(nn.ReLU(inplace=True))
layers_1.append(nn.Conv2d(curr_dim, 3, kernel_size=7, stride=1, padding=3, bias=False))
layers_1.append(nn.Tanh())
self.branch_1 = nn.Sequential(*layers_1)
layers_2 = []
layers_2.append(nn.Conv2d(curr_dim, curr_dim, kernel_size=3, stride=1, padding=1, bias=False))
layers_2.append(nn.InstanceNorm2d(curr_dim, affine=True))
layers_2.append(nn.ReLU(inplace=True))
layers_2.append(nn.Conv2d(curr_dim, curr_dim, kernel_size=3, stride=1, padding=1, bias=False))
layers_2.append(nn.InstanceNorm2d(curr_dim, affine=True))
layers_2.append(nn.ReLU(inplace=True))
layers_2.append(nn.Conv2d(curr_dim, 3, kernel_size=7, stride=1, padding=3, bias=False))
layers_2.append(nn.Tanh())
self.branch_2 = nn.Sequential(*layers_2)
def forward(self, x, y):
input_x = self.Branch_0(x)
input_y = self.Branch_1(y)
input_fuse = torch.cat((input_x, input_y), dim=1)
out = self.main(input_fuse)
out_A = self.branch_1(out)
out_B = self.branch_2(out)
return out_A, out_B
class Discriminator(nn.Module):
"""Discriminator. PatchGAN."""
def __init__(self, image_size=128, conv_dim=64, repeat_num=3, norm='SN'):
super(Discriminator, self).__init__()
layers = []
if norm=='SN':
layers.append(SpectralNorm(nn.Conv2d(3, conv_dim, kernel_size=4, stride=2, padding=1)))
else:
layers.append(nn.Conv2d(3, conv_dim, kernel_size=4, stride=2, padding=1))
layers.append(nn.LeakyReLU(0.01, inplace=True))
curr_dim = conv_dim
for i in range(1, repeat_num):
if norm=='SN':
layers.append(SpectralNorm(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1)))
else:
layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=2, padding=1))
layers.append(nn.LeakyReLU(0.01, inplace=True))
curr_dim = curr_dim * 2
#k_size = int(image_size / np.power(2, repeat_num))
if norm=='SN':
layers.append(SpectralNorm(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=1, padding=1)))
else:
layers.append(nn.Conv2d(curr_dim, curr_dim*2, kernel_size=4, stride=1, padding=1))
layers.append(nn.LeakyReLU(0.01, inplace=True))
curr_dim = curr_dim *2
self.main = nn.Sequential(*layers)
if norm=='SN':
self.conv1 = SpectralNorm(nn.Conv2d(curr_dim, 1, kernel_size=4, stride=1, padding=1, bias=False))
else:
self.conv1 = nn.Conv2d(curr_dim, 1, kernel_size=4, stride=1, padding=1, bias=False)
# conv1 remain the last square size, 256*256-->30*30
#self.conv2 = SpectralNorm(nn.Conv2d(curr_dim, 1, kernel_size=k_size, bias=False))
#conv2 output a single number
def forward(self, x):
h = self.main(x)
#out_real = self.conv1(h)
out_makeup = self.conv1(h)
#return out_real.squeeze(), out_makeup.squeeze()
return out_makeup.squeeze()
class VGG(nn.Module):
def __init__(self, pool='max'):
super(VGG, self).__init__()
# vgg modules
self.conv1_1 = nn.Conv2d(3, 64, kernel_size=3, padding=1)
self.conv1_2 = nn.Conv2d(64, 64, kernel_size=3, padding=1)
self.conv2_1 = nn.Conv2d(64, 128, kernel_size=3, padding=1)
self.conv2_2 = nn.Conv2d(128, 128, kernel_size=3, padding=1)
self.conv3_1 = nn.Conv2d(128, 256, kernel_size=3, padding=1)
self.conv3_2 = nn.Conv2d(256, 256, kernel_size=3, padding=1)
self.conv3_3 = nn.Conv2d(256, 256, kernel_size=3, padding=1)
self.conv3_4 = nn.Conv2d(256, 256, kernel_size=3, padding=1)
self.conv4_1 = nn.Conv2d(256, 512, kernel_size=3, padding=1)
self.conv4_2 = nn.Conv2d(512, 512, kernel_size=3, padding=1)
self.conv4_3 = nn.Conv2d(512, 512, kernel_size=3, padding=1)
self.conv4_4 = nn.Conv2d(512, 512, kernel_size=3, padding=1)
self.conv5_1 = nn.Conv2d(512, 512, kernel_size=3, padding=1)
self.conv5_2 = nn.Conv2d(512, 512, kernel_size=3, padding=1)
self.conv5_3 = nn.Conv2d(512, 512, kernel_size=3, padding=1)
self.conv5_4 = nn.Conv2d(512, 512, kernel_size=3, padding=1)
if pool == 'max':
self.pool1 = nn.MaxPool2d(kernel_size=2, stride=2)
self.pool2 = nn.MaxPool2d(kernel_size=2, stride=2)
self.pool3 = nn.MaxPool2d(kernel_size=2, stride=2)
self.pool4 = nn.MaxPool2d(kernel_size=2, stride=2)
self.pool5 = nn.MaxPool2d(kernel_size=2, stride=2)
elif pool == 'avg':
self.pool1 = nn.AvgPool2d(kernel_size=2, stride=2)
self.pool2 = nn.AvgPool2d(kernel_size=2, stride=2)
self.pool3 = nn.AvgPool2d(kernel_size=2, stride=2)
self.pool4 = nn.AvgPool2d(kernel_size=2, stride=2)
self.pool5 = nn.AvgPool2d(kernel_size=2, stride=2)
def forward(self, x, out_keys):
out = {}
out['r11'] = F.relu(self.conv1_1(x))
out['r12'] = F.relu(self.conv1_2(out['r11']))
out['p1'] = self.pool1(out['r12'])
out['r21'] = F.relu(self.conv2_1(out['p1']))
out['r22'] = F.relu(self.conv2_2(out['r21']))
out['p2'] = self.pool2(out['r22'])
out['r31'] = F.relu(self.conv3_1(out['p2']))
out['r32'] = F.relu(self.conv3_2(out['r31']))
out['r33'] = F.relu(self.conv3_3(out['r32']))
out['r34'] = F.relu(self.conv3_4(out['r33']))
out['p3'] = self.pool3(out['r34'])
out['r41'] = F.relu(self.conv4_1(out['p3']))
out['r42'] = F.relu(self.conv4_2(out['r41']))
out['r43'] = F.relu(self.conv4_3(out['r42']))
out['r44'] = F.relu(self.conv4_4(out['r43']))
out['p4'] = self.pool4(out['r44'])
out['r51'] = F.relu(self.conv5_1(out['p4']))
out['r52'] = F.relu(self.conv5_2(out['r51']))
out['r53'] = F.relu(self.conv5_3(out['r52']))
out['r54'] = F.relu(self.conv5_4(out['r53']))
out['p5'] = self.pool5(out['r54'])
return [out[key] for key in out_keys]
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
import numpy as np
import torch
import copy
def cal_hist(image):
"""
cal cumulative hist for channel list
"""
hists = []
for i in range(0, 3):
channel = image[i]
# channel = image[i, :, :]
channel = torch.from_numpy(channel)
# hist, _ = np.histogram(channel, bins=256, range=(0,255))
hist = torch.histc(channel, bins=256, min=0, max=256)
hist = hist.numpy()
# refHist=hist.view(256,1)
sum = hist.sum()
pdf = [v / sum for v in hist]
for i in range(1, 256):
pdf[i] = pdf[i - 1] + pdf[i]
hists.append(pdf)
return hists
def cal_trans(ref, adj):
"""
calculate transfer function
algorithm refering to wiki item: Histogram matching
"""
table = list(range(0, 256))
for i in list(range(1, 256)):
for j in list(range(1, 256)):
if ref[i] >= adj[j - 1] and ref[i] <= adj[j]:
table[i] = j
break
table[255] = 255
return table
def histogram_matching(dstImg, refImg, index):
"""
perform histogram matching
dstImg is transformed to have the same the histogram with refImg's
index[0], index[1]: the index of pixels that need to be transformed in dstImg
index[2], index[3]: the index of pixels that to compute histogram in refImg
"""
index = [x.cpu().numpy() for x in index]
dstImg = dstImg.detach().cpu().numpy()
refImg = refImg.detach().cpu().numpy()
dst_align = [dstImg[i, index[0], index[1]] for i in range(0, 3)]
ref_align = [refImg[i, index[2], index[3]] for i in range(0, 3)]
hist_ref = cal_hist(ref_align)
hist_dst = cal_hist(dst_align)
tables = [cal_trans(hist_dst[i], hist_ref[i]) for i in range(0, 3)]
mid = copy.deepcopy(dst_align)
for i in range(0, 3):
for k in range(0, len(index[0])):
dst_align[i][k] = tables[i][int(mid[i][k])]
for i in range(0, 3):
dstImg[i, index[0], index[1]] = dst_align[i]
# dstImg = torch.FloatTensor(dstImg).cuda()
dstImg = torch.FloatTensor(dstImg)
return dstImg
import torch
import torch.nn as nn
from torch.autograd import Variable
class GANLoss(nn.Module):
def __init__(self, use_lsgan=True, target_real_label=1.0, target_fake_label=0.0,
tensor=torch.FloatTensor):
super(GANLoss, self).__init__()
self.real_label = target_real_label
self.fake_label = target_fake_label
self.real_label_var = None
self.fake_label_var = None
self.Tensor = tensor
if use_lsgan:
self.loss = nn.MSELoss()
else:
self.loss = nn.BCELoss()
def get_target_tensor(self, input, target_is_real):
target_tensor = None
if target_is_real:
create_label = ((self.real_label_var is None) or
(self.real_label_var.numel() != input.numel()))
if create_label:
real_tensor = self.Tensor(input.size()).fill_(self.real_label)
self.real_label_var = Variable(real_tensor, requires_grad=False)
target_tensor = self.real_label_var
else:
create_label = ((self.fake_label_var is None) or
(self.fake_label_var.numel() != input.numel()))
if create_label:
fake_tensor = self.Tensor(input.size()).fill_(self.fake_label)
self.fake_label_var = Variable(fake_tensor, requires_grad=False)
target_tensor = self.fake_label_var
return target_tensor
def __call__(self, input, target_is_real):
target_tensor = self.get_target_tensor(input, target_is_real)
return self.loss(input, target_tensor)
\ No newline at end of file
import torch
from torch.nn import Parameter
def l2normalize(v, eps=1e-12):
return v / (v.norm() + eps)
class SpectralNorm(object):
def __init__(self):
self.name = "weight"
#print(self.name)
self.power_iterations = 1
def compute_weight(self, module):
u = getattr(module, self.name + "_u")
v = getattr(module, self.name + "_v")
w = getattr(module, self.name + "_bar")
height = w.data.shape[0]
for _ in range(self.power_iterations):
v.data = l2normalize(torch.mv(torch.t(w.view(height,-1).data), u.data))
u.data = l2normalize(torch.mv(w.view(height,-1).data, v.data))
# sigma = torch.dot(u.data, torch.mv(w.view(height,-1).data, v.data))
sigma = u.dot(w.view(height, -1).mv(v))
return w / sigma.expand_as(w)
@staticmethod
def apply(module):
name = "weight"
fn = SpectralNorm()
try:
u = getattr(module, name + "_u")
v = getattr(module, name + "_v")
w = getattr(module, name + "_bar")
except AttributeError:
w = getattr(module, name)
height = w.data.shape[0]
width = w.view(height, -1).data.shape[1]
u = Parameter(w.data.new(height).normal_(0, 1), requires_grad=False)
v = Parameter(w.data.new(width).normal_(0, 1), requires_grad=False)
w_bar = Parameter(w.data)
#del module._parameters[name]
module.register_parameter(name + "_u", u)
module.register_parameter(name + "_v", v)
module.register_parameter(name + "_bar", w_bar)
# remove w from parameter list
del module._parameters[name]
setattr(module, name, fn.compute_weight(module))
# recompute weight before every forward()
module.register_forward_pre_hook(fn)
return fn
def remove(self, module):
weight = self.compute_weight(module)
delattr(module, self.name)
del module._parameters[self.name + '_u']
del module._parameters[self.name + '_v']
del module._parameters[self.name + '_bar']
module.register_parameter(self.name, Parameter(weight.data))
def __call__(self, module, inputs):
setattr(module, self.name, self.compute_weight(module))
def spectral_norm(module):
SpectralNorm.apply(module)
return module
def remove_spectral_norm(module):
name = 'weight'
for k, hook in module._forward_pre_hooks.items():
if isinstance(hook, SpectralNorm) and hook.name == name:
hook.remove(module)
del module._forward_pre_hooks[k]
return module
raise ValueError("spectral_norm of '{}' not found in {}"
.format(name, module))
\ No newline at end of file
import torch
import torch.nn.init as init
from torch.autograd import Variable
from torchvision.utils import save_image
import itertools
import os
import time
import datetime
import tools.plot as plot_fig
import net
from ops.loss_added import GANLoss
class Solver_cycleGAN(object):
"""
solver to reproduce the cycleGAN
"""
def __init__(self, data_loaders, config, dataset_config):
# dataloader
self.checkpoint = config.checkpoint
# Hyper-parameteres
self.g_lr = config.G_LR
self.d_lr = config.D_LR
self.ndis = config.ndis
self.num_epochs = config.num_epochs # set 200
self.num_epochs_decay = config.num_epochs_decay
# Training settings
self.snapshot_step = config.snapshot_step
self.log_step = config.log_step
self.vis_step = config.vis_step
#training setting
self.task_name = config.task_name
# Data loader
self.data_loader_train = data_loaders[0]
self.data_loader_test = data_loaders[1]
# Model hyper-parameters
self.img_size = config.img_size
self.g_conv_dim = config.g_conv_dim
self.d_conv_dim = config.d_conv_dim
self.g_repeat_num = config.g_repeat_num
self.d_repeat_num = config.d_repeat_num
# Hyper-parameteres
self.lambda_idt = config.lambda_idt
self.lambda_A = config.lambda_A
self.lambda_B = config.lambda_B
self.beta1 = config.beta1
self.beta2 = config.beta2
# Test settings
self.test_model = config.test_model
# Path
self.log_path = config.log_path + '_' + config.task_name
self.vis_path = config.vis_path + '_' + config.task_name
self.snapshot_path = config.snapshot_path + '_' + config.task_name
self.result_path = config.vis_path + '_' + config.task_name
if not os.path.exists(self.log_path):
os.makedirs(self.log_path)
if not os.path.exists(self.vis_path):
os.makedirs(self.vis_path)
if not os.path.exists(self.snapshot_path):
os.makedirs(self.snapshot_path)
self.build_model()
# Start with trained model
if self.checkpoint:
self.load_checkpoint()
#for recording
self.start_time = time.time()
self.e = 0
self.i = 0
self.loss = {}
if not os.path.exists(self.log_path):
os.makedirs(self.log_path)
if not os.path.exists(self.vis_path):
os.makedirs(self.vis_path)
if not os.path.exists(self.snapshot_path):
os.makedirs(self.snapshot_path)
def print_network(self, model, name):
num_params = 0
for p in model.parameters():
num_params += p.numel()
print(name)
print(model)
print("The number of parameters: {}".format(num_params))
def update_lr(self, g_lr, d_lr):
for param_group in self.g_optimizer.param_groups:
param_group['lr'] = g_lr
for param_group in self.d_A_optimizer.param_groups:
param_group['lr'] = d_lr
for param_group in self.d_B_optimizer.param_groups:
param_group['lr'] = d_lr
def log_terminal(self):
elapsed = time.time() - self.start_time
elapsed = str(datetime.timedelta(seconds=elapsed))
log = "Elapsed [{}], Epoch [{}/{}], Iter [{}/{}]".format(
elapsed, self.e+1, self.num_epochs, self.i+1, self.iters_per_epoch)
for tag, value in self.loss.items():
log += ", {}: {:.4f}".format(tag, value)
print(log)
def save_models(self):
torch.save(self.G_A.state_dict(),
os.path.join(self.snapshot_path, '{}_{}_G_A.pth'.format(self.e + 1, self.i + 1)))
torch.save(self.G_B.state_dict(),
os.path.join(self.snapshot_path, '{}_{}_G_B.pth'.format(self.e + 1, self.i + 1)))
torch.save(self.D_A.state_dict(),
os.path.join(self.snapshot_path, '{}_{}_D_A.pth'.format(self.e + 1, self.i + 1)))
torch.save(self.D_B.state_dict(),
os.path.join(self.snapshot_path, '{}_{}_D_B.pth'.format(self.e + 1, self.i + 1)))
def weights_init_xavier(self, m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
init.xavier_normal(m.weight.data, gain=1.0)
elif classname.find('Linear') != -1:
init.xavier_normal(m.weight.data, gain=1.0)
def to_var(self, x, requires_grad=True):
if torch.cuda.is_available():
x = x.cuda()
if not requires_grad:
return Variable(x, requires_grad=requires_grad)
else:
return Variable(x)
def denorm(self, x):
out = (x + 1) / 2
return out.clamp_(0, 1)
def load_checkpoint(self):
self.G_A.load_state_dict(torch.load(os.path.join(
self.snapshot_path, '{}_G_A.pth'.format(self.checkpoint))))
self.G_B.load_state_dict(torch.load(os.path.join(
self.snapshot_path, '{}_G_B.pth'.format(self.checkpoint))))
self.D_A.load_state_dict(torch.load(os.path.join(
self.snapshot_path, '{}_D_A.pth'.format(self.checkpoint))))
self.D_B.load_state_dict(torch.load(os.path.join(
self.snapshot_path, '{}_D_B.pth'.format(self.checkpoint))))
print('loaded trained models (step: {})..!'.format(self.checkpoint))
def build_model(self):
# Define generators and discriminators
self.G_A = net.Generator(self.g_conv_dim, self.g_repeat_num)
self.G_B = net.Generator(self.g_conv_dim, self.g_repeat_num)
self.D_A = net.Discriminator(self.img_size, self.d_conv_dim, self.d_repeat_num)
self.D_B = net.Discriminator(self.img_size, self.d_conv_dim, self.d_repeat_num)
self.criterionL1 = torch.nn.L1Loss()
self.criterionGAN = GANLoss(use_lsgan=True, tensor =torch.cuda.FloatTensor)
# Optimizers
self.g_optimizer = torch.optim.Adam(itertools.chain(self.G_A.parameters(), self.G_B.parameters()),
self.g_lr, [self.beta1, self.beta2])
self.d_A_optimizer = torch.optim.Adam(filter(lambda p: p.requires_grad, self.D_A.parameters()), self.d_lr, [self.beta1, self.beta2])
self.d_B_optimizer = torch.optim.Adam(filter(lambda p: p.requires_grad, self.D_B.parameters()), self.d_lr, [self.beta1, self.beta2])
self.G_A.apply(self.weights_init_xavier)
self.D_A.apply(self.weights_init_xavier)
self.G_B.apply(self.weights_init_xavier)
self.D_B.apply(self.weights_init_xavier)
# Print networks
# self.print_network(self.E, 'E')
self.print_network(self.G_A, 'G_A')
self.print_network(self.D_A, 'D_A')
self.print_network(self.G_B, 'G_B')
self.print_network(self.D_B, 'D_B')
if torch.cuda.is_available():
self.G_A.cuda()
self.G_B.cuda()
self.D_A.cuda()
self.D_B.cuda()
def train(self):
"""Train StarGAN within a single dataset."""
# The number of iterations per epoch
self.iters_per_epoch = len(self.data_loader_train)
# Start with trained model if exists
g_lr = self.g_lr
d_lr = self.d_lr
if self.checkpoint:
start = int(self.checkpoint.split('_')[0])
else:
start = 0
# Start training
self.start_time = time.time()
for self.e in range(start, self.num_epochs):
for self.i, (img_A, img_B, _, _) in enumerate(self.data_loader_train):
# Convert tensor to variable
org_A = self.to_var(img_A, requires_grad=False)
ref_B = self.to_var(img_B, requires_grad=False)
# ================== Train D ================== #
# training D_A
# Real
out = self.D_A(ref_B)
d_loss_real = self.criterionGAN(out, True)
# Fake
fake = self.G_A(org_A)
fake = Variable(fake.data)
fake = fake.detach()
out = self.D_A(fake)
#d_loss_fake = self.get_D_loss(out, "fake")
d_loss_fake = self.criterionGAN(out, False)
# Backward + Optimize
d_loss = (d_loss_real + d_loss_fake) * 0.5
self.d_A_optimizer.zero_grad()
d_loss.backward(retain_graph=True)
self.d_A_optimizer.step()
# Logging
self.loss = {}
self.loss['D-A-loss_real'] = d_loss_real.item()
# training D_B
# Real
out = self.D_B(org_A)
d_loss_real = self.criterionGAN(out, True)
# Fake
fake = self.G_B(ref_B)
fake = Variable(fake.data)
fake = fake.detach()
out = self.D_B(fake)
#d_loss_fake = self.get_D_loss(out, "fake")
d_loss_fake = self.criterionGAN(out, False)
# Backward + Optimize
d_loss = (d_loss_real + d_loss_fake) * 0.5
self.d_B_optimizer.zero_grad()
d_loss.backward(retain_graph=True)
self.d_B_optimizer.step()
# Logging
self.loss['D-B-loss_real'] = d_loss_real.item()
# ================== Train G ================== #
if (self.i + 1) % self.ndis == 0:
# adversarial loss, i.e. L_trans,v in the paper
# identity loss
if self.lambda_idt > 0:
# G_A should be identity if ref_B is fed
idt_A = self.G_A(ref_B)
loss_idt_A = self.criterionL1(idt_A, ref_B) * self.lambda_B * self.lambda_idt
# G_B should be identity if org_A is fed
idt_B = self.G_B(org_A)
loss_idt_B = self.criterionL1(idt_B, org_A) * self.lambda_A * self.lambda_idt
g_loss_idt = loss_idt_A + loss_idt_B
else:
g_loss_idt = 0
# GAN loss D_A(G_A(A))
fake_B = self.G_A(org_A)
pred_fake = self.D_A(fake_B)
g_A_loss_adv = self.criterionGAN(pred_fake, True)
#g_loss_adv = self.get_G_loss(out)
# GAN loss D_B(G_B(B))
fake_A = self.G_B(ref_B)
pred_fake = self.D_B(fake_A)
g_B_loss_adv = self.criterionGAN(pred_fake, True)
# Forward cycle loss
rec_A = self.G_B(fake_B)
g_loss_rec_A = self.criterionL1(rec_A, org_A) * self.lambda_A
# Backward cycle loss
rec_B = self.G_A(fake_A)
g_loss_rec_B = self.criterionL1(rec_B, ref_B) * self.lambda_B
# Combined loss
g_loss = g_A_loss_adv + g_B_loss_adv + g_loss_rec_A + g_loss_rec_B + g_loss_idt
self.g_optimizer.zero_grad()
g_loss.backward(retain_graph=True)
self.g_optimizer.step()
# Logging
self.loss['G-A-loss_adv'] = g_A_loss_adv.item()
self.loss['G-B-loss_adv'] = g_A_loss_adv.item()
self.loss['G-loss_org'] = g_loss_rec_A.item()
self.loss['G-loss_ref'] = g_loss_rec_B.item()
self.loss['G-loss_idt'] = g_loss_idt.item()
# Print out log info
if (self.i + 1) % self.log_step == 0:
self.log_terminal()
#plot the figures
for key_now in self.loss.keys():
plot_fig.plot(key_now, self.loss[key_now])
#save the images
if (self.i + 1) % self.vis_step == 0:
print("Saving middle output...")
self.vis_train([org_A, ref_B, fake_A, fake_B, rec_A, rec_B])
self.vis_test()
# Save model checkpoints
if (self.i + 1) % self.snapshot_step == 0:
self.save_models()
if (self.i % 100 == 99):
plot_fig.flush(self.task_name)
plot_fig.tick()
# Decay learning rate
if (self.e+1) > (self.num_epochs - self.num_epochs_decay):
g_lr -= (self.g_lr / float(self.num_epochs_decay))
d_lr -= (self.d_lr / float(self.num_epochs_decay))
self.update_lr(g_lr, d_lr)
print('Decay learning rate to g_lr: {}, d_lr:{}.'.format(g_lr, d_lr))
def vis_train(self, img_train_list):
# saving training results
mode = "train_vis"
img_train_list = torch.cat(img_train_list, dim=3)
result_path_train = os.path.join(self.result_path, mode)
if not os.path.exists(result_path_train):
os.mkdir(result_path_train)
save_path = os.path.join(result_path_train, '{}_{}_fake.jpg'.format(self.e, self.i))
save_image(self.denorm(img_train_list.data), save_path, normalize=True)
def vis_test(self):
# saving test results
mode = "test_vis"
for i, (img_A, img_B) in enumerate(self.data_loader_test):
real_org = self.to_var(img_A)
real_ref = self.to_var(img_B)
image_list = []
image_list.append(real_org)
image_list.append(real_ref)
# Get makeup result
fake_A = self.G_A(real_org)
fake_B = self.G_B(real_ref)
rec_A = self.G_B(fake_A)
rec_B = self.G_A(fake_B)
image_list.append(fake_A)
image_list.append(fake_B)
image_list.append(rec_A)
image_list.append(rec_B)
image_list = torch.cat(image_list, dim=3)
vis_train_path = os.path.join(self.result_path, mode)
result_path_now = os.path.join(vis_train_path, "epoch" + str(self.e))
if not os.path.exists(result_path_now):
os.makedirs(result_path_now)
save_path = os.path.join(result_path_now, '{}_{}_{}_fake.jpg'.format(self.e, self.i, i + 1))
save_image(self.denorm(image_list.data), save_path, normalize=True)
#print('Translated test images and saved into "{}"..!'.format(save_path))
def test(self):
# Load trained parameters
G_A_path = os.path.join(self.snapshot_path, '{}_G_A.pth'.format(self.test_model))
G_B_path = os.path.join(self.snapshot_path, '{}_G_B.pth'.format(self.test_model))
self.G_A.load_state_dict(torch.load(G_A_path))
self.G_A.eval()
self.G_B.load_state_dict(torch.load(G_B_path))
self.G_B.eval()
for i, (img_A, img_B) in enumerate(self.data_loader_test):
real_org = self.to_var(img_A)
real_ref = self.to_var(img_B)
image_list = []
image_list.append(real_org)
image_list.append(real_ref)
# Get makeup result
fake_A = self.G_A(real_org)
fake_B = self.G_B(real_ref)
rec_A = self.G_B(fake_A)
rec_B = self.G_A(fake_B)
image_list.append(fake_A)
image_list.append(fake_B)
image_list.append(rec_A)
image_list.append(rec_B)
image_list = torch.cat(image_list, dim=3)
save_path = os.path.join(self.result_path, '{}_{}_{}_fake.png'.format(self.e, self.i, i + 1))
save_image(self.denorm(image_list.data), save_path, nrow=1, padding=0, normalize=True)
print('Translated test images and saved into "{}"..!'.format(save_path))
import torch
import torch.nn.init as init
from torch.autograd import Variable
from torchvision.utils import save_image
import os
import time
import datetime
import tools.plot as plot_fig
import net
from ops.histogram_matching import *
from ops.loss_added import GANLoss
class Solver_makeupGAN(object):
def __init__(self, data_loaders, config, dataset_config):
# dataloader
self.checkpoint = config.checkpoint
# Hyper-parameteres
self.g_lr = config.G_LR
self.d_lr = config.D_LR
self.ndis = config.ndis
self.num_epochs = config.num_epochs # set 200
self.num_epochs_decay = config.num_epochs_decay
self.batch_size = config.batch_size
self.whichG = config.whichG
self.norm = config.norm
# Training settings
self.snapshot_step = config.snapshot_step
self.log_step = config.log_step
self.vis_step = config.vis_step
#training setting
self.task_name = config.task_name
# Data loader
self.data_loader_train = data_loaders[0]
self.data_loader_test = data_loaders[1]
# Model hyper-parameters
self.img_size = config.img_size
self.g_conv_dim = config.g_conv_dim
self.d_conv_dim = config.d_conv_dim
self.g_repeat_num = config.g_repeat_num
self.d_repeat_num = config.d_repeat_num
self.lips = config.lips
self.skin = config.skin
self.eye = config.eye
# Hyper-parameteres
self.lambda_idt = config.lambda_idt
self.lambda_A = config.lambda_A
self.lambda_B = config.lambda_B
self.lambda_his_lip = config.lambda_his_lip
self.lambda_his_skin_1 = config.lambda_his_skin_1
self.lambda_his_skin_2 = config.lambda_his_skin_2
self.lambda_his_eye = config.lambda_his_eye
self.lambda_vgg = config.lambda_vgg
self.beta1 = config.beta1
self.beta2 = config.beta2
self.cls = config.cls_list
self.content_layer = config.content_layer
self.direct = config.direct
# Test settings
self.test_model = config.test_model
# Path
self.log_path = config.log_path + '_' + config.task_name
self.vis_path = config.vis_path + '_' + config.task_name
self.snapshot_path = config.snapshot_path + '_' + config.task_name
self.result_path = config.vis_path + '_' + config.task_name
if not os.path.exists(self.log_path):
os.makedirs(self.log_path)
if not os.path.exists(self.vis_path):
os.makedirs(self.vis_path)
if not os.path.exists(self.snapshot_path):
os.makedirs(self.snapshot_path)
self.build_model()
# Start with trained model
if self.checkpoint:
self.load_checkpoint()
#for recording
self.start_time = time.time()
self.e = 0
self.i = 0
self.loss = {}
if not os.path.exists(self.log_path):
os.makedirs(self.log_path)
if not os.path.exists(self.vis_path):
os.makedirs(self.vis_path)
if not os.path.exists(self.snapshot_path):
os.makedirs(self.snapshot_path)
def print_network(self, model, name):
num_params = 0
for p in model.parameters():
num_params += p.numel()
print(name)
print(model)
print("The number of parameters: {}".format(num_params))
def update_lr(self, g_lr, d_lr):
for param_group in self.g_optimizer.param_groups:
param_group['lr'] = g_lr
for i in self.cls:
for param_group in getattr(self, "d_" + i + "_optimizer").param_groups:
param_group['lr'] = d_lr
def log_terminal(self):
elapsed = time.time() - self.start_time
elapsed = str(datetime.timedelta(seconds=elapsed))
log = "Elapsed [{}], Epoch [{}/{}], Iter [{}/{}]".format(
elapsed, self.e+1, self.num_epochs, self.i+1, self.iters_per_epoch)
for tag, value in self.loss.items():
log += ", {}: {:.4f}".format(tag, value)
print(log)
def save_models(self):
torch.save(self.G.state_dict(),
os.path.join(self.snapshot_path, '{}_{}_G.pth'.format(self.e + 1, self.i + 1)))
for i in self.cls:
torch.save(getattr(self, "D_" + i).state_dict(),
os.path.join(self.snapshot_path, '{}_{}_D_'.format(self.e + 1, self.i + 1) + i + '.pth'))
def weights_init_xavier(self, m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
init.xavier_normal(m.weight.data, gain=1.0)
elif classname.find('Linear') != -1:
init.xavier_normal(m.weight.data, gain=1.0)
def to_var(self, x, requires_grad=True):
if torch.cuda.is_available():
x = x.cuda()
if not requires_grad:
return Variable(x, requires_grad=requires_grad)
else:
return Variable(x)
def de_norm(self, x):
out = (x + 1) / 2
return out.clamp(0, 1)
def load_checkpoint(self):
self.G.load_state_dict(torch.load(os.path.join(
self.snapshot_path, '{}_G.pth'.format(self.checkpoint))))
for i in self.cls:
getattr(self, "D_" + i).load_state_dict(torch.load(os.path.join(
self.snapshot_path, '{}_D_'.format(self.checkpoint) + i + '.pth')))
print('loaded trained models (step: {})..!'.format(self.checkpoint))
def build_model(self):
# Define generators and discriminators
if self.whichG=='normal':
self.G = net.Generator_makeup(self.g_conv_dim, self.g_repeat_num)
if self.whichG=='branch':
self.G = net.Generator_branch(self.g_conv_dim, self.g_repeat_num)
for i in self.cls:
setattr(self, "D_" + i, net.Discriminator(self.img_size, self.d_conv_dim, self.d_repeat_num, self.norm))
self.criterionL1 = torch.nn.L1Loss()
self.criterionL2 = torch.nn.MSELoss()
# self.criterionGAN = GANLoss(use_lsgan=True, tensor =torch.cuda.FloatTensor)
self.criterionGAN = GANLoss(use_lsgan=True)
from torchvision.models import vgg16
self.vgg = vgg16(pretrained=False)
self.vgg.load_state_dict(torch.load('/Users/edz/Downloads/vgg16-397923af.pth'))
# self.vgg = net.VGG()
# self.vgg.load_state_dict(torch.load('/Users/edz/Downloads/vgg16-397923af.pth'))
# Optimizers
self.g_optimizer = torch.optim.Adam(self.G.parameters(), self.g_lr, [self.beta1, self.beta2])
for i in self.cls:
setattr(self, "d_" + i + "_optimizer", \
torch.optim.Adam(filter(lambda p: p.requires_grad, getattr(self, "D_" + i).parameters()), \
self.d_lr, [self.beta1, self.beta2]))
# Weights initialization
self.G.apply(self.weights_init_xavier)
for i in self.cls:
getattr(self, "D_" + i).apply(self.weights_init_xavier)
# Print networks
self.print_network(self.G, 'G')
for i in self.cls:
self.print_network(getattr(self, "D_" + i), "D_" + i)
if torch.cuda.is_available():
self.G.cuda()
self.vgg.cuda()
for i in self.cls:
getattr(self, "D_" + i).cuda()
def rebound_box(self, mask_A, mask_B, mask_A_face):
index_tmp = mask_A.nonzero()
x_A_index = index_tmp[:, 2]
y_A_index = index_tmp[:, 3]
index_tmp = mask_B.nonzero()
x_B_index = index_tmp[:, 2]
y_B_index = index_tmp[:, 3]
mask_A_temp = mask_A.copy_(mask_A)
mask_B_temp = mask_B.copy_(mask_B)
mask_A_temp[: ,: ,min(x_A_index)-10:max(x_A_index)+11, min(y_A_index)-10:max(y_A_index)+11] =\
mask_A_face[: ,: ,min(x_A_index)-10:max(x_A_index)+11, min(y_A_index)-10:max(y_A_index)+11]
mask_B_temp[: ,: ,min(x_B_index)-10:max(x_B_index)+11, min(y_B_index)-10:max(y_B_index)+11] =\
mask_A_face[: ,: ,min(x_B_index)-10:max(x_B_index)+11, min(y_B_index)-10:max(y_B_index)+11]
mask_A_temp = self.to_var(mask_A_temp, requires_grad=False)
mask_B_temp = self.to_var(mask_B_temp, requires_grad=False)
return mask_A_temp, mask_B_temp
def mask_preprocess(self, mask_A, mask_B):
index_tmp = mask_A.nonzero()
x_A_index = index_tmp[:, 2]
y_A_index = index_tmp[:, 3]
index_tmp = mask_B.nonzero()
x_B_index = index_tmp[:, 2]
y_B_index = index_tmp[:, 3]
mask_A = self.to_var(mask_A, requires_grad=False)
mask_B = self.to_var(mask_B, requires_grad=False)
index = [x_A_index, y_A_index, x_B_index, y_B_index]
index_2 = [x_B_index, y_B_index, x_A_index, y_A_index]
return mask_A, mask_B, index, index_2
def criterionHis(self, input_data, target_data, mask_src, mask_tar, index):
input_data = (self.de_norm(input_data) * 255).squeeze()
target_data = (self.de_norm(target_data) * 255).squeeze()
mask_src = mask_src.expand(1, 3, mask_src.size(2), mask_src.size(2)).squeeze()
mask_tar = mask_tar.expand(1, 3, mask_tar.size(2), mask_tar.size(2)).squeeze()
input_masked = input_data * mask_src
target_masked = target_data * mask_tar
# dstImg = (input_masked.data).cpu().clone()
# refImg = (target_masked.data).cpu().clone()
input_match = histogram_matching(input_masked, target_masked, index)
input_match = self.to_var(input_match, requires_grad=False)
loss = self.criterionL1(input_masked, input_match)
return loss
def train(self):
"""Train StarGAN within a single dataset."""
# The number of iterations per epoch
self.iters_per_epoch = len(self.data_loader_train)
# Start with trained model if exists
cls_A = self.cls[0]
cls_B = self.cls[1]
g_lr = self.g_lr
d_lr = self.d_lr
if self.checkpoint:
start = int(self.checkpoint.split('_')[0])
self.vis_test()
else:
start = 0
# Start training
self.start_time = time.time()
for self.e in range(start, self.num_epochs):
for self.i, (img_A, img_B, mask_A, mask_B) in enumerate(self.data_loader_train):
# Convert tensor to variable
# mask attribute: 0:background 1:face 2:left-eyebrown 3:right-eyebrown 4:left-eye 5: right-eye 6: nose
# 7: upper-lip 8: teeth 9: under-lip 10:hair 11: left-ear 12: right-ear 13: neck
if self.checkpoint or self.direct:
if self.lips==True:
mask_A_lip = (mask_A==7).float() + (mask_A==9).float()
mask_B_lip = (mask_B==7).float() + (mask_B==9).float()
mask_A_lip, mask_B_lip, index_A_lip, index_B_lip = self.mask_preprocess(mask_A_lip, mask_B_lip)
if self.skin==True:
mask_A_skin = (mask_A==1).float() + (mask_A==6).float() + (mask_A==13).float()
mask_B_skin = (mask_B==1).float() + (mask_B==6).float() + (mask_B==13).float()
mask_A_skin, mask_B_skin, index_A_skin, index_B_skin = self.mask_preprocess(mask_A_skin, mask_B_skin)
if self.eye==True:
mask_A_eye_left = (mask_A==4).float()
mask_A_eye_right = (mask_A==5).float()
mask_B_eye_left = (mask_B==4).float()
mask_B_eye_right = (mask_B==5).float()
mask_A_face = (mask_A==1).float() + (mask_A==6).float()
mask_B_face = (mask_B==1).float() + (mask_B==6).float()
# avoid the situation that images with eye closed
if not ((mask_A_eye_left>0).any() and (mask_B_eye_left>0).any() and \
(mask_A_eye_right > 0).any() and (mask_B_eye_right > 0).any()):
continue
mask_A_eye_left, mask_A_eye_right = self.rebound_box(mask_A_eye_left, mask_A_eye_right, mask_A_face)
mask_B_eye_left, mask_B_eye_right = self.rebound_box(mask_B_eye_left, mask_B_eye_right, mask_B_face)
mask_A_eye_left, mask_B_eye_left, index_A_eye_left, index_B_eye_left = \
self.mask_preprocess(mask_A_eye_left, mask_B_eye_left)
mask_A_eye_right, mask_B_eye_right, index_A_eye_right, index_B_eye_right = \
self.mask_preprocess(mask_A_eye_right, mask_B_eye_right)
org_A = self.to_var(img_A, requires_grad=False)
ref_B = self.to_var(img_B, requires_grad=False)
# ================== Train D ================== #
# training D_A, D_A aims to distinguish class B
# Real
out = getattr(self, "D_" + cls_A)(ref_B)
d_loss_real = self.criterionGAN(out, True)
# Fake
fake_A, fake_B = self.G(org_A, ref_B)
fake_A = Variable(fake_A.data).detach()
fake_B = Variable(fake_B.data).detach()
out = getattr(self, "D_" + cls_A)(fake_A)
#d_loss_fake = self.get_D_loss(out, "fake")
d_loss_fake = self.criterionGAN(out, False)
# Backward + Optimize
d_loss = (d_loss_real + d_loss_fake) * 0.5
getattr(self, "d_" + cls_A + "_optimizer").zero_grad()
d_loss.backward(retain_graph=True)
getattr(self, "d_" + cls_A + "_optimizer").step()
# Logging
self.loss = {}
self.loss['D-A-loss_real'] = d_loss_real.item()
# training D_B, D_B aims to distinguish class A
# Real
out = getattr(self, "D_" + cls_B)(org_A)
d_loss_real = self.criterionGAN(out, True)
# Fake
out = getattr(self, "D_" + cls_B)(fake_B)
#d_loss_fake = self.get_D_loss(out, "fake")
d_loss_fake = self.criterionGAN(out, False)
# Backward + Optimize
d_loss = (d_loss_real + d_loss_fake) * 0.5
getattr(self, "d_" + cls_B + "_optimizer").zero_grad()
d_loss.backward(retain_graph=True)
getattr(self, "d_" + cls_B + "_optimizer").step()
# Logging
self.loss['D-B-loss_real'] = d_loss_real.item()
# ================== Train G ================== #
if (self.i + 1) % self.ndis == 0:
# adversarial loss, i.e. L_trans,v in the paper
# identity loss
if self.lambda_idt > 0:
# G should be identity if ref_B or org_A is fed
idt_A1, idt_A2 = self.G(org_A, org_A)
idt_B1, idt_B2 = self.G(ref_B, ref_B)
loss_idt_A1 = self.criterionL1(idt_A1, org_A) * self.lambda_A * self.lambda_idt
loss_idt_A2 = self.criterionL1(idt_A2, org_A) * self.lambda_A * self.lambda_idt
loss_idt_B1 = self.criterionL1(idt_B1, ref_B) * self.lambda_B * self.lambda_idt
loss_idt_B2 = self.criterionL1(idt_B2, ref_B) * self.lambda_B * self.lambda_idt
# loss_idt
loss_idt = (loss_idt_A1 + loss_idt_A2 + loss_idt_B1 + loss_idt_B2) * 0.5
else:
loss_idt = 0
# GAN loss D_A(G_A(A))
# fake_A in class B,
fake_A, fake_B = self.G(org_A, ref_B)
pred_fake = getattr(self, "D_" + cls_A)(fake_A)
g_A_loss_adv = self.criterionGAN(pred_fake, True)
#g_loss_adv = self.get_G_loss(out)
# GAN loss D_B(G_B(B))
pred_fake = getattr(self, "D_" + cls_B)(fake_B)
g_B_loss_adv = self.criterionGAN(pred_fake, True)
rec_B, rec_A = self.G(fake_B, fake_A)
# color_histogram loss
g_A_loss_his = 0
g_B_loss_his = 0
if self.checkpoint or self.direct:
if self.lips==True:
g_A_lip_loss_his = self.criterionHis(fake_A, ref_B, mask_A_lip, mask_B_lip, index_A_lip) * self.lambda_his_lip
g_B_lip_loss_his = self.criterionHis(fake_B, org_A, mask_B_lip, mask_A_lip, index_B_lip) * self.lambda_his_lip
g_A_loss_his += g_A_lip_loss_his
g_B_loss_his += g_B_lip_loss_his
if self.skin==True:
g_A_skin_loss_his = self.criterionHis(fake_A, ref_B, mask_A_skin, mask_B_skin, index_A_skin) * self.lambda_his_skin_1
g_B_skin_loss_his = self.criterionHis(fake_B, org_A, mask_B_skin, mask_A_skin, index_B_skin) * self.lambda_his_skin_2
g_A_loss_his += g_A_skin_loss_his
g_B_loss_his += g_B_skin_loss_his
if self.eye==True:
g_A_eye_left_loss_his = self.criterionHis(fake_A, ref_B, mask_A_eye_left, mask_B_eye_left, index_A_eye_left) * self.lambda_his_eye
g_B_eye_left_loss_his = self.criterionHis(fake_B, org_A, mask_B_eye_left, mask_A_eye_left, index_B_eye_left) * self.lambda_his_eye
g_A_eye_right_loss_his = self.criterionHis(fake_A, ref_B, mask_A_eye_right, mask_B_eye_right, index_A_eye_right) * self.lambda_his_eye
g_B_eye_right_loss_his = self.criterionHis(fake_B, org_A, mask_B_eye_right, mask_A_eye_right, index_B_eye_right) * self.lambda_his_eye
g_A_loss_his += g_A_eye_left_loss_his + g_A_eye_right_loss_his
g_B_loss_his += g_B_eye_left_loss_his + g_B_eye_right_loss_his
# cycle loss
g_loss_rec_A = self.criterionL1(rec_A, org_A) * self.lambda_A
g_loss_rec_B = self.criterionL1(rec_B, ref_B) * self.lambda_B
# vgg loss
# vgg_org = self.vgg(org_A, self.content_layer)[0]
def vgg_forward( model, x):
for i in range(18):
x = model.features[i](x)
return x
vgg_org = vgg_forward(self.vgg,org_A)
vgg_org = Variable(vgg_org.data).detach()
# vgg_fake_A = self.vgg(fake_A, self.content_layer)[0]
vgg_fake_A = vgg_forward(self.vgg,fake_A)
g_loss_A_vgg = self.criterionL2(vgg_fake_A, vgg_org) * self.lambda_A * self.lambda_vgg
# vgg_ref = self.vgg(ref_B, self.content_layer)[0]
vgg_ref = vgg_forward(self.vgg,ref_B)
vgg_ref = Variable(vgg_ref.data).detach()
# vgg_fake_B = self.vgg(fake_B, self.content_layer)[0]
vgg_fake_B = vgg_forward(self.vgg,fake_B)
g_loss_B_vgg = self.criterionL2(vgg_fake_B, vgg_ref) * self.lambda_B * self.lambda_vgg
loss_rec = (g_loss_rec_A + g_loss_rec_B + g_loss_A_vgg + g_loss_B_vgg) * 0.5
# Combined loss
g_loss = g_A_loss_adv + g_B_loss_adv + loss_rec + loss_idt
if self.checkpoint or self.direct:
g_loss = g_A_loss_adv + g_B_loss_adv + loss_rec + loss_idt + g_A_loss_his + g_B_loss_his
self.g_optimizer.zero_grad()
g_loss.backward(retain_graph=True)
self.g_optimizer.step()
# Logging
self.loss['G-A-loss-adv'] = g_A_loss_adv.item()
self.loss['G-B-loss-adv'] = g_A_loss_adv.item()
self.loss['G-loss-org'] = g_loss_rec_A.item()
self.loss['G-loss-ref'] = g_loss_rec_B.item()
self.loss['G-loss-idt'] = loss_idt.item()
self.loss['G-loss-img-rec'] = (g_loss_rec_A + g_loss_rec_B).item()
self.loss['G-loss-vgg-rec'] = (g_loss_A_vgg + g_loss_B_vgg).item()
if self.direct:
self.loss['G-A-loss-his'] = g_A_loss_his.item()
self.loss['G-B-loss-his'] = g_B_loss_his.item()
# Print out log info
if (self.i + 1) % self.log_step == 0:
self.log_terminal()
#plot the figures
for key_now in self.loss.keys():
plot_fig.plot(key_now, self.loss[key_now])
#save the images
if (self.i + 1) % self.vis_step == 0:
print("Saving middle output...")
self.vis_train([org_A, ref_B, fake_A, fake_B, rec_A, rec_B])
# Save model checkpoints
if (self.i + 1) % self.snapshot_step == 0:
self.save_models()
if (self.i % 100 == 99):
plot_fig.flush(self.task_name)
plot_fig.tick()
# Decay learning rate
if (self.e+1) > (self.num_epochs - self.num_epochs_decay):
g_lr -= (self.g_lr / float(self.num_epochs_decay))
d_lr -= (self.d_lr / float(self.num_epochs_decay))
self.update_lr(g_lr, d_lr)
print('Decay learning rate to g_lr: {}, d_lr:{}.'.format(g_lr, d_lr))
if self.e % 2 == 0:
print("Saving output...")
self.vis_test()
def vis_train(self, img_train_list):
# saving training results
mode = "train_vis"
img_train_list = torch.cat(img_train_list, dim=3)
result_path_train = os.path.join(self.result_path, mode)
if not os.path.exists(result_path_train):
os.mkdir(result_path_train)
save_path = os.path.join(result_path_train, '{}_{}_fake.jpg'.format(self.e, self.i))
save_image(self.de_norm(img_train_list.data), save_path, normalize=True)
def vis_test(self):
# saving test results
mode = "test_vis"
for i, (img_A, img_B) in enumerate(self.data_loader_test):
real_org = self.to_var(img_A)
real_ref = self.to_var(img_B)
image_list = []
image_list.append(real_org)
image_list.append(real_ref)
# Get makeup result
fake_A, fake_B = self.G(real_org, real_ref)
rec_B, rec_A = self.G(fake_B, fake_A)
image_list.append(fake_A)
image_list.append(fake_B)
image_list.append(rec_A)
image_list.append(rec_B)
image_list = torch.cat(image_list, dim=3)
vis_train_path = os.path.join(self.result_path, mode)
result_path_now = os.path.join(vis_train_path, "epoch" + str(self.e))
if not os.path.exists(result_path_now):
os.makedirs(result_path_now)
save_path = os.path.join(result_path_now, '{}_{}_{}_fake.png'.format(self.e, self.i, i + 1))
save_image(self.de_norm(image_list.data), save_path, normalize=True)
#print('Translated test images and saved into "{}"..!'.format(save_path))
def test(self):
# Load trained parameters
G_path = os.path.join(self.snapshot_path, '{}_G.pth'.format(self.test_model))
self.G.load_state_dict(torch.load(G_path))
self.G.eval()
#time_total = time.time()
time_total = 0
for i, (img_A, img_B) in enumerate(self.data_loader_test):
#start = time.time()
start = time.time()
real_org = self.to_var(img_A)
real_ref = self.to_var(img_B)
image_list = []
image_list_0 = []
image_list.append(real_org)
image_list.append(real_ref)
# Get makeup result
fake_A, fake_B = self.G(real_org, real_ref)
rec_B, rec_A = self.G(fake_B, fake_A)
time_total += time.time() - start
image_list.append(fake_A)
image_list_0.append(fake_A)
image_list.append(fake_B)
image_list.append(rec_A)
image_list.append(rec_B)
image_list = torch.cat(image_list, dim=3)
image_list_0 = torch.cat(image_list_0, dim=3)
result_path_now = os.path.join(self.result_path, "multi")
if not os.path.exists(result_path_now):
os.makedirs(result_path_now)
save_path = os.path.join(result_path_now, '{}_{}_{}_fake.png'.format(self.e, self.i, i + 1))
save_image(self.de_norm(image_list.data), save_path, nrow=1, padding=0, normalize=True)
result_path_now = os.path.join(self.result_path, "single")
if not os.path.exists(result_path_now):
os.makedirs(result_path_now)
save_path_0 = os.path.join(result_path_now, '{}_{}_{}_fake_single.png'.format(self.e, self.i, i + 1))
save_image(self.de_norm(image_list_0.data), save_path_0, nrow=1, padding=0, normalize=True)
print('Translated test images and saved into "{}"..!'.format(save_path))
print("average time : {}".format(time_total/len(self.data_loader_test)))
import os
import argparse
from torch.backends import cudnn
from config import config, dataset_config, merge_cfg_arg
from dataloder import get_loader
from solver_cycle import Solver_cycleGAN
from solver_makeup import Solver_makeupGAN
def parse_args():
parser = argparse.ArgumentParser(description='Train GAN')
# general
parser.add_argument('--data_path', default='makeup/makeup_final/', type=str, help='training and test data path')
parser.add_argument('--dataset', default='MAKEUP', type=str, help='dataset name, MAKEUP means two domain, MMAKEUP means multi-domain')
parser.add_argument('--gpus', default='0', type=str, help='GPU device to train with')
parser.add_argument('--batch_size', default='1', type=int, help='batch_size')
parser.add_argument('--vis_step', default='1260', type=int, help='steps between visualization')
parser.add_argument('--task_name', default='', type=str, help='task name')
parser.add_argument('--ndis', default='1', type=int, help='train discriminator steps')
parser.add_argument('--LR', default="2e-4", type=float, help='Learning rate')
parser.add_argument('--decay', default='0', type=int, help='epochs number for training')
parser.add_argument('--model', default='makeupGAN', type=str, help='which model to use: cycleGAN/ makeupGAN')
parser.add_argument('--epochs', default='300', type=int, help='nums of epochs')
parser.add_argument('--whichG', default='branch', type=str, help='which Generator to choose, normal/branch, branch means two input branches')
parser.add_argument('--norm', default='SN', type=str, help='normalization of discriminator, SN means spectrum normalization, none means no normalization')
parser.add_argument('--d_repeat', default='3', type=int, help='the repeat Res-block in discriminator')
parser.add_argument('--g_repeat', default='6', type=int, help='the repeat Res-block in Generator')
parser.add_argument('--lambda_cls', default='1', type=float, help='the lambda_cls weight')
parser.add_argument('--lambda_rec', default='10', type=int, help='lambda_A and lambda_B')
parser.add_argument('--lambda_his', default='1', type=float, help='histogram loss on lips')
parser.add_argument('--lambda_skin_1', default='0.1', type=float, help='histogram loss on skin equals to lambda_his* lambda_skin')
parser.add_argument('--lambda_skin_2', default='0.1', type=float, help='histogram loss on skin equals to lambda_his* lambda_skin')
parser.add_argument('--lambda_eye', default='1', type=float, help='histogram loss on eyes equals to lambda_his*lambda_eye')
parser.add_argument('--content_layer', default='r41', type=str, help='vgg layer we use')
parser.add_argument('--lambda_vgg', default='5e-3', type=float, help='the param of vgg loss')
parser.add_argument('--cls_list', default='A_OM,B_OM', type=str, help='the classes we choose')
parser.add_argument('--direct', action="store_true", default=False, help='direct means to add local cosmetic loss at the first, unified training')
parser.add_argument('--finetune', action="store_true", default=False, help='finetune the network or not')
parser.add_argument('--lips', action="store_true", default=False, help='whether to finetune lips color')
parser.add_argument('--skin', action="store_true", default=False, help='whether to finetune foundation color')
parser.add_argument('--eye', action="store_true", default=False, help='whether to finetune eye shadow color')
parser.add_argument('--test_model', default='20_2520', type=str, help='which one to test')
args = parser.parse_args()
return args
def tes_net():
# enable cudnn
cudnn.benchmark = True
# get the DataLoader
data_loaders = get_loader(dataset_config, config, mode="test")
#get the solver
if args.model == 'cycleGAN':
solver = Solver_cycleGAN(data_loaders, config, dataset_config)
elif args.model =='makeupGAN':
solver = Solver_makeupGAN(data_loaders, config, dataset_config)
else:
print("model that not support")
exit()
solver.test()
if __name__ == '__main__':
args = parse_args()
print("Call with args:")
print(args)
config = merge_cfg_arg(config, args)
config.test_model = args.test_model
print("The config is:")
print(config)
# Create the directories if not exist
if not os.path.exists(config.data_path):
print("No datapath!!")
dataset_config.dataset_path = os.path.join(config.data_path, args.data_path)
tes_net()
#!/usr/bin/env bash
# video! 用在VBT上效果很差,不知道为什么
--img_size 361 --cls_list wild_before,RE_ORG --batch_size 16 --test_model 66_2520
--img_size 361 --cls_list A_before,RE_ORG --batch_size 1 --test_model 66_2520
--img_size 256 --cls_list wild_256,RE_REF --batch_size 1 --test_model 66_2520
# 测试一下在有妆图片下的效果
--img_size 256 --cls_list RE_REF,RE_ORI --batch_size 1 --test_model 66_2520
--img_size 256 --cls_list RE_ORG,wild_256 --batch_size 1 --test_model 66_2520
# new
--task_name default --cls_list wild_256,RE_REF --batch_size 1 --test_model 26_2520
\ No newline at end of file
/Users/edz/Downloads/makeupdataset/all/images/makeup/4298ad4c38d17597-5c06c575c1723922-e8ae039f36c74c4286242f9dab93abb1.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/4298ad4c38d17597-5c06c575c1723922-e8ae039f36c74c4286242f9dab93abb1.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX733.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX733.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG680.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG680.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX575.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX575.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG126.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG126.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX777.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX777.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX498.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX498.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG103.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG103.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/1ca3a0a3de6bc50f6af176e4c02e8c38.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/1ca3a0a3de6bc50f6af176e4c02e8c38.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX916.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX916.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX390.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX390.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX571.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX571.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX188.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX188.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX167.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX167.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX144.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX144.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG717.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG717.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG121.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG121.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX193.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX193.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-073.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-073.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX861.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX861.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG148.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG148.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX908.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX908.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG505.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG505.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX622.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX622.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG387.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG387.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX244.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX244.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG9.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG9.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-364.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-364.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX460.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX460.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG239.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG239.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG712.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG712.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG760.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG760.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX662.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX662.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX405.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX405.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG798.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG798.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX489.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX489.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX403.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX403.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/ac75323d6b6de243-7728d900ea0dce1d-e801f8a3ef5d0944015418d2e68dcb80.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/ac75323d6b6de243-7728d900ea0dce1d-e801f8a3ef5d0944015418d2e68dcb80.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG28.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG28.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/a5bef619b76daca3bba80131bb55b2eb.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/a5bef619b76daca3bba80131bb55b2eb.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX798.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX798.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX523.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX523.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX339.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX339.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX21.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX21.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX587.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX587.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-117.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-117.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG204.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG204.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG40.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG40.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG93.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG93.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-118.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-118.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG238.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG238.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX217.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX217.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX522.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX522.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-120.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-120.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG767.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG767.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG36.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG36.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG339.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG339.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX273.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX273.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/8ed6feb8f72b89632d02fbafcc2511a9.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/8ed6feb8f72b89632d02fbafcc2511a9.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/YUEHUI-114.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/YUEHUI-114.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/31bdcd86ffa8cc91444ec6ca921e32e5.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/31bdcd86ffa8cc91444ec6ca921e32e5.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG421.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG421.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX290.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX290.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX62.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX62.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX149.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX149.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX233.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX233.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX73.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX73.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG340.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG340.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX576.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX576.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG502.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG502.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG449.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG449.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG237.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG237.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX514.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX514.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX115.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX115.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG744.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG744.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX648.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX648.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX717.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX717.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG644.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG644.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX780.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX780.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX494.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX494.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX211.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX211.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG693.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG693.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG451.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG451.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX391.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX391.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX666.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX666.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX411.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX411.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG342.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG342.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-119.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-119.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX246.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX246.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG211.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG211.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX323.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX323.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG429.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG429.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG294.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG294.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX445.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX445.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/QQ20171214193917.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/QQ20171214193917.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX4.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX4.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX235.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX235.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG777.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG777.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG338.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG338.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX116.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX116.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX546.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX546.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG432.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG432.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-304.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-304.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX145.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX145.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG679.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG679.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX434.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX434.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX152.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX152.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX199.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX199.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG614.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG614.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG244.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG244.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX772.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX772.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX697.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX697.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX752.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX752.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX909.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX909.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX299.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX299.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG310.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG310.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG684.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG684.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX417.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX417.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX465.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX465.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX675.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX675.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-130.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-130.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX443.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX443.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/4131180f8bd977424bee61c6db075f6e.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/4131180f8bd977424bee61c6db075f6e.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX699.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX699.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-071.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-071.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG130.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG130.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG62.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG62.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-252.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-252.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/6db04069ad1af6ec976e31b7e9e6cb0a.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/6db04069ad1af6ec976e31b7e9e6cb0a.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX621.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX621.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX819.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX819.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX683.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX683.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG243.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG243.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG186.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG186.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX213.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX213.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX746.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX746.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX843.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX843.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX738.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX738.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX333.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX333.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX23.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX23.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/8fb420459611cbe7e1e87f04abaa505f.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/8fb420459611cbe7e1e87f04abaa505f.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG810.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG810.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX177.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX177.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG274.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG274.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG326.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG326.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX723.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX723.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX879.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX879.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-003.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-003.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-042.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-042.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX741.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX741.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX731.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX731.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG175.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG175.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-266.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-266.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG558.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG558.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG82.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG82.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG671.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG671.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG844.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG844.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG576.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG576.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG608.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG608.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX344.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX344.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX25.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX25.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-027.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-027.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-046.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-046.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX257.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX257.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX634.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX634.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG709.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG709.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX551.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX551.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG763.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG763.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX455.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX455.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-038.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-038.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX653.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX653.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX611.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX611.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX347.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX347.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG797.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG797.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX580.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX580.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX91.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX91.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX761.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX761.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG551.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG551.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/3a178e2dceaec352a4bda7ab686f970e.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/3a178e2dceaec352a4bda7ab686f970e.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG601.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG601.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX46.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX46.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX543.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX543.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX396.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX396.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG659.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG659.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG300.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG300.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG355.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG355.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX186.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX186.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX264.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX264.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG561.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG561.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX425.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX425.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX166.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX166.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG524.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG524.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG135.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG135.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX297.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX297.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/6d8b3d09feb4a574042b431ed3f29f0f.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/6d8b3d09feb4a574042b431ed3f29f0f.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG823.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG823.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG428.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG428.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX37.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX37.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX762.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX762.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX339.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX339.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG292.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG292.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX266.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX266.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX867.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX867.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX402.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX402.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG66.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG66.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX271.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX271.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX223.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX223.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX700.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX700.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYUH-019.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYUH-019.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX380.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX380.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG177.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG177.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-024.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-024.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG500.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG500.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX134.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX134.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX133.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX133.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX180.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX180.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-402.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-402.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG377.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG377.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX263.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX263.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/c848f905077d16f15ddac5208498e1c0.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/c848f905077d16f15ddac5208498e1c0.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-053.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-053.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/15d06c640213f4d70d42bf6a8ae28d05.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/15d06c640213f4d70d42bf6a8ae28d05.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/bbddd296c79d8edf6520e8673861bc52.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/bbddd296c79d8edf6520e8673861bc52.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX529.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX529.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG715.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG715.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/522a70de6befeb69d197ce74256fc71d.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/522a70de6befeb69d197ce74256fc71d.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG574.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG574.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG336.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG336.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX413.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX413.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX168.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX168.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX56.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX56.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX11.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX11.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/08d07734712422248a6af552f03453ea.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/08d07734712422248a6af552f03453ea.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX335.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX335.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG434.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG434.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX631.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX631.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/khkukyuky.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/khkukyuky.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX138.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX138.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG196.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG196.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG172.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG172.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG225.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG225.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/YH-118.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/YH-118.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX616.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX616.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX107.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX107.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX618.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX618.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX293.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX293.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX822.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX822.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX131.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX131.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX758.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX758.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX524.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX524.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX779.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX779.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/t01f0988463efd03350.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/t01f0988463efd03350.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX187.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX187.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vHX540.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vHX540.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX804.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX804.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX158.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX158.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-048.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-048.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/yrtyryt.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/yrtyryt.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX680.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX680.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX788.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX788.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG8.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG8.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG203.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG203.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XMY-230.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XMY-230.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/ef22531c99c63c3c31b2e3dce6926e59.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/ef22531c99c63c3c31b2e3dce6926e59.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG458.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG458.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/XYH-002.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/XYH-002.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX193.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX193.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX54.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX54.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG185.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG185.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vFG537.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vFG537.png
/Users/edz/Downloads/makeupdataset/all/images/makeup/vRX547.png /Users/edz/Downloads/makeupdataset/all/segs/makeup/vRX547.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ271.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ271.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ781.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ781.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ472.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ472.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ762.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ762.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0423.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0423.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0016.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0016.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ94.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ94.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ299.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ299.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0494.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0494.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ93.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ93.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ95.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ95.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ159.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ159.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0506.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0506.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ244.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ244.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ113.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ113.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0170.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0170.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ805.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ805.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ181.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ181.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ662.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ662.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ918.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ918.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ156.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ156.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ247.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ247.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ902.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ902.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0503.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0503.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ856.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ856.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ86.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ86.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ733.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ733.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ455.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ455.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0135.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0135.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0149.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0149.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ944.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ944.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0239.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0239.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ789.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ789.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0522.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0522.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0220.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0220.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0168.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0168.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ376.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ376.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ260.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ260.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0084.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0084.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0363.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0363.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0124.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0124.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ217.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ217.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ384.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ384.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0268.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0268.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ790.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ790.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0492.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0492.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0267.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0267.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ90.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ90.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ96.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ96.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0404.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0404.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0416.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0416.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/XYUH-001.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/XYUH-001.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ595.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ595.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ84.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ84.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0461.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0461.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0157.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0157.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0019.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0019.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ588.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ588.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0027.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0027.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0119.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0119.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ874.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ874.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ916.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ916.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ465.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ465.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ209.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ209.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ230.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ230.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ751.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ751.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0384.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0384.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ685.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ685.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ295.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ295.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ40.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ40.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0005.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0005.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ871.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ871.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0443.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0443.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0092.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0092.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0470.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0470.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0223.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0223.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ799.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ799.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ816.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ816.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ204.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ204.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ538.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ538.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ133.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ133.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ641.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ641.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ910.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ910.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ678.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ678.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0185.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0185.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0094.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0094.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0032.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0032.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0186.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0186.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ625.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ625.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0006.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0006.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ467.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ467.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ482.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ482.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ371.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ371.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ408.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ408.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ699.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ699.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0277.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0277.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ554.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ554.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ494.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ494.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ715.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ715.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ15.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ15.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ362.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ362.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ61.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ61.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ175.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ175.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ428.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ428.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ76.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ76.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ137.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ137.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/xfsy_0428.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/xfsy_0428.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ266.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ266.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ219.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ219.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ142.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ142.png
/Users/edz/Downloads/makeupdataset/all/images/non-makeup/vSYYZ74.png /Users/edz/Downloads/makeupdataset/all/segs/non-makeup/vSYYZ74.png
# From https://github.com/openai/improved-gan/blob/master/inception_score/model.py
# Code derived from tensorflow/tensorflow/models/image/imagenet/classify_image.py
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import sys
import tarfile
import numpy as np
from six.moves import urllib
import tensorflow as tf
import glob
import scipy.misc
import math
import sys
import os
MODEL_DIR = '/tmp/imagenet'
DATA_URL = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz'
softmax = None
#os.environ["CUDA_VISIBLE_DEVICES"] = '0'
config = tf.ConfigProto()
#config.gpu_options.per_process_gpu_memory_fraction = 0.4
config.gpu_options.allow_growth = True
# Call this function with list of images. Each of elements should be a
# numpy array with values ranging from 0 to 255.
def get_inception_score(images, splits=10):
assert(type(images) == list)
assert(type(images[0]) == np.ndarray)
assert(len(images[0].shape) == 3)
assert(np.max(images[0]) > 10)
assert(np.min(images[0]) >= 0.0)
inps = []
for img in images:
img = img.astype(np.float32)
inps.append(np.expand_dims(img, 0))
bs = 100
with tf.Session(config = config) as sess:
preds = []
n_batches = int(math.ceil(float(len(inps)) / float(bs)))
for i in range(n_batches):
# sys.stdout.write(".")
# sys.stdout.flush()
inp = inps[(i * bs):min((i + 1) * bs, len(inps))]
inp = np.concatenate(inp, 0)
pred = sess.run(softmax, {'ExpandDims:0': inp})
preds.append(pred)
preds = np.concatenate(preds, 0)
scores = []
for i in range(splits):
part = preds[(i * preds.shape[0] // splits):((i + 1) * preds.shape[0] // splits), :]
kl = part * (np.log(part) - np.log(np.expand_dims(np.mean(part, 0), 0)))
kl = np.mean(np.sum(kl, 1))
scores.append(np.exp(kl))
return np.mean(scores), np.std(scores)
# This function is called automatically.
def _init_inception():
global softmax
if not os.path.exists(MODEL_DIR):
os.makedirs(MODEL_DIR)
filename = DATA_URL.split('/')[-1]
filepath = os.path.join(MODEL_DIR, filename)
if not os.path.exists(filepath):
def _progress(count, block_size, total_size):
sys.stdout.write('\r>> Downloading %s %.1f%%' % (
filename, float(count * block_size) / float(total_size) * 100.0))
sys.stdout.flush()
filepath, _ = urllib.request.urlretrieve(DATA_URL, filepath, _progress)
print()
statinfo = os.stat(filepath)
print('Succesfully downloaded', filename, statinfo.st_size, 'bytes.')
tarfile.open(filepath, 'r:gz').extractall(MODEL_DIR)
with tf.gfile.FastGFile(os.path.join(
MODEL_DIR, 'classify_image_graph_def.pb'), 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
_ = tf.import_graph_def(graph_def, name='')
# Works with an arbitrary minibatch size.
with tf.Session(config=config) as sess:
pool3 = sess.graph.get_tensor_by_name('pool_3:0')
ops = pool3.graph.get_operations()
for op_idx, op in enumerate(ops):
for o in op.outputs:
shape = o.get_shape()
shape = [s.value for s in shape]
new_shape = []
for j, s in enumerate(shape):
if s == 1 and j == 0:
new_shape.append(None)
else:
new_shape.append(s)
o._shape = tf.TensorShape(new_shape)
w = sess.graph.get_operation_by_name("softmax/logits/MatMul").inputs[1]
logits = tf.matmul(tf.squeeze(pool3), w)
softmax = tf.nn.softmax(logits)
if softmax is None:
_init_inception()
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import collections
import time
#import cPickle as pickle
_since_beginning = collections.defaultdict(lambda: {})
_since_last_flush = collections.defaultdict(lambda: {})
_iter = [0]
def tick():
_iter[0] += 1
def plot(name, value):
_since_last_flush[name][_iter[0]] = value
#print(_since_last_flush)
def flush(task_name):
prints = []
for name, vals in _since_last_flush.items():
#prints.append("{}\t{}".format(name, np.mean(vals.values())))
_since_beginning[name].update(vals)
"""
print(name)
print("#######################")
print(_since_beginning[name])
print("#######################")
print(_since_beginning[name].keys())
print("#######################")
print(list(_since_beginning[name].keys()))
print("#######################")
"""
x_vals = np.sort(list(_since_beginning[name].keys()))
y_vals = [_since_beginning[name][x] for x in x_vals]
plt.clf()
plt.plot(x_vals, y_vals)
plt.xlabel('iteration')
plt.ylabel(name)
plt.savefig(name.replace(' ', '_')+ "_" + task_name +"_" + '.png')
"""
print "iter {}\t{}".format(_iter[0], "\t".join(prints))
_since_last_flush.clear()
with open('log.pkl', 'wb') as f:
pickle.dump(dict(_since_beginning), f, pickle.HIGHEST_PROTOCOL)
"""
\ No newline at end of file
import os
import argparse
from torch.backends import cudnn
from config import config, dataset_config, merge_cfg_arg
from dataloder import get_loader
from solver_cycle import Solver_cycleGAN
from solver_makeup import Solver_makeupGAN
def parse_args():
parser = argparse.ArgumentParser(description='Train GAN')
# general
parser.add_argument('--data_path', default='makeup/makeup_final/', type=str, help='training and test data path')
parser.add_argument('--dataset', default='MAKEUP', type=str, help='dataset name, MAKEUP means two domain, MMAKEUP means multi-domain')
parser.add_argument('--gpus', default='0', type=str, help='GPU device to train with')
parser.add_argument('--batch_size', default='1', type=int, help='batch_size')
parser.add_argument('--vis_step', default='1260', type=int, help='steps between visualization')
parser.add_argument('--task_name', default='', type=str, help='task name')
parser.add_argument('--checkpoint', default='', type=str, help='checkpoint to load')
parser.add_argument('--ndis', default='1', type=int, help='train discriminator steps')
parser.add_argument('--LR', default="2e-4", type=float, help='Learning rate')
parser.add_argument('--decay', default='0', type=int, help='epochs number for training')
parser.add_argument('--model', default='makeupGAN', type=str, help='which model to use: cycleGAN/ makeupGAN')
parser.add_argument('--epochs', default='300', type=int, help='nums of epochs')
parser.add_argument('--whichG', default='branch', type=str, help='which Generator to choose, normal/branch, branch means two input branches')
parser.add_argument('--norm', default='SN', type=str, help='normalization of discriminator, SN means spectrum normalization, none means no normalization')
parser.add_argument('--d_repeat', default='3', type=int, help='the repeat Res-block in discriminator')
parser.add_argument('--g_repeat', default='6', type=int, help='the repeat Res-block in Generator')
parser.add_argument('--lambda_cls', default='1', type=float, help='the lambda_cls weight')
parser.add_argument('--lambda_rec', default='10', type=int, help='lambda_A and lambda_B')
parser.add_argument('--lambda_his', default='1', type=float, help='histogram loss on lips')
parser.add_argument('--lambda_skin_1', default='0.1', type=float, help='histogram loss on skin equals to lambda_his* lambda_skin')
parser.add_argument('--lambda_skin_2', default='0.1', type=float, help='histogram loss on skin equals to lambda_his* lambda_skin')
parser.add_argument('--lambda_eye', default='1', type=float, help='histogram loss on eyes equals to lambda_his*lambda_eye')
parser.add_argument('--content_layer', default='r41', type=str, help='vgg layer we use to output features')
parser.add_argument('--lambda_vgg', default='5e-3', type=float, help='the param of vgg loss')
parser.add_argument('--cls_list', default='SYMIX,MAKEMIX', type=str, help='the classes of makeup to train')
parser.add_argument('--direct', action="store_true", default=True, help='direct means to add local cosmetic loss at the first, unified training')
parser.add_argument('--lips', action="store_true", default=True, help='whether to finetune lips color')
parser.add_argument('--skin', action="store_true", default=True, help='whether to finetune foundation color')
parser.add_argument('--eye', action="store_true", default=True, help='whether to finetune eye shadow color')
args = parser.parse_args()
return args
def train_net():
# enable cudnn
cudnn.benchmark = True
data_loaders = get_loader(dataset_config, config, mode="train") # return train&test
#get the solver
if args.model == 'cycleGAN':
solver = Solver_cycleGAN(data_loaders, config, dataset_config)
elif args.model =='makeupGAN':
solver = Solver_makeupGAN(data_loaders, config, dataset_config)
else:
print("model that not support")
exit()
solver.train()
if __name__ == '__main__':
args = parse_args()
print("Call with args:")
print(args)
config = merge_cfg_arg(config, args)
dataset_config.name = args.dataset
print("The config is:")
print(config)
# Create the directories if not exist
if not os.path.exists(config.data_path):
print("No datapath!!")
exit()
if args.data_path != '':
dataset_config.dataset_path = os.path.join(config.data_path, args.data_path)
train_net()
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
import os
from PIL import Image
from easydict import EasyDict as edict
from torch.backends import cudnn
from config import config, default, dataset_config
# from solvers import *
from data_loaders import *
default.network = 'MULTICYCLEGAN'
#default.network = 'STARGAN'
default.dataset_choice = ['MAKEUP']
#default.dataset_choice = ['CELEBA']
default.model_base = 'RES'
default.loss_chosen = 'normal'
default.gpu_ids = [0,1,2]
config_default = config
def train_net():
# enable cudnn
cudnn.benchmark = True
# get the DataLoader
data_loaders = eval("get_loader_" + config.network)(default.dataset_choice, dataset_config, config, mode="test")
#get the solver
solver = eval("Solver_" + config.network +"_VIS")(default.dataset_choice, data_loaders, config, dataset_config)
solver.visualize()
if __name__ == '__main__':
print("Call with args:")
print(default)
config = config_default[default.network]
config.network = default.network
config.model_base = default.model_base
config.gpu_ids = default.gpu_ids
# Create the directories if not exist
if not os.path.exists(config.log_path):
os.makedirs(config.log_path)
if not os.path.exists(config.vis_path):
os.makedirs(config.vis_path)
if not os.path.exists(config.snapshot_path):
os.makedirs(config.snapshot_path)
if not os.path.exists(config.data_path):
print("No datapath!!")
train_net()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment