Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Automatically remove the mosaics in images and videos, or add mosaics to them.

License

Notifications You must be signed in to change notification settings

styler00dollar/Colab-DeepMosaics

 
 

Repository files navigation

image

Colab-DeepMosaics

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.

Info about Colab

  • 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.

More example

origin auto add mosaic auto clean mosaic
image image image
image image image
mosaic image DeepCreamPy ours
image image image
image image image
  • Style Transfer
origin to Van Gogh to winter
image image image

An interesting example:Ricardo Milos to cat

Get pre-trained models

You can download pre_trained models and put them into './pretrained_models'.
[Google Drive] [百度云,提取码1x0a]
[Introduction to pre-trained models]

Simple example

  • 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

More parameters

If you want to test other image or video, please refer to this file.
[options_introduction.md]

Acknowledgments

This code borrows heavily from [pytorch-CycleGAN-and-pix2pix] [Pytorch-UNet] [pix2pixHD] [BiSeNet].

About

Automatically remove the mosaics in images and videos, or add mosaics to them.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.6%
  • Jupyter Notebook 2.4%