ai project 1
ai project 1
OPERATING SYSTEM
● Window 8
● Window 10
● Window 11
● 4GB
PROCESSOR
● Cross 86
● Cross 85
● Cross 64
SOFTWARE REQUIRED
● Python – IDLE
● Anaconda – Spyder
PROJECT METHODOLOGY
The objective of this project is to develop an Image colourizer using deep learning
technique and computer vision (cv).The system generates captions for images by
combining computer vision,numpy library and pre trained models.
This project aims to develop a bot which can non coloured images with:
1. High Accuracy: Generate image which matches colours of the real world.
2. Up scale work: Handle diverse image categories.
3. Efficiency: Provide real-time image colouring.
4. Scalability: Extendable to complex images and can be used by anyone.
PROJECT DESCRIPTION:
This project uses Convolutional Neural Networks (CNNs) for feature extraction from
images and Long Short-Term Memory (LSTM) networks for choosing suitable colours for
images.
Key Features:
1. Image Preprocessing: Resize and normalize images for model input.
2. Feature Extraction: Use pre-trained CV models like colorization_release_v2.caffemodel
and Tensor flow
3. Outcome:The program will display the original grayscale image and the colorized
version side by side.
4. Evaluation: BLEU score for performance metrics.
Facilitates Scalability: Adapt to different scales, from small user groups to large
databases, without significant loss in performance.
● WHAT…..?
Product/Service: Python-based Image Caption Generator.
● WHY…..?
Code:
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Main function
def main():
# Load the model
net = load_colorization_model()
plt.subplot(1, 2, 2)
plt.title('Colorized Image')
plt.imshow(cv2.cvtColor(colorized_image, cv2.COLOR_BGR2RGB))
plt.axis('off')
plt.show()
if __name__ == "__main__":
main()
Note- All librarian such as CV2 and numpy are needed to be installed before coding the program
PROJECT OUTCOMES
1. Model Fine-Tuning:
o Transfer learning techniques were used to enhance the model’s accuracy by
fine-tuning pre-trained CNN layers on domain-specific datasets and tested by
Peak Signal-to-Noise Ratio (PSNR) for the image quality Mean Squared
Error (MSE): Calculates the average squared difference between the
generated and ground truth images. Lower values signify better performance.
2. Dataset Used:
o The Kaggle dataset was used for training, which contains over 330,000
images and hosts image colourization task.Additional datasets like
Imagenet ,MIRFLICKR25k and GIT HUB were also experimented with
for comparison and to get testing data also.
3. Challenges Faced:
o Managing large datasets and ensuring optimal GPU utilization.
o Handling ambiguous and complex images where multiple colours can be
equally valid.
4. Future Improvements:
o Incorporating attention mechanisms for more accurate image colouring
o Extending support for making it more easy to use
FUTURE APPLICATIONS
1. Healthcare:
o For making coloured mri scan reports,x-ray reports and scans.
2. E-commerce:
o Automatic artworks can be made by colouring non coloured images and
selling them online.
3. Content Creation:
● Colouring old documentaries
and using old pictures in a coloured form.
REFERENCES
1. TensorFlow Documentation
2. "Deep Learning" by Ian Goodfellow
3. cv2.dnn.readNetFromCaffe('colorization_deploy.prototxt
4. Kaggle dataset for data:
kaggle.com