How to open a Trimap file into indarray

Is there an existing solution to opening a trimap?

This is the segmentation mask I’m using

The dataset on the original website is corrupted. Kaggle matlab was a nightmre too. I used the github here and it worked in 15 seconds.
https://github.com/mpecha/Oxford-IIIT-Pet-Dataset

there goes 5 hours of my life