Inspiration
A firefighter searching a burning house can be one wall away from the person they're looking for and have no idea. Smoke and closed doors make it worse. The case we kept coming back to was a firefighter going down inside, because then their own crew has to find them fast, usually without being able to see them.
We had two phones and a Raspberry Pi, and we wanted to know how far we could get by letting each camera share what it sees with everyone else.
What it does
Each phone runs pose detection in Safari and sends the people it sees to a Raspberry Pi 5 running QNX. The Pi puts all of those detections into one map of the room and draws a HUD on top of the wearer's camera feed.
If the wearer's phone can see a person, the HUD draws a cyan box around them with their distance. If only the second phone can see them, say because there's a wall in the way, the HUD draws their skeleton in green at the spot behind the wall where they're standing, with a label like "Behind wall, 4.7 m, seen by R2". When someone is lying down, their label turns magenta and pulses, whether they're in view or behind the wall. A small floor plan in the corner has both phones, the walls and everyone the system has found.
To be clear about the x-ray part: the HUD can only show someone if one of the phones has a line of sight to them. Firewatch takes the second phone's view and draws it in the right place in yours.
How we built it
The phone side is one web page. It runs MediaPipe's pose model in the browser, works out the direction to each person from the camera's focal length, and estimates their distance from how tall they look, with a button that calibrates this against someone standing 2 m away. We pack the 17 skeleton points into integers so that a room with several people in it still fits in a single UDP datagram. iOS only allows camera access over HTTPS, so the Pi serves the page with a self-signed certificate and the phones talk to it over secure WebSockets.
On the Pi, a small Python relay passes detections to the fusion process over UDP and video to the display over TCP. Fusion is written in C. It converts each detection into room coordinates using the phone's known position, tracks people from frame to frame, smooths each joint with a One Euro filter, works out whether someone is standing, crouching or down, and hands a person from one phone's track to the other's when they walk between views. The display is also C. It projects every track into the wearer's camera and uses the wall positions to decide whether a person is in view or hidden. We wrote our own drawing code for it, with alpha blending, anti-aliased dashed lines, hatching and TrueType text through stb_truetype. A supervisor process restarts anything that crashes while the HUD keeps running.
There are two of us. Daniel did the phone page, the relay and the design, and Felix did the QNX side. On the first night we wrote down the interface between the two halves, down to every message field and port, so we could build in parallel. We kept a shared repo of notes for decisions and handoffs, partly for each other and partly for the AI coding agents we used (Claude Code and Cursor), which were often working on separate branches at the same time. Our rule was that a feature wasn't done until it worked on the Pi with the real phones.
Challenges we ran into
At first the wearer could walk around and found its own position from an ArUco marker on the wall. The pose solver sometimes flipped to a mirror-image solution for a frame, which threw the whole HUD sideways. We added a check that ignores sudden jumps, and for the demo we keep the wearer in one spot, which got rid of the problem entirely.
People behind the wall drifted down and to the side on the HUD. The wall hides part of the body, so the box around the visible part sits too low, and anything placed from that box ends up in the wrong spot. We fixed it by anchoring the skeleton at the hips and sizing it from the measured distance.
Our first direction calculation treated the camera's field of view as linear, which is wrong near the edges of the image. Switching to the pinhole formula fixed a drift we'd been chasing for a while.
Video over a phone hotspot arrives in bursts, and the HUD kept flipping between the camera feed and the map. We added a two-second hold before it falls back to the map, plus some hysteresis so the alert colours stop flickering.
QNX took some getting used to. It has a different screen API, some of the command-line tools we rely on are missing, and we did our builds on the Pi itself. Safari also has its own rules for when a page can use the camera and the compass.
The first version of the HUD looked like a weapons sight, which was the wrong feel for a rescue tool, so we redesigned it twice. Along the way we noticed that red and orange are hard to pick out against flames, so people are now drawn in cyan, green and magenta, each with a dark outline.
Accomplishments that we're proud of
The full loop works on real hardware. Someone standing behind a wall, seen only by the second phone, shows up on the wearer's HUD as a skeleton in the right place.
It flags a person who is down, in view or behind a wall.
There are over 1,100 automated checks, including screenshot comparisons that confirm the original HUD still renders pixel for pixel after the redesign.
What we learned
Writing the interface down on day one was the best decision we made. Two people and a lot of agents could work at the same time without breaking each other's code.
Testing on a laptop only gets you so far. QNX and Safari both behaved differently from what we saw on our own machines, hotspot Wi-Fi was worse than we expected, and most of our real bugs showed up on the Pi.
A half-degree error in a calculation turns into a box that's visibly in the wrong place on a HUD, so the geometry needed more care than we thought it would.
In a fire, the colour of a marker decides whether anyone can see it at all.
What's next for Firewatch
Ordinary cameras can't see through smoke, so the next step is thermal cameras, with a person detector trained on thermal images.
Seeing through a wall without a second camera takes radar. NASA JPL's FINDER radar found four men buried in rubble after the 2015 Nepal earthquake by picking up their heartbeats, and a radar node could feed our map the same way a phone does.
Firefighters also need to know where they are indoors without markers on the walls. We'd look at UWB beacons and motion sensors for that, and replace Wi-Fi with mesh radios.
Longer term, the HUD belongs inside the firefighter's breathing mask, linked to the motion alarm they already wear, with the floor plan shared with incident command.
Built With
- aruco
- c
- javascript
- mediapipe
- python
- qnx
- raspberry-pi