yolo-helpers
Version:
Helper functions to use models converted from YOLO in browser and Node.js
25 lines (24 loc) • 840 B
TypeScript
import * as tf from '@tensorflow/tfjs-node';
export declare function loadYoloModel(
/**
* Can be with or without `/model.json`.
*
* Examples:
* - "./saved_model/yolo11n-pose_web_model/model.json"
* - "./saved_model/yolo11n-pose_web_model"
* - "file://path/to/model.json"
* - "http://localhost:8100/saved_models/yolo11n-pose_web_model"
* - "https://domain.net/saved_models/yolo11n-pose_web_model/model.json"
* */
modelPath: string): Promise<import("./common").ModelWithMetadata<tf.GraphModel<string | import("@tensorflow/tfjs-core/dist/io/types").IOHandler>>>;
export type ImageInput = {
/** path to image file */
file: string;
} | {
/**
* input shape: [height, width, channels] or [batch, height, width, channels]
*
* the pixel values should be in the range of [0, 255]
*/
tensor: tf.Tensor;
};