Professional Documents
Culture Documents
Final Project
Final Project
Final Project
C.PAVITHRUN 211520243039
S.VIGNESH 211520243058
D.NARENDHIRAN 211520243034
in the eighth semester of
BACHELOR OF TECHNOLOGY
in
1
PANIMALAR INSTITUTE OF
TECHNOLOGY CHENNAI – 600 123
DEPARTMENT OF
ARTIFICIAL INTELLIGENCE AND DATA SCIENCE
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Mrs. BABISHA M.E Dr. T. KALAICHELVI, M.E.,
Ph.D.
SUPERVISOR
HEAD OF DEPARTMENT
2
INTERNAL EXAMINER EXTERNAL EXAMINER
3
ACKNOWLEDGEMENT
A project of this magnitude and nature requires the kind cooperation and
support of many, for successful completion. We wish to express our sincere
thanks to all those who were involved in the completion of this project.
We would like to express our deep gratitude to Our Beloved Secretary and
Correspondent, Dr.P.CHINNADURAI, M.A., Ph.D., for his kind words
and enthusiastic motivation which inspired us a lot in completing the project.
We wish to convey our thanks and gratitude to our Head of the Department
Dr. T. KALAICHELVI, M.E., Ph.D., Department of Artificial Intelligence
And Data Science, for her support and providing us ample time to complete
our project.
4
TABLE OF CONTENTS
5
4 SOFTWARE DESCRIPTION
4.1 The Jupyter Notebook 32
4.2 Pycharm
4.3 Matlab
5 SYSTEM DESIGN
5.1 Architecture diagram 41
5.2 Data Flow diagram 42
5.3 UML diagrams 45
5.3.1 Usecase diagram 45
6 MODULES 50
6.1 Module description 50
6
9 SCREENSHOTS 42
10 CONCLUSIONS AND FUTURE WORKS 43
11 REFERENCES 44
12 APPENDICES 46
7
ABSTRACT
task in computer vision and digital image processing, aims to recover missing or
damaged information within images to restore them to their original state. Traditional
methods often struggle with complex patterns and variations in images, necessitating
The proposed context encoder model serves as the cornerstone of our approach,
representation, while the decoder reconstructs the image back to its original size.
to-noise ratio (PSNR) and structural similarity index (SSIM). Experimental results
methods, showcasing its ability to preserve fine details and accurately restore images
8
context encoder model, in addressing real-world challenges in visual content
Keywords:
9
LIST OF FIGURES
10
LIST OF ABBREVIATIONS
S. No Abbreviation Expansi
on
1 NLP Natural Language Processing
5 PC Personal Computer
11
CHAPTER 1
INTRODUCTION
Image restoration, a crucial task in the realm of computer vision and digital
image processing, plays a pivotal role in preserving and enhancing visual content.
within images, restoring them to their original state while retaining fine details
and visual fidelity. Over the years, traditional methods of image restoration have
In recent years, the emergence of deep learning techniques has revolutionized the
and features directly from data, making them well-suited for image restoration
tasks. Among these approaches, the context encoder model has garnered
system based on the context encoder model. The context encoder serves as the
foundation of our approach, leveraging the power of deep learning to learn and
12
understand the underlying structure of images. Through extensive training on a
diverse dataset of damaged images, the context encoder learns to recognize and
restoration, the challenges associated with traditional methods, and the potential
objectives and scope of the project, highlighting the innovative nature of the
proposed context encoder model and its potential impact on the field of image
the context encoder model, in preserving and enhancing visual content for
13
Fig.1 Image Processing
restoration system using deep learning techniques, with a specific emphasis on the context
encoder model. The project encompasses several key components and stages, each
literature and research in the fields of image restoration, computer vision, and deep
learning. This review serves to establish a foundational understanding of the current
state-of-the-art techniques, challenges, and potential areas for improvement.
2. Problem Definition: The project defines the specific problem statement and objectives,
identifying the key challenges and goals of image restoration. This step involves
clarifying the scope of the project, selecting appropriate datasets, and defining
performance metrics for evaluating the effectiveness of the proposed system.
3. Data Collection and Preprocessing: A diverse dataset of damaged images is collected
or curated for training and evaluation purposes. The dataset may include images with
14
various types of damage, such as noise, blur, missing regions, and artifacts. Data
preprocessing techniques are applied to prepare the dataset for training, including
resizing, normalization, and augmentation.
4. Model Development: The core of the project involves the development of the context
encoder model for image restoration. The model architecture is designed based on
deep learning principles, incorporating convolutional neural networks (CNNs) and
encoder-decoder structures. Hyperparameters are tuned, and optimization algorithms
are selected to train the model efficiently.
5. Training and Evaluation: The context encoder model is trained on the prepared dataset
based on the performance metrics and qualitative assessment of restored images. This
analysis provides insights into the strengths and limitations of the proposed approach
and identifies potential areas for further improvement.
7. Discussion and Conclusion: The project concludes with a discussion of the findings,
implications, and future directions. Key insights, challenges, and contributions are
summarized, and recommendations are provided for advancing the field of image
restoration using deep learning techniques.
Through these stages, the project aims to demonstrate the feasibility and efficacy of the
context encoder model for image restoration, showcasing its potential to address real-world
challenges and contribute to the advancement of computer vision and digital image
processing technologies.
15
In today's digital age, the relevance and importance of projects like "Image Restoration
Using Context Encoder Model" are particularly significant for several reasons:
3. Model Training: Training the context encoder model on the prepared dataset using
appropriate methodologies, such as supervised learning or self-supervised learning.
Monitoring training progress, optimizing model performance, and addressing challenges.
5. Results Analysis: Analyzing and interpreting the results of the trained model, including its
strengths, limitations, and areas for improvement. Investigating the impact of different
factors such as dataset size, model architecture, and training parameters on the performance
of the model.
6. Application and Deployment: Exploring potential applications and use cases of the
developed image restoration system across various domains, including cultural heritage
preservation, forensic analysis, medical imaging, and entertainment. Considering practical
considerations for deploying the model in real-world scenarios, such as computational
resources, scalability, and efficiency.
7. Documentation and Reporting: Documenting the entire process of the project, including
16
data collection, model development, training procedures, evaluation metrics, and results
analysis. Writing comprehensive reports and documentation to communicate the findings,
insights, and recommendations of the project to stakeholders and the wider community.
8. Future Directions: Identifying potential areas for further research and development in
image restoration using deep learning techniques. Proposing innovative approaches,
methodologies, and applications to advance the field and address emerging challenges.
1. Preservation of Cultural Heritage: With the proliferation of digital archives and online
repositories, preserving cultural heritage through digital means has become increasingly
crucial. Image restoration techniques can help restore and enhance old, damaged photographs
and artworks, ensuring their longevity and accessibility for future generations.
2. Forensic Analysis and Law Enforcement: Image restoration plays a vital role in forensic
analysis and law enforcement investigations. Restoring obscured or tampered images can
provide critical evidence in criminal cases, helping law enforcement agencies solve crimes
and ensure justice.
3. Medical Imaging: In the field of medical imaging, the accurate restoration of medical
17
scans and diagnostic images is paramount for accurate diagnosis and treatment planning.
Image restoration techniques can help improve the quality and clarity of medical images,
leading to more reliable diagnoses and better patient outcomes.
18
1. Develop and implement an advanced image restoration system based on the context
encoder model, leveraging deep learning techniques to effectively recover missing or
damaged information within images.
2. Train the context encoder model on a diverse dataset of damaged images, utilizing
appropriate methodologies to optimize model performance and accuracy in recognizing and
reconstructing missing elements.
3. Evaluate the performance of the trained context encoder model using quantitative metrics
such as peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM), as well as
qualitative assessment of restored images, to assess its efficacy in image restoration tasks.
4. Compare the performance of the context encoder model with traditional image restoration
methods, identifying strengths, limitations, and areas for improvement to advance the state-
of-the-art in image restoration techniques.
5. Explore potential applications and use cases of the developed image restoration system
across various domains, including cultural heritage preservation, forensic analysis, medical
imaging, and entertainment, contributing to advancements in technology and society.
19
CHAPTER 2
LITERATURE
SURVEY
Adversarial Network
ABSTRACT :In recent years, people's pursuit of art has been on the rise.
People want computers to be able to create artistic paintings based on
descriptions. In this paper, we proposed a novel project, Painting Creator, which
uses deep learning technology to enable the computer to generate artistic
illustrations from a short piece of text. Our scheme includes two models, image
generation model and style transfer model. In the real image generation model,
inspired by the application of stack generative adversarial networks in text to
image generation, we proposed an improved model, IStackGAN, to solve the
problem of image generation. We added a classifier based on the original model
and added image structure loss and feature extraction loss to improve the
performance of the generator.
MERITS :
The structure of Fuzzy Logic systems is simple and justifiable
DEMERITS :
Approval and verification of a fuzzy information-based framework needs broad testing with
equipment
20
2. PAPER TITLE: A Novel Fractional-Order Variational
Approach for Image Restoration Based on Fuzzy Membership
Degrees
MERITS :
The structure of Fuzzy Logic systems is simple and justifiable
DEMERITS :
Approval and verification of a fuzzy information-based framework needs broad testing with
equipment
21
3. PAPER TITLE:
A Comprehensive Review of Deep Learning-Based Real-World Image
Restoration
ABSTRACT: Real-world imagery does not always exhibit good visibility and
clean content, but often suffers from various kinds of degradations (e.g., noise,
blur, rain drops, fog, color distortion, etc.), which severely affect vision-driven
tasks (e.g., image classification, target recognition, and tracking, etc.). Thus,
restoring the true scene from such degraded images is of significance. In recent
years, a large body of deep learning-based image processing works has been
exploited due to the advances in deep neural networks. This paper aims to make
a comprehensive review of real-world image restoration algorithms and beyond.
More specifically, this review provides overviews of critical benchmark
datasets, image quality assessment methods, and four major categories of deep
learning-based image restoration methods, i.e., based on convolutional neural
network (CNN), generative adversarial network (GAN), Transformer, and
multi-layer perceptron (MLP). The paper highlights the latest developments and
advances in each category of network architecture to provide an up-to-date
overview
MERITS:
Has the ability to handle large and complex data, and has been used to achieve state-of-the-art
performance on a wide range of problems
DEMERITS:
It is also computationally expensive and requires a large amount of data and computational
resources to train.
22
4. PAPER TITLE:
ABSTRACT: Digital images have become easy to generate and share with
tremendous growth in communication technology. Therefore, the threat of
forgery and tampering in digital images has also been increased. This study
proposes a blind fragile watermarking scheme for color images to provide
efficient image tamper detection and self-recovery. A secret key based pseudo
random binary sequence is used as a fragile watermark for tamper detection.
Likewise, the recovery information is preserved in a randomized manner using a
secret key. During embedding, each channel of the RGB image is divided into
non-overlapping 2 4 size blocks. Each block is then watermarked using a LSB
(least significant bit) replacement process in 9-base notation structure. The
watermark sequence (i.e. 12-bit) for each block contains 6-bits from the fragile
watermark and concatenated with the recovery information (i.e. 6 MSB (most
significant bit) of blocks mean value) of a different block. The experimental
results confirm that the scheme is highly efficient to locate tampered regions
and recover the original image even in case of serious tampering.
MERITS :
Partial theft protection. Branding. Images look signed. Getting more sales. Photo agencies do it. It's
an age-old practice.
DEMERITS :
They're a distracting foreign element. Time-consuming. No legal value. They can be removed or
cropped.
23
CHAPTER 3
SYSTEM ANALYSIS
The existing system for image restoration relies heavily on traditional methods such as
interpolation, filtering, and heuristic algorithms. While these methods can address basic
forms of image degradation, they often struggle with more complex patterns and variations.
Manual intervention and expert knowledge are frequently required to fine-tune parameters
process. Furthermore, traditional methods may lack the flexibility to adapt to different types
of damage and may not fully exploit the contextual information present in images, leading to
suboptimal results.
24
3.1.1. LIMITATIONS:
Existing systems for a project of this scale often have limitations, including:
The proposed system introduces an advanced image restoration approach based on the
context encoder model, leveraging deep learning techniques to overcome the limitations of
traditional methods. By training the context encoder model on a diverse dataset of damaged
images, the system learns to recognize and reconstruct missing information by capturing
contextual dependencies within the images. Unlike traditional methods, the proposed system
offers a data-driven approach that automatically learns to restore images without the need for
manual intervention or fine-tuning of parameters. This approach results in higher accuracy,
efficiency, and adaptability in image restoration tasks, leading to superior results across
various types of image damage.
25
3.2.1. ADVANTAGES:
26
3.3. REQUIREMENTS ANALYSIS:
The Hardware requirements may serve as the basis for a contract for the
implementation of the system and should therefore be a complete specification
of the whole system. They are used by the software engineers as the starting
point for the system design. It shows what the system does not and how it
should be implemented.
o HDD : >90GB
o RAM : >2GB
o OS : Windows 7/8/8.1/10
27
CHAPTER 4
SOFTWARE DESCRIPTION
4.2 PyCharm:
● Intelligent Code
● Editor Smart Code
● Navigation Fast
● Safe Refactoring
● Debugging, Testing and Profiling
● VCS, Deployment and Remote Development.
28
4.3 MATLAB:
29
CHAPTER 5
SYSTEM DESIGN
30
5.2 UML DIAGRAMS:
31
Fig 5.3.1-Use Case Diagram
32
CHAPTER-6
MODULES
Certainly, in the "Developing a DL model to restore vintage art pieces" project, various
modules or components are used to perform specific functions and tasks. These
modules work together to automate data collection, analysis, and reporting. Here's an
explanation of the key modules used in the project:
relevant data from specified websites. It typically includes scripts and tools for
making HTTP requests, parsing HTML, and retrieving structured data.
Data Preprocessing and Normalization Module:
● Function: This module is designed to clean, format, and structure the collected
33
Fig 6.1.2- Data Collection Module
34
CHAPTER 7
ALGORITHM AND
PERFORMANCE
7.1. ALGORITHM:
35
CHAPTER 8
36
8.1.3 Integration Testing
Here the streaming module and encoding module options are integrated
and tested. This testing provides the assurance that the application is well
integrated functional unit with smooth transition of data.
37
8.2 TESTING RESULTS
All libraries
worked Test 100%
successful
successfully.
38
8.3 TEST CASES
39
CHAPTER-9
SCREENSHOTS
40
CHAPTER 10
10.1 CONCLUSION
Future Work:
While the project has achieved promising results, there are several avenues for future
work and research to further enhance the proposed image restoration system:
41
system to specific domains such as medical imaging, historical document restoration,
and satellite imagery analysis, addressing domain-specific challenges and
requirements.
5. User interface and usability: Design user-friendly interfaces and tools to enable non-
experts to utilize the image restoration system effectively, facilitating its adoption in
various fields and applications.
By pursuing these avenues for future work, the proposed image restoration system can
continue to evolve and address emerging challenges, further contributing to
advancements in technology, science, and society.
42
CHAPTER - 11
REFERENCES
[3] S. Ren, K. He, R. Girshick, and J. Sun, ‘‘Faster R-CNN: Towards real-
time object detection with region proposal networks,’’ in Proc. Adv.
Neural Inf. Process. Syst., 2015, pp. 91–99.
43
[8] N. C. F. Codella, D. Gutman, M. E. Celebi, B. Helba, M. A. Marchetti,
S. W. Dusza, A. Kalloo, K. Liopyris, N. Mishra, H. Kittler, and A.
Halpern, ‘‘Skin lesion analysis toward melanoma detection: A challenge at
the 2017 international symposium on biomedical imaging (ISBI), hosted by
the international skin imaging collaboration (ISIC),’’ in Proc. IEEE 15th
Int. Symp. Biomed. Imag. (ISBI ), Apr. 2018, pp. 168–172.
44
CHAPTER - 12
APPENDICES
SAMPLE SOURCE CODE:
import numpy as np
import cv2
import PySimpleGUI as sg
import os.path
import argparse
import os
import sys
import shutil
from subprocess import call
def run_cmd(command):
try:
call(command, shell=True)
except KeyboardInterrupt:
print("Process interrupted")
sys.exit(1)
parser = argparse.ArgumentParser()
parser.add_argument("--input_folder", type=str,
default= image_filename, help="Test images")
parser.add_argument(
"--output_folder",
type=str,
default="./output",
help="Restored images, please use the absolute path",
)
parser.add_argument("--GPU", type=str, default="-1", help="0,1,2")
parser.add_argument(
"--checkpoint_name", type=str, default="Setting_9_epoch_100",
help="choose which checkpoint"
)
parser.add_argument("--with_scratch",default="--
with_scratch" ,action="store_true")
opts = parser.parse_args()
45
gpu1 = opts.GPU
main_environment = os.getcwd()
if not opts.with_scratch:
stage_1_command = (
"python test.py --test_mode Full --Quality_restore --
test_input "
+ stage_1_input_dir
+ " --outputs_dir "
+ stage_1_output_dir
+ " --gpu_ids "
+ gpu1
)
run_cmd(stage_1_command)
else:
46
"python test.py --Scratch_and_Quality_restore --test_input
"
+ new_input
+ " --test_mask "
+ new_mask
+ " --outputs_dir "
+ stage_1_output_dir
+ " --gpu_ids "
+ gpu1
)
run_cmd(stage_1_command_1)
run_cmd(stage_1_command_2)
global f_image
f_image = f'./output/final_output/{n3}'
image = cv2.imread(f_image)
window['-OUT-'].update(data=cv2.imencode('.png', image)
[1].tobytes())
except:
continue
49
elif event == '-IN FILE-': # A single filename was chosen
filename = values['-IN FILE-']
if filename != prev_filename:
prev_filename = filename
try:
image = cv2.imread(filename)
window['-IN-'].update(data=cv2.imencode('.png', image)
[1].tobytes())
except:
continue
50