Screen Shot 2024-10-31 at 10.03.20 AM.png

https://editor.p5js.org/YuhongSun/sketches/eY8TudBRz

Screen Shot 2024-10-31 at 12.13.31 PM.png

I found a facial emotion image detector in Transformer. js. I want users to be able to interact with it, so I changed it to video, but it seems that this cannot handle continuous videos. I change run the video by capturing a frame. Although I have been experiencing errors all along, I am still able to obtain this result.

Screen Shot 2024-10-31 at 10.04.36 AM.png

I think transformer.js is more complex than ML5. And each model contains more specialized content, which many beginners cannot understand how to apply. The use of transformer.js in p5js is somewhat different from the code it provides and cannot be directly used. There are many examples of p5js in ml5.