created_at2022-02-12 18:29:25.257616
updated_at2022-02-12 19:03:04.504832
descriptionA command line tool for converting greyscale to RGB using CNN modelling.
Gaurav Pandey (ligmitz)





rimcol - Rust Image Coloriser is a command line tool for converting grayscale images to RGB images.

rimcol stands for rust image coloriser. It is a command line tool written in rust to predict the rgb color pallete of a grayscale image using a CNN model written in tensorflow and python. The input image should be a 256*256 grayscale image and the output is an RGB image of the same dimension.

Note: The model is still in its early stages and is evolved to be more accurate with each iteration.

Command-line options

  • -i, --path-to-input (Parameter): Pass the input grayscale image location.
  • -o, --path-for-output (Parameter): Pass the output location for saving the RGB image.
  • -h, --help: Get the help info.


rimcol currently can be used in 3 ways, install via cargo, build from source and use as a rust package.

Before installing, download the model from here, extract it and place the folder at /home/<user>/.

Note: rimcol depends on tensorflow for running the CNN model, so you should have tensorflow prerequisites installed. Refer tensorflow-rust.

Manual installation from GitHub

Compiled binary versions of rimcol are uploaded to GitHub when a release is made. You can install rimcol manually by downloading a release, extracting it, and copying the binary to a directory in your $PATH, such as /usr/local/bin.


If you already have a Rust environment set up, you can use the cargo install command:

$ cargo install rimcol

Cargo will build the rimcol binary and place it in $HOME/.cargo.

As a package

If you want to use rimcol as a package in your rust project, add this to your Cargo.toml file:

rimcol = "0.1.0"

Development Rust 1.57.0+ MIT Licence

rimcol is written in Rust. You will need rustc version 1.57.0 or higher. The recommended way to install Rust for development is from the official download page, using rustup.

Once Rust is installed, you can compile the rimcol directory cloned from github with Cargo:

$ cargo build
  • If you want to compile a version for yourself, run cargo build --release.

Copy the resulting binary, which will be in the target/release directory, into a folder in your $PATH such as /usr/local/bin.

Commit count: 20

cargo fmt