Synthetic Microscopy Timelapse Data Generation for Zero-Annotation AI Mitochondrial Segmentation and Tracking
MitoMimicsDemo.mp4
MitoMimics is designed to simulate temporal mitochondrial dynamics-based microscopy data. MitoMimics employs a Python-based rendering pipeline to generate synthetic widefield microscopy datasets of mitochondrial dynamics events. Our algorithmic toolset provides researchers a means for testing and validating AI-based models, providing both ease of use and flexibility.
Timeline.2.mp4
- Simulates mitochondrial motility, fission, and fusion in 2D space.
- Generates synthetic time-lapse microscopy data.
- Generates synthetic instance masks along with a JSON file that registers instances between frames, which can be used to validate segmentation and/or tracking models.
- Allows customization of simulation parameters, such as:
- Mitochondrial Density
- Mitochondrial Speed
- Fission and Fusion Rates
- Simulation Time Scale
- Dimensions of the Simulation Space
- Allows customization of microscopy parameters, such as:
- Point Spread Function (2D Gaussian PSF)
- Noise (Background Offset, Camera Readout Noise, Poisson Noise)
To install MitoMimics, follow these steps (tested on macOS Sequoia - Tahoe, and Ubunutu 20.04 - 22.04) (Install time 5-15 minutes):
- Clone the repository:
git clone https://github.com/aidanpcquinn/mito_sim_pack.git - Navigate to the project directory:
cd MitoMimics/envs - Install environment:
conda env create -f environment.yml - Activate the conda environment with
conda activate mitodynamicsim
To use MitoMimics for dataset generation, follow these steps (Run time: <10 minutes per simulated image stack with default parameters):
- Navigate to the MitoMimicsGeneration folder and run the simulation script:
python sim.py --seed 42- This generates the underlying simulation of the mitochondria morphology and dynamics
- Parameters can be modified in
parameters.yamlor withpython parametes_gui.py - The files are saved in
MitoMimicsGeneration/sim_output/42 - batch scripts for running multiple jobs
gen_multi_batch_sim.sh
- Run the rendering script with
python renderer.py --seed 42 --gpu 0- This renders the simulation into the synthetic microscopy stacks
- Parameters can be modified in
parameters.yamlor withpython parametes_gui.py - The files are saved in
MitoMimicsGeneration/render_output/42 - batch scripts for running multiple jobs
gen_multi_batch_render.sh - Note: on CUDA accelerated systems the cupy library can be installed, the flag --cupy True may speed up rendering.
- To view the simulated data, run
python sim_napari_viewer.py --loc render_output/42- The user can vary the timescale indefinitely by changing the
save_dataorsim_length_secondsvariables.
- The user can vary the timescale indefinitely by changing the
To use MitoMimics for training on generated synthetic data, follow these steps (Run Time: 24 hours, on 4x NVIDIA H100s)
- Download a processed synthetic training dataset (
Training_Data.tar.gz) from https://zenodo.org/uploads/19603477 REVIEWER TEMP LINK - Install Umamba (https://github.com/bowang-lab/U-Mamba) and follow instructions for dataset preperation and training
- We trained with
nnUNetv2_train DATSET_ID 3d_fullres 0 -tr nnUNetTrainerUMambaEnc -num_gpus 4and otherwise default parameters
- We trained with
- Note: you will need to process and train on a dataset for both fullmasks and centerlines
- To use your own tiff stacks, see
2_1_raw_to_intermediary_demo.ipynband2_2_intermediary_prepro.ipynbin/RealDataProcessing
- Download demo unlabaled photogentle sequences (
Unlabelled_Photogentle_Sequences.tar.gz) from https://zenodo.org/uploads/19603477 REVIEWER TEMP LINK - Run inference with both trained models on real dataset
nnUNetv2_predict -i raw_unlabaled_photogentle_sequences/ -o fullmask_out_location/ -d DATASET_ID_fullmask -c 3d_fullres -f 0 -tr nnUNetTrainerUMambaEnc --disable_ttannUNetv2_predict -i raw_unlabaled_photogentle_sequences/ -o centerline_out_location/ -d DATASET_ID_centerline -c 3d_fullres -f 0 -tr nnUNetTrainerUMambaEnc --disable_tta
- Run Post processing scripts
3_1 to 5_3in/RealDataProcessing. Usepython 3_1...py --helpto view arguments- post processing needs the raw nifti stacks from step 1, and the outputs of both segmentation models in 2
- Download demo unlabaled photogentle sequences (
Unlabelled_Photogentle_Sequences.tar.gz) from https://zenodo.org/uploads/19603477 REVIEWER TEMP LINK - Download the trained model weights ('Trained_UMamba_Models.zip') from https://zenodo.org/uploads/19603477 REVIEWER TEMP LINK
- Place the unziped folders in your UMamba install at
U-Mamba/data/nnUNet_results/ - Run inference with both trained models on real dataset
nnUNetv2_predict -i raw_unlabaled_photogentle_sequences/ -o fullmask_out_location/ -d 901 -c 3d_fullres -f 0 -tr nnUNetTrainerUMambaEnc --disable_ttannUNetv2_predict -i raw_unlabaled_photogentle_sequences/ -o centerline_out_location/ -d 902 -c 3d_fullres -f 0 -tr nnUNetTrainerUMambaEnc --disable_tta
- Run Post processing scripts
3_1 to 5_3in/RealDataProcessing. Usepython 3_1...py --helpto view arguments- post processing needs the raw nifti stacks from step 1, and the outputs of both segmentation models in 2
MitoMimics © 2026 by Aidan Quinn, Volkan Ozcoban & Vijay Rajagopal is licensed under GPL-3.0
For any questions, feedback, or potential collaborations, please contact the original authors of MitoMimics:
-
Aidan Quinn
🐙 Github: @aidanpcquinn
-
Volkan Ozcoban
🐙 Github: @VolkanOzcoban
-
Vijay Rajagopal
📧 vijay.rajagopal@unimelb.edu.au
🐙 Github: @vraj004
Please include “MitoMimics” in the subject line when contacting us.
See more from our lab at our github: https://github.com/CellSMB
