Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing more bands to the segmentation routine. #33

Open
csherwood-usgs opened this issue Jun 1, 2022 · 1 comment
Open

Passing more bands to the segmentation routine. #33

csherwood-usgs opened this issue Jun 1, 2022 · 1 comment

Comments

@csherwood-usgs
Copy link
Contributor

It might be very useful if we could pass more than three bands to the segmentation routine. @dbuscombe@usgs.gov has indicated that, in principle, there is no reason the segmentation can't work on >3 bands...maybe as many as 12.

The version in my crs_dev branch can read multi-band tiff files. Currently, if more than three bands are encountered, it puts the first three in img, which is passed to both the UI and the seg code. I envision changing the code to send three bands in img to the UI, but all bands in seg_array to the seg. code. I am a little unsure how to make this happen (i.e., I have not pinpointed the place where the image array is passed to the seg code, and I don't know if that code is flexible in the number of bands it can accept). I will try to suss this out in the next few days, but any pointers are welcome!

I also suggest we add flexibility by allowing options for which bands to display in the UI, and which bands to process in the seg code. This could be implemented by adding to the config.ini file a set of indices, like band_to_view with a default of [1,2,3] and bands_to_seg, with a default of all bands. This would allow us to conveniently explore the seg. behaviour of multi-band files.

Ideas? Concerns?

@dbuscombe-usgs
Copy link

I like the idea of being able to select which bands to use for display, and which to use for inference. It is a great advantage of this task-specific segmentation that overfitting is not a concern

Concerns: memory consumption. From each image, features are extracted that are H x W x D x 5 x number of scales (2 upwards), so its very easy to generate large raster stacks

Ideas: use Dask arrays to handle all CPU-bound processes that dont fit in memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants