Image Matting with fastai & PyTorch
An online challenge proposed to apply image matting to the CelebA dataset. I tried my hand at it by re-implementing a paper by Adobe.
Context
Yearly, I work my way through the fast.ai online MOOC, which covers applied Deep Learning topics using their pyTorch-based library, fastai. Having finished the 2019 edition, I wanted to sink my teeth into something that was more than a toy problem. An online challenge proposed to apply image matting to the CelebA dataset, and that seemed like an ideal small-scale project.
My experience
While reading up on the challenge of applying image matting, I came across a 2017 paper published by Adobe, titled Deep Image Matting. Their approach to image matting was based on a U-net with a simple convolutional network for refining the edges. I knew that fastai provided some form of support for U-nets, so I re-read the paper a couple of times and set to work.
Over the next few weeks, I prepared a suitable dataset, which I also uploaded on Kaggle. In parallel, I spent most of my time re-implementing the Adobe paper by modifying the fastai-provided U-net, which often required me to drop back to the underlying pyTorch code.
My final results were decent enough to warrant a pretty long blogpost and got me accepted into a Fellowship program, though I did not end up taking that opportunity. It was a great way to get a gentle introduction to pyTorch too!