Image_Segmentation
Image_Segmentation
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
SUBMITTED BY
Name Univ. Roll No.
Subharaj Mishra 10800120067
Dipyaman Ghosal 10800121194
Abir Maji 10800121203
Arghya Konar 10800121193
December, 2023
Contents
Certificate of ii
Recommendation………………………………………………………………
Certificate of iii
Approval……………………………………………………………….............
Acknowledgement…………………………………………………………......................... iv
...
Abstract…………………………………………………………………………... v
…………..
List of vii
Figures……………………………………………………………………………….
List of Tables………………………………………………………………………………. vii
i
1. Preface………………………………………………………………………………
1.1 Introduction……………………………………………………... 1
……………
1.2 Motivation of the project…………………………………. 2
…………………..
1.3 Basic description of the project…………………………. 3
……………………
2. Literature Review
2.1 General……………………………………………………... 4
…………………
2.2 Review of related works …………………………. …………......….…... 6
……
3. Related Theories and Algorithms…………..……………………………………..
3.1 Fundamental theories underlying the work. 8
…………………………………..
3.2 Fundamental algorithms…………………………………. 10
……………………
4. Proposed model/algorithm…………………………………….………………….
4.1 Proposed 12
model………………………………………………………………..
4.2 Proposed algorithms………………………. 16
………………………………….
5. Simulation Results…………………………………………...…………………….
…
4.1 Experimental set up ……………………………………………..………….. 20
4.2 Experimental results………...……………...……… 25
6. Discussion and Conclusion ……...…………………………………………….
…….
6.1 Discussion…………………………………..…………………………. 30
……..
6.2 Future work…………………………………..….……………………... 32
ii
……..
6.3 Conclusion………………………………………………………………… 34
…..
References…………………………………………………………………………
….
Certificate of Recommendation
I hereby recommend that the Minor Project Report entitled, “Write Project Title
Here” carried out under my supervision by the group of students listed below may be
accepted in partial fulfilment of the requirement for the degree of “Bachelor of
Technology in Computer Science and Engineering” of Asansol Engineering College
under MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY.
…………………………………
(Asst Prof. Mr. Pranabes Gangopadhyay)
Project Supervisor
iii
Dept. of Comp. Sc. & Engg,
Asansol Engineering College,
Asansol-713305
Countersigned:
………………………………
(Dr. Monish Chatterjee)
Head of the Department
Dept. of Comp. Sc. & Engg.
Asansol Engineering College,
Asansol-713305
Certificate of Approval
…………………………………
Acknowledgement
It is our great privilege to express our profound and sincere gratitude to our Project
Supervisor, Asst Prof. Mr. Pranabes Gangopadhyay for providing us a very
cooperative and precious guidance at every stage of the present project work being
carried out under his/her supervision. His valuable advice and instructions in carrying
out the present study has been a very rewarding and pleasurable experience that has
greatly benefited us throughout the course of work.
We would like to convey our sincere gratitude towards Dr. Monish Chatterjee, Head of
the Department of Computer Science and Engineering of Asansol Engineering College
for providing us the requisite support for timely completion of our work. We would also
like to pay our heartiest thanks and gratitude to all the teachers of the Department of
Computer Science and Engineering, for various suggestions being provided in attaining
success in our work.
We would like to express our earnest thanks to Mr. Suman Mallick, of CSE Project Lab
for his technical assistance provided during our project work.
v
Finally, I would like to express my deep sense of gratitude to my parents for their
constant motivation and support throughout my work.
…………………………………
(Subharaj Mishra)
…………………………………
(Dipyaman Ghosal)
…………………………………
(Abir Maji)
…………………………………
(Arghya Konar)
Abstract
As the complexity and dimensionality of image data continue to grow, the demand for efficient
and accurate image segmentation models becomes increasingly crucial. This abstract explores the
application of evolutionary feature selection and dimensionality reduction techniques as powerful
strategies for optimizing image segmentation models. Evolutionary algorithms, inspired by
natural selection, offer a dynamic and adaptive approach to selecting relevant features by
iteratively evolving a population of potential solutions. Through the exploration of candidate
feature subsets, these algorithms aim to enhance the model's performance by identifying and
retaining the most informative features for image segmentation tasks.
This abstract concludes by highlighting the potential synergy between evolutionary feature
selection and dimensionality reduction techniques, emphasizing their collective impact on
vi
improving the efficiency, accuracy, and interpretability of image segmentation models. The
integration of these strategies holds promise for advancing the field of computer vision and
empowering applications ranging from medical imaging to autonomous systems.
List of Figures
Fig. 2.0 Proposed Algorithms For Image Segmentation(R-CNN). Page no: xii
vii
1. Preface……………………………………………………………………………
…
1.1 Introduction:
The advent of sophisticated imaging technologies has fuelled the need for
advanced computer vision models, particularly in the domain of image
segmentation. As the complexity of visual data grows, optimizing
segmentation models becomes paramount. This preface introduces the key
elements of the upcoming exploration—evolutionary feature selection and
dimensionality reduction—as innovative techniques to address the challenges
of enhancing image segmentation models. It sets the stage for understanding
the dynamic interplay between these methodologies and their potential impact
on the field of computer vision.
viii
significance of exploring evolutionary feature selection and dimensionality
reduction in this context.
2. Literature Review…………………………………………………………………
2.1 General:
The literature review in this section provides a broad overview of the general
landscape surrounding image segmentation, evolutionary algorithms, and
dimensionality reduction techniques. It explores foundational concepts,
historical developments, and key theoretical frameworks that form the basis of
the subsequent investigation. By delving into the general literature, readers
will gain a comprehensive understanding of the evolution of image
segmentation models, the principles underlying evolutionary algorithms, and
the significance of dimensionality reduction in the context of computer vision.
ix
Additionally, it provides a foundation for the project's methodology and
conceptual framework, setting the stage for the subsequent chapters that delve
into the practical application of these techniques in optimizing image
segmentation models.
This section explores the foundational theories that underpin the application
of TensorFlow in the context of image segmentation. It delves into the core
principles of deep learning, convolutional neural networks (CNNs), and the
specific architectural considerations within TensorFlow that make it a
powerful tool for image segmentation tasks. The review of fundamental
theories provides readers with the necessary background to comprehend the
intricacies of how TensorFlow processes image data, extracts features, and
performs segmentation. Insights into the theoretical underpinnings guide the
subsequent discussion on the practical implementation of image segmentation
using TensorFlow.
x
covers key algorithms such as U-Net, Deep Lab, and Mask R-CNN, among
others, that have proven effective in segmenting images. The discussion
outlines the conceptual frameworks and algorithmic intricacies that contribute
to the success of these methods. By examining the core algorithms, readers
will gain a deeper understanding of the nuances involved in leveraging
TensorFlow for image segmentation. This knowledge serves as a crucial
precursor to the subsequent chapters, where the integration of evolutionary
feature selection and dimensionality reduction techniques will be explored to
enhance these fundamental algorithms and optimize image segmentation
models.
4. Proposed Model/Algorithm……………………………………………………….
4.1 Proposed Model of U-Net:
xi
Fig: 1.0 : Proposed Model for Image Segmentation.
4.2 Proposed Algorithms For Image Segmentation(R-CNN):
xii
Backbone Network:
Mask R-CNN typically starts with a backbone network (e.g., U-Net or a
similar architecture) that extracts hierarchical features from the input image.
These features serve as a foundation for subsequent tasks.
Region Proposal Network (RPN):
Similar to Faster R-CNN, Mask R-CNN utilizes an RPN to generate region
proposals. These proposals are candidate bounding boxes that potentially
contain objects of interest. The RPN proposes regions based on anchor boxes
and assigns objectless scores to these proposals.
ROI Align:
Once region proposals are obtained, the algorithm uses ROI (Region of
Interest) Align to extract features from these proposed regions with sub-pixel
accuracy. Unlike the ROI pooling used in Faster R-CNN, ROI Align mitigates
information loss caused by quantization and improves the accuracy of the
subsequent tasks.
Object Classification:
The extracted features from the proposed regions are fed into a classification
head, which predicts the class label of the object contained within each
region. This step distinguishes different object categories.
Mask Prediction:
Mask R-CNN introduces an additional branch for mask prediction. This
branch is responsible for generating pixel-level segmentation masks for each
instance within the proposed regions. It uses a small fully convolutional
network to predict the mask for each region independently.
Training:
The entire Mask R-CNN model is trained end-to-end. The training involves
optimizing three main components: the region proposal network, the object
classification, and bounding box regression, and the mask prediction. A multi-
task loss function combines these components, ensuring that the model learns
to simultaneously predict bounding boxes, class labels, and segmentation
masks.
Inference:
xiii
During inference, the trained Mask R-CNN model takes an input image,
generates region proposals using the RPN, performs ROI Align to extract
features, and then predicts class labels, bounding boxes, and segmentation
masks for each region. The final output includes the identified objects along
with their precise segmentation masks.
Mask R-CNN has proven to be highly effective in various applications,
including object detection and instance segmentation, making it a widely
adopted algorithm in the field of computer vision
Fig: 2.0
5. Simulation Results………………………………………………………………..
5.1 Experimental Setup:
In the experimental setup, images from a diverse dataset were pre-processed
with resizing and normalization.
The dataset namely Oxford-IIIT Pets dataset is loaded in the Program where
the images of different animals are give to work upon. In addition, the image
color values are normalized to the [0, 1] range. Finally, as mentioned above
the pixels in the segmentation mask are labelled either {1, 2, 3}. For the sake
of convenience, subtract 1 from the segmentation mask, resulting in labels
that are: {0, 1, 2}.
xiv
2. Normalizing the Image:
In image processing, normalization is a process that changes the range of
pixel intensity values. Applications include photographs with poor contrast
due to glare, for example. Normalization is sometimes called contrast
stretching or histogram stretching. In more general fields of data processing,
such as digital signal processing, it is referred to as dynamic range expansion.
xv
5. Augmenting the data:
The data is further given to for augmentation. Data augmentation is a
technique to increase the diversity of your training set by applying random
(but realistic) transformations, such as image rotation. Here we are randomly-
flipping an image. The flipping is horizontal in nature.
xvi
5.2 Experimental Results:
1. First Phase (Running the model before Training):
First phase of testing is to run the model on the new images before
training the model. This is comparing the results before training.
xvii
2. Second Phase (Running the model when its Training):
Second phase of testing is to run the model with partial data while its
training on the training data to check the progress of our machine learning model.
xvii
i
4. Fourth Phase (Accuracy and Precision of each testing data):
These are the following Iteration of the testing data along with there
validation loss and Accuracy.
xix
The graph showing the reduction of validation loss and Training loss over the
iteration in the model.
xx
The discussion section delves into the implications of the simulation results,
addressing strengths and limitations of the proposed algorithm for image
segmentation. Key considerations include the algorithm's adaptability to
various datasets, the impact of hyperparameter choices on performance, and
potential challenges in handling complex scenes. Additionally, comparisons
with existing methods and insights into the algorithm's generalization
capabilities are explored.
6.3 Conclusion:
It emphasizes the effectiveness of the proposed algorithm in achieving
accurate image segmentation results, as evidenced by comprehensive
evaluation metrics. The conclusion reinforces the algorithm's practical
applicability and potential for real-world deployment. Closing remarks may
also touch upon the broader implications of the research within the field of
computer vision and image processing.
References:
xxi
1. Kaggle - https://www.kaggle.com/
2. Coursera - https://www.coursera.org/
3. Geeksforgeeks - https://www.geeksforgeeks.org/
xxii