Supersegger-Omnipose is the Supersegger MATLAB-based suite modified to work with improved Omnipose segmentation. Omnipose should be installed before running Supersegger-Omnipose.
More information about Omnipose can be found at the Github and documentation page.
Supersegger-Omnipose uses the same MATLAB toolboxes as the original Supersegger:
- Curve Fitting Toolbox
- Deep Learning Toolbox (fka Neural Network Toolbox)
- Global Optimization Toolbox
- Image Processing Toolbox
- Optimization Toolbox
- Parallel Computing Toolbox (not necessary)
- Statistics and Machine Learning Toolbox
The Github for the original Supersegger is here. For more detailed documentation, the website for Supersegger can be found here, the wiki, and documentation on functions found here. Supersegger-Omnipose uses the same MATLAB functions as the original Supersegger.
Quick-start guide for new users
Omnipose options have been preselected to work directly with Supersegger-Omnipose, but if needed, further documentation can be found by running python -m omnipose --help
in the omnipose environment. Recommended options can also be found on the documentation page.
Segmentation Options: When running the Omnipose command in conda, the following default Omnipose options can be modified depending on the desired usage: "--cluster --mask_threshold 1 --flow_threshold 0 --diameter 30".
--cluster: DBscan clustering, reduces oversegmentation of thin features [can remove option]
--mask_threshold: mask threshold [0 default, decrease to find more and larger masks]
--flow_threshold: flow error threshold [0.4 default, 0 to turn off]
--diameter: approximate diameter of cell in pixels (for rod-shape, this is the length of the short axis) [30 default, 0 to have omnipose estimate for each image]
Mask and flow threshold numbers can be tested quickly with the Omnipose GUI (
python -m omnipose
). In addition, other Omnipose options can be added to possibly improve segmentation.
git clone https://github.com/tlo-bot/supersegger-omnipose.git
- Add supersegger-omnipose to MATLAB path, with its subfolders (see "Setting the Path").
- Install Omnipose
In order for Matlab to be able to find SuperSegger-Omnipose, the SuperSegger-Omnipose folder needs to be in your path*. In the Home tab, in the Environment section, click Set Path. The Set Path dialog box appears. Click 'add folder with subfolders' and add the SuperSegger-Omnipose folder.
*note that if the original Supersegger is already installed and on the MATLAB path, you should replace the paths of the original Supersegger folders & subfolders with the paths to the new Supersegger-Omnipose folders & subfolders.
- Put images (.tif) into a folder.
- Convert image file names to Supersegger convention (in MATLAB with
superSeggerGui
, orconvertImageNames
; or manually with command line). - Run
superSeggerGui
, or configure and runprocessExp
. Supersegger-Omnipose will begin aligning the images.- After aligning, Supersegger-Omnipose will pause for segmentation through Omnipose. The Omnipose command should be displayed on the MATLAB Command Window and also automatically copied to your clipboard.
- Open terminal/Anaconda Prompt and start Omnipose (ie
conda activate omnipose
)- Note that you should see the conda environment change from "(base)" to "(omnipose)"
- Paste in the Omnipose command that was generated by MATLAB into the terminal. Wait for Omnipose to segment images and generate masks. -Can also change the command options in this step, if needed.
- Once Omnipose has completed, continue running Supersegger by pressing the return/Enter key in the MATLAB Command Window.
- Put images (.tif) into a folder.
- Convert image file names to Supersegger convention.
- Configure
processExp
file. - In terminal, run
matlab -nodesktop -noFigureWindows -nosplash -r “processExp(‘dir’)”
- Open another terminal, navigate to folder with Omnipose, and start Omnipose (ie
conda activate omnipose
) - Once images are aligned in MATLAB terminal, run Omnipose command. Wait for Omnipose to segment images and generate masks.
- Once Omnipose has completed, continue running Supersegger by pressing the return/Enter key in the MATLAB terminal.
Only supported when using processExp
. Specify autoomni=1 input for processExp (ie processExp('dirname',1)
). Disabled by default.
See documentation for setup linked below.