Treffer: SAHI: A lightweight vision library for performing large scale object detection and instance segmentation

Title:
SAHI: A lightweight vision library for performing large scale object detection and instance segmentation
Publisher Information:
Zenodo
Publication Year:
2021
Collection:
Zenodo
Document Type:
E-Ressource software
Language:
English
DOI:
10.5281/zenodo.5718950
Rights:
Creative Commons Attribution 4.0 International ; cc-by-4.0 ; https://creativecommons.org/licenses/by/4.0/legalcode
Accession Number:
edsbas.B5FBD19F
Database:
BASE

Weitere Informationen

SAHI: Slicing Aided Hyper Inference A lightweight vision library for performing large scale object detection & instance segmentation Overview Object detection and instance segmentation are by far the most important fields of applications in Computer Vision. However, detection of small objects and inference on large images are still major issues in practical usage. Here comes the SAHI to help developers overcome these real-world problems with many vision utilities. Command Description predict perform sliced/standard prediction using any yolov5/mmdet model predict-fiftyone perform sliced/standard prediction using any yolov5/mmdet model and explore results in fiftyone app coco slice automatically slice COCO annotation and image files coco fiftyone explore multiple prediction results on your COCO dataset with fiftyone ui ordered by number of misdetections coco evaluate evaluate classwise COCO AP and AR for given predictions and ground truth coco analyse calcualate and export many detection and segmentation error margin plots coco yolov5 automatically convert any COCO dataset to yolov5 format Getting Started Blogpost Check the official SAHI blog post. Installation Install sahi using pip: pip install sahi On Windows, Shapely needs to be installed via Conda: conda install -c conda-forge shapely Install your desired version of pytorch and torchvision: pip install torch torchvision Install your desired detection framework (such as mmdet or yolov5): pip install mmdet mmcv pip install yolov5 Usage From Python: Sliced inference: result = get_sliced_prediction( image, detection_model, slice_height = 256, slice_width = 256, overlap_height_ratio = 0.2, overlap_width_ratio = 0.2 ) Check YOLOv5 + SAHI demo: Check MMDetection + SAHI demo: Slice an image: from sahi.slicing import slice_image slice_image_result = slice_image( image=image_path, output_file_name=output_file_name, output_dir=output_dir, slice_height=256, slice_width=256, overlap_height_ratio=0.2, overlap_width_ratio=0.2, ) Slice a coco formatted dataset: from ...