Vision Events
Record, query, and manage time-series vision events from your computer vision deployments using the Python SDK.
Quick Start
import roboflow
roboflow.login()
rf = roboflow.Roboflow()
ws = rf.workspace()
# Create a use case
result = ws.create_vision_event_use_case("manufacturing-qa")
use_case_id = result["id"]
# Upload an image
img = ws.upload_vision_event_image("photo.jpg")
# Create an event with the uploaded image
ws.write_vision_event({
"eventId": "c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f",
"eventType": "quality_check",
"useCaseId": use_case_id,
"timestamp": "2024-01-15T10:30:00Z",
"images": [{"sourceId": img["sourceId"]}],
"eventData": {"result": "pass"},
})
# Query events
for page in ws.query_all_vision_events(use_case_id):
for evt in page:
print(evt["eventId"], evt["eventType"])Available Methods
Method
Description
Last updated
Was this helpful?