Member-only story
Transfer Learning for Segmentation Using DeepLabv3 in PyTorch
Learn how to perform road crack detection from just 118 images!
Back when I was researching segmentation using Deep Learning and wanted to run some experiments on DeepLabv3[1] using PyTorch, I couldn’t find any online tutorial. What added to the challenge was that torchvision not only does not provide a Segmentation dataset but also there is no detailed explanation available for the internal structure of the DeepLabv3 class. However, I did the transfer learning on my own, and want to share the procedure so that it may potentially be helpful for you.
In this article, I’ll be covering how to use a pre-trained semantic segmentation DeepLabv3 model for the task of road crack detection in PyTorch by using transfer learning. The same procedure can be applied to fine-tune the network for your custom dataset. If you want to look at the results and repository link directly, please scroll to the bottom.
Introduction
Let us start with a brief introduction to image segmentation. The primary goal of a segmentation task is to output pixel-level output masks in which regions belonging to certain categories are assigned the same distinct pixel value. If you color-code these segmentation masks by assigning a different color for every category for visualizing them, then you’ll get something like an image from a coloring book for kids. An example is shown below.