API reference
API reference
Select your platform
No SDKs available
No versions available

IObjectDetectionTask Interface

Interface for object detection providers supporting both cloud (JSON) and on-device (binary) execution.

Member Functions

Performs object detection on an encoded image (JPEG/PNG).
Used by cloud providers (e.g., HuggingFace) that accept binary image uploads.
Parameters
imageJpgOrPng
Encoded image bytes in JPEG or PNG format.
ct
Cancellation token for aborting the operation.
Returns
JSON string containing detection results with boxes, scores, and labels.
Performs object detection directly on a GPU texture (fastest path).
Used by on-device providers (e.g., UnityInferenceEngine) to avoid CPU-GPU transfers.
Parameters
src
Source RenderTexture containing the image to analyze.
ct
Cancellation token for aborting the operation.
Returns
Binary-encoded detection results for efficient downstream processing.