# Nose ID: I Taught an AI to Recognize Dogs by Their Nose-Print

> Source: <https://dev.to/rimshashehzadi98/nose-id-i-taught-an-ai-to-recognize-dogs-by-their-nose-print-l44>
> Published: 2026-08-17 06:54:15+00:00

**Nose ID** — a biometric dog identification system. Instead of a collar

tag, chip scanner, or manual lookup, it identifies a dog the way security

systems identify people: from a unique physical trait. In this case, the

dog's nose-print — the ridge and texture pattern on a dog's nose, which is

as individual to each dog as a fingerprint is to a human.

Scan a dog's nose → the system tells you who it is (with a spoken voice

response) or offers to enroll it if it's new.

**1. Embedding extraction (the core ML piece)**

Rather than training a nose-print classifier from scratch, I used a

**pretrained MobileNetV2** (ImageNet weights) as a feature extractor,

stripping its classification head and using the penultimate layer's

pooled output as a 1280-dimensional embedding vector. This is a standard

transfer-learning technique — mid-level CNN filters trained on general

images still respond well to texture, edges, and ridge patterns, which is

exactly what distinguishes one nose-print from another.

**2. Matching**

Each enrolled dog's embedding is L2-normalized and stored. A new scan's

embedding is compared against all stored ones using **cosine similarity**.

A similarity above a tuned threshold (0.90) counts as a match.

**3. AI-generated personality**

On enrollment, **Google Gemini** generates a short, fun bio for each dog

from its name and breed.

**4. Voice confirmation**

On identification, **ElevenLabs** turns the result into a spoken response

— "Welcome back, Bella. Access granted." or "I don't recognize this nose.

Would you like to enroll?"

Both Gemini and ElevenLabs changed parts of their APIs the same week I

built this:

`generateContent`

endpoint to their new `/v1/voices`

to find one my account could actually use.This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [ typescript-eslint](https://typescript-eslint.io) in your project.
