A Deep Learning Pipeline for 3D Cell Detection, Tracking, and Lineage Reconstruction in Zebrafish Microscopy Data
- Name: Biohub β Cell Tracking During Development
- Goal: Detect, track, and link cells in 3D microscopy data of developing zebrafish embryos.
- Metrics: Edge Jaccard + Division Jaccard (higher is better).
- Data Format:
.zarr3D volumetric time-series.
git clone https://github.com/your-username/ZebraTrack3D.git
cd ZebraTrack3D
pip install -r requirements.txtOr with Conda:
conda env create -f environment.yml
conda activate zebratrack3dPlace raw Kaggle data in data/raw/:
kaggle competitions download -c biohub-cell-tracking-during-development
unzip biohub-cell-tracking-during-development.zip -d data/raw/python scripts/train.py --config configs/params.yamlpython scripts/predict.py --input data/raw/test.zarr --output outputs/predictions/submission.csvpython scripts/evaluate.py --pred outputs/predictions/submission.csv --gt data/processed/ground_truth.csvpython scripts/submit.py --file outputs/predictions/submission.csv --message "3D U-Net + MCF v1"ZebraTrack3D/
βββ configs/ # YAML configuration files (hyperparams, paths)
βββ data/ # Raw, processed, and external data
βββ notebooks/ # Jupyter notebooks for EDA and prototyping
βββ src/ # Core source code (data, models, utils)
β βββ data/ # Data loading and preprocessing
β βββ models/ # Detection, tracking, and lineage models
β βββ utils/ # Metrics, visualization, helpers
βββ scripts/ # Train, predict, evaluate, submit
βββ outputs/ # Saved models, predictions, logs, figures
βββ tests/ # Unit and integration tests
βββ docs/ # Architecture, setup, and results docs
See docs/architecture.md for a detailed breakdown.
| Task | Approach | Example Models | Library |
|---|---|---|---|
| Cell Detection | 3D Segmentation | 3D U-Net, nnU-Net, Cellpose3D | PyTorch |
| Cell Tracking | Graph-based / Deep Learning | Min-Cost Flow, DeepSORT, Tracktor | NetworkX, PyTorch |
| Division Detection | Classification / GNN | Custom CNN, Graph Neural Networks | PyTorch Geometric |
| Lineage Reconstruction | Tree/Graph Algorithms | Hierarchical Clustering, MST | NetworkX, SciPy |
Edit configs/params.yaml to adjust hyperparameters:
model:
name: unet3d
in_channels: 1
out_channels: 2
features: [32, 64, 128, 256]
training:
epochs: 100
batch_size: 2
lr: 1e-4| Model | Edge Jaccard | Division Jaccard | Rank |
|---|---|---|---|
| 3D U-Net + MCF | 0.85 | 0.78 | β |
| Baseline (Threshold) | 0.60 | 0.45 | β |
| Category | Tools |
|---|---|
| Core | Python 3.10+, PyTorch 2.0+ |
| Data Handling | zarr, numpy, pandas, dask |
| Visualization | matplotlib, plotly, napari |
| Tracking | trackpy, scipy.optimize, networkx |
| Evaluation | scikit-learn, scipy |
| Reproducibility | hydra, DVC |
| CI/CD | GitHub Actions |
- Fork the repository.
- Create a feature branch:
git checkout -b feature/my-feature. - Commit your changes:
git commit -m "Add my feature". - Push to the branch:
git push origin feature/my-feature. - Open a Pull Request.
This project is licensed under the MIT License β see LICENSE for details.
- ChanZuckerberg Biohub for the competition data.
- OME-Zarr for the
.zarrformat. - PyTorch and the open-source community.