
Catcierge: Image recognition and RFID chip reader for automated cat door - sebg
https://joakimsoderberg.github.io/catcierge/
======
_yy
Wow... awesome project. That guy is living the dream...

[https://github.com/JoakimSoderberg/catcierge](https://github.com/JoakimSoderberg/catcierge)

That cat house has better documentation, unit tests and code coverage than
many commercial projects I've worked on.

~~~
joakimsoderberg
Yes I'm living the dream of 90% test coverage! ... Well I used this project as
an excuse to write testable C code, so that's why.

------
phkahler
Nice, I bought a pi to make a "cat on the kitchen table" alarm to handle a
common problem. Have not had time to complete it, but the concept is: find the
pixels that compose the kitchen table-top and get the convex hull of those.
Next identify pixels that are "cat color" and are inside that hull. In the
case of my cat, "cat color" is several colors and stray matches can be
rejected if they are not near different colors in the collection - false
positives are bad, as we don't want to turn it off during dinner and people
have different clothes all the time.

Another challenge is scaring the cat out of the christmas tree. This will be
coming up soon so I may have to finish this thing after all. Training the cat
to stay off the table has gone well, since we keep interesting stuff off it
when we're not there. The tree however is full of interesting stuff.

EDIT: to clarify, I never completed the table project, in part because it's
not a problem any more.

------
ck2
I swear I've seen a similar project like a decade ago, somewhere.

I have an easier solution - weigh the cat on a pressure pad just before the
flap - allow for variances of a few ounces but not much more.

But the cat door is also a safety thing for my cats when they are feeling
unsafe or being chased - I wouldn't want them to have to wait to get inside.

ps. cats bring you dead things as food because they think you are too feable
to hunt and triggering a nursing instinct

~~~
ryan-c
> I swear I've seen a similar project like a decade ago, somewhere.

Probably "Flo Control"[0]. There was a system to get a silhouette of the cat's
head to identify whether it was carrying anything.

0\.
[https://web.archive.org/web/20081014091109/http://www.quantu...](https://web.archive.org/web/20081014091109/http://www.quantumpicture.com/Flo_Control/flo_control.htm)

~~~
allencoin
The author of the original article references Flo Control and uses it in his
implementation.

~~~
joakimsoderberg
To be specific. I only took the general idea from that project. That is, to
match the cat head against a lit background to make it easy to get a good
profile image.

None of the implementation has anything to do with that project however.

------
AUmrysh
Awesome. I've been wanting to use the RFID pet id tags for a feeder that would
block out other pets and only allow a certain amount of food (by mass) to be
eaten by a specific animal. I'll be going over how they implemented it and see
if I can use any of it. Thanks for this post :)

~~~
joakimsoderberg
As I mention in the project I bought one of these:
[http://www.priority1design.com.au/shopfront/index.php?main_p...](http://www.priority1design.com.au/shopfront/index.php?main_page=product_info&cPath=1&products_id=23)

Turns out the antenna that comes with it is way too small for anything other
than manually brushing it against the cats neck knowing exactly where the chip
is.

However I got some mails from another guy that built a cat feeder thingie. He
ended up doing his own, much bigger antenna so that the cats head fit through
it (he made a structure in cardboard wrapping the coil around that).

Anyway, he had some contact with the company, and they recommend using the
RS232 version instead of the USB one for such applications... They had some
better spec in some way.

EDIT: I looked up the mail, and to summarize he used 0.6mm enamled copper wire
and a 120mm computer fan (minus the fan in the middle, that he wrapped the
coil around. The reader then outputs the MOF value so you can know what
frequency you're getting.

I've bought some copper wire myself and I'm planning to make a better antenna
myself, but haven't yet.

------
drdaeman
Awesome project. Wonder if author would eventually replace mock prey images
with real camera shots with positive detections :)

But I wonder... is it common to let a cat walk freely outside, unsupervised?
In my perception, author's either putting his pet to danger, has a good
fencing or must be living in awesomely nice neighborhood.

~~~
joakimsoderberg
It's common I'd say. And I live in a small village with lots of room.

Here are some real images (including hard cases):
[https://github.com/JoakimSoderberg/catcierge-
examples/tree/m...](https://github.com/JoakimSoderberg/catcierge-
examples/tree/master/example)

I got lots more, just haven't uploaded them

------
comrh
I wonder if that corridor is going to fill up with dead birds soon.

~~~
joakimsoderberg
Author of the project. Yes this happened, not with birds but with dead mice...
And I did not realise it until like a week or so, not a pleasant cleaning
operation.

~~~
pm24601
I am waiting for Higgs to get smart:

1\. Drop the prey in front of door.

2\. Door detects no prey.

3\. Door opens.

4\. Higgs props door open.

5\. Higgs retrieve prey FTW!

~~~
joakimsoderberg
Yup she's done exactly that at times, not the "prop door open", but she
dropped the prey right in front of the door, went away for a while, came back,
picked up the prey and went inside... But I wouldn't say it was because of
detailed scheming on her part, but luck rather :)

Another thing she has done is to learn to back out of the corridor as the door
locks, and then wait a while, and try going back in all while having the prey
in her mouth.

EDIT: So all small things like that has led me to tweak the algorithms, and
add some extra settings to be tweaked. I mean the backing out move she did
several times like 6 times in a row... Some of those times she managed to get
in.

So to remedy that I added some settings for extra timeouts so she cannot try
again as quickly and so on :)

