Camelia is an image decensor tool to remove censorship bars from images (you know what kind of images I am talking about). It supports black bars, white bars, and transparent black censorship types.
- Python 3.9
- Conda (recommended for managing environments)
- NVIDIA GPU with CUDA support (optional but recommended for faster processing)
- Node.js 16+ (for Web UI)
-
Clone the repository:
git clone https://github.com/windbow27/camelia cd camelia -
Create a Conda environment:
conda create --name camelia_env python=3.9 -y conda activate camelia_env
-
Install dependencies:
pip install -r requirements.txt
-
Verify PyTorch installation: Ensure that PyTorch is installed with CUDA support (if applicable):
python -c "import torch; print(torch.cuda.is_available())"This should return
Trueif CUDA is available. -
For Web UI, install Node.js dependencies:
cd camelia-ui npm install cd ..
Download the models here: models
Put the segmentation models in smp-segmentation/pretrained and inpainting model (the whole folder) in lama-inpainting/pretrained.
-
Place your input images in the correct
camelia-decensor/inputdirectory (input/black_bars,input/white_bars,input/transparent_black)- Subdirectories can be used
-
Run:
python main.py --model_type <model_type>
Replace
<model_type>with one of the following options:black_barswhite_barstransparent_black
-
The output will be saved under
camelia-decensor/output.
-
Start the API server, make sure to use the correct environment:
python api.py
-
In a separate terminal, start the web UI:
cd camelia-ui npm run dev -
Open your browser and navigate to http://localhost:3000
This project is intended for personal use only. Do not share the results on public sites. If you choose to do so anyway, please do not credit me or Camelia.
Sharing the tool is welcomed. A ☆ would also be greatly appreciated.