Usage: Simply download Colab-DeepMosaics.ipynb
and open it inside your Google Drive or click here and copy the file with "File > Save a copy to Drive..." into your Google Drive.
- If you can't open
Colab-DeepMosaics.ipynb
inside your Google Drive, try this colab link and save it to your Google Drive. The "open in Colab"-button can be missing in Google Drive, if that person never used Colab. - Google Colab does assign a random GPU. It depends on luck.
- The Google Colab VM does have a maximum session length of 12 hours. Additionally there is a 30 minute timeout if you leave colab. The VM will be deleted after these timeouts.
origin | auto add mosaic | auto clean mosaic |
---|---|---|
- Compared with DeepCreamPy
mosaic image | DeepCreamPy | ours |
---|---|---|
- Style Transfer
origin | to Van Gogh | to winter |
---|---|---|
An interesting example:Ricardo Milos to cat
You can download pre_trained models and put them into './pretrained_models'.
[Google Drive] [百度云,提取码1x0a]
[Introduction to pre-trained models]
- Add Mosaic (output media will save in './result')
python3 deepmosaic.py --media_path ./imgs/ruoruo.jpg --model_path ./pretrained_models/mosaic/add_face.pth --use_gpu -1
- Clean Mosaic (output media will save in './result')
python3 deepmosaic.py --media_path ./result/ruoruo_add.jpg --model_path ./pretrained_models/mosaic/clean_face_HD.pth --use_gpu -1
If you want to test other image or video, please refer to this file.
[options_introduction.md]
This code borrows heavily from [pytorch-CycleGAN-and-pix2pix] [Pytorch-UNet] [pix2pixHD] [BiSeNet].