0% found this document useful (0 votes)
1 views

Abir 05 CSE 3217 Assignment 2

The document discusses Support Vector Machines (SVM), a machine learning technique used for classification and regression, particularly in image processing. It explains the types of SVM, the concept of hyperplanes and support vectors, and various applications such as object detection, image segmentation, and anomaly detection. Additionally, it highlights the benefits and challenges of using SVM in image processing, concluding with its significant impact on the field.

Uploaded by

abirhasan.shu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Abir 05 CSE 3217 Assignment 2

The document discusses Support Vector Machines (SVM), a machine learning technique used for classification and regression, particularly in image processing. It explains the types of SVM, the concept of hyperplanes and support vectors, and various applications such as object detection, image segmentation, and anomaly detection. Additionally, it highlights the benefits and challenges of using SVM in image processing, concluding with its significant impact on the field.

Uploaded by

abirhasan.shu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Assignment -02

Topic: Support Vector Machine


Course Title: Technical Writing and Presentation Lab
Course Code: CSE-3217

Submitted By: Submitted To:


Name: Abir Hasan Name: Anup Majumder
Roll: 05 Assistant Professor
Department of Computer Science & Department of Computer Science &
Engineering Engineering
Session: 2019-2020 Jahangirnagar university

Submission Date: 14.12.2023

Department of Computer Science & Engineering


Sheikh Hasina University
Netrokona, Bangladesh
Introduction:
Support vector machine (SVM) is a powerful machine learning technique that can be used
for both classification and regression problems. It is based on the idea of finding the optimal
hyperplane that separates the data points of different classes with the maximum margin.
SVMs can handle high-dimensional and nonlinear data, making them suitable for various
image processing tasks, such as image classification, segmentation, recognition, and
retrieval.

Image processing represents the domain within computer science dedicated to the
manipulation and analysis of digital images. Images are composed of pixels, which are the
smallest units of information that can be displayed on a screen. Each pixel has a numerical
value that represents its color and intensity. To process an image using SVM, we need to
extract features from the pixels that can represent the image content and distinguish it from
other images. Features can be based on color, texture, shape, edges, or any other property
of the image. Once the features are extracted, we can use them as input for the SVM
algorithm, which will learn a model that can classify or predict the output for new images.

What is an SVM?

A support vector machine (SVM) is a supervised machine learning algorithm designed for
both classification and regression tasks. It belongs to the family of discriminative models
and is widely utilized in various fields, including pattern recognition, image analysis, and
bioinformatics. The primary objective of SVM is to find a hyperplane that effectively
separates data points into different classes while maximizing the margin between the
classes. In the context of classification, SVM aims to establish an optimal decision boundary
that maximizes the distance between the nearest data points of different classes, known as
support vectors.SVM is particularly effective in high-dimensional spaces and is capable of
handling both linear and non-linear relationships between input features. It achieves this by
mapping input data into a higher-dimensional space through a process called the kernel
trick, allowing for the identification of complex patterns and structures.
Types of SVM:

There are two types of SVM

• Linear SVM
• Non-linear SVM

Linear SVM: Linear svm is applied when dealing with data that can be distinctly divided
into two classes using a single straight line. This type of dataset, known as linearly separable
data, is best suited for a classifier termed the Linear SVM classifier.

Non-linear SVM: Non-Linear SVM is employed when working with data that lacks a clear
separation using a straight line. In cases where the dataset is nonlinear, meaning it cannot
be easily classified by a straight line, the appropriate classifier to use is the Non-Linear SVM
classifier.

Hyperplane and Support Vectors in the SVM algorithm:

• Hyperplane: In an n-dimensional space, there exist numerous lines or decision


boundaries to distinguish between classes. However, the objective is to identify the
optimal decision boundary, referred to as the hyperplane in SVM, that effectively
classifies the data points. The hyperplane's dimensions are contingent upon the
features within the dataset. For instance, in a scenario with two features, the
hyperplane manifests as a straight line, as depicted in the image. Conversely, if the
dataset comprises three features, the hyperplane takes the form of a two-dimensional
plane.
• Support Vectors: Support Vectors are data points or vectors that hold the closest
proximity to the hyperplane and exert influence on its position. These vectors, by
virtue of supporting the hyperplane, are referred to as Support Vectors.

How does SVM works?

A straightforward linear SVM classifier functions by establishing a straight line between


two classes, wherein one side of the line encompasses data points representing one category,
while the other side contains data points assigned to a different category. The crucial
distinction lies in the algorithm's capacity to select the optimal line among the infinite
possibilities, setting it apart from alternatives like k-nearest neighbours.
What distinguishes the linear SVM algorithm is its ability to identify the line that maximizes
the separation between different classes while remaining as distant as possible from the
nearest data points. To demystify the machine learning terminology, envision a 2-
dimensional scenario where data points are plotted on a grid. The objective is to pinpoint
the line between the two closest points that effectively segregates the other data points,
ensuring accurate categorization. In this context, the two closest data points become the
support vectors crucial for determining the decision boundary. It's important to note that the
decision boundary need not be a simple line; it is alternatively termed a hyperplane because
it extends to scenarios with more than two features, transcending the limitations of a two-
dimensional representation. The essence of the decision boundary lies in its ability to discern
and classify data points accurately, showcasing the efficacy of the linear SVM classifier.

Fig: Linear SVM

Fig: Non-linear SVM using RBF kernel


How Does the Computer Read the Image?
The primary function of image classification involves interpreting input images, a process
through which computers perceive images distinctively. From the computer's perspective,
an image is essentially an array of pixels. For instance, if the image dimensions are 200 X
200, the corresponding array size becomes 200 X 200 X 3. Here, the first 200 denotes the
width, the second 200 signifies the height, and the subsequent 3 represents the RGB channel
values. The array contains pixel intensity values ranging from 0 to 255, each value
describing the pixel's intensity at a specific coordinate within the image.

Uses of SVM:
Support Vector Machines (SVMs) have become a cornerstone in the field of digital image
processing due to their remarkable ability to analyze and extract meaningful information
from images. Their strengths in classification and pattern recognition make them ideal for
various image processing tasks, leading to their widespread adoption across diverse
applications.

1. Object Detection and Recognition:

SVMs excel at identifying and classifying objects within images. This capability plays a
crucial role in several applications, including:

• Facial recognition: Identifying individuals in images and videos is crucial for


security systems, access control, and law enforcement.
• Pedestrian detection: Autonomous vehicles rely on SVM-based object detection
algorithms to identify pedestrians and navigate safely.
• Traffic sign recognition: Recognizing and interpreting traffic signs automatically
enhances road safety and assists in driver assistance systems.
2. Image Segmentation:

SVMs can effectively segment images into meaningful regions based on their content.
This is crucial for tasks like:

• Medical image analysis: Segmenting tissues and organs in medical images, such
as MRI scans, aids in diagnosis, disease monitoring, and treatment planning.
• Remote sensing: Identifying land cover, detecting deforestation, and analyzing
environmental changes rely heavily on image segmentation techniques.
• Content-based image retrieval: Searching for images based on specific
content, such as color, texture, or shape, becomes possible through effective image
segmentation.

3. Anomaly Detection:

SVMs can identify anomalies and outliers in images, making them valuable for:

• Defect detection: Identifying defects in manufactured products improves quality


control and reduces production costs.
• Fraudulent activity detection: Detecting anomalies in financial transactions or
online activity helps combat fraud and financial crime.
• Medical diagnosis: Identifying abnormalities in medical images can assist medical
professionals in early disease detection and diagnosis.

4. Image Enhancement and Restoration:

SVMs can improve image quality by denoising, correcting color imbalances, and
sharpening details. This is valuable for:

• Improving visual quality: Enhancing photographs and videos for better viewing
and understanding.
• Medical image enhancement: Preprocessing and enhancing medical images can
improve the accuracy of diagnoses and treatment planning.
• Low-quality image restoration: Restoring old or damaged images can preserve
historical records and improve their visual quality.

5. Image Content Analysis and Understanding:

SVMs can analyze and extract high-level information from images, enabling applications
like:
• Scene understanding: Automatically interpreting the content and context of an
image, such as identifying the location, objects present, and activities occurring.
• Automatic image captioning: Generating captions for images, providing textual
descriptions of the image content.
• Image retrieval based on semantic similarity: Searching for images based on
their semantic meaning, rather than just keywords or visual features.

Benefits of using SVM for Image Processing:

• High accuracy: SVMs offer high classification and detection accuracy, making
them reliable for critical tasks.
• Versatility: They can be applied to various image processing tasks, from object
detection to image segmentation and content analysis.
• Robustness: SVMs can handle noise and variations in image data, making them
effective in real-world applications.
• Efficiency: With optimized implementations, SVMs can perform complex image
processing tasks efficiently.

Challenges of using SVM for Image Processing:

• Hyperparameter tuning: Selecting optimal hyperparameters can be complex and


requires expertise.
• Computational cost: Training SVMs on large datasets can be computationally
expensive and time-consuming.
• Limited to binary classification: The basic SVM algorithm is only suitable for
binary classification tasks.

Conclusion:

Support Vector Machines have revolutionized the field of digital image processing with
their powerful capabilities in image analysis, classification, and understanding. Their
diverse applications and proven performance across various tasks solidify their position as
a crucial tool in the image processing toolbox. As the field continues to evolve, the
integration of SVMs with other machine learning techniques will undoubtedly lead to even
more remarkable advancements in image processing capabilities.

You might also like