YOLACT with Google Colab

A giraffe with red bounding box and segmentation mask detected by YOLACT++.

A giraffe with red bounding box and segmentation mask detected by YOLACT++.

YOLACT (also YOLACT++) is a state of the art, real-time, single shot object segmentation algorithm detailed in these papers:

Big thanks to the authors: Daniel Bolya, Chong Zhou, Fanyi Xiao, Yong Jae Lee!

YOLACT was released in 2019 and can do object detection and segmentation with amazing accuracy and is blazing fast compared to previous segmentation AI like Mask R-CNN. The research paper says they were able to hit ~30 FPS on 550x550 images using a single NVIDIA Titan XP GPU.

YOLACT++ Google Colab Tutorial

I wanted to make a tutorial with Google Colab to make it accessible to as many people as possible. In it, you will:

  • Set up Google Colab for YOLACT++

  • Get sample test images from the COCO Dataset

  • Get pre-trained weights (ResNet 50)

  • Run inference on the test images

  • Get a test video with giraffes

  • Run inference on the giraffe video (I saw ~20 FPS processing)

  • Connect to your Google Drive so that you can save the video

You can customize it however you like so that you can process your own images and videos.

Run notebook in Google Colab

Here it is on GitHub if you cannot or don’t want to use Colab, just note that it needs a CUDA GPU and Linux to work: View notebook on GitHub

Here it is in action on a video I took of a giraffe:

YouTube Tutorial

Same tutorial in video form, but including a high level overview!


Want to learn how to Train on a custom dataset?

Check out this tutorial: Train YOLACT with a Custom COCO Dataset