roboflow / roboflow-python

The official Roboflow Python package. Manage your datasets, models, and deployments. Roboflow has everything you need to build a computer vision application.
https://docs.roboflow.com/python
Apache License 2.0
272 stars 71 forks source link

Add support for classification and keypoint video processing #247

Closed capjamesg closed 4 months ago

capjamesg commented 4 months ago

Description

This PR adds support for classification video processing with the Roboflow Video Inference API. It also introduces a new KeypointDetectionModel class that can be used for video processing.

Type of change

How has this change been tested, please provide a testcase or example of how you tested the change?

from roboflow import Roboflow

rf = Roboflow(api_key="API_KEY")
project = rf.workspace().project("juice-box-quality-assurance")
model = project.version("1").model

job_id, signed_url, expire_time = model.predict_video(
    "raccoon.mp4",
    fps=5,
    prediction_type="batch-video",
)

results = model.poll_until_video_results(job_id)

print(results)

Where the project is either a keypoint or a classification model.

Any specific deployment considerations

N/A

Docs

N/A