PawMatch
A lost pet can be a very stressful experience. You can post about it online, ask people nearby, and keep checking different places, but finding the right sighting can still feel like looking for a needle in a haystack.
That is what inspired us to build PawMatch.
The Inspiration
We wanted to make it easier for people to find lost pets using something they already have — a photo.
With PawMatch, a person can upload a photo of a lost or spotted pet and create a report. The system then looks for similar pets in other reports and also helps users search for reports nearby.
The idea was simple: make it easier to connect the right people at the right time.
How We Built It
We built PawMatch as a web app using Next.js and TypeScript, with a separate Python service for the image matching part.
For image matching, we used a ResNet-50 model and trained it using triplet loss. The model learns to bring photos of the same pet closer together and push photos of different pets further apart.
For every image, the model creates a 256-number representation of the pet's visual features. We store these representations in PostgreSQL using pgvector, which lets us quickly search for similar images.
We also did not want to rely only on how similar two photos look. A report that looks similar but is hundreds of kilometers away may not be very useful.
So our matching score also considers:
- Visual similarity: 70%
- Location: 25%
- Time: 5%
Along with photo matching, we built a Nearby Search feature where users can choose a radius and see relevant reports on a map.
What We Learned
The biggest thing we learned was that building a machine learning model is only one part of the problem.
We had to connect the model to a real application, send images from the web app to the Python service, store the results, search them efficiently, and turn everything into something a normal user can understand.
We also learned that context matters. A good match is not only about how similar two pets look. Where and when they were seen can make a big difference.
Challenges We Faced
One challenge was dealing with different photos of the same pet. A pet can look very different in photos because of lighting, camera angle, background, or distance.
Another challenge was combining different types of information into one useful match score. We had to balance the photo similarity with location and time so that the results stayed practical.
We also had to make the map easy to use when many reports were close together. We solved this using marker clustering so that the map does not become crowded.
What We Hope PawMatch Can Do
We built PawMatch with one simple goal: help make the search for a lost pet a little less overwhelming.
A single photo, a nearby sighting, or a report from a stranger might seem small on its own. But when those pieces of information are connected, they can become a real lead.
And hopefully, that lead ends with a pet going home.
Built With
- computer-vision
- css
- deep-learning
- embeddings
- fastapi
- gps
- image
- leaflet.js
- machine-learning
- next.js
- pgvector
- postgresql
- prisma
- python
- pytorch
- react
- resnet-50
- supabase
- tailwind
- transfer-learning
- triplet-loss
- typescript
Log in or sign up for Devpost to join the conversation.