ds = JsonDataset(dataset)
roidb = ds.get_roidb()
with open(detections_pkl, "r") as f:
dets = pickle.load(f)
assert all(k in dets for k in ["all_boxes", "all_segms", "all_keyps"]), \
"Expected detections pkl file in the format used by test_engine.py"
all_boxes = dets["all_boxes"]
After Change
ds = JsonDataset(dataset)
roidb = ds.get_roidb()
dets = load_object(detections_pkl)
assert all(k in dets for k in ["all_boxes", "all_segms", "all_keyps"]), \
"Expected detections pkl file in the format used by test_engine.py"