DEV Community

Francesco Tisiot
Francesco Tisiot

Posted on

3

Machine Learning challenge: Chihuahua vs Muffin with PostgreSQL and pgvector

Is it a Muffin or a Chihuahua?

I tried to solve the famous meme using #PostgreSQL pgvector extension. The results are really impressive!

Do you want to try? I created a Python notebook that can give you a jump start, check it out at https://go.aiven.io/muffin-vs-chihuahua

You can find the training dataset at https://www.kaggle.com/datasets/samuelcortinhas/muffin-vs-chihuahua-image-classification

You can find a managed PostgreSQL for free at https://go.aiven.io/francesco-signup

Top comments (1)

Collapse
 
waled_khalex_ab923398f307 profile image
Waled Khalex

The Chihuahua vs Muffin machine learning challenge is a fun yet intricate test of image recognition models, often requiring advanced tools to differentiate between lookalike items like cute Chihuahuas and muffins. Using PostgreSQL with the pgvector extension, you can store and query high-dimensional vectors, such as image embeddings generated by a pre-trained model, to improve classification accuracy. By indexing these embeddings and performing similarity searches, your application can efficiently identify patterns and make accurate predictions. For example, just as you might use a database to track the mcdonalds muffin cost, pgvector helps track vector similarities, making it easier to separate canine from confection!

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay