ZebraTrack3D/
│
├── README.md
├── LICENSE
├── .gitignore
├── requirements.txt
├── environment.yml
│
├── configs/
│ ├── params.yaml ← hyperparameters, model config, augmentation
│ └── paths.yaml ← all file paths
│
├── data/
│ ├── raw/ ← original Kaggle .zarr files (gitignored)
│ ├── processed/ ← extracted patches & coordinate CSVs
│ └── external/ ← third-party datasets
│
├── notebooks/
│ ├── EDA.ipynb ← Exploratory Data Analysis
│ └── baseline_model.ipynb ← Prototype baseline
│
├── src/
│ ├── __init__.py
│ ├── main.py ← Click CLI (train / predict)
│ │
│ ├── data/
│ │ ├── loader.py ← ZarrPatchDataset, ZarrInferenceDataset, DataLoader factory
│ │ ├── preprocess.py ← normalization, augmentation transforms
│ │ └── utils.py ← pad_to_shape, crop_center, coord I/O helpers
│ │
│ ├── models/
│ │ ├── detection/
│ │ │ └── unet3d.py ← Full 3D U-Net (ConvBlock, Encoder, Decoder, Head)
│ │ ├── tracking/
│ │ │ └── graph_based.py ← HungarianTracker + MinCostFlowTracker
│ │ └── lineage/
│ │ ├── division_detector.py ← Heuristic + CNN classifier
│ │ └── tree_builder.py ← LineageTree (networkx DAG, CSV/JSON export)
│ │
│ └── utils/
│ ├── metrics.py ← Edge Jaccard, Division Jaccard, evaluate()
│ └── visualization.py ← matplotlib, plotly, napari viewers
│
├── scripts/
│ ├── train.py ← delegates to src.main train
│ ├── predict.py ← delegates to src.main predict
│ ├── evaluate.py ← standalone evaluation CLI
│ └── submit.py ← wraps kaggle CLI for submission
│
├── outputs/
│ ├── models/ ← saved .pth checkpoints (gitignored)
│ ├── predictions/ ← submission.csv (gitignored)
│ ├── logs/ ← TensorBoard event files
│ └── figures/ ← exported visualizations
│
└── tests/
├── test_data_loader.py
└── test_metrics.py
Raw .zarr
│
▼ ZarrPatchDataset / ZarrInferenceDataset
Patches (Z, Y, X)
│
▼ Normalize → Augment
Processed Tensors
│
▼ UNet3D
Segmentation Masks
│
▼ Postprocess (threshold, watershed, connected components)
Cell Detections (t, z, y, x)
│
▼ HungarianTracker / MinCostFlowTracker
Tracks (track_id, t, z, y, x)
│
▼ HeuristicDivisionDetector / DivisionClassifierCNN
Division Events (parent, daughter1, daughter2)
│
▼ LineageTree
Lineage DAG → submission.csv