Skip to content

v0.3.15

Compare
Choose a tag to compare
@fcakyon fcakyon released this 07 May 19:44
· 443 commits to main since this release
c8509b4
  • add get_area_filtered_coco method to Coco class (#75):
from sahi.utils.coco import Coco
from sahi.utils.file import save_json

# init Coco objects by specifying coco dataset paths and image folder directories
coco = Coco.from_coco_dict_or_path("coco.json")

# filter out images that contain annotations with smaller area than 50
area_filtered_coco = coco.get_area_filtered_coco(min=50)

# filter out images that contain annotations with smaller area than 50 and larger area than 10000
area_filtered_coco = coco.get_area_filtered_coco(min=50, max=10000)

# export filtered COCO dataset
save_json(area_filtered_coco.json, "area_filtered_coco.json")
  • faster yolov5 conversion with mp argument (#80):
# multiprocess support
if __name__ == __main__:
  coco = Coco.from_coco_dict_or_path(
    "coco.json",
    image_dir="coco_images/"
    mp=True
  )
  coco.export_as_yolov5(
    output_dir="output/folder/dir",
    train_split_rate=0.85,
    mp=True
  )
  • update torch and mmdet versions in workflows (#79)
  • remove optional dependencies from conda (#78)