Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon authored Nov 5, 2023
2 parents a23587d + f04a7ee commit 4774f6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sahi/slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def slice_coco(
sliced_coco_images: List = []

# iterate over images and slice
for coco_image in tqdm(coco.images):
for idx, coco_image in enumerate(tqdm(coco.images)):
# get image path
image_path: str = os.path.join(image_dir, coco_image.file_name)
# get annotation json list corresponding to selected coco image
Expand All @@ -478,7 +478,7 @@ def slice_coco(
slice_image_result = slice_image(
image=image_path,
coco_annotation_list=coco_image.annotations,
output_file_name=Path(coco_image.file_name).stem,
output_file_name=f"{Path(coco_image.file_name).stem}_{idx}",
output_dir=output_dir,
slice_height=slice_height,
slice_width=slice_width,
Expand Down

0 comments on commit 4774f6a

Please sign in to comment.