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

1. Clone Repository

git clone https://github.com/windbow27/camelia
cd camelia

2. Create Conda Environment

conda create --name camelia_env python=3.9 -y
conda activate camelia_env

3. Install Dependencies

pip install -r requirements.txt

4. Verify PyTorch with CUDA

python -c "import torch; print(torch.cuda.is_available())"

5. Install UI Dependencies

cd camelia-ui
npm install
cd ..

Usage

CLI Mode

1

Input Image Preparation

Place your input images in the correct directory matching your censorship type

camelia-decensor/input/[model_type]
Subdirectories are supported for organization
2

Run the Command

Execute the main script with your selected model type

python main.py --model_type [model_type]
black_barswhite_barstransparent_black
3

Access Results

Find your processed images in the output directory

camelia-decensor/output/

Web UI Mode

1

Start API Server

Launch the backend API server first

python api.py
2

Start Web Interface

In a separate terminal, launch the web UI

cd camelia-ui
npm run dev
3

Open in Browser

Access the web interface in your browser

http://localhost:3000

Using the Web Interface

1

Upload your images using the file uploader

2

Select the desired processing type (Black Bars, White Bars, or Transparent Black)

3

Click "Process Images" to begin processing

4

View real-time logs in the console display

5

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