Removing Pixelated Mosaic Censorship using ESRGAN (Enhanced SRGAN) and green_mask_project
ESRGAN model should be downloaded here: Twittman's 4x_FatalPixels_340000_G.pth, and placed into models folder!
To have a decent performance you need a CUDA+cudnn(NVIDIA) or ROCm(AMD) compatible GPU with installed drivers! Otherweis use "--cpu" key, but beware it can be VERY slow.
HOW TO USE:
- Place your images inside decensor_input
- Run "python demosaic_project_ESRGAN.py" or ("python demosaic_project_ESRGAN.py --cpu" for cpu version)
- Take your decensored images from decensor_output
- ???
- Profit
Don't forget to install python3 and all the requirements with command "pip3 install -r requirements.txt" in cmd or bash
TODO:
- GUI
- Config file
- Better detection algorithm
Inspiration from DeepCreamPy and hent-AI
Credits to Twittman for making trained model Fatal Pixels.
Sample image by hks(@timbougami)