Skip to content

Latest commit

 

History

History
15 lines (15 loc) · 866 Bytes

README_addmosaic.md

File metadata and controls

15 lines (15 loc) · 866 Bytes

Add mosaic dataset

Please generate mask from images which you want to add mosaic(number of images should be above 1000). And then put the images in face/origin_image, and masks in face/mask.

  • You can use draw_mask.pyto generate them.
python draw_mask.py --datadir 'dir for your pictures' --savedir ../datasets/draw/face
#Press the left mouse button to draw the mask .  Press 'S' to save mask, 'A' to reduce  brush size, 'D' to increase brush size, 'W' to cancel drawing.
  • If you want to get images from videos, you can use get_image_from_video.py
python get_image_from_video.py --datadir 'dir for your videos' --savedir ../datasets/video2image --fps 1

Training

cd train/add
python train.py --gpu_id 0 --dataset ../../datasets/draw/face --savename face --loadsize 512 --finesize 360 --batchsize 16