Test Time Augmentation (TTA) for Segmentation in PyTorch

In recent posts, we’ve built a strong foundation around multiclass image segmentation using PyTorch. From creating segmentation masks, converting RGB to class index masks, overlaying results using OpenCV, to training a full-fledged UNet model and visualizing it with GradCAM, we’ve covered the full training pipeline. But what happens when your Continue Reading

GradCAM Heatmaps for Segmentation with UNet in PyTorch

In semantic segmentation, understanding how a deep learning model arrives at its decisions is crucial—especially in fields like medical imaging, agriculture, and autonomous systems. While U-Net and other architectures can deliver high accuracy, they often act as black boxes. In this blog post, we go beyond prediction accuracy. We’ll visualize Continue Reading

Multiclass Segmentation in PyTorch using U-Net

Semantic segmentation is a crucial task in computer vision that involves labeling each pixel in an image with its corresponding class. In this blog post, we’ll dive into building a multiclass semantic segmentation pipeline using the U-Net architecture with PyTorch. Our goal is to segment different types of weeds from Continue Reading

GradCAM and its Implementation in PyTorch

Deep learning models, especially convolutional neural networks (CNNs), often function as black boxes, making it difficult to interpret their decision-making processes. Gradient-weighted Class Activation Mapping (GradCAM) is a powerful technique used to visualize and understand these models by highlighting the regions of an image that contribute most to a prediction. Continue Reading

Naive Bayes Classifier in Python

The article explores the Naive Bayes classifier, its workings, the underlying naive Bayes algorithm, and its application in machine learning. Through an intuitive example and Python implementation, the article demonstrates how Naive Bayes in Python can be applied for real-world classification tasks. Complete with code, evaluation metrics, and practical insights, Continue Reading

What is Dice Coefficient?

This article will explore the Dice Coefficient (DSC), a metric commonly used to evaluate the similarity between two sets. We’ll delve into its definition, provide implementations in NumPy, TensorFlow, and PyTorch, and discuss its practical applications. By the end of this guide, you’ll have a solid understanding of the Dice Continue Reading

Attention UNET in PyTorch

In this article, we are going to learn about the Attention UNET and then implement it in the PyTorch framework. Attention UNET is a type of Convolutional Neural Network (CNN) that is commonly used for image segmentation tasks. It is an extension of the original U-Net architecture, which was proposed Continue Reading

What is Intersection over Union (IoU) in Object Detection?

Intersection over Union (IoU) is a popular evaluation metric used in the field of computer vision and object detection. It is used to calculate the overlap between two bounding boxes and is used to evaluate the accuracy of object detection algorithms. IoU is a value between 0 and 1 that Continue Reading

Squeeze and Excitation Implementation in TensorFlow and PyTorch

The Squeeze and Excitation network is a channel-wise attention mechanism that is used to improve the overall performance of the network. In today’s article, we are going to implement the Squeeze and Excitation module in TensorFlow and PyTorch. What is Squeeze and Excitation Network? The squeeze and excitation attention mechanism Continue Reading

RESUNET Implementation in PyTorch

This tutorial focuses on implementing the image segmentation architecture called Deep Residual UNET (RESUNET) in the PyTorch framework. It’s an encoder-decoder architecture developed by Zhengxin Zhang et al. for semantic segmentation. It was initially used for road extraction from high-resolution aerial images in the field of remote sensing image analysis. Original Paper: Road Extraction Continue Reading