<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss.xml.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>iammatthias — #quantified-self</title><description>Entries tagged quantified-self.</description><link>https://iammatthias.com/</link><language>en-us</language><item><title>Adventures in Machine Vision</title><link>https://iammatthias.com/posts/1780360240000-adventures-in-machine-vision/</link><guid isPermaLink="true">https://iammatthias.com/posts/1780360240000-adventures-in-machine-vision/</guid><description>A Nat Friedman anecdote about an AI watching him drink water sent me digging for a spare Raspberry Pi. Now a camera and a sensor HAT watch my desk, a self-inflicted panopticon that logs who walks by and what the room is doing.</description><pubDate>Tue, 02 Jun 2026 00:30:40 GMT</pubDate><content:encoded>&lt;p&gt;A Nat Friedman anecdote recently caught my eye:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://wsrv.nl/?url=https%3A%2F%2Fblobs.farfield.systems%2Fblobs%2Fbafkreihzqgr2igbs5ggops54ad7vb5bjy6zlwnsnltb6nvzcqfegqs5gs4&amp;amp;w=960&amp;amp;q=80&amp;amp;output=webp&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Most of it is fluff. Friedman, Daniel Gross, and the Collisons are positioned to consume AI at a level most of us only read about: all the toys, all the tokens, early access, and people on payroll to wire it together. A lot of what gets demoed from that vantage point is a postcard from a budget I don&amp;#39;t have. But the kernel of the idea is almost always cheap, you don&amp;#39;t need their resources to point some consumer hardware at yourself and see what falls out.&lt;/p&gt;
&lt;p&gt;Now I need to preface this by making it clear that blanketing your house with cameras and letting an AI watch you 24/7 sounds dystopian.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I want you to walk to the kitchen right now and drink a bottle of water, and I&amp;#39;m going to watch to make sure you do it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Maybe dystopian is the wrong word. This is self-inflicted panopticon horror.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s build our own.&lt;/p&gt;
&lt;h2&gt;The build&lt;/h2&gt;
&lt;p&gt;I had a spare Raspberry Pi Zero 2 W rattling around in a drawer, so I gave it a job. A 5MP Arducam (the OV5647, a native Pi sensor, so no driver wrangling) rides the camera ribbon, and a repurposed Waveshare Environment Sensor HAT sits on the GPIO header. The camera and the HAT use different connectors, so they coexist on one board on my desk.&lt;/p&gt;
&lt;p&gt;The pipeline is small. &lt;code&gt;picamera2&lt;/code&gt; pulls frames, a quantized TFLite SSD-MobileNet-v2 runs COCO object detection, and every confirmed sighting gets appended to a daily JSONL log. A read-only FastAPI service reads that log back out over my tailnet. The detector writes, the API reads, and they run as separate services so I can restart one without disturbing the other.&lt;/p&gt;
&lt;p&gt;The Zero 2 W is the bottleneck: quad A53, 512 MB, around 2 to 6 FPS for full COCO. That&amp;#39;s slow for video and plenty for &amp;quot;who or what just walked by.&amp;quot; It debounces per label, so it records presence over time instead of flooding the log every frame.&lt;/p&gt;
&lt;p&gt;It stores no video. Frames stay in memory unless I ask for them, and what lands on disk is metadata: one JSON object per detection with the label, confidence, and bounding box. There&amp;#39;s a live preview too, off by default and tailnet-only, plain MJPEG that renders into an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; and encodes on the Zero 2 W&amp;#39;s hardware block instead of the CPU.&lt;/p&gt;
&lt;p&gt;The HAT writes its own stream, polling temperature, humidity, pressure, and light every thirty seconds. The board heats itself, so the temperature reads high. A live reading of the SoC temperature feeds a thermal-divider model that subtracts the self-heating and pulls the number back toward the actual room.&lt;/p&gt;
&lt;p&gt;Right now it isn&amp;#39;t doing anything. It watches my desk and writes things down. But I have ideas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;track my water intake during the workday&lt;/li&gt;
&lt;li&gt;turn the lights on and off depending on whether I&amp;#39;m actually at my desk&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><media:content url="https://wsrv.nl/?url=https%3A%2F%2Fblobs.farfield.systems%2Fblobs%2Fbafkreihzqgr2igbs5ggops54ad7vb5bjy6zlwnsnltb6nvzcqfegqs5gs4&amp;w=960&amp;q=80&amp;output=webp" medium="image"/><category>Posts</category><category>computer-vision</category><category>edge-computing</category><category>raspberry-pi</category><category>hardware</category><category>machine-learning</category><category>side-projects</category><category>quantified-self</category></item></channel></rss>