COCO annotations JSON fix (#3764)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-06-25 01:55:53 +02:00
1 parent f79d7479da
commit 03281f8c76
1 file changed
+1 -1
+1 -1
View File
@@ -270,7 +270,7 @@ def run(data,
# Save JSON
if save_json and len(jdict):
w = Path(weights[0] if isinstance(weights, list) else weights).stem if weights is not None else '' # weights
anno_json = '../coco/annotations/instances_val2017.json' # annotations json
anno_json = str(Path(data.get('path', '../coco')) / 'annotations/instances_val2017.json') # annotations json
pred_json = str(save_dir / f"{w}_predictions.json") # predictions json
print('\nEvaluating pycocotools mAP... saving %s...' % pred_json)
with open(pred_json, 'w') as f: