checkpointer = DetectionCheckpointer(model) checkpointer.save("path/to/checkpoint.pth")
checkpointer = DetectionCheckpointer(model) resume_from = "path/to/checkpoint.pth" checkpointer.resume_or_load(resume_from, resume=True)This example shows how to resume training from the last checkpoint saved in the specified file path. The resume_or_load method will automatically resume training if resume=True. Package Library: Detectron2 package is an object detection library, built on top of PyTorch, that provides fast and accurate detection algorithms.