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

There are no instance masks in dataset bbbc010-2012 #24

Open
lphilomena opened this issue Nov 3, 2022 · 4 comments
Open

There are no instance masks in dataset bbbc010-2012 #24

lphilomena opened this issue Nov 3, 2022 · 4 comments

Comments

@lphilomena
Copy link

lphilomena commented Nov 3, 2022

No description provided.

@lphilomena lphilomena reopened this Nov 22, 2022
@lphilomena
Copy link
Author

There is only an instance mask in the generated mask folder in ./data/bbbc010-2012/train/masks by the python file "/examples/2d/bbbc010-2012/01-data.ipynb for the bbbc010 dataset, could you please share the masks including all instances in a mask image?

@lmanan
Copy link
Contributor

lmanan commented Nov 29, 2022

Hello @lphilomena

So the 01-data.ipynb notebook downloads data from this url https://github.com/juglab/EmbedSeg/releases/download/v0.1.0/bbbc010-2012.zip.

If you manually download from this url and unzip this folder, you would see a directory called train/masks containing 100 files.

My guess is that if you delete the directory bbbc010-2012 within data and try running the notebook again, the problem is solved. Let me know if that is not the case.

@lphilomena
Copy link
Author

lphilomena commented Dec 9, 2022 via email

@lmanan
Copy link
Contributor

lmanan commented Dec 10, 2022

Hi @lphilomena
These 100 masks are all multi-slice tiffs, with the number of slices in each mask equal to the number of worms present in the corresponding image.

In each individual slice, we can see one of the worms. We could visualize a different worm mask by selecting a different slice.

For example, in this code snippet, we load one of the label masks, and by changing the slice parameter we can visualize a different worm mask:

import tifffile
import matplotlib.pyplot as plt
mask_filename = '' # path to one of the label masks 
mask = tifffile.imread(mask_filename)
slice = 1 # change `slice` for a different worm
plt.imshow(mask[slice])

Let me know if there are questions. Thanks.

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