sci-visus / OpenVisus

Open Source distribution of the ViSUS capabilities
Other
27 stars 18 forks source link

Options for bounding box visualizations, colored annotations in open visus server? #250

Open bw4sz opened 1 year ago

bw4sz commented 1 year ago

Hello openvisus team. I'm a long time user -> https://visualize.idtrees.org/ext/visus/viewer.html?server=https:/visualize.idtrees.org:8080/mod_visus?&dataset=ABBY%20-%20Oregon

We have been serving 100 million tree annotations that are predicted from our machine learning pipelines. https://elifesciences.org/articles/62922 Thanks to @spetruzza for many helpful insights over the last couple years.

We have now completed species classification for these trees.

Screenshot 2023-04-21 at 12 13 51 PM

We could repeat the process we have now, burn the bounding boxes into the raster, but now each with a different color. Pros: it will work. Cons: no legend? (is there a way to add text panel without alot of javscript/css/html work?), no interactivity. In an ideal world, it would be nice for a user to be able to click on an annotation and get a leaflet style popup. Alternatively, I could try earth engine, I played with uploading assets for about 15 minutes and just hit a deluge of errors.

Thanks for your support on these really important tools.

spetruzza commented 1 year ago

Hi there,

The OpenVisus web viewer does not support annotations natively, but we have recently made a version of the viewer that uses OpenLayers (which is similar to Leaflet), so in principles you could add those labels yourself and leverage OpenLayers functionalities for it. This is also what is currently used on the NEON data portal

So you could be using the same exact web viewer that neon is using and put on top of that your labels. The biggest question is, would OpenLayers be able to support these many labels? I would suggest you to test that idea first without the NEON data (you can find examples here: https://openlayers.org/en/latest/examples/). If that works with your largest set of labels, that might be the easiest solution to deploy.

If that does not work, we'll have to think at something else...

Another option that you mentioned that is still doable is to bake the labels in the image as you are doing right now, and add some floating legend in HTML with the information you need. You can do this by editing the existing viewer HTML page. The cons, as you noted, is that since the labels are part of the raster image there won't be any interactivity.