Custom DataLoader for .mat file

Hello, I am trying to segment medical image and i need help on creating a DataLoader to take into a CNN .mat images. My main image and mask are saved in a same mat file. So, I need help to create custom dataloader to read the main image and mask from the same mat file.

Thank you