About

Is the mountain out? People here have been asking that for decades. On a clear day Mount Rainier, or "Tahoma" as local Indigenous peoples called it, towers over everything around it. It's the most prominent peak in the contiguous United States, but it unfortunately spends a lot of the year completely hidden behind Seattle's (in)famous weather.

I started building this during the Big Dark, the grey stretch of the year when the mountain can stay tucked away for weeks at a time and you half forget it's out there. I also wanted an excuse to learn machine learning and build a website.

Tahoma Tracker is what came of that. A camera pointed at the mountain, a model that looks at every photo it takes, and a page that answers the question.

How it started

The Space Needle's panocam helped get this project off the ground without months of setting up hardware and collecting images first.

There's a camera on top of the Needle that publishes a panorama of the city every ten minutes, and if you crop the right piece, you get Mount Rainier (on the good days, anyway). I wrote a Lambda function that grabs each new panorama, cuts out the mountain section, and runs that crop through a classifier I trained on a few thousand images I labeled by hand.

It worked, and it still runs. But the panorama is stitched together from a rotating camera, so it doesn't always come back to the same place and the crop I wanted would drift. The stitching itself can come out wrong, and the whole feed goes down now and then. The real problem, though, is that the camera isn't looking at the mountain. It's looking at everything. A bit of haze or glare is enough to lose Rainier entirely in a wide shot, even on a day you could see it fine with your own eyes.

I could correct the drift in software, and that turned into its own project. But I couldn't make the mountain any clearer. So I decided to take my own pictures.

The dedicated camera

The camera in its weatherproof housing on a balcony rail at sunset, with Mount Rainier lit pink on the horizon beyond the neighborhood
The Tahoma Tracker Cam, with the mountain catching the last of the light.

The Tahoma Tracker Cam is a Canon Rebel T6 with a 55-250mm lens (thanks to Glazer's for the help!), sealed in a weatherproof housing on a balcony with a clear line to the mountain. A Raspberry Pi 4 sits next to it and fires the shutter every five minutes.

A breadboard of jumper wires and components held in one hand, wired to a Raspberry Pi in a black case
The trigger circuit: an unexpected venture into breadboarding.

I had never really used a DSLR before this, and getting one to take a picture on command turned out to be the trickiest part of the build. The original approach was to trigger it over USB, but that software is buggy for this particular setup. It has a habit of wedging the camera in a state that needs me to walk over and physically fix it (good ol' turn it off and on, plus a little more fiddling), which defeats the point of an unattended camera. So a setup I already thought was hardware-heavy got more so, and I ended up building a remote shutter to improve reliability.

A small circuit on a breadboard connects two of the Pi's GPIO pins to the camera's remote port, so the Pi can close the shutter switch exactly the way a wired remote does. Taking the picture no longer depends on the USB path at all, which is the part that used to wedge the camera into the dreaded "PTP Device Busy" state it couldn't recover from on its own.

From there the Pi pulls the new frame over USB, crops and resizes and watermarks it, runs the visibility model on the Pi itself, and uploads the photo and the result to an S3 bucket backed by CloudFront, the same as the original Space Needle setup.

Scoring visibility

Every photo gets sorted into one of three buckets:

Out Partially Out Not Out

Partially Out covers the in-between moments where the mountain may be pretty hazy or partially covered by clouds.

It started off with labeling thousands of photos by hand. To speed that up, I built a page for rapid labeling and for filtering back through the labels to clean up the bad ones. Those labels went into training a ResNet-50 model that now does the labeling automatically. It still gets things wrong, and when it does there's a correction link under the image on the homepage. Those go straight into the pile for the next round of training, so feel free to help guide the next model if it's getting them wrong!

The Tahometer Score

Every day gets a number from 0 to 100.

Tahometer Score

( fully-out photos + ½ × partially-out photos ) ÷ all daylight photos × 100

Only photos between sunrise and sunset count. A 100 means every image that day was marked "out," while a 0 means it never showed. Pro tip: the calendar colors each day on a gradient based on its Tahometer Score, so you can see at a glance which days were the good ones.

Under the hood

The two pipelines

Tahoma Tracker Cam
Camera
every 5 min
Raspberry Pi
trigger + classify
S3 / CloudFront
store + serve
This site
published every 10
Space Needle Panocam
Public webcam
every 10 min
AWS Lambda
align, crop, classify
S3 / CloudFront
store + serve
This site
you're here!

The shapes are similar; where the work happens isn't. The Pi does everything locally and uploads a finished result. The Space Needle path does all of it in a Lambda, since there's no hardware I control on that end, just a public image URL to poll.

Why the Space Needle needs a second model

1

Frame State Space Needle only

Is this image even usable? The panorama can be aimed the wrong way, stitched badly, blurred, or simply dark. This model catches those first, so the visibility model never sees them.

Good Off-Target Dark Bad
2

Visibility

If the frame is good, can you see the mountain?

Out Partially Out Not Out

The Tahoma Tracker Cam skips stage one. It doesn't move and it isn't stitching anything together, so off-target and badly-assembled frames aren't categories that exist for it, and "too dark to tell" folds neatly into Not Out.

The alignment problem

The Space Needle webcam is bolted to the top of the Space Needle, but the panorama it produces isn't always aimed the same way, and it can be off by a lot. The orange box in these two images shows where the model's mountain crop lands.

Panorama with crop box highlighting downtown Seattle buildings, camera has drifted away from Mount Rainier
Before Alignment
Same panorama after alignment with crop box correctly centered on Mount Rainier
After Alignment

In the first one, Rainier is nowhere near the box.

There was a second, subtler version of this problem. Early on I trained the visibility model on the wide display crop rather than a tight crop of the mountain, which meant it was learning from the sky and the cityscape as much as from Rainier itself. The current version registers each panorama against a reference image, corrects the drift, and only then cuts out the mountain.

Fixing it paid off more than I expected. Of roughly 9,400 images the old model had thrown out as "Off-Target," alignment recovered over 80%. Nearly 1,800 turned out to have the mountain plainly visible.

FAQ

The image isn't updating. Is the tracker broken?

The Space Needle webcam often publishes every 20 minutes instead of every 10, and it goes offline now and then for maintenance; the tracker can only work with what shows up. On the Tahoma Cam side, a long gap usually means the Pi or the camera hit a snag, most often a stuck USB connection. Either way it picks itself back up as soon as new photos start arriving.

Can I use these photos?

Photos from the Tahoma Tracker Cam are free to share and post. If you want to use one commercially, or you're after something bigger than what the site serves, email me first and we'll sort it out. What I'd rather you didn't do is scrape the archive wholesale to stand up a copy of this project somewhere else. Images from the Space Needle Panocam aren't mine to license; those need to be credited to the Space Needle. Questions either way: contact [at] tahomatracker.com.

About me

I'm Jacob Knight, a software engineer in Seattle. I work on distributed systems, which is a long way from cameras and frontend, and this started as a way to learn the parts I don't touch at work. You can find me on LinkedIn.