Custom Data Loader For Semantic Segmentation
I was working on a project in which I wanted to load a semantic segmentation dataset I couldn’t find any data loader function in tensorflow. If someone knows one kindly let me know. My directory structure looks like
/train
/train/Original
/train/Ground Truth
Also their order doesn’t match either but If one sorts them it matches
Since I couldn’t find an existing data loader, I wrote my own with the help of ChatGPT. Here is the code:
Code