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

Image segmentation using custom neural network model with Tensorflow #9

Closed
gusqgm opened this issue Apr 22, 2022 · 5 comments
Closed
Assignees
Labels
Backlog Backlog issues we may eventually fix, but aren't a priority enhancement New feature or request

Comments

@gusqgm
Copy link

gusqgm commented Apr 22, 2022

Currently two different network architectures have been used for object segmentation: Cellpose and RDCNet. As a minimal working example, we should be able to use a pre-trained model from each of these architectures and use it for prediction of label maps. Important to note that Cellpose is using pytorch, whereas RDCNet utilizes Tensorflow.

Cellpose should work by installing it from the repository above. For RDCNet, we have usually used it via ISIT.

The input is the reading of the zarr file in such a way that the images match the images used for training and applying the prediction model on them. The output are object labels which are defined as regions which contain information of where they should be located within the field grid. Each region comprises of a segmented object plus a certain bounding box surrounding it.

Currently the models mostly used with RDCNet rely on object segmentation of MIP projections of each well/overview.

@gusqgm
Copy link
Author

gusqgm commented Apr 22, 2022

In a more organized fashion:

  1. input zarr files manipulate the images so they fit the trained images for the segmentation model. For example, making maximum intensity projections of each well overview
    1.2 Objects are predicted using either one of the networks
  2. outputs saved as regions within the overview grid: an object is a bounding box region with a mask
    2.1 segmented object with certain boundary surrounding it (2D or 3D)
    2.2 each object gets assigned the grid numbers where its bounding region overlaps
    2.3 list of all objects and their grids saved in table format
    2.4 if segmentation occurs at multiple levels (e.g. tisse, cells, subcellular structures), smallest object(s) is(are) linked to its(their) parent via particular label mapping

@gusqgm
Copy link
Author

gusqgm commented Apr 22, 2022

Here an interesting challenge to check is whether the construct of bounding box + mask can be used as a generic unit that e.g. Napari could use for dynamically reading only the pertaining chuncks of the larger .zarr files for display. this could be particular interesting in situations where the user can also filter out particular objects based on certain values, so that only the valid objects are loaded into the canvas. Something going in the direction of the Napari Clusters Plotter

@gusqgm gusqgm added the enhancement New feature or request label Apr 26, 2022
@tcompa
Copy link
Collaborator

tcompa commented Jun 29, 2022

Can we move this discussion to fractal-analytics-platform/fractal-client#64 and close this one, or are there important differences?

Also: I don't have access to https://github.com/fmi-basel/isit (in case it's useful).

@jluethi jluethi changed the title Image segmentation using particular neural network model Image segmentation using custom neural network model with Tensorflow Jun 30, 2022
@jluethi
Copy link
Collaborator

jluethi commented Jun 30, 2022

@tcompa There is quite some overlap. I now renamed it to reflect its difference:
fractal-analytics-platform/fractal-client#66 is about the generic implementation of an existing neural network in Pytorch with a clear python API and no known dependency issues (=> cellpose).

Let's use this issue to track progress on the more complex case of some custom models at FMI. This is not a July goal. I think the first step will be some cleanup on those models and the isit library that runs them. Once this is achieved, we can integrate the more complex network architectures into Fractal
(=> this is a backlog issue for the moment, @gusqgm will update us here once we have progress on the FMI side about the networks)

@jluethi jluethi added the Backlog Backlog issues we may eventually fix, but aren't a priority label Aug 4, 2022
@jluethi jluethi transferred this issue from fractal-analytics-platform/fractal-client Sep 2, 2022
@jluethi
Copy link
Collaborator

jluethi commented Dec 20, 2023

This has been covered in the (private) RDCNet task at FMI now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog Backlog issues we may eventually fix, but aren't a priority enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants