Python library 1.3.1 version
This Python library simplifies SAHI-like inference for instance segmentation tasks, enabling the detection of small objects in images. It caters to both object detection and instance segmentation tasks, supporting a wide range of Ultralytics models.
The library also provides a sleek customization of the visualization of the inference results for all models, both in the standard approach (direct network run) and the unique patch-based variant.
Model Support: The library offers support for multiple ultralytics deep learning models, such as YOLOv8, YOLOv8-seg, YOLOv9, YOLOv9-seg, FastSAM, and RTDETR. Users can select from pre-trained options or utilize custom-trained models to best meet their task requirements.
pip install patched-yolo-infer==1.3.1
🚀MAIN UPDATES:
The key advancements in this version are centered around the enhanced visualization capabilities for neural network inference results. Now you can implement a color selection not only for boxes and masks, but also a color selection of the class text field. An example is shown below:
visualize_results_usual_yolo_inference(
img,
model,
conf=0.15,
iou=0.7,
segment=True,
show_classes_list=[0, 1, 2, 7],
list_of_class_colors=[(0,0,255),(0,255,0),(0,0,0),_,_,_,_,(255,0,0)],
color_class_background=[(0,0,255),(0,255,0),(0,0,0),_,_,_,_,(255,0,0)],
thickness=3,
font_scale=0.65,
show_class=True,
show_boxes=False,
)