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

How to generate dataset images? #10

Open
pccoe-co opened this issue Jul 8, 2022 · 4 comments
Open

How to generate dataset images? #10

pccoe-co opened this issue Jul 8, 2022 · 4 comments
Labels
stale This issue or pull request waits for an update

Comments

@pccoe-co
Copy link

pccoe-co commented Jul 8, 2022

I am trying to use similar cell images dataset for 4 - Segment nuclei and cells.ipynb notebook. Can you tell me how to generate tiff images compatible with the notebook.

@muellerflorian
Copy link
Member

hello, do you mean you would like to run the notebook on your own data?

@Henley13 , maybe we should add a section in the docs (if not present already) to describe how a user has to prepare his own data in the simplest possible way to use the notebooks?

@Henley13
Copy link
Member

``Hello @pccoe-co,

I am not sure what you mean by generate tiff images, but all you need to run the notebook is to read your images in order to get a nucleus and cell image (preferably from DAPI and CellMask channels, respectively), in 2D, aligned and with the same shape. It does not matter if your image is saved in tiff, tif, png or anything else. You can use bigfish.stack.read_image to read your images for example.

More specifically, in the second code block you can use your own input and output paths and comment the checking line:

# hard-code the paths of our input and output directories
path_input = "../data/input"
path_output = "../data/output"

# check input images are loaded
#stack.check_input_data(path_input, input_segmentation=True)

In the third code block, you can rewrite the path with the name of you images:

path = os.path.join(path_input, "example_nuc_full.tif")
nuc = stack.read_image(path)
print("nucleus image")
print("\r shape: {0}".format(nuc.shape))
print("\r dtype: {0}".format(nuc.dtype), "\n")

path = os.path.join(path_input, "example_cell_full.tif")
cell = stack.read_image(path)
print("cell image")
print("\r shape: {0}".format(cell.shape))
print("\r dtype: {0}".format(cell.dtype))

@pccoe-co
Copy link
Author

@muellerflorian yes I mean to say that I want to run this notebook on my own data. https://drive.google.com/drive/folders/14rsnAPYWUGVlMB5jiwF8rn-9PfWcOyq6?usp=sharing I am trying following image for segmentation.

@Henley13
Copy link
Member

@pccoe-co you can read your jpg image with bigfish.stack.read_image. Have you tried to edit and run the code as explained here ?

Some parts of the notebook require cell and nucleus channels. Si if you only have a cell image you won't be able to fully run the notebook.

@Henley13 Henley13 added the stale This issue or pull request waits for an update label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue or pull request waits for an update
Projects
None yet
Development

No branches or pull requests

3 participants