ObjectDetector
Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:74
Properties
Section titled “Properties”inputSize
Section titled “inputSize”
readonlyinputSize:number
Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:78
Width and height of the model input in pixels.
labels
Section titled “labels”
readonlylabels: readonlystring[]
Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:76
The class names, by class index.
schemas
Section titled “schemas”
readonlyschemas:object
Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:82
Buffer layouts for encodeDetectObjects, at this runner’s size: the
model input, and the list with room for maxDetections objects. Pass
one to root.createBuffer to make a buffer of the right type and size.
readonlyinput:Yolo26Input
output
Section titled “output”
readonlyoutput: (maxDetections) =>ObjectDetectionList
Parameters
Section titled “Parameters”maxDetections
Section titled “maxDetections”number
Returns
Section titled “Returns”Methods
Section titled “Methods”detectObjects()
Section titled “detectObjects()”detectObjects(
image,options?):Promise<ObjectDetection[]>
Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:87
Image in, the objects in it out, best first.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<ObjectDetection[]>
dispose()
Section titled “dispose()”dispose():
void
Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:96
Frees the weights and every GPU buffer the runner holds.
Returns
Section titled “Returns”void
encodeDetectObjects()
Section titled “encodeDetectObjects()”encodeDetectObjects(
options):void
Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:94
Records a detection from GPU memory into GPU memory, with no CPU copy. A texture source is fitted like an ImageBuffer; a buffer source is the model input as-is. The target gets the list of objects, decoded on the GPU. Work submitted after it sees the result.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”void
Throws
Section titled “Throws”RunntimeError INVALID_ARGUMENT for a resource of the wrong
format, usage or size, or an option out of range.