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
The code seems to work but does so reduce the quality as original images have higher resolution(2K) If anyone can suggest any improvement in this if there is no in built loader.
Ahmad IMRAN is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.