Live data from Hacker News

How we used GPT-4o for image detection with 350 similar illustrations

olup-blog.pages.dev

71–80 of 93 posts

Re: How we used GPT-4o for image detection with 350 similar illustrations

#71
post #68

A completely different approach that don't require heavy AI would be an app on the user phone that does this: 1. Measure the distance from the wall (standard image processing) 2. Use the rotations of the gyro sensors on the phone to conclude which car is being looked at I wonder if this could be as accurate though

You could definitely cheat a little with something like this or geofences, but that requires the photos stay in the same place or the museum updates whenever they move.

Re: How we used GPT-4o for image detection with 350 similar illustrations

#72
post #48

This has been my experience. Foundation models have completely changed the game of ML. Previously, companies might have needed to hire ML engineers familiar with ML training, architectures etc to get mediocre results. Now companies can just hire a regular software engineer familiar with foundation model API’s to get excellent results. In some ways it is sad, but in other ways the result you get is so much better than…

> The only way this trend reverses, is if compute becomes so cheap and ubiquitous, that everyone can achieve the necessary scale. We would still need the 100 M+ images with accurate labels. That work can be performed collectively and open sourced but it must be maintained etc. I don't think it will be easy.

The other way it can reverse is discovering better methods to train models, or fine-tune existing ones with LoRA or whatever.

How did Chinese companies do it, is it a fabricated claim? https://slashdot.org/story/24/12/27/0420235/chinese-firm-tra...

Re: How we used GPT-4o for image detection with 350 similar illustrations

#73

This has been my experience. Foundation models have completely changed the game of ML. Previously, companies might have needed to hire ML engineers familiar with ML training, architectures etc to get mediocre results. Now companies can just hire a regular software engineer familiar with foundation model API’s to get excellent results. In some ways it is sad, but in other ways the result you get is so much better than…

Things like DINO, GroundingDINO, SAM (and whatever the latest versions of those are) are incredible. I think the progress in this field has been overlooked given LLMs, they're less end-user friendly but they're so good compared to what I remember working with.

I was able to turn around a segmentation and classifier demo in almost no time because they gave me fast and quick segmentation from a text description and then I trained a YOLO model on the results.

Re: How we used GPT-4o for image detection with 350 similar illustrations

#74
post #69

Earlier quoted context omitted.

Put each painting in an artsy frame whose edges are each different, colorful pattern. When the user photographs the painting, they’ll include all (or even most) of the frame, and distinguishing the frames is easy.

> artsy frame Embedding a QR code or simply a barcode somewhere and you're done. Maybe hide it like a watermark so it does not show to the naked eye and doing some Fourier transform in the app won't require a network connection nor lot of processing power.

the article does mention that the client rejected a similar approach. steganography seems like a bad choice for a museum setting where you don't own the images.

Re: How we used GPT-4o for image detection with 350 similar illustrations

#75

Alternative solution that would require less heavy lifting of ML but a little more upfront programming: It sounds like the cars are arranged in a grid on the wall. Maybe it would be possible to narrow down which car the user took a photo of by looking at the photos of the surrounding cars as well, and hardcoding into the system the position of each car relative to one another? Could potentially do that locally very q…

Put each painting in an artsy frame whose edges are each different, colorful pattern. When the user photographs the painting, they’ll include all (or even most) of the frame, and distinguishing the frames is easy.

This seems the way to go… its only 350 images

Re: How we used GPT-4o for image detection with 350 similar illustrations

#76

Side question: is there any good model that allows for image similarity detection across a large image set, that can be incrementally augmented with new images? You'd somehow have to generate an embedding for each image, I presume.

Yes, you could implement image similarity search using embeddings: Create embeddings for the entire image set, save the embeddings in a database, and add embeddings incrementally as new images come in. To search for a similar image, create the embedding for the image that you are looking for and compute the cosine similarity between that embedding and the embeddings in your database. The closer the cosine similarity is to 1.0 the more similar the images.

For choosing a model, the article mentions the AWS Titan multimodal model, but you’d have to pay for API access to create the embeddings. Alternatively, self-hosting the CLIP model [0] to create embeddings would avoid API costs.

Follow-up question: Would the embeddings from the llama3.2-vision models be of higher quality (contain more information) than the original CLIP model?

The llama vision models use CLIP under the hood, but they add a projection head to align with the text model and the CLIP weights are mutated during alignment training, so I assume the llama vision embeddings would be of higher quality, but I don’t know for sure. Does anybody know?

(I would love to test this quality myself but Ollama does not yet support creating image embeddings from the llama vision models - a feature request with several upvotes has been opened [1].)

[0] https://github.com/openai/CLIP

[1] https://github.com/ollama/ollama/issues/5304

Re: How we used GPT-4o for image detection with 350 similar illustrations

#77

Side question: is there any good model that allows for image similarity detection across a large image set, that can be incrementally augmented with new images? You'd somehow have to generate an embedding for each image, I presume.

Yes, you could implement image similarity search using embeddings: Create embeddings for the entire image set, save the embeddings in a database, and add embeddings incrementally as new images come in. To search for a similar image, create the embedding for the image that you are looking for and compute the cosine similarity between that embedding and the embeddings in your database. The closer the cosine similarity…

So, there is a whole world with vision based RAG/search.

We have a good open-source repo here with a ColPali implementation: https://github.com/tjmlabs/ColiVara

Re: How we used GPT-4o for image detection with 350 similar illustrations

#78
post #56

I mean, cool tech, but why not just print a QR code next to each illustration?

Poster here. We would have loved that, and it was one of our first proposal - a QR code or some kind of marker. However, the client is understandably very controlling on the aesthetics of their wall as a central element of their scenography. We would have pushed for it again in the last resort, but would probably have lost the contract.

This is completely offtopic, but I would bet it was a government-funded museum. A reasonable institution would have worked with you to find an acceptable compromise, something much easier to implement with a small sacrifice of aesthetics.

Anyway, great work, and thank you for taking the time to share it!

Re: How we used GPT-4o for image detection with 350 similar illustrations

#79

Earlier quoted context omitted.

This feels like one of those “NASA spent millions developing a space pen, Russians took a pencil” moments.

... which ignores the hazards of pencil shavings in a zero-g environment, especially the graphite, a good electrical conductor.

and that NASA did not spend millions on this. https://www.reuters.com/article/fact-check/nasa-did-not-spen...
Post reply on HN