diff --git a/val.py b/val.py index 8da3ef7..b3d05f4 100644 --- a/val.py +++ b/val.py @@ -72,7 +72,8 @@ def save_one_json(predn, jdict, path, class_map): def process_batch(detections, labels, iouv): """ - Return correct prediction matrix + Return correct prediction matrix. + Arguments: detections (array[N, 6]), x1, y1, x2, y2, conf, class labels (array[M, 5]), class, x1, y1, x2, y2 @@ -258,6 +259,7 @@ def run( # Save/log if save_txt: + (save_dir / 'labels').mkdir(parents=True, exist_ok=True) save_one_txt(predn, save_conf, shape, file=save_dir / 'labels' / f'{path.stem}.txt') if save_json: save_one_json(predn, jdict, path, class_map) # append to COCO-JSON dictionary