This repository holds the script for Volume Segmentation Tool and its Gradio-based Webui.
Paper is available now: A generalist deep-learning volume segmentation tool for volume electron microscopy of biological samples
VST is also available with SBGrid!
Supporting Operating Systems includes: Windows and Linux.
(macOS is supported in theory, however some necessary PyTorch operations needed is not yet supported on MPS backend. Nothing I can do here)
Volume Segmentation Tool is a python based tool that utilizes deep learning to perform volumetric electron microscopy image segmentations, both semantic and instance segmentation.
Based on Pytorch backend. Includes a Gradio based graphical user interface.
The desired images are 8bit or 16bit grey scale 3D tif/hdf as commonly generated by electron microscopes. The desired labels are either binary mask where 0 is background and 1 is foreground (semantic), or each value represent a different object (instance).
This tool does not support 2D image segmentation, nor colorful image segmentation. In which case you should consider ilastik or Trainable Weka Segmentation or nnUNet.
- High efficiency
- Custom implemented augmentations specialised in volumetric images
- Process many depth slices all once, rather than slice by slice
- Support fp16/bf16 training
- Up to 20x speedup compare to nnUNet
- Versatile
- Semantic Segmentation & Instance Segmentation
- Isotropic & anisotropic images
- Adaptive network type, size and depth
- Support AMD GPU (only under Linux)
- Easy to use
- One click installation script
- Graphical User Interface
- Visualisation tools for data augmentation and network activations
- Visualise network output on the fly
- TensorBoard Logging & Can export as Excel spreadsheet
- Does not support 2D images, nor images with colours (grey scale only)
- Since it's based on Deep Learning, the tool needs to be used with a discrete GPU
- It's possible to run this tool without a discrete GPU, however it will run extremely slowly
- Recommended minimal GPU requirement: 4GB of Video Memory, made by Nvidia or AMD
- Since it's based on Deep Learning, the user has to create training samples to train the network before it could perform segmentation
- For more information, please see Tutorials.
-
Install Python 3.10. (Newer versions of Python should work as well)
- During the installation process, ensure that you select the option to add Python to the 'PATH' environment variable.
-
Install Git.
- If you are using Linux, it's highly likely you can skip this step.
-
Open a terminal and navigate to the desired installation directory.
-
Clone the repository by running the following command:
git clone https://github.com/fgdfgfthgr-fox/Volume_Seg_Tool.git
-
Run the corresponding "install_dependencies" script for your system.
- For Windows, it would be install_dependencies_Windows.bat
-
Wait for the script to finish, which could take a while depends on your network speed.
- Run the corresponding "start_WebUI" script for your system. This would open up a terminal.
- For Windows, it would be start_WebUI_Windows.bat
- Your web browser should automatically open up a "website" with url "127.0.0.1:7860" or something similar.
Please see the Wiki.
All number below were obtained with semantic segmentation
Dataset | Time taken | Dice Score | Peak VRAM Use |
---|---|---|---|
UroCell Mitochondria validate on fib-1-0-0-0 | 1.0 hour | 0.8926 | 7.5GB |
More evaluation please see the upcoming paper... |
A. Ground Truth. B. VST predicted result C. DeepImageJ D. ZeroCostDL4mic E. nnUNet
A. Ground Truth. B. VST predicted result
This tool was developed under the scholarship funding from AgResearch, and was helped by the members of the Bostina Lab of the University of Otago. As well as Lech Szymanski from the school of computing.
The example dataset included in this repository was collected by Vincent Casser.
The UroCell Dataset was heavily used during the development of the tool.
Special thanks to YunBo Wang from Xidian University, who gave me exceptional helps at the early stage of development.