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

Example

Example

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support