microsoft / onnxjs

ONNX.js: run ONNX models using JavaScript
Other
1.76k stars 129 forks source link

Question on load image function in load image.py #238

Closed JonathanSum closed 3 years ago

JonathanSum commented 4 years ago

loadImageCb(url, cb) { loadImage( url, img => { if (img.type === 'error') { throw Could not load image: ${url}; } else { // load image data onto input canvas this.ctx.drawImage(img, 0, 0) //console.log(image was loaded); window.setTimeout(() => { cb(); }, 0); } },

Where is the loadImage come from?

28Smiles commented 3 years ago

Its provided by ndarray