Skip to main content

Posts

Deep Learning Questions

1. Why CNN ? Translational Invariant Preserve Spatial Information Shared Weights: reduce memory requirement and computation time. 2. Batch Normalization Batch normalization is a technique used in deep learning to improve the performance and stability of neural networks. It normalizes the activations of the neurons in a layer for each mini-batch of training data. This has the effect of reducing the internal covariate shift, which is the change in the distribution of the inputs to a layer caused by the changing weights during training. Normalization is done by scaling the features activation of a layer to have mean zero and standard deviation to one Batch normalization can improve the convergence of the training process. It can also regularize the model, which can improve its generalization performance on unseen data. Batch normalization is typically applied before the activation function of a lay

Graph Search Algorithms (Python Code)

 Graph Algorithm Code for YT Videos

Evaluation Metrics for Machine Learning Model

Evaluation metrics play an important role in achieving the optimal model during model training. It is a way to quantify the performance of the Machine learning Model. For simplicity, I'll be focusing on binary classification. But all the below metrics can be extended for multi-class classification. Let us first understand the basic building block of metrics used to evaluate a classification model. Suppose we have trained a binary image classifier model that predicts whether there is a cat or not in the image. Positive Class: Cat is a Positive class . Negative Class: No Cat is the Negative class, It can be anything(dog, horse, background, etc.) except cat in the image. Fig. 1 Fig. 2 True Positive (TP): It is an outcome when the model correctly predicts the positive class. i.e the actual image is "Cat" and the model also predicts "Cat" . False Positive (FP):   It is an outcome when the model incorrectly predicts the positive class. i.e the a

Activation Functions

Neuron Model The operation of a neuron in an artificial neural network is, to sum up, the product of the input and associated weight (also called connection weight) and produce an output using activation/transfer function. It maps the output values in the desired range such as 0 to 1 or -1 to 1 or 0 to inf. This output will act as an input for neuron of next layer.

Fast Pixel Processing with OpenCV and Python

In this post. I will explain how fast pixel manipulation of an image can be done in Python and OpenCV. Image processing is a CPU intensive task. It involves processing on large arrays. Hence when you are implementing your Image Processing algorithm, you algorithm needs to be highly efficient. The type of operation that can be applied on an Image can be classified into three categories.

Face Recognition using OpenCV and Python.

Face recognition is becoming increasingly important as our identities are digitalized. We are moving away further from the passwords and PIN numbers. Today, biometric sensors are available on all security devices and smartphones. Innovation such as biometric is widely used now in place of the PIN and password. However facial recognition has started to rule these and will offer another level of security and flexibility. Let's learn how face recognition works!! Face Recognition works in 4 steps: Detect face in image. Compute Facial features Compare facial feature against known faces. Make a prediction. But before Recognizing any face , we need to train our system , how to identify and recognise a face.Hence first, I will first discuss how to train our classifier. Thanks to OpenCV , it makes the face recognition easy for any beginner. OpenCV comes with three built in face recognizers algorithms. Eigen Faces : cv2.face.createEigenFaceRecognizer() FisherFaces:  cv2

Face Detection using OpenCV and Python.

  Introduction Face detection is a computer technology that determines the locations and sizes of human faces in arbitrary (digital) images. It detects facial features and ignores anything else, such as buildings, trees and bodies. Face detection can be regarded as a more general case of face localization.  The first step in automatic facial recognition is the accurate detection of human faces in an arbitrary scene. When faces are localized exactly, the recognition is performed on the detected face. Haar Cascade Detection  It is a machine learning approach where a cascade function is trained from a lot of positive and negative images. This method was proposed by Paul Viola and Michael Jones in their Paper "Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001. Initially, the algorithm needs a lot of positive (Images of Faces) and negative Images (images without faces) to train the classifier. Then we need to extract Haar features fro

Popular Posts

Transparent Image overlay(Alpha blending) with OpenCV and Python

(a)Final Blended Image                     (b) Background Image                             (c)Foreground Image                               Alpha blending Alpha blending is the process of overlaying a foreground image with transparency over a background Image. The transparent image is generally a PNG image.It consists of four channels (RGBA).The fourth channel is the alpha channel which holds the transparency magnitude. Image (b) is a background image and image (c) is the foreground / overlay image. Image (a) is the final blended image obtained by blending  the overalay image using the alpha mask.  Below is the image(Fig d) of the alpha channel of the overlay  image. (d).Alpha Channel At every pixel of the image, we blend the background and foreground image color(F) and background color (B) using the alpha mask . At every pixel value of alpha lie in range(0,255), a pixel intensity of 0 means black color and pixel instensity of 255 means whit

Fast Pixel Processing with OpenCV and Python

In this post. I will explain how fast pixel manipulation of an image can be done in Python and OpenCV. Image processing is a CPU intensive task. It involves processing on large arrays. Hence when you are implementing your Image Processing algorithm, you algorithm needs to be highly efficient. The type of operation that can be applied on an Image can be classified into three categories.