Skip to content

hpotechius/ColorTransferLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

237 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is part of a collection of three repositories. See the links below for the related projects.

Button 1 Button 2 Button 3

03_CTL_interface2

ColorTransferLab

python3.12.6

ColorTransferLab is a web-based user interface for the application of color transfer, style transfer, and colorization algorithms on different data types, including Images, Videos, Point Clouds, Meshes, Light Fields, Volumetric Videos, and Gaussian Splattings, with the possibility to visualize these data types. Additionally, 20 evaluation metrics are included to assess color transfer results. It is based on our previous tool ColorTransferLab.

This tool is based on WebRTC communication between the client, which is the User Interface, and the compute node, which applies computations using the Python library ColorTransferLib. This library contains available algorithms and image quality assessment metrics.

1. System Architecture

ColorTransferLabV3

This system consists of four components: Client, Web Server, Signaling Server, and Compute Node, which will be explained in the following sections.

1.1 Client and Web Server

The client is the user interface, served by a web server available at https://potechius.com/ColorTransferLab or self-hosted. It allows users to visualize data and connect to an available Compute Node to apply the aforementioned algorithms.

1.2 Signaling Server

06_signalserverinterface

To connect two instances, such as the client and compute node, within this WebRTC-based setup, the signaling server announces them to each other. The server is available at https://signal.potechius.com and also displays a list of available instances when accessed via a browser.

1.3 Compute Node

ComputeNode This instance must be provided by the user (see Section 2: Usage). It supplies the necessary data and computational power to apply the algorithms. It is a Python instance with an installed version of ColorTransferLib.

The above image illustrates the three stages of the compute node:

  • Initial Stage: The node is only connected to the signaling server, which can also be provided by the user.
  • Waiting for Connection: After clicking the "Connect to Signaling Server" button, the compute node registers with the signaling server and enters the Idle state. The compute node now awaits a client connection to begin processing.
  • Connected Stage: Client and compute node are connected for peer-to-peer data transmission.

2. Setup

In this setup, the signaling server is provided via https://signal.potechius.com, and the user interface is served through the web server at https://potechius.com/ColorTransferLab. The only instance that must be provided by the user is the compute node. Notably, both the signaling server and the web server are included in this repository and can be self-hosted. The following steps must be followed to run the compute node and test the application.

2.1 Setup (Compute Node only)

  1. Clone the repository and go into the directory

    git clone git@github.com:hpotechius/ColorTransferLab.git
    cd ColorTransferLab
    
  2. Create and activate an environment env using Python3.12

    python3.12 -m venv env
    source env/bin/activate
    
  3. Install the necessary packages

    pip install -r ComputeNode/requirements/requirements.txt
    
  4. Run the Compute Node

    cd ComputeNode
    python main_computenode.py
    
  5. Connect to Signal Server

    • Press the "Connect to Signal Server" button (https://signal.potechius.com).
    • The Compute Node will now enter a waiting state until a client connects to it.
  6. Connect to Compute Node

    • Open https://potechius.com/ColorTransferLab in any browser.
    • The Compute Node should now appear in the SERVER section of the web interface. Press the button to view all available algorithms and data.

2.2 Local Setup

If you want to run ColorTransferLab completely locally, you have to run also the Signal Server and the Webserver.

git clone https://github.com/hpotechius/ColorTransferLab

Signal Server

cd SignalingServer
python3.12 -m venv env
source env/bin/activate
pip install -r requirements.txt
python main_signalingserver.py

The signal server will be available at http://localhost:8071.

WebServer

In the file WebServer/src/config.json change the variable signalServerURL to http://localhost:8071.

cd WebServer
npm install
npm run dev

The tool will be available at http://localhost:5173/ColorTransferLab.

Compute Node

In the file ComputeNode/main_computenode.py change the Variable SIGNAL_SERVER from https://signal.potechius.com to http://localhost:8071.

SIGNAL_SERVER = "http://localhost:8071"
# SIGNAL_SERVER = "https://signal.potechius.com"
  cd ComputeNode
  python3.12 -m venv env
  source env/bin/activate
  pip install -r requirements.txt
  pip install git+https://github.com/facebookresearch/detectron2.git@main

  # Optional: To enable semantic segmentation support
  pip install git+https://github.com/facebookresearch/sam3.git

2.3 Notes

  • Due to the WebRTC-based system architecture, the client and compute node do not need to run on the same system.
  • Depending on the network environment, a connection may not always be established using a STUN server. In such cases, a TURN server must be provided.

3. Datatypes


Figure 1: Supported data types. Note: Palette Transfer is not currently available.

4. Usage

Video Title

Video 1: Usage of the ColorTransferLab interface.

Video Title

Video 2: Usage of the User Study interface.

5. List of other Color Transfer Tools

6. Acknowledgements

7. Citation

If you utilize this code in your research, kindly provide a citation:

@inproceeding{potechius2023,
  author={Herbert Potechius, Thomas Sikora, Gunasekaran Raja, Sebastian Knorr},
  title={A software test bed for sharing and evaluating color transfer algorithms for images and 3D objects},
  year={2023},
  booktitle={European Conference on Visual Media Production (CVMP)},
  doi={10.1145/3626495.3626509}
}
@article{potechius2025,
  author = {Herbert Potechius, Thomas Sikora, Sebastian Knorr},
  title = {ColorTransferLabV2: a software testbed for multi-modal color transfer, colorization, and style transfer},
  journal = {Journal of Electronic Imaging},
  editor = {SPIE},
  year = {2025},
  volume = {34},
  issue = {5},
  pages = {1-31},
  doi = {10.1117/1.JEI.34.5.051002},
  url = {https://doi.org/10.1117/1.JEI.34.5.051002}
}

About

React-based user interface designed for the application and evaluation of color and style transfer algorithms on images and 3D objects.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors