I built a manga colouriser for a friend, and it runs fully on my laptop
My friend Vinay reads a lot of manga, and it's all black and white. For the Hacktoberfest "Build for a Friend" challenge I built a tool that colours manga pages and keeps each character looking the same from page to page. What it does You upload black-and-white pages (images, PDF or CBZ) and add each main character once, with a few coloured reference pictures. The app then: Finds the panels and…
My friend Vinay, an avid manga reader, requested a tool to colorize black and white pages of his beloved comics. For the Hacktoberfest Build for a Friend challenge, I created a manga colorizer application that fulfills this need, running entirely on a laptop without any cloud dependencies.
To use the app, users upload their black-and-white manga pages, either as images, PDFs, or CBZ files. They then identify each main character, providing a few reference images for each. The application analyzes the uploaded pages, locating panels and speech bubbles. It then identifies the characters within each panel and associates them with their respective reference images.
The colorization process begins by extracting the characters' key attributes—hair, skin, and clothing colors—from the provided references. The app then applies these colors to corresponding parts of each panel, ensuring that a character's appearance remains consistent across different pages. Speech bubbles and lettering remain untouched, preserving the original text and tone.
The application's interface allows for manual corrections if the AI misidentifies a character. Designed to run locally, the full version of the colorizer ensures that users' private manga pages never leave their devices. There are no per-page charges or subscription fees; users can employ the software at no cost.
The colorizer leverages advanced AI models, including Stable Diffusion with a line-art ControlNet, OWL-ViT for character detection, CLIP for naming characters, and SegFormer for hair and clothes recognition. If any component proves inadequate, it can be swapped out with a more suitable alternative.
The colorizer has successfully implemented several core features, such as panel detection, speech bubble preservation, character memory management, and color correction. However, the full end-to-end AI coloring process has not been completed due to the size of the models required, which exceed 6 GB. Currently, the Quick preview mode demonstrates flat-colored regions, intended for layout verification only. The source code for the application is available on GitHub for further exploration and modification.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.