diff --git a/tools/visualize_json_results.py b/tools/visualize_json_results.py index 5b369a12e1..d11ecb9038 100755 --- a/tools/visualize_json_results.py +++ b/tools/visualize_json_results.py @@ -22,7 +22,7 @@ def create_instances(predictions, image_size): score = np.asarray([x["score"] for x in predictions]) chosen = (score > args.conf_threshold).nonzero()[0] score = score[chosen] - bbox = np.asarray([predictions[i]["bbox"] for i in chosen]) + bbox = np.asarray([predictions[i]["bbox"] for i in chosen]).reshape(-1, 4) bbox = BoxMode.convert(bbox, BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) labels = np.asarray([dataset_id_map(predictions[i]["category_id"]) for i in chosen])