Get PyTorch Connectomics running in 5 minutes! 🚀
- Install PyTorch Connectomics (2-3 minutes)
- Run a demo to verify installation (30 seconds)
- Try a tutorial with real data (optional)
curl -fsSL https://raw.githubusercontent.com/zudi-lin/pytorch_connectomics/master/quickstart.sh | bash
cd pytorch_connectomics
conda activate pytcFor CUDA-specific options, manual install, or installing via an AI coding agent (Claude Code / Codex), see INSTALLATION.md.
conda activate pytc
python scripts/main.py --demoThis creates synthetic data and trains a small model for 5 epochs. If this works, your installation is successful! ✅
Expected output:
🎯 PyTorch Connectomics Demo Mode
...
✅ DEMO COMPLETED SUCCESSFULLY!
Your installation is working correctly! 🎉
The Lucchi++ dataset contains mitochondria segmentation data from EM images.
# Download from HuggingFace (recommended)
mkdir -p datasets/
wget https://huggingface.co/datasets/pytc/tutorial/resolve/main/lucchi%2B%2B.zip
unzip lucchi++.zip -d datasets/
rm lucchi++.zipSize: ~100 MB
# Quick test (1 batch, ~30 seconds)
python scripts/main.py --config tutorials/monai_lucchi++.yaml --fast-dev-run
# Full training (~2 hours on GPU)
python scripts/main.py --config tutorials/monai_lucchi++.yaml# Launch TensorBoard (in a separate terminal)
tensorboard --logdir outputs/lucchi++_monai_unet
# Open browser to http://localhost:6006For installation problems, see INSTALLATION.md.
Solution: Reduce batch size in config:
python scripts/main.py --config tutorials/lucchi.yaml data.dataloader.batch_size=1- 📚 Full Documentation: connectomics.readthedocs.io
- 📖 Developer Guide: CLAUDE.md
- 🎯 More Tutorials: See
tutorials/directory
- 💬 Slack Community: Join here
- 🐛 Report Issues: GitHub Issues
- 📧 Email: See README for contact info
Train on your own data:
# Create a config file (e.g., my_config.yaml)
# See tutorials/*.yaml for examples
python scripts/main.py --config my_config.yamlUse different models:
# In your config file:
model:
architecture: mednext # Try MedNeXt (state-of-the-art)
mednext_size: S # S, B, M, or L
deep_supervision: trueDistributed training:
system:
training:
num_gpus: 4 # Automatically uses DDP- Start small: Use
--fast-dev-runto test configs quickly - Monitor training: Always use TensorBoard to watch loss curves
- GPU memory: Start with small batch sizes, increase gradually
- Ask questions: Join our Slack community - we're friendly! 😊
Now that you're set up, explore:
- Different architectures: MONAI models, MedNeXt
- Advanced features: Mixed precision, deep supervision
- Custom data: HDF5, TIFF, Zarr formats
- Deployment: Docker/Singularity containers
Happy segmenting! 🔬🧠