Automatic feeding system based on cat face recognition using P-HOG feature extraction and K-Nearest Neighbor classification โ personalizing diet for each cat by age and nutritional needs.
The 2021 Javanese Script Congress wasn't the only problem Marchel was solving.
At home, 7 cats of different ages needed different food portions โ but manual feeding was inconsistent.
This project builds an automatic cat feeder that identifies
each cat by face using Pyramid HOG (P-HOG) feature extraction
and classifies them with K-Nearest Neighbor (KNN),
then dispenses the correct portion based on each cat's age-specific dietary requirements.
Dataset of 86 images across
7 cats โ photographed by Marchel himself
using iPad 9th Generation (12MP, 3264ร2448px).
Standard HOG computes gradient magnitudes and orientations in a 3ร3 pixel block. P-HOG extends this by building a pyramid of scales โ the same face is analyzed at 4 different resolutions.
Gx = I(r,c+1) โ I(r,cโ1)โ(Gxยฒ + Gyยฒ)|tanโปยน(Gy/Gx)|| K Value | Type | Accuracy | Bar |
|---|---|---|---|
| K = 1 | Odd | 95% | |
| K = 2 | Even | 80% | |
| K = 3 | Odd | 85% | |
| K = 4 | Even | 75% | |
| K = 5 | Odd | 85% | |
| K = 7 | Odd | 80% | |
| K = 9 | Odd | 80% |
The P-HOG + KNN system demonstrates a viable solution for
personalized, automated cat feeding.
By recognizing each cat individually, it eliminates manual inconsistency
and provides age-appropriate nutrition with
95% identification accuracy at K=1.
Future work: real-time video stream integration ยท servo motor dispenser ยท
mobile app dashboard ยท expanded multi-cat household dataset