Pytorch: Creating a Custom Dataset Class With Specific Data Transformations for Semantic…
Whenever you work on a deep learning project with Pytorch, you might have to define your dataset class at some point. In my case, I work on a project using semantic segmentation to train a transformer model that can generalize geometric shapes (such as building footprints) on different scales. When working out my implementation, I found it hard to find specific examples treating semantic segmentation, which is why I decided to share some parts of my experience. In the following, I will show you how I set up my dataset class object and apply the wanted data transformations to the "input" and the "mask" data. Let's go through this code step by step.
Jul-27-2022, 15:50:05 GMT
- Technology: