open-forest-observatory / geograypher

Multiview Semantic Reasoning with Geospatial Data
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Feature/RP/remove unused colors #83

Closed Ruprabhu25 closed 3 months ago

Ruprabhu25 commented 4 months ago

Closes #59 .

By setting a parameter n_colors to the number of class IDs, I limited the number of colors that appear on the colormap. I also had to remove the clim key in the TEN_CLASS_VIS_KWARGS and TWENTY_CLASS_VIS_KWARGS since those were making the labels unnaturally group together. As seen below, the labels are equally spaced from each other.

This current method takes colors that are sampled from even intervals of size of N from the color map (for example tab20), not the first N colors from the color map.

This is what a mesh would look like with the current changes (taken from render_labels.ipynb)

Screen Shot 2024-02-20 at 4 33 39 PM

russelldj commented 4 months ago

I think you may be able to get the consecutive behavior if you set clim to (-0.5, num_classes+0.5), but I'm not sure.