OpenCV Selective Search For Object Detection
Last Updated :
23 Jul, 2025
OpenCV is a Python library that is used to study images and video streams. It basically extracts the pixels from the images and videos (stream of image) so as to study the objects and thus obtain what they contain. It contains low-level image processing and high-level algorithms for object detection, feature matching etc.
In this article, we will dive into a computer vision technique i.e. selective search for Object Detection in OpenCV.
Object Detection
Object Detection is a fundamental computer vision task that involves identifying and localizing objects or specific features within an image or a video stream. It plays a crucial role in numerous applications, including autonomous driving, surveillance, robotics, and image analysis. Object detection goes beyond mere object recognition by providing both the classification of objects into predefined categories or classes and the precise localization of where these objects exist within the image.
Sliding Window Algorithm
The sliding Window Algorithm is one of the important steps in Object detection algorithms. In the sliding window algorithm, we select a path or a region of the image by sliding a window or box over it and then classify each region that the window covers using an object recognition model. Over the course of the image, every object is thoroughly searched for. We must not only look at every available spot on the image but also at various scales. This is the case because many times object recognition models are trained on a certain set of scales. As a result, classification is required for many image regions or patches.
But the issue still persists. For objects with a fixed ratio, such as faces or people, the sliding window algorithm works well. According to the angle, the features of the objects can change dramatically. But when we search for different aspect ratios, this approach is a little more expensive.
Region Proposal Algorithm
The problem in the sliding window algorithm can be addressed using the region proposal algorithm. With the use of this technique, areas of a picture that are likely to contain objects are encapsulated by the bounding boxes. These region proposals typically contain proposals that nearly resemble the real object's position, even though they occasionally may be noisy, overlapping or improperly aligned with those boundaries. The classification of these recommendations can then be done using object recognition models. The location of perspective objects is detected in areas with high probability.
In order to do this, the region proposal algorithm uses segmentation, which groups neighbouring image regions with comparable properties. The sliding window strategy, in contrast, looks for objects at all pixels places and sizes. Instead, these algorithms divide images into fewer regions, producing a much lower number of categorization suggested options. To allow for possible differences in object size and shape, these generated ideas are available in a range of scales and aspect ratios.
Region proposal method aims for high recall, prioritizing inclusion of regions with objects. This may result in number of proposals, including the false positives. While this can increase processing time and slight affect accuracy, its crucial to avoid missing actual objects, making high recall a valuable priority in object detection.
Selective Search
Selective Search is a region-based technique extensively used for object detection tasks within computer vision. It aims to generate a varied set of region proposals from an input image, where each region proposal representing a potential object or object portion.These region proposals are subsequently used as candidate regions by object detection algorithms to categorize and localize objects within an image.
Let's understand that the how Selective Search algorithms works?
- Image Segmentation: The process begins with the over-segmentation of the input image. Over-segmentation involves dividing the image into many smaller regions or superpixels. This initial segmentation is often performed using graph-based algorithms like the one by Felzenszwalb and Huttenlocher. The result is an initial set of small regions.
- Region Grouping: Selective Search employs a hierarchical grouping approach. It begins with the initial small regions and progressively merges regions that are similar in terms of color, texture, size, and shape compatibility. The similarity between regions is determined using various image features.
- Bounding Box Proposals: During the grouping process, bounding boxes of various sizes and aspect ratios are generated for each region. These bounding boxes represent the potential object candidates within those regions.
- Training: The algorithm iteratively refines the grouping and generates more bounding box proposals by merging and splitting regions. This iterative approach continues until the satisfactory set of region proposals is obtained.
- Output: The final output of Selective Search is a list of region proposals, each associated with a bounding box. These region proposals are used as candidate regions for subsequent object detection and recognition algorithms.
Similarity Measures
Similarity in Selective Search refers to the degree of visual resemblance between neighboring image regions based on color, texture, shape, and size. By quantifying these similarities using appropriate metrics, the algorithm groups regions that are likely to belong to the same object or object part, resulting in a hierarchical set of object proposals that can be used for further analysis and object detection tasks.
Now, lets look into different kinds of similarities:
Color Similarity: Color is one of the primary visual characteristics considered in Selective Search. Regions that have similar color distributions are more likely to belong to the same object. Mathematical illustration for color similarity to understand can be like in a color histogram of 25 bins is computed for each channel of the image and are concatenated to obtain a 25×3 = 75-dimensional color descriptor. It is based on histogram intersection between two regions and is calculated as below-
s_{color}(r_{i} r_{j}) = \sum_{k=1}^{n} min(c_{i}^k , c_{j}^k)
cik is the histogram value for kth bin in color descriptor.
Shape Similarity/Compatibility: The main idea behind shape compatibility is how better one image fits into the other one. The algorithm evaluates shape characteristics. Regions with similar shapes or contours might be grouped because objects often have consistent shapes. It is defined by the formula -
s_{fill}(r_{i} r_{j}) = 1 - \frac{ size(BB_{ij}) - size(r_{i}) - size(r_{j})} {size(im)}
where size(BBij) is a bounding box around ri and rj .
Texture Similarity: Texture refers to the patterns or surface properties within an image region. Regions with similar textures, such as a smooth area or a region with a fine-grained texture, may be grouped together. To calculate the texture features, firstly gaussian derivatives are extracted at 8 orientations for each channel and then for each orientation and each color channel, a 10-bin histogram is computed resulting into a 10x8x3 = 240-dimensional feature descriptor. It is also calculated using histogram intersections -
s_{texture}(r_{i} r_{j}) = \sum_{k=1}^{n} min (t_{i}^k , t_{j}^k)
tik is the histogram value for kth bin in texture descriptor.
Size Similarity: Regions of similar size might be more likely to belong to the same object or object part. It encourages smaller regions to merge early. By enforcing smaller regions to merge earlier, we can help prevent a large number of clusters from swallowing up all smaller regions. It is defined as -
s_{size}(r_{i} r_{j}) = 1 - \frac {size(r_{i}) + size(r_{j})}{size(im)}
where size(im) is size of image in pixels.
Final Similarity: The final similarity between two regions is defined as a linear combination of color similarity, texture similarity, size similarity, and shape similarity/compatibility.
Implementation of SelectiveSearch using python OpenCV
Let's Manually build the Region for SelectiveSearch
Importing Libraries
Python3
# importing necessary libraries
import cv2
import selectivesearch
import matplotlib.pyplot as plt
Creation of bounding boxes Manually
Python3
# Load the image
image_path = 'img_1.jpg'
image = cv2.imread(image_path)
# Define bounding box coordinates (x, y, width, height)
bounding_boxes = [
(100, 50, 200, 150), # Example bounding box 1
(300, 200, 150, 100), # Example bounding box 2
# Add more bounding boxes as needed
]
# Draw bounding boxes on the image
for (x, y, w, h) in bounding_boxes:
cv2.rectangle(image, (x, y), (x + w, y + h), (0, 255, 0), 2)
# Display the image with bounding boxes
cv2_imshow(image)
# Wait for a key press and close the window
cv2.waitKey(0)
cv2.destroyAllWindows()
Output:

This bit of code shows how to load and display a picture with bounding boxes drawn around key areas. It specifies bounding boxes as tuples of (x, y, width, and height) coordinates and uses the OpenCV library (cv2) to read an image. The next step is to use cv2.rectangle() to create green rectangles around each location of interest on the image when the code loops over the list of bounding boxes. After using cv2_imshow() to display the image with bounding boxes, the software waits for a key press before destroying all open windows and releasing resources using cv2.waitKey(0) and cv2.destroyAllWindows().
Selective Search using Region proposals
We can use 'selectivesearch.selective_search' function to perform Selective Search on the image
Installing packages
pip install selectivesearch
Importing libraries
Python3
# importing necessary libraries
import cv2
import selectivesearch
import matplotlib.pyplot as plt
Loading image
Python3
# Load the image
image_path = 'elephant.jpg'
image = cv2.imread(image_path)
This code will load the image using openCV's 'imread' function and stores it in the variable 'image'.
Image Dimensions
Python3
# Print the dimensions of the loaded image
print(image.shape)
# Retrieve the width of the image
image.shape[1]
# Calculate the scaling factor for the image's height
(new_height / (image.shape[0]))
Here we are loading image and printing its dimensions, including height, width. Additionally it calculates the scaling factor for a new height based on a specified value.
Resize image to reduce computation time
Python3
# Calculate a new height
import matplotlib.pyplot as plt
new_height = int(image.shape[1] / 4)
# Calculate a new width
new_width = int(image.shape[0] / 2)
# Resize the image to the new dimensions
resized_image = cv2.resize(image, (new_width, new_height))
# Display the resized image using Matplotlib
plt.imshow(resized_image)
plt.show()
Output:

This code calculates new dimensions for an image based on specific proportions, resize the image accordingly, and then displays the resized image using matplotlib, resulting in a smaller representation of the original image.
Applying Search Selective on resized image
Python3
# applying selective search
img_lbl, regions = selectivesearch.selective_search(
resized_image, scale=500, sigma=0.9, min_size=10)
"selectivesearch.selective_search" is a function provided by the selective search algorithm for object detection and image segmentation. This function performs a region proposal process on an input image to identify and generate potential regions of interests that may contain objects.
This code applies selective search algorithm to the resized image, aiming to generate region proposals for object detection. 'Scale' controls the trade off between the number of generated regions and their quality. Large values result in fewer regions but potentially higher quality. 'Sigma' value for gaussian function is used in smoothing the image. 'min_size' is the minimum size of a region proposal. Regions smaller than this are discarded.
After this, it performs the selective search and returns two main outputs i.e., 'img_lbl' contains the image labels and 'regions' contains the regions of interest generated by the algorithm. These regions represent potential objects in the image.
Calculating the Region
Python3
# Initialize an empty set to store selected region proposals
candidates = set()
# Iterate over all the regions detected by Selective Search
for r in regions:
# Check if the current region's rectangle is already in candidates
if r['rect'] in candidates:
continue # Skip this region if it's a duplicate
# Check if the size of the region is less than 200 pixels
if r['size'] < 200:
continue # Skip this region if it's too small
# Extract the coordinates and dimensions of the region's rectangle
x, y, w, h = r['rect']
# Avoid division by zero by checking if height or width is zero
if h == 0 or w == 0:
continue # Skip this region if it has zero height or width
# Check the aspect ratio of the region (width / height and height / width)
if w / h > 1.2 or h / w > 1.2:
continue # Skip this region if its aspect ratio is not within a range
# If all conditions are met, add the region's rectangle to candidates
candidates.add(r['rect'])
This code iterates through the regions generated by selective search, filtering and selecting regions based on specific criteria. It adds the valid regions to the candidates set. After the loop, it iterates over the detected regions.
Bounding Box Scaling
Python3
# Convert the selected bounding boxes to the original image size
candidates_scaled = [(int(x * (image.shape[1] / new_width)),
int(y * (image.shape[0] / new_height)),
int(w * (image.shape[1] / new_width)),
int(h * (image.shape[0] / new_height)))
for x, y, w, h in candidates]
return candidates_scaled
Here , in this code, it scales bounding boxes from a resized image back to their original dimensions, ensuring that regions of interest are accurately represented in the original image. It uses ratios between original and resized image dimensions for the scaling.
Search Selective for Object detection
Python3
# Load the image
image_path = 'elephant.jpg'
image = cv2.imread(image_path)
# Get selective search object proposals
proposals = selective_search(image)
# Draw the proposals on the image
output_image = image.copy()
for (x, y, w, h) in proposals:
cv2.rectangle(output_image, (x, y), (x + w, y + h), (0, 255, 0), 20)
# Display the result
plt.imshow(output_image)
plt.show()
Output:

This code loads an image, applies selective search to generate object proposals, and then draws bounding boxes around these proposals on the image. Finally, it displays the image with the drawn bounding boxes.
Another Example
Python3
# Load the image from the specified path
image_path = 'dog.jpg'
image = cv2.imread(image_path)
# Get region proposals using Selective Search
proposals = selective_search(image)
# Create a copy of the original image to draw bounding boxes on
output_image = image.copy()
# Iterate through each region proposal and draw bounding boxes
for (x, y, w, h) in proposals:
# Define the coordinates and dimensions of the bounding box
x1, y1 = x, y # Top-left corner
x2, y2 = x + w, y + h # Bottom-right corner
# Draw a green bounding box around the region proposal on the output image
cv2.rectangle(output_image, (x1, y1), (x2, y2), (0, 255, 0), 2)
# Display the result image with bounding boxes
plt.imshow(output_image)
plt.show()
Output:
.jpg)
Time complexity for this code is divided into different segments: Resizing of image, selective search, Iteration through different regions, scaling, drawing and showing up the results.
- Resizing the image: O(H * W) where H and W are height and width respectively .
- Selective Search Complexity: This time complexity is typically influenced by factors like the number of pixels, the scale parameter, and the complexity of region merging.
- Iteration through regions: O(N) where N is number of regions.
- Scaling: O(B), where B is the number of bounding boxes.
- Drawing and showing up the result: O(B), where B is the number of bounding boxes.
Overall complexity would be the sum of all the complexities of sub categories i.e. O(H * W) + O(Selective Search) + O(N) + O(B) + O(B)
Application of Selective Search Algorithm in Object Detection
Selective search plays an important role in R-CNN(Region - based Convolutional Neural Network) family of the object detection models. It primary function is to efficiently generate a diverse set of region proposals, which are potential bounding boxes likely to contain objects within an image. This significantly reduces the computational burden by narrowing down the regions of interest for subsequent analysis. The generated region proposals are used as input to the R-CNN architecture, where they undergo feature extraction, classification and localization. High recall is a key benefit, ensuring that most potential object regions are included, even if some are false positives. R-CNN models then refine these proposals for accurate object localization. Ultimately, this collaboration between Selective Search and R-CNN model enhances both the efficiency and accuracy of object detection, making them suitable for real-time applications and complex scenes.
Similar Reads
Computer Vision Tutorial Computer Vision (CV) is a branch of Artificial Intelligence (AI) that helps computers to interpret and understand visual information much like humans. This tutorial is designed for both beginners and experienced professionals and covers key concepts such as Image Processing, Feature Extraction, Obje
7 min read
Introduction to Computer Vision
Computer Vision - IntroductionComputer Vision (CV) in artificial intelligence (AI) help machines to interpret and understand visual information similar to how humans use their eyes and brains. It involves teaching computers to analyze and understand images and videos, helping them "see" the world. From identifying objects in ima
4 min read
A Quick Overview to Computer VisionComputer vision means the extraction of information from images, text, videos, etc. Sometimes computer vision tries to mimic human vision. Itâs a subset of computer-based intelligence or Artificial intelligence which collects information from digital images or videos and analyze them to define the a
3 min read
Applications of Computer VisionHave you ever wondered how machines can "see" and understand the world around them, much like humans do? This is the magic of computer visionâa branch of artificial intelligence that enables computers to interpret and analyze digital images, videos, and other visual inputs. From self-driving cars to
6 min read
Fundamentals of Image FormationImage formation is an analog to digital conversion of an image with the help of 2D Sampling and Quantization techniques that is done by the capturing devices like cameras. In general, we see a 2D view of the 3D world.In the same way, the formation of the analog image took place. It is basically a co
7 min read
Satellite Image ProcessingSatellite Image Processing is an important field in research and development and consists of the images of earth and satellites taken by the means of artificial satellites. Firstly, the photographs are taken in digital form and later are processed by the computers to extract the information. Statist
2 min read
Image FormatsImage formats are different types of file types used for saving pictures, graphics, and photos. Choosing the right image format is important because it affects how your images look, load, and perform on websites, social media, or in print. Common formats include JPEG, PNG, GIF, and SVG, each with it
5 min read
Image Processing & Transformation
Digital Image Processing BasicsDigital Image Processing means processing digital image by means of a digital computer. We can also say that it is a use of computer algorithms, in order to get enhanced image either to extract some useful information. Digital image processing is the use of algorithms and mathematical models to proc
7 min read
Difference Between RGB, CMYK, HSV, and YIQ Color ModelsThe colour spaces in image processing aim to facilitate the specifications of colours in some standard way. Different types of colour models are used in multiple fields like in hardware, in multiple applications of creating animation, etc. Letâs see each colour model and its application. RGBCMYKHSV
3 min read
Image Enhancement Techniques using OpenCV - PythonImage enhancement is the process of improving the quality and appearance of an image. It can be used to correct flaws or defects in an image, or to simply make an image more visually appealing. Image enhancement techniques can be applied to a wide range of images, including photographs, scans, and d
15+ min read
Image Transformations using OpenCV in PythonIn this tutorial, we are going to learn Image Transformation using the OpenCV module in Python. What is Image Transformation? Image Transformation involves the transformation of image data in order to retrieve information from the image or preprocess the image for further usage. In this tutorial we
5 min read
How to find the Fourier Transform of an image using OpenCV Python?The Fourier Transform is a mathematical tool used to decompose a signal into its frequency components. In the case of image processing, the Fourier Transform can be used to analyze the frequency content of an image, which can be useful for tasks such as image filtering and feature extraction. In thi
5 min read
Python | Intensity Transformation Operations on ImagesIntensity transformations are applied on images for contrast manipulation or image thresholding. These are in the spatial domain, i.e. they are performed directly on the pixels of the image at hand, as opposed to being performed on the Fourier transform of the image. The following are commonly used
5 min read
Histogram Equalization in Digital Image ProcessingA digital image is a two-dimensional matrix of two spatial coordinates, with each cell specifying the intensity level of the image at that point. So, we have an N x N matrix with integer values ranging from a minimum intensity level of 0 to a maximum level of L-1, where L denotes the number of inten
5 min read
Python - Color Inversion using PillowColor Inversion (Image Negative) is the method of inverting pixel values of an image. Image inversion does not depend on the color mode of the image, i.e. inversion works on channel level. When inversion is used on a multi color image (RGB, CMYK etc) then each channel is treated separately, and the
4 min read
Image Sharpening using Laplacian, High Boost Filtering in MATLABImage sharpening is a crucial process in digital image processing, aimed at improving the clarity and crispness of visual content. By emphasizing the edges and fine details in a picture, sharpening transforms dull or blurred images into visuals where objects stand out more distinctly from their back
3 min read
Wand sharpen() function - PythonThe sharpen() function is an inbuilt function in the Python Wand ImageMagick library which is used to sharpen the image. Syntax: sharpen(radius, sigma) Parameters: This function accepts four parameters as mentioned above and defined below: radius: This parameter stores the radius value of the sharpn
2 min read
Python OpenCV - Smoothing and BlurringIn this article, we are going to learn about smoothing and blurring with python-OpenCV. When we are dealing with images at some points the images will be crisper and sharper which we need to smoothen or blur to get a clean image, or sometimes the image will be with a really bad edge which also we ne
7 min read
Python PIL | GaussianBlur() methodPIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageFilter module contains definitions for a pre-defined set of filters, which can be used with the Image.filter() method. PIL.ImageFilter.GaussianBlur() method create Gaussian blur filter.
1 min read
Apply a Gauss filter to an image with PythonA Gaussian Filter is a low-pass filter used for reducing noise (high-frequency components) and for blurring regions of an image. This filter uses an odd-sized, symmetric kernel that is convolved with the image. The kernel weights are highest at the center and decrease as you move towards the periphe
2 min read
Spatial Filtering and its TypesSpatial Filtering technique is used directly on pixels of an image. Mask is usually considered to be added in size so that it has specific center pixel. This mask is moved on the image such that the center of the mask traverses all image pixels. Classification on the basis of Linearity There are two
3 min read
Python PIL | MedianFilter() and ModeFilter() methodPIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageFilter module contains definitions for a pre-defined set of filters, which can be used with the Image.filter() method. PIL.ImageFilter.MedianFilter() method creates a median filter. Pick
1 min read
Python | Bilateral FilteringA bilateral filter is used for smoothening images and reducing noise, while preserving edges. This article explains an approach using the averaging filter, while this article provides one using a median filter. However, these convolutions often result in a loss of important edge information, since t
2 min read
Python OpenCV - Morphological OperationsPython OpenCV Morphological operations are one of the Image processing techniques that processes image based on shape. This processing strategy is usually performed on binary images. Morphological operations based on OpenCV are as follows:ErosionDilationOpeningClosingMorphological GradientTop hatBl
5 min read
Erosion and Dilation of images using OpenCV in PythonMorphological operations modify images based on the structure and arrangement of pixels. They apply kernel to an input image for changing its features depending on the arrangement of neighboring pixels. Morphological operations like erosion and dilation are techniques in image processing, especially
3 min read
Introduction to Resampling methodsWhile reading about Machine Learning and Data Science we often come across a term called Imbalanced Class Distribution, which generally happens when observations in one of the classes are much higher or lower than in other classes. As Machine Learning algorithms tend to increase accuracy by reducing
8 min read
Python | Image Registration using OpenCVImage registration is a digital image processing technique that helps us align different images of the same scene. For instance, one may click the picture of a book from various angles. Below are a few instances that show the diversity of camera angles.Now, we may want to "align" a particular image
3 min read
Feature Extraction and Description
Feature Extraction Techniques - NLPIntroduction : This article focuses on basic feature extraction techniques in NLP to analyse the similarities between pieces of text. Natural Language Processing (NLP) is a branch of computer science and machine learning that deals with training computers to process a large amount of human (natural)
10 min read
SIFT Interest Point Detector Using Python - OpenCVSIFT (Scale Invariant Feature Transform) Detector is used in the detection of interest points on an input image. It allows the identification of localized features in images which is essential in applications such as:Â Â Object Recognition in ImagesPath detection and obstacle avoidance algorithmsGest
4 min read
Feature Matching using Brute Force in OpenCVIn this article, we will do feature matching using Brute Force in Python by using OpenCV library. Prerequisites: OpenCV OpenCV is a python library which is used to solve the computer vision problems. OpenCV is an open source Computer Vision library. So computer vision is a way of teaching intelligen
13 min read
Feature detection and matching with OpenCV-PythonIn this article, we are going to see about feature detection in computer vision with OpenCV in Python. Feature detection is the process of checking the important features of the image in this case features of the image can be edges, corners, ridges, and blobs in the images. In OpenCV, there are a nu
5 min read
Feature matching using ORB algorithm in Python-OpenCVORB is a fusion of FAST keypoint detector and BRIEF descriptor with some added features to improve the performance. FAST is Features from Accelerated Segment Test used to detect features from the provided image. It also uses a pyramid to produce multiscale-features. Now it doesnât compute the orient
2 min read
Mahotas - Speeded-Up Robust FeaturesIn this article we will see how we can get the speeded up robust features of image in mahotas. In computer vision, speeded up robust features (SURF) is a patented local feature detector and descriptor. It can be used for tasks such as object recognition, image registration, classification, or 3D rec
2 min read
Create Local Binary Pattern of an image using OpenCV-PythonIn this article, we will discuss the image and how to find a binary pattern using the pixel value of the image. As we all know, image is also known as a set of pixels. When we store an image in computers or digitally, itâs corresponding pixel values are stored. So, when we read an image to a variabl
5 min read
Deep Learning for Computer Vision
Image Classification using CNNImage classification is a key task in machine learning where the goal is to assign a label to an image based on its content. Convolutional Neural Networks (CNNs) are specifically designed to analyze and interpret images. Unlike traditional neural networks, they are good at detecting patterns, shapes
5 min read
What is Transfer Learning?Transfer learning is a machine learning technique where a model trained on one task is repurposed as the foundation for a second task. This approach is beneficial when the second task is related to the first or when data for the second task is limited. Using learned features from the initial task, t
8 min read
Top 5 PreTrained Models in Natural Language Processing (NLP)Pretrained models are deep learning models that have been trained on huge amounts of data before fine-tuning for a specific task. The pre-trained models have revolutionized the landscape of natural language processing as they allow the developer to transfer the learned knowledge to specific tasks, e
7 min read
ML | Introduction to Strided ConvolutionsLet us begin this article with a basic question - "Why padding and strided convolutions are required?" Assume we have an image with dimensions of n x n. If it is convoluted with an f x f filter, then the dimensions of the image obtained are (n-f+1) x (n-f+1). Example: Consider a 6 x 6 image as shown
2 min read
Dilated ConvolutionPrerequisite: Convolutional Neural Networks Dilated Convolution: It is a technique that expands the kernel (input) by inserting holes between its consecutive elements. In simpler terms, it is the same as convolution but it involves pixel skipping, so as to cover a larger area of the input. Dilated
5 min read
Continuous Kernel ConvolutionContinuous Kernel convolution was proposed by the researcher of Verije University Amsterdam in collaboration with the University of Amsterdam in a paper titled 'CKConv: Continuous Kernel Convolution For Sequential Data'. The motivation behind that is to propose a model that uses the properties of co
6 min read
CNN | Introduction to Pooling LayerPooling layer is used in CNNs to reduce the spatial dimensions (width and height) of the input feature maps while retaining the most important information. It involves sliding a two-dimensional filter over each channel of a feature map and summarizing the features within the region covered by the fi
5 min read
CNN | Introduction to PaddingDuring convolution, the size of the output feature map is determined by the size of the input feature map, the size of the kernel, and the stride. if we simply apply the kernel on the input feature map, then the output feature map will be smaller than the input. This can result in the loss of inform
5 min read
What is the difference between 'SAME' and 'VALID' padding in tf.nn.max_pool of tensorflow?Padding is a technique used in convolutional neural networks (CNNs) to preserve the spatial dimensions of the input data and prevent the loss of information at the edges of the image. It involves adding additional rows and columns of pixels around the edges of the input data. There are several diffe
14 min read
Convolutional Neural Network (CNN) ArchitecturesConvolutional Neural Network(CNN) is a neural network architecture in Deep Learning, used to recognize the pattern from structured arrays. However, over many years, CNN architectures have evolved. Many variants of the fundamental CNN Architecture This been developed, leading to amazing advances in t
11 min read
Deep Transfer Learning - IntroductionDeep transfer learning is a machine learning technique that utilizes the knowledge learned from one task to improve the performance of another related task. This technique is particularly useful when there is a shortage of labeled data for the target task, as it allows the model to leverage the know
8 min read
Introduction to Residual NetworksRecent years have seen tremendous progress in the field of Image Processing and Recognition. Deep Neural Networks are becoming deeper and more complex. It has been proved that adding more layers to a Neural Network can make it more robust for image-related tasks. But it can also cause them to lose a
4 min read
Residual Networks (ResNet) - Deep LearningAfter the first CNN-based architecture (AlexNet) that win the ImageNet 2012 competition, Every subsequent winning architecture uses more layers in a deep neural network to reduce the error rate. This works for less number of layers, but when we increase the number of layers, there is a common proble
9 min read
ML | Inception Network V1Inception net achieved a milestone in CNN classifiers when previous models were just going deeper to improve the performance and accuracy but compromising the computational cost. The Inception network, on the other hand, is heavily engineered. It uses a lot of tricks to push performance, both in ter
4 min read
Understanding GoogLeNet Model - CNN ArchitectureGoogLeNet (Inception V1) is a deep convolutional neural network architecture designed for efficient image classification. It introduces the Inception module, which performs multiple convolution operations (1x1, 3x3, 5x5) in parallel, along with max pooling and concatenates their outputs. The archite
3 min read
Image Recognition with MobilenetImage Recognition plays an important role in many fields like medical disease analysis and many more. In this article, we will mainly focus on how to Recognize the given image, what is being displayed. What is MobilenetMobilenet is a model which does the same convolution as done by CNN to filter ima
4 min read
VGG-16 | CNN modelA Convolutional Neural Network (CNN) architecture is a deep learning model designed for processing structured grid-like data such as images and is used for tasks like image classification, object detection and image segmentation.The VGG-16 model is a convolutional neural network (CNN) architecture t
6 min read
Autoencoders in Machine LearningAutoencoders are a special type of neural networks that learn to compress data into a compact form and then reconstruct it to closely match the original input. They consist of an:Encoder that captures important features by reducing dimensionality.Decoder that rebuilds the data from this compressed r
8 min read
How Autoencoders works ?Autoencoders is used for tasks like dimensionality reduction, anomaly detection and feature extraction. The goal of an autoencoder is to to compress data into a compact form and then reconstruct it to closely match the original input. The model trains by minimizing reconstruction error using loss fu
6 min read
Difference Between Encoder and DecoderCombinational Logic is the concept in which two or more input states define one or more output states. The Encoder and Decoder are combinational logic circuits. In which we implement combinational logic with the help of boolean algebra. To encode something is to convert in piece of information into
9 min read
Implementing an Autoencoder in PyTorchAutoencoders are neural networks designed for unsupervised tasks like dimensionality reduction, anomaly detection and feature extraction. They work by compressing data into a smaller form through an encoder and then reconstructing it back using a decoder. The goal is to minimize the difference betwe
4 min read
Generative Adversarial Network (GAN)Generative Adversarial Networks (GAN) help machines to create new, realistic data by learning from existing examples. It is introduced by Ian Goodfellow and his team in 2014 and they have transformed how computers generate images, videos, music and more. Unlike traditional models that only recognize
12 min read
Deep Convolutional GAN with KerasDeep Convolutional GAN (DCGAN) was proposed by a researcher from MIT and Facebook AI research. It is widely used in many convolution-based generation-based techniques. The focus of this paper was to make training GANs stable. Hence, they proposed some architectural changes in the computer vision pro
9 min read
StyleGAN - Style Generative Adversarial NetworksStyleGAN is a generative model that produces highly realistic images by controlling image features at multiple levels from overall structure to fine details like texture and lighting. It is developed by NVIDIA and builds on traditional GANs with a unique architecture that separates style from conten
5 min read
Object Detection and Recognition
Image Segmentation
3D Reconstruction
Python OpenCV - Depth map from Stereo ImagesOpenCV is the huge open-source library for the computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in todayâs systems.Note: For more information, refer to Introduction to OpenCV Depth Map : A depth map is a picture wher
2 min read
Top 7 Modern-Day Applications of Augmented Reality (AR)Augmented Reality (or AR), in simpler terms, means intensifying the reality of real-time objects which we see through our eyes or gadgets like smartphones. You may think, How is it trending a lot? The answer is that it can offer an unforgettable experience, either of learning, measuring the three-di
10 min read
Virtual Reality, Augmented Reality, and Mixed RealityVirtual Reality (VR): The word 'virtual' means something that is conceptual and does not exist physically and the word 'reality' means the state of being real. So the term 'virtual reality' is itself conflicting. It means something that is almost real. We will probably never be on the top of Mount E
3 min read
Camera Calibration with Python - OpenCVPrerequisites: OpenCV A camera is an integral part of several domains like robotics, space exploration, etc camera is playing a major role. It helps to capture each and every moment and helpful for many analyses. In order to use the camera as a visual sensor, we should know the parameters of the cam
4 min read
Python OpenCV - Pose EstimationWhat is Pose Estimation? Pose estimation is a computer vision technique that is used to predict the configuration of the body(POSE) from an image. The reason for its importance is the abundance of applications that can benefit from technology. Human pose estimation localizes body key points to accu
7 min read
40+ Top Computer Vision Projects [2025 Updated] Computer Vision is a branch of Artificial Intelligence (AI) that helps computers understand and interpret context of images and videos. It is used in domains like security cameras, photo editing, self-driving cars and robots to recognize objects and navigate real world using machine learning.This ar
4 min read