For this week’s assignment, I thought I could try combining 2 models… object detection and sentiment analysis.

Users can upload an image via the file input element. After some processing, the image appears on the canvas, where object detection labels each identifies object. Sentiment analysis then assesses these labels, coloring each bounding box based on its positive or negative sentiment.

Link to sketch: https://editor.p5js.org/khz2004/sketches/PBwwTv1mj

Screenshot 2024-10-30 at 9.41.13 PM.png

Screenshot 2024-10-30 at 10.28.15 PM.png

I tried using different models but they gave the exact same results? Not sure if I did this correctly or if this is expected..

Screenshot 2024-10-30 at 10.27.28 PM.png

model: "facebook/detr-resnet-50"

Screenshot 2024-10-30 at 11.15.49 PM.png

model: "Xenova/detr-resnet-50"

you-can-find-waldo-on-google-earth-photo-u1.jpg

Screenshot 2024-10-30 at 11.08.15 PM.png

I also tried playing around with cartoon/clip art/animated images which didn’t detect that well.

Compare and Contrast: Transformers.js vs ml5.js.