Class 10 Notes Ai Computer Vision
Class 10 Notes Ai Computer Vision
ARTIFICIAL INTELLIGENCE
ADVANCED PYTHON-COMPUTER VISION
• Emoji Scavenger Hunt :
[Link]
• [Link]
know-about-computer-vision
• Computer Vision is a domain of Artificial Intelligence.
• It deals with visual data inputs, primarily images and videos. It
enables computers to interpret and understand visual information
• Computer Vision is like giving computers the ability to see and
understand the world through digital images and videos, much like
how humans use their eyes to perceive their surroundings.
• It involves extraction of information from digital images like the
videos and photographs, then computers analyze visual
information from images and videos to recognize objects,
understand scenes, and make decisions based on what they “SEE”
• Computer Vision based applications analyse understand the content
using the concepts of image processing and machine learning
models.
Applications of Computer Vision
1. Facial Recognition
2. Face Filters
3. Google’s Search by Image
4. Computer Vision in Retail
5. Self-Driving Cars
6. Medical Imaging
7. Google Translate App
Weather forecasting
• Weather forecasting deals with gathering the satellites data, identifying
patterns in the observations made, and then computing the results to get
accurate weather predictions. This is done in real-time to prevent
disasters.
• Artificial Intelligence uses computer-generated mathematical programs
and computer vision technology to identify patterns so that relevant
weather predictions can be made. Scientists are now using AI for weather
forecasting to obtain refined and accurate results, fast!
• In the current model of weather forecasting, scientists gather satellite
data i.e. temperature, wind, humidity etc. and compare and analyze this
data against a mathematical model that is based on past weather patterns
and geography of the region in question. This is done in real time to
prevent disasters.
• This has resulted in scientists preferring AI for weather forecasting. One of
the key advantages of the AI based model is that it adjusts itself with the
dynamics of atmospheric changes.
Facial Recognition:
• With the advent of smart cities and smart
homes, Computer Vision plays a vital role in
making the home smarter.
• face lock system work in a smartphone
• guest recognition or log maintenance of the
visitors.
• in schools for an attendance system based on
facial recognition of students.
Face Filters :
• The modern-day apps like Instagram and
snapchat have a lot of features based on the
usage of computer vision. The application of
face filters is one among them.
• Through the camera the machine or the
algorithm is able to identify the facial
dynamics of the person and applies the facial
filter selected.
Google’s Search by Image
• The maximum amount of searching for data
on Google’s search engine comes from textual
data, but at the same time it has an
interesting feature of getting search results
through an image.
• CV compares different features of the input
image to the database of images and give us
the search result while at the same time
analysing various features of the image.
Computer Vision in Retail:
• Retailers can use Computer Vision techniques to track
customers’ movements through stores, analyse
navigational routes and detect walking patterns.
• Inventory Management is another such application.
Through security camera image analysis, a Computer
Vision algorithm can generate a very accurate estimate
of the items available in the store. Also, it can analyse
the use of shelf space to identify suboptimal
configurations and suggest better item placement.
Self-Driving Cars:
• A self-driving car, also known as an autonomous vehicle (AV),
driverless car, robot car, or robotic car is a vehicle that is
capable of sensing its environment and moving safely with
little or no human input.”
• Self-driving cars combine a variety of sensors to perceive
their surroundings and differentiate objects, such as
pedestrians, vehicles, and road signs within the vehicle's
environment such as radar, lidar, sonar, GPS, odometry.
• Most leading car manufacturers in the world like Tesla are
reaping the benefits of investing in artificial intelligence for
developing on-road versions of hands-free technology.
• This involves the process of identifying the objects, getting
navigational routes and also at the same time environment
monitoring.
Watch These Videos:
Video 1: Google’s Waymo -
[Link]
Video 2: Tesla’s self-parking -
[Link]
MEDICAL IMAGING
• Medical Imaging*: For the last decades,
computer-supported medical imaging application
has been a trustworthy help for physicians. It
doesn’t only create and analyse images, but also
becomes an assistant and helps doctors with
their interpretation. The application is used to
read and convert 2D scan images into interactive
3D models that enable medical professionals to
gain a detailed understanding of a patient’s
health condition.
GOOGLE TRANSLATE
• Google Translate App*: All you need to do to
read signs in a foreign language is to point
your phone’s camera at the words and let the
Google Translate app tell you what it means in
your preferred language almost instantly. By
using optical character recognition to see the
image and augmented reality to overlay an
accurate translation, this is a convenient tool
that uses Computer Vision.
CV is effective in the following:
• How does the colour vary when you put either of the three as 0 and
then keep on varying the other two?
• How does the output colour change when all the three colours are
varied in same proportion ?
• What is the RGB value of your favourite colour from the colour
palette?
Visit the link [Link]
and create your own pixel art.
Try and make a GIF using the online app for your
own pixel art.
Tasks in Computer Vision
A computer cannot make sense of images. For human,
this ability comes naturally and effortlessly but for
machines, it’s a fairly complicated process.
The idea is to teach a computer how to make sense of a
matrix of numbers and identify objects, faces and
characters using mathematical principles.
1. Semantic Segmentation (Image Classification)
2. Classification + Localization
3. Object Detection
4. Instance Segmentation
Tasks in Computer Vision
Tasks in Computer Vision
1. Classification
• Classification in Computer Vision (CV) refers to the task of
categorizing images or objects within images into predefined
classes or categories.
• The goal is to train a model to recognize patterns and features in
images that correspond to specific categories, and then use this
trained model to predict the category of new, unseen images.
• In this process, an image is classified depending on its visual content
ie. assigning an input image one label from a fixed set of categories.
It is the process of finding out the class of the input image.
• A set of classes (objects to identify in images) are defined and a
model is trained to recognize them with the help of labelled photos.
Ie. it takes an image as an input and outputs a class i.e. a cat, dog
etc. or a probability of classes from which one has the highest
chance of being correct.
• Classification in computer vision is a
fundamental task where the goal is to
automatically assign labels to images or
objects within images based on learned
patterns and features.
• This technique is widely used in various
applications, including object recognition,
facial recognition, and medical image analysis
How Classification Works:
• Data Collection:
– A dataset of labeled images is collected, where each image is associated with
a specific class label. For example, a dataset might contain images of cats,
dogs, and birds, each labeled with their respective class.
• Feature Extraction:
– The model processes the images to extract relevant features, such as edges,
shapes, colors, or textures, that help in distinguishing between different
classes.
• Model Training:
– A machine learning algorithm is trained on the labeled dataset. During
training, the model learns to map the extracted features to the correct class
labels.
• Prediction:
– Once trained, the model can predict the class of new, unseen images by
analyzing their features and determining which class they most closely match.
Image Classification of Animals:
Suppose you want to build a system that can automatically classify images of animals
into categories like "cat," "dog," and "rabbit."
Steps:
• Dataset:
– Collect a dataset containing thousands of images of cats, dogs, and rabbits, each
labeled with the corresponding animal type.
• Feature Extraction:
– Use techniques like convolutional neural networks (CNNs) to automatically extract
features such as fur patterns, ear shapes, and body contours from the images.
• Training:
– Train a classification model (e.g., a deep learning model like a CNN) on the labeled
dataset. The model learns the distinguishing features of each class.
• Testing:
– Provide the model with new images, and it will classify them as either "cat," "dog,"
or "rabbit" based on the learned features.
Outcome:
• When given an image of a dog, the model processes the image, identifies the
relevant features, and predicts the label "dog" with high accuracy.
2. Classification and Localization
• It identifies what object is present in the image and at the
same time identifying at what location that object is present
in that image.
• It is used only for single objects.
• Eg. There a dog in an image, the algorithm predicts the class,
once it is classified and labelled, it creates a bounding box
around the object in the image.
3. Object Detection
• Object detection in computer vision (CV) is the process of identifying and locating
objects within an image or video. It aims to find instances of real-world objects
such as faces, bicycles, and buildings in images or videos.
• Unlike classification, which assigns a single label to an entire image, object
detection not only classifies the objects present in an image but also determines
their positions within the image by drawing bounding boxes around them.
• If we have multiple objects in the image, object detection algorithms use extracted
features and learning algorithms to recognize instances of an object category. There
can be multiple bounding boxes and labels can be there around the objects.
• It is commonly used in applications such as image retrieval and automated vehicle
parking systems.
4. Instance segmentation
• Instance segmentation helps in identifying and outlining distinctly
each object of interest appearing in an image.
• It is the process of detecting instances of the objects, giving them a
category and then giving each pixel a label on the basis of that.
• A segmentation algorithm takes an image as input and outputs a
collection of regions (or segments).
• This process helps to create a pixel-wise mask for each object in the
image and provides a far more granular understanding of the
object(s) in the image.
• Objects belonging to the same class are shown in multiple colours.
Image Features
import cv2
import [Link] as plt
img=[Link] ("C:/Users/admin/Desktop/original_man.jpg”)
[Link](img)
[Link](“on”)
[Link]()
import cv2
import [Link] as plt
img=[Link] ("C:/Users/admin/Desktop/original_man.jpg")
RGB_img = [Link](img, cv2.COLOR_BGR2RGB)
[Link](RGB_img)
[Link](“on”)
[Link]()