NVIDIA / semantic-segmentation

Nvidia Semantic Segmentation monorepo
BSD 3-Clause "New" or "Revised" License
1.76k stars 388 forks source link

Add `tile_size` to arguments of function `build_centroids` in `uniform.py` #191

Closed msseibel closed 1 year ago

msseibel commented 1 year ago

I want to perform uniform sampling for my own dataset by first building centroids using build_centroids. The dimensions of my images are smaller than the hard_coded tile_size of 1024. Thus calc_tile_locations returns an empty list.

Fix:

  1. Add argument tile_size to function build_centroids as it seems to be the entry point for building centroids
  2. calc_tile_locations should not return empty lists. Perhaps raise an error. At least give some user feedback.
msseibel commented 1 year ago

After finding https://github.com/NVIDIA/semantic-segmentation/issues/106 I understand, that tile_size should be changed using the cfg.DATASET.CLASS_UNIFORM_TILE argument.

Still the bug described in the above mentioned issue must be fixed.