Category: 02. Image segmentation

  • Object detection with Vision Transformers

    Introduction The article Vision Transformer (ViT) architecture by Alexey Dosovitskiy et al. demonstrates that a pure transformer applied directly to sequences of image patches can perform well on object detection tasks. In this Keras example, we implement an object detection ViT and we train it on the Caltech 101 dataset to detect an airplane in the given image. Imports…

  • Keypoint Detection with Transfer Learning

    Keypoint detection consists of locating key object parts. For example, the key parts of our faces include nose tips, eyebrows, eye corners, and so on. These parts help to represent the underlying object in a feature-rich manner. Keypoint detection has applications that include pose estimation, face detection, etc. In this example, we will build a…

  • Object Detection with RetinaNet

    Introduction Object detection a very important problem in computer vision. Here the model is tasked with localizing the objects present in an image, and at the same time, classifying them into different categories. Object detection models can be broadly classified into “single-stage” and “two-stage” detectors. Two-stage detectors are often more accurate but at the cost…

  • Image Segmentation using Composable Fully-Convolutional Networks

    Introduction The following example walks through the steps to implement Fully-Convolutional Networks for Image Segmentation on the Oxford-IIIT Pets dataset. The model was proposed in the paper, Fully Convolutional Networks for Semantic Segmentation by Long et. al.(2014). Image segmentation is one of the most common and introductory tasks when it comes to Computer Vision, where we…

  • Highly accurate boundaries segmentation using BASNet

    Introduction Deep semantic segmentation algorithms have improved a lot recently, but still fails to correctly predict pixels around object boundaries. In this example we implement Boundary-Aware Segmentation Network (BASNet), using two stage predict and refine architecture, and a hybrid loss it can predict highly accurate boundaries and fine structures for image segmentation. References: Download the Data…

  • Multiclass semantic segmentation using DeepLabV3+

    Introduction Semantic segmentation, with the goal to assign semantic labels to every pixel in an image, is an essential computer vision task. In this example, we implement the DeepLabV3+ model for multi-class semantic segmentation, a fully-convolutional architecture that performs well on semantic segmentation benchmarks. References: Downloading the data We will use the Crowd Instance-level Human Parsing Dataset for training…

  • Image segmentation with a U-Net-like architecture

    Download the data Prepare paths of input images and target segmentation masks What does one input image and corresponding segmentation mask look like? Prepare dataset to load & vectorize batches of data Prepare U-Net Xception-style model Model: “functional_1” ┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Layer (type) ┃ Output Shape ┃ Param # ┃ Connected to ┃ ┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩ │ input_layer…