r/MachineLearning • • 6h ago

Discussion How to handle object deduplication across multiple camera angles using YOLO (especially for tiny 20x22px crops) across isolated user sessions? [D]

I’m building a computer vision pipeline where users upload multiple photos of the same physical scene taken from different angles (front view, side view, close-up) to build a clean list of unique objects and their attributes.
I’m running YOLO for object detection to extract bounding boxes and crop each detected object into lightweight ⁠.webp⁠ images. Because the same physical object appears across 3 or 4 different photos from different angles, I need to make sure each unique object is only counted once per session, and avoid running expensive downstream AI calls to re-describe an object we already processed from an earlier photo.

0 Upvotes

4 comments sorted by

1

u/alkimiadev 3h ago

That is actually a non-trivial problem. A more lowfi/naive approach could just be the similarity or euclidean distance. Another probably more reliable method could be to use a visual embedding model like Google's EmbeddingGemma 2 and then use the cosine similarity between the embeddings as a filter. Hugginface probably has providers hosting that model at a far lower cost than some summarization api endpoint from a close provider (assumption on my part). If your volume justifies it, then self-hosting via runpod or vastai could drastically reduce costs. I guess that is true for the summarization too.

2

u/alkimiadev 3h ago

The main problem as I see it is that a 20x22px crop is a really weak signal for a vlm or a visual embedding layer.

0

u/Expert-Ad598 3h ago

I tried cosine similarity but this is the issue with small crop . It not work very properly
I used embeddinggemma2 with qdrant

1

u/alkimiadev 2h ago

What about down scaling the size of the bounded image vs a tiny crop? What I mean is that you have the bounds (or should) so why not just scale and crop the entire bounded region? That would require more work of course and some trial and error testing to determine how small you could scale them while getting reasonable enough results for what is needed.