setup-build
Use this sub-skill when a task involves installing AdelaiDet, selecting PyTorch/Detectron2/CUDA versions, building adet._C, checking custom operators, or diagnosing import/build failures.
Use this route for
- Creating a fresh environment for AdelaiDet.
- Choosing a Detectron2 wheel that matches PyTorch and CUDA.
- Building
AdelaiDeteditable from source. - Verifying
adet.config.get_cfg, Detectron2 registries,adet._C, BezierAlign, DefROIAlign, and multi-label NMS. - Fixing build failures such as missing torch in build isolation, missing CUDA headers, missing THC headers, Pillow/rapidfuzz/OpenCV incompatibilities, or CUDA architecture problems.
Do not use this route for
- Choosing a model config after installation succeeds. Use
../train-eval/SKILL.md. - Demo commands with an already working install. Use
../demo-visualize/SKILL.md. - Dataset annotation conversion. Use
../data-prep/SKILL.md. - ONNX and checkpoint conversion. Use
../export-convert/SKILL.md.
Read first
references/setup-build.mdfor the known-good install recipe and version pins.references/runtime-checks.mdfor what each smoke check proves.../../references/compatibility.mdfor package-version rationale.../../references/troubleshooting.mdfor cross-cutting error fixes.
Skill-owned scripts
../../scripts/check_install.py— package/config/registry/extension smoke check, with optional--cuda-ops.
Standard workflow
-
Create the compatible Python/PyTorch/CUDA/Detectron2 environment described in
references/setup-build.md. -
Install AdelaiDet with
python -m pip install --no-build-isolation -e <checkout>. -
Pin compatibility fixes:
Pillow<10,rapidfuzz<3, NumPy1.23.x, and OpenCV headless4.8.x. -
Run:
bashpython ../../scripts/check_install.py --cuda-ops -
If
--cuda-opsfails, do not start training or inference; fix setup first or explicitly narrow the task to import/config-only analysis.
Decision points
- Need unmodified CUDA extension? Use PyTorch 1.10.x + CUDA 11.3. PyTorch 2.x is not the default.
- No GPU available? You may perform import/config-only checks without
--cuda-ops, but record that DefROIAlign and native_C.ml_nmsare not validated. - Need ONNX/TensorRT/NCNN? First prove the base AdelaiDet install, then switch to
export-convertfor optional deployment runtimes.
Success signal
A healthy CUDA-capable environment reports:
import adetsucceeds.adet._Cexposes BezierAlign, DefROIAlign, andml_nmssymbols.scripts/check_install.py --cuda-opsexits 0.- CLI help for training/demo/visualization/export can import all required modules.


