A Flask web application that colorizes black and white images using DeOldify AI.
- Upload black and white or grayscale images
- Automatically colorize images using AI
- View side-by-side comparison of original, grayscale, and colorized versions
- Simple and intuitive web interface
-
Clone this repository:
git clone https://github.com/ahajin07/colorplash.git cd colorplash -
Create a virtual environment and install dependencies:
python -m venv venv # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate pip install -r requirements.txt -
Set up DeOldify (the AI colorization model):
git clone https://github.com/jantic/DeOldify.git cd DeOldify pip install -e . cd .. -
Download the DeOldify model file:
- Download the
ColorizeArtistic_gen.pthfile from this link - Place it in the
modelsdirectory
- Download the
colorplash/
│
├── app.py # Main Flask application
├── colorizer_utils.py # Utility for colorization
├── models/ # Model storage
│ └── ColorizeArtistic_gen.pth # DeOldify model file (needs to be downloaded)
├── static/ # Static assets
│ └── uploads/ # Image upload storage
├── templates/ # HTML templates
│ └── index.html # Main app page
├── DeOldify/ # DeOldify submodule
└── requirements.txt # Python dependencies
-
Run the application:
python app.py -
Open your browser and navigate to
http://127.0.0.1:5000 -
Upload a black and white image and see the colorized result
ColorSplash uses the DeOldify project, which implements a novel approach to image colorization using self-attention mechanisms in GANs (Generative Adversarial Networks). The app:
- Accepts user-uploaded images
- Converts them to grayscale for consistent input
- Processes them through the DeOldify artistic model
- Displays the original, grayscale, and colorized versions
This project is licensed under the MIT License - see the LICENSE file for details.
- This project relies on DeOldify by Jason Antic
- Built with Flask
