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

List all segment IDs given precomputed segmentation volume #648

Open
jakobtroidl opened this issue Jan 21, 2025 · 3 comments
Open

List all segment IDs given precomputed segmentation volume #648

jakobtroidl opened this issue Jan 21, 2025 · 3 comments
Labels
question What is going on??? :thinking emoji:

Comments

@jakobtroidl
Copy link

jakobtroidl commented Jan 21, 2025

Is there a way to use cloud volume to generate a list of all segment IDs given a precomputed segmentation volume? Here's a pseudocode example of what I am looking for.

from cloudvolume import CloudVolume

vol_path = "https://storage.googleapis.com/neuroglancer/drosophila_v0/seg_190410_FAFB_v02_ws_size_threshold_200"
vol = CloudVolume(vol_path, parallel=True, progress=True)

vol.all_ids() # list all segmentation IDs in the volume as np.array

Thanks so much for your help.

@william-silversmith william-silversmith added the question What is going on??? :thinking emoji: label Jan 21, 2025
@william-silversmith
Copy link
Contributor

Hi Jakob,

There are two answers to this question.

  1. uniq = cv.image.unique(cv.bounds, cv.mip) will download the entire dataset and efficiently decode the downloaded image chunk files without fully decompressing them. This will take a while... It's probably something like 300-400 GB at highest resolution.

  2. By lucky chance, I've been doing compression experiments at mip 1 with this volume and can readily produce a file with this list pretty much on demand. Mip 0 is trickier just because it's so big.

@jakobtroidl
Copy link
Author

Thanks for your swift response, Will. I will try (1), but if you could share the file for mip 1 for the above volume, I'd be super, super grateful.

@william-silversmith
Copy link
Contributor

I can get you that list with a turnaround time of probably 24-48 hrs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question What is going on??? :thinking emoji:
Projects
None yet
Development

No branches or pull requests

2 participants