Fall 2026 — Python & computer vision project
This blog post was generated with AI, but the content remains true! Prompted & reviewed by a human. This project is also written up as a paper, written by a human and edited with AI: Interpretable Face Part Discovery Without Gradient Descent (PDF).
I started with a simple question: what information about an object's appearance is actually necessary to recognize it as that object? Part of what got me thinking about this was cartoons. People recognize a cartoon face instantly, with a few lines standing in for eyes, a nose and a mouth, and nobody had to show us thousands of labeled cartoons first.
I also wanted to explore a different kind of learning algorithm, one that builds a model from the ground up. At a high level: start with the signal in an image, create features that explain part of that signal, then "turn off" the signal that's been explained and repeat, recursively building deeper and deeper features on top of the earlier ones. A feature is learned by finding other places where a similar pattern shows up and keeping a running average of the signal observed there. This continues a thread from an earlier project of mine on learning features on-the-fly.
The other motivation was interpretability. We understand the early layers of convolutional neural networks fairly well (they learn edge and color detectors), but the deeper layers are still largely opaque, despite a lot of good interpretability research. I wanted every activation to be traceable back to specific signals in the input image, and every feature to be something you can simply look at.
This project covers the first step of that program: the detector, and the first layer of features that goes from pixels to parts. The features turn out to be parts of objects, such as eyes, noses and mouths, and each one is made of sub-features that together decide whether the part is present.
The question isn't just "can we build an eye detector," but "what is the least information a detector needs." The simplest answer is gradients: the edges in an image and the directions they run in. A group of gradients sitting in roughly the right places relative to each other tells you where an object is. This is classic computer vision territory (it's the idea behind histograms of oriented gradients and deformable part models). What's new here is how the detectors are learned, and that they can be read directly.
Each detector is a set of small boxes laid out over a region, at several scales. Each box holds the oriented gradients and the blobs (Laplacian of Gaussian) seen in that part of the region. A detector can be created from a single example, with no training and no backpropagation.
The key observation is that two examples of the same part never look exactly alike. Eyes vary in shape, size and gaze, so a rigid template matches poorly. Instead, each box is allowed to shift a little from where it is expected and settle wherever it matches best (max pooling, with a small penalty for moving too far). That's how a single detector captures the variation within a part.
To discover parts, I find keypoints on a set of unlabeled faces, create a detector at each one, and group the detectors into clusters of similar-looking regions. Each cluster's detectors are aligned and averaged into a single part detector. Some clusters land cleanly on eyes, noses, mouths and brows; others describe general outlines like the edge of the face or the hairline. Because every detector is an average of real image values, it can be drawn as an image: in the figure below you can see eyelids, nostrils and individual teeth.
To check that the parts are meaningful, I used them to locate standard face landmarks. The method comes within 4.4 points of DINO co-parts, a method built on a network pretrained on 1.3 million images (11.9 vs. 7.5 normalized error), and beats DFF (14.8), all without any pretraining or gradient descent. The details are in the paper.
Looking through the top 100 matches of one eye detector, almost all of them were eyes. A few weren't, and they're the interesting ones. The detector only sees gradients, so anything with the right arrangement of gradients looks like an eye to it. Two examples:
The side of a nose. The bulb of the nostril sits where the iris would be, and the creases above and below read as eyelids. Once you see it, it's hard to unsee. This is pareidolia, the same effect that makes us see faces in electrical outlets.




A blurry green background. At first glance there's nothing there. But shrink it down and turn up the contrast (roughly what the detector sees, since it only looks at lightness) and there's a faint pattern of light and dark blobs in the right places.




Since each box finds its own best match, the boxes also tell you how a part is moving inside. Running an eye detector on a video of an eye looking around, the inner boxes follow the iris while the outer boxes stay on the outline of the eye.
The box positions over time also say something about how the eye moves. I took the box positions from every frame of this one video and decomposed them into non-negative motion components (a non-negative version of PCA, where each component is a motion in one direction only). Four components came out, and each one corresponds to a way the eye moves: looking left, looking right, looking straight ahead, and looking up. Nothing told the model about gaze; it found these four modes from a single video.
Nothing about the detector is specific to faces, so I tried it on a video of a horse. A detector created from the horse's head in one frame tracks it out of the box. As the horse turns, its head starts to look different and the detector's score drops, so whenever that happens I create a new detector from the current view. Three detectors end up covering the whole video.
Knowing where the head is makes everything else easier. I fed the head track into an old-school Lucas–Kanade point tracker, so it only has to follow points relative to the moving head instead of across the whole frame. That's a much easier problem, and the point tracks become much more reliable.
From those point tracks, I can reconstruct a 3D point cloud of the head and recover its 3D pose in every frame.
Creating many more detectors along the head track gives a whole space of views of the head. That space is, in effect, a model of the head in 3D.
Appearance, then tracking, then a 3D model, with no deep learning anywhere in the pipeline. I think that's a neat result.
The same approach works much worse on the horse's leg. A lower leg isn't very distinctive on its own, so the tracker is jumpy and frequently latches onto the wrong thing.
Cropping the video to just the lower leg shows why: over the course of the video, its appearance changes enormously. Appearance alone isn't enough to follow it.
When we track a horse's leg, we don't rely on how the leg looks. We use the rest of the scene: where the body is, how legs attach and move, lighting, shadows, the ground.
The project set out to ask how little information is needed to recognize an object, and to build features from the ground up that stay fully interpretable. For objects with a distinctive shape, it worked better than I expected: face parts discovered with no labels and no gradient descent, detectors you can draw and read directly, an eye whose gaze directions fall out of a single video, and a horse's head tracked and reconstructed in 3D without deep learning anywhere in the pipeline.
But when I extended the approach to less distinctive objects, like the horse's leg, it broke down. Appearance alone isn't enough to recognize them; recognizing them depends on context and on everything else in the scene. Vision draws on far more cues than a simple, interpretable architecture like this one can describe, and capturing all of them by hand would mean giving up the simplicity that made the approach appealing in the first place. Learned models handle that complexity, which is why deep learning is the practical answer here, and why I put this project on the shelf. The detectors and the paper stand on their own, and the question I started with, how we recognize a cartoon face without ever being taught, is still one I find fascinating.
Face images are from the FFHQ dataset (Karras et al., NVIDIA). Horse footage from "The horse suddenly turned around. Do you think my shadow is too long?" by Charley Wang on YouTube.