The last months I have been working on an app that is like Pokemon GO but for real dogs: a person takes a photo of a dog, the app recognizes the breed and adds it to a dog collection, you can get achievements and participate on seasonal challenges, among other fun stuff. The app's name is Todogs and it's available on Android and iOS
This is how the app looks:
A big challenge was to make the app work in real time, with no delays, and without needing internet connection to perform the recognition, so for that I needed to train my own Machine Learning model, for what I used Tensorflow (And TFLite to run it), I trained a model with 117 breeds and worked like a charm!.
Now, in order to train an image model like this you need a big enough dataset for the model accuracy to be good enough for a product, I found some images repositories that I used, needing around 150 images for each one of the 117 breeds. The thing is, even in these repositories there are some mistakes, some breeds with wrong tags, some images are too dark, or multiple dogs show in them, etc.
Also, now that I want the model to include more breeds and improve itself, I have to search on the internet for more dog images (The more data the better).
The problem is the manual process is exhausting, these are the steps:
Also, another thing I want to do is use the same photos generated on the app as new data to re-train the model, but there are lots of low-precision and not adequate photos, applying the process above is just unsustainable, I'd need a full time person for that.
Enter Google All Things Agentic Hackathon
I got a link to this Hackathon from a friend, the hackathon is about learning to create AI agents with the Google services and platforms (Cloud Run, Antigravity SDK, VertexAI, Gemini, etc) and create a project using those tools so solve a problem you have. Right away came to my mind "Wait, I could create an agent for my problem!", so I started digging on it and started building a solution that is going to save me a lot of headaches.
I wrote this article as part of my submission to the All Things Agentic Hackathon.
The project I started was an AI agent to do the whole process described above in minutes instead of weeks, it works like this: I open the agent, write "Give me 100 Husky images" and it goes to a repository with photos of many dogs, then it picks Husky and goes image by image. Then it starts throwing images away. First the cheap checks in Python: anything too small, anything that won't even open, and near-duplicates caught with perceptual hashing (so the same photo at two sizes gets spotted, not just byte-identical files). Then the expensive one: Gemini looks at every surviving image and answers the questions I used to answer by hand. Is there actually a dog? Is it the breed I asked for? Is there only one? Is it sharp enough? And the weird one: does it look like a photo a phone would take, or like a studio shot? Studio photos are beautiful and useless to me, because my users are outside with bad lighting and a dog that won't sit still.
The part I'm most proud of is that the agent refuses to guess. If I ask for a breed that isn't in the corpus, it stops and tells me instead of handing me the closest thing it found. If a request is genuinely ambiguous, it asks me which one I meant instead of picking. That sounds like a small thing, but a wrong breed match poisons a training set silently — nothing downstream ever catches it, the model just gets a little worse and you find out months later. At the end it saves the good photos on my Google Drive.
With this project I achieved several things:
Stack used:
Challenges:
What's next:
So it seems a Hackathon I didn't know some weeks ago helped me to solve one of my biggest challenges.