Allen Cell Discussion Forum

3D single cell image data set

Hello Allen Cell Segmentation Developers,

I have read “Robust integrated intracellular organization of the human iPS cell” and “The Allen Cell and Structure Segmenter”. I am trying to create a 3D single cell image data set, which includes the cell membrane and nucleus, utilizing the classic work flow and the tools in Napari. I have been able to segment the cell membrane and the nucleus with different classic workflows, after the previous help you provided. The problem I am now having is that I cannot access certain repositories to run the segmenter_model_zoo.


From what I read in the “Robust” paper, this is the path I should take. However, I am not sure if this is correct. If you could direct me to the correct method / code to create single cell 3D images from an image that has multiple cells in the field of view I would greatly appreciate it.

I also have one more question. In the classic segmenter there is a workflow named cardio_fbl_100x. I have checked each of the options in Napari and I am unable to find this workflow. The reason I ask is that out of all of the workflows, this classic workflow works the best on segmenting the cell membrane in our images and I would like to use it for 3D segmentation as well.

Thank you for your assistance!

Best regards,
Rex H

Hi @RexH,
Thanks for your interest in these analyses! I’ll look into those GitHub issues and keep you updated on what I find. As for the cardio_fbl_100x workflow, the regular fbl workflow has a similar structure, so with some tweaking of the workflow parameters you might be able to get similar results.

Best,
Benji

Hello @RexH ,

What kind of cell membrane images do you have? In general, you may have to either re-train or fine-tune the models in order to make them working on your data. The model zoo we provided is mostly for (1) reproduce our results and (2) apply on users’ images collected in very similar way as ours or (3) use these models for transfer learning and fine tuning on your data.

Let us know if there is anything more we could help.

Thanks,
Jianxu

Hello Jianxu,

Thank you for your quick response! I am trying to reproduce your results so that I can transfer this process to our endothelial cell line. I am currently using the cells that are provided in the AICS-14-part1 folder (Allen Institute cell line ID: AICS 14).

I require more instruction as I am unable to understand the necessary steps after reading the papers.

Benji replied that he was looking into why I am unable to access the repositories so hopefully I can get into those soon.

Any assistance you might be able to provide would be greatly appreciated.

Best regards,

Rex H

Hello Benji,

Thank you for your quick response! I will try your recommendation of using the regular fbl workflow.

I look forward to your response on how to access the Github.

Best regards,
Rex H

Hi Jianxu,

Since you mentioned it, I am curious about how to do transfer learning with the pretrained models. I have used the machine learning version of the Segmenter to train my own models from scratch, but I wonder if in some situations it might be more efficient to start from a pretrained model.

Is it possible to use the aics-ml-segmentation package to do transfer learning with the pretrained models? If so, is it as simple as editing the YAML configuration file to “resume” training from a downloaded pretrained model (like when resuming training from a model checkpoint), or is there something else I should do?

Best,
Madeleine

Dear Madeleine (@lynn),

First of all, apologize for the late reply. You can certainly do transfer learning using aics-ml-segmentation, and exactly like what you described. Another minor thing is that you may want to try different learning_rate (aics-ml-segmentation/train_config.yaml at main · AllenCell/aics-ml-segmentation · GitHub), depending on how close your pre-trained model is to your new problem.

Thanks,
Jianxu

1 Like

Hi Benji,

I am just sending a follow-up post for the GitHub issues. I have not tried to access them again as I was waiting to see if there was something special I needed to do. If you could let me know the status I would greatly appreciate it.

Thank you,
RexH

Hello @RexH ,

If you have data from AICS-14, you could try the following jupyter notebook to get the cell and nuclear segmentation: segmenter_model_zoo/demo_2_using_super_model.ipynb at main · AllenCell/segmenter_model_zoo (github.com)

This jupyter notebook uses a simplified version of the full algorithm (so, actually much faster), it should give results very close to the full algorithm. This simplified version does not use cell_detector package, so you should be able to easily test it out without any issue. I am working on moving cell_detector from an internal private repo to a public github repo, which may take some time.

Let me know if the jupyter notebook works well or not, or if there is anything else I can help.

Thanks,
Jianxu

Hi @RexH ,

Have you tried this instead?
git clone https://github.com/AllenCell/segmenter_model_zoo.git

This works for me and should work for everyone since it is a public repository.

Thanks,
Na Hyung

Hello Jianxu,

Thank you for your quick follow-up! I have tried to run the jupyter notebook on a windows and linux system and I receive these errors when trying to use the notebook.
image
From this step I went into the python code and this is what I found.
image
I am in the beginning stages of programming so I am sorry if there is something that I am not doing correctly to make this work. Please let me know what I am missing.

Regards,

RexH

Hi @RexH, I just tested again. It works well for me on Linux. May I know which operating system are you using? If you are using a Windows machine, you can skip these two cells running “list_all_super_models” and go to the next cell directly. I don’t have any Windows machine with NVIDIA GPU at the moment, which makes debugging Windows issue a little bit hard for me right now. But, I will look into more details asap.

In short, for now, you can just skip cell [2] and [3] (i.e., not running “list_all_super_models”), everything else should be fine. Let me know if you encounter more errors. Sorry for the inconvenience.

Thanks,
Jianxu

Hi Jianxu,

So that our lab can use Linux with a GPU, we have created a dual boot system with Windows and Ubuntu. The Ubuntu system specifications are; Ubuntu 20.04, Nvidia driver version 470.74, CUDA version 11.4, GPU Quadro M4000.

I tried running the Juypter notebook in Linux and in Window skipping the two cells as you suggested and I am now receiving this error “ModuleNotFoundError” in both systems.

I tried to go into the python code and see what might be causing the problem, but I did not see anything unusual.

As I stated before we are using your image to initially test the Jupyter notebook. I know that trying to troubleshoot an error with code is difficult. I want to thank you for helping me to get this to work.

Regards,
Rex H