DLMini Project LP5
DLMini Project LP5
SUBMITTED BY
2024-2025
1
CERTIFICATE
Submitted by
Are bonafide students of this institute and the work has been carried out by them under the
supervision of Prof. Amruta Patil and it is approved for the partial fulfillment of the requirement of
Savitribai Phule Pune University, for the award of the degree of Bachelor of Engineering
(Computer Engineering)
Dr. A. V. Deshpande
Principal,
Smt. Kashibai Navale College of Engineering Pune – 41
Place: Pune
Date:
2
ACKNOWLEDGEMENT
The present world of competition there is a race of existence in which those are having will to come
forward succeed. Project is like a bridge between theoretical and practical working. With this willing
we joined this particular project. First of all, we would like to thank the supreme power the Almighty
God who is obviously the one has always guided us to work on the right path of life.
We sincerely thank Prof. R. H. Borhade sir Head of the Department of Computer Science of Smt.
Kashibai Navale college of engineering, for all the facilities provided to us in the pursuit of this
project.
We are indebted to our project guide Prof. Amruta Patil , Department of Computer Science of Smt.
Kashibai Navale college of engineering. We feel it’s a pleasure to be indebted to our guide for his
valuable support, advice and encouragement and we think him for his superb and constant guidance
towards this project.
We are deeply grateful to all the staff members of CS department, for supporting us in all aspects.
We acknowledge our deep sense of gratitude to our loving parents for being a constant source of
inspiration and motivation.
3
ABSTRACT
Colorizing black and white (B&W) images is a challenging task that requires an understanding of image
semantics and contextual details to generate realistic colors. This project, titled "Colorizing Old B&W Images
using Convolutional Neural Networks (CNN)," aims to develop a deep learning-based solution to
automatically colorize grayscale images. By leveraging the power of CNNs, the model is trained on a large
dataset of colored images, learning the complex relationships between grayscale pixel intensities and their
corresponding colors. The trained model can then infer plausible color versions of historical or monochrome
photographs. This approach eliminates the need for manual intervention or artistic input, making it efficient
for restoring old photographs and enhancing visual media archives. The implementation focuses on designing
an effective CNN architecture, preprocessing the data, and evaluating the model’s performance using
qualitative and quantitative metrics. The final output demonstrates the potential of deep learning in
automating the colorization process and preserving visual history in a more vibrant form.
4
INDEX
1 Introduction 6
2 Problem Definition 7
3 Objectives 8
4 Features 9
5 Implementation 11
7 Conclusion 15
8 References 16
5
INTRODUCTION
In the early days of photography, images were captured in black and white due to technological
limitations. While these images hold historical and emotional value, their monochromatic appearance
lacks the vibrancy of real life. The task of colorizing such black and white (B&W) images—once a
labor-intensive manual process—is now being revolutionized through the power of deep learning and
computer vision. This mini project explores the use of Convolutional Neural Networks (CNNs) for the
automatic colorization of grayscale images, aiming to restore and enrich old photos with realistic and
aesthetically pleasing colors.
This project not only demonstrates practical applications of CNNs in image processing but also
highlights the integration of data preprocessing, deep learning model design, and image post-processing.
By automating the colorization process, we can revive historical images, enhance visual storytelling, and
apply the technology in areas such as media restoration, film colorization, and heritage preservation.
6
PROBLEM STATEMENT
Black and white images, though historically valuable, lack the visual richness and emotional depth
that color images provide. Manual colorization of such images is a labor-intensive process that requires
expert knowledge and artistic skill, making it inefficient and impractical for large-scale applications.
The challenge lies in accurately predicting plausible colors for different objects and scenes in a
grayscale image, which is inherently an ambiguous and complex task. This project aims to address
this problem by implementing an automated solution using Convolutional Neural Networks (CNNs)
that can learn to generate realistic colorized versions of grayscale images. By training on large datasets
of color images, the model learns to associate grayscale patterns with their corresponding color values,
thereby enabling the automatic colorization of old black and white photographs.
7
OBJECTIVE
The main objective of this project is to develop a deep learning-based model using Convolutional
Neural Networks (CNNs) that can automatically colorize black and white images into realistic, full-
color versions. The project aims to implement a reliable and efficient solution that eliminates the
need for manual colorization by training a model on a dataset of color images and their grayscale
counterparts. The objective is to enhance the visual quality of old monochrome photographs,
preserve historical images in a more engaging form, and demonstrate the practical application of
image processing and deep learning techniques in the field of digital restoration and media
enhancement.
8
FEATURES
• Automatic Colorization: The system takes a black and white image as input and automatically
generates a colorized version without any manual intervention.
• Deep Learning-Based Approach: Utilizes a Convolutional Neural Network (CNN) trained on large
datasets to learn patterns and color distributions for realistic output.
• Image Preprocessing: Includes resizing, grayscale conversion, and normalization of input images to
prepare them for model prediction.
• Model Architecture: A custom CNN architecture with multiple convolutional and upsampling layers
designed to effectively extract features and reconstruct color images.
• Pre-trained Weights Integration: Supports the use of pre-trained model weights for faster inference
and improved colorization accuracy.
• Post-Processing of Output: Enhances the final output by converting the predicted image into a format
suitable for viewing and saving.
• Scalability: The model can be extended or improved further by training on more diverse datasets to
increase generalization and accuracy.
9
IMPLEMENTATION
10
CODE
11
12
OUTPUT
13
CONCLUSION
The project “Colorizing Old B&W Images using CNN” successfully demonstrates the application of deep
learning techniques in image restoration and enhancement. By utilizing Convolutional Neural Networks and
pre-trained weights, the system is able to intelligently predict and restore colors in black and white images,
giving them a more realistic and visually appealing appearance. This not only revives old memories captured in
monochrome but also highlights the potential of artificial intelligence in solving real-world problems in the field
of digital image processing. The results obtained are promising and show that with sufficient training data and
model optimization, the quality of colorization can be further improved for more detailed and accurate outputs .
14
REFERENCES
1. Zhang, R., Isola, P., & Efros, A. A. (2016). Colorful Image Colorization. European Conference on
Computer Vision (ECCV), 649–666. https://doi.org/10.1007/978-3-319-46487-9_40
2. Larsson, G., Maire, M., & Shakhnarovich, G. (2016). Learning Representations for Automatic
Colorization. European Conference on Computer Vision (ECCV), 577–593.
https://doi.org/10.1007/978-3-319-46487-9_35
3. TensorFlow. (n.d.). TensorFlow: An end-to-end open source machine learning platform. Retrieved
from https://www.tensorflow.org/
4. Chollet, F. (2015). Keras: Deep Learning for humans. Retrieved from https://keras.io/
5. OpenCV. (n.d.). Open Source Computer Vision Library. Retrieved from https://opencv.org/
6. Jason Brownlee. (2019). How to Develop a CNN for Image Colorization. Retrieved from
https://machinelearningmastery.com/how-to-develop-a-cnn-for-image-colorization-from-scratch/
7. classification. Advances in neural information processing systems, 649-657
15