Skip to content

Commit 068b0c2

Browse files
authored
fix a typo in image id (#299)
* fix a typo in image id * update to v0.8.14
1 parent 830638e commit 068b0c2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sahi/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.8.13"
1+
__version__ = "0.8.14"

sahi/predict.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,10 @@ def predict(
461461
durations_in_seconds["prediction"] += prediction_result.durations_in_seconds["prediction"]
462462

463463
if dataset_json_path:
464-
image_id = ind + 1
465464
# append predictions in coco format
466465
for object_prediction in object_prediction_list:
467466
coco_prediction = object_prediction.to_coco_prediction()
468-
coco_prediction.image_id = image_id
467+
coco_prediction.image_id = coco.images[ind].id
469468
coco_prediction_json = coco_prediction.json
470469
if coco_prediction_json["bbox"]:
471470
coco_json.append(coco_prediction_json)

0 commit comments

Comments
 (0)