Guide
This guide will help you set up and use the Camelia Decensoring tool. Follow the steps below to get started with both CLI and Web UI modes.
Prerequisites
Python 3.9
Conda (recommended)
NVIDIA GPU with CUDA
Node.js 16+
Installation
git clone https://github.com/windbow27/camelia
cd camelia
conda create --name camelia_env python=3.9 -y
conda activate camelia_env
pip install -r requirements.txt
python -c "import torch; print(torch.cuda.is_available())"
cd camelia-ui
npm install
cd ..
Usage
CLI Mode
Input Image Preparation
Place your input images in the correct directory matching your censorship type
camelia-decensor/input/[model_type]
Run the Command
Execute the main script with your selected model type
python main.py --model_type [model_type]
Access Results
Find your processed images in the output directory
camelia-decensor/output/
Web UI Mode
Start API Server
Launch the backend API server first
python api.py
Start Web Interface
In a separate terminal, launch the web UI
cd camelia-ui
npm run dev
Open in Browser
Access the web interface in your browser
http://localhost:3000
Using the Web Interface
Upload your images using the file uploader
Select the desired processing type (Black Bars, White Bars, or Transparent Black)
Click "Process Images" to begin processing
View real-time logs in the console display
Once complete, view and download the results
Features
Multiple Censorship Types
Support for black bars, white bars, and transparent censoring
Batch Processing
Process multiple images in one go
Real-time Logs
Color-coded console output shows processing status
Format Support
Handles PNG, JPEG, and WebP image formats
Side-by-Side Comparison
Compare original and processed images easily
Bulk Download
Download all results with one click
Cancellable Jobs
Stop processing at any time
Directory Support
Maintains subfolder structure for organization