MCPcopy Create free account
hub / github.com/tensorflow/tfjs / preprocess

Method preprocess

tfjs-automl/src/object_detection.ts:100–102  ·  view source on GitHub ↗
(input: ImageInput, options: ObjectDetectionOptions)

Source from the content-addressed store, hash-verified

98 }
99
100 private preprocess(input: ImageInput, options: ObjectDetectionOptions) {
101 return cast(expandDims(imageToTensor(input)), 'float32');
102 }
103}
104
105export async function loadObjectDetection(modelUrl: string):

Callers 1

detectMethod · 0.95

Calls 3

imageToTensorFunction · 0.90
castFunction · 0.50
expandDimsFunction · 0.50

Tested by

no test coverage detected