the errors I got:
Uncaught TypeError: Cannot read property ‘split’ of undefined (: line 57)
model is loaded
Error: Failed to execute ‘texImage2D’ on ‘WebGL2RenderingContext’: The image element contains cross-origin data, and may not be loaded.
my code:
let mobilenet;
let img;
function modelLoaded(){
console.log(‘model is loaded’);
mobilenet.predict(img,gotresult);
}
function gotresult(error,result){
if(error){
console.error(error)
}else{
console.log(result);
}
}
function setup() {
createCanvas(400, 400);
img=createImg(‘birds/bird.png’);
mobilenet=ml5.imageClassifier(‘MobileNet’,modelLoaded)
}
function draw() {
background(220);
}
please tell me how do I work it out .