MCPcopy
hub / github.com/tensorflow/tfjs / loadImage

Function loadImage

e2e/benchmarks/model_config.js:551–562  ·  view source on GitHub ↗
(imagePath)

Source from the content-addressed store, hash-verified

549const imageBucket =
550 'https://storage.googleapis.com/tfjs-models/assets/posenet/';
551async function loadImage(imagePath) {
552 const image = new Image();
553 const promise = new Promise((resolve, reject) => {
554 image.crossOrigin = '';
555 image.onload = () => {
556 resolve(image);
557 };
558 });
559
560 image.src = `${imageBucket}${imagePath}`;
561 return promise;
562}
563
564function findIOHandler(path, loadOptions = {}) {
565 let handler;

Callers 1

model_config.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…