CocoSsd加载功能未在基于Node.js电子的应用程序上从Google加载API
const unfetch = require('unfetch');
const fetch = window.fetch.bind(window);
const cocoSsd= require('@tensorflow-models/coco-ssd');
const tfnode= require('@tensorflow/tfjs-node');
const tf = require('@tensorflow/tfjs');
async function loadModel(){
const model = await cocoSsd.load();
const predictions = await model.detect(img);
console.log('Predictions: ');
console.log(predictions);
}
path =“ https://storage.googleapis.com/tfjs-models/savedmodel/ssd_mobilenet_v1/model.json”,requestInits = {}
TypeError:无法在“ Window”上执行“ fetch”:非法调用