Drag and drop images to canvas p5.js in classification program

I made a [program] (p5.js Web Editor) where I used Image classification using MobileNet and p5.js in p5,js editor. Sometimes I have to drop my images twice for them to show up on the canvas. The classification works directly even if the images do not show…
Can someone see what error I have made?

1 Like

I solved it! :smile: I moved the drawing of the image to the gotResults function. The working sketch: p5.js Web Editor