Recommended flow
- Create a new virtual environment.
- Install PyTorch for your CPU or CUDA target.
- Install Detectron2 using a supported wheel or build from source.
- Verify inference with a small image before training custom models.
Always check official PyTorch and Detectron2 documentation for version-specific install commands before production use.
Common checks
| Check | Why it matters |
|---|---|
| Python version | Prevents dependency conflicts and build errors. |
| CUDA compatibility | GPU builds must match installed drivers and PyTorch. |
| Clean environment | Avoids mixing old packages from other projects. |
| Compiler tools | Needed when building from source. |