Model Description
This model to extract classes:
- image
- news
- paragraph
- table
- text-box
Usage
Example Code
pip install ultralytics==8.0.196 supervision==0.21.0 opencv-python==4.8.0.76
from ultralytics import YOLO
import cv2
import supervision as sv
img = "sample.jpeg"
image = cv2.imread(img)
model = YOLO('news-segmentation/best.pt')
results = model(source=img, conf=0.2, iou=0.8)[0]
detections = sv.Detections.from_ultralytics(results)
bounding_box_annotator = sv.BoundingBoxAnnotator()
label_annotator = sv.LabelAnnotator()
annotated_image = bounding_box_annotator.annotate(
scene=image, detections=detections)
annotated_image = label_annotator.annotate(
scene=annotated_image, detections=detections)
sv.plot_image(annotated_image)
Example Output
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API:
The model has no library tag.