cfg drives everythingget_cfg + merge zoo yaml + set WEIGHTS
same yaml for config & checkpointget_config_file and get_checkpoint_url with the same string
DefaultPredictor takes BGR, single imagecv2.imread; batch manually for throughput
outputs["instances"]pred_boxes / scores / pred_classes / pred_masks — move .to("cpu")
Visualizer wants RGBimg[:, :, ::-1] and back again to save
register_coco_instancesname, {}, json, img_dir — then set DATASETS.TRAIN
NUM_CLASSES = your classes onlybackground is implicit
SOLVER counts iterationsMAX_ITER, not epochs; resume_or_load(False) to fine-tune
COCOEvaluator for mAPbuild_detection_test_loader + inference_on_dataset