Where the Knees Are: How a Detection Transformer Reads Poses on a Street RF-DETR 1.11.2's RFDETRKeypointPreview model, an early-access keypoint detector from Roboflow that runs at 576 × 576 pixels and predicts the 17 COCO person keypoints, is detailed in a technical walkthrough by an author who maintains RF-DETR at Roboflow. The model resizes images into 2,304 patches of 12 × 12 pixels, tokenizes them through a DINOv2-initialized vision transformer backbone, and builds a 256-number-per-patch memory grid that a second projector duplicates so the box-finding and joint-finding heads read separate copies. The walkthrough notes the RF-DETR paper covers detection and segmentation rather than keypoints, so the mechanism is drawn from the 1.11.2 source code, and that fine-tuning on custom keypoint datasets is the model's primary intended use case. Look at a photo of a street. A cyclist rides across a zebra crossing. One car waits before the crossing, another drives away, and a dog sits on the pavement. A detector draws a box around each of them. That tells you where they are. It does not tell you whether the cyclist is pedalling or reaching for the brake, or whether the dog is sitting or about to run. For that you need keypoints. Keypoints are named points on an object: a nose, a left knee, a tail tip. Join them with lines, and you get a skeleton. Finding them for every person in a photo is called pose estimation https://en.wikipedia.org/wiki/Articulated body pose estimation ; the same idea works for animals, hands, or the corners of a parcel. It is how sports apps count reps, how ergonomics tools spot a bad lifting posture, and how biologists track how animals move. The hard part is not finding knees. It is knowing whose knee it is. Pause and ponder. Two people stand close together, and their legs overlap. A model has found four knees. Which two belong to the person on the left? Pose models have given different answers to that question over the years, and RF-DETR’s answer is the thread of this post. It is told in nine steps, and each step has its own animation. If you only scroll through the animations, you should still get the main idea; the text adds the why and the numbers. No prior knowledge of transformers is needed. Scope. RF-DETR 1.11.2 from PyPI https://pypi.org/project/rfdetr/ , the RFDETRKeypointPreview model. The docs call it "an early-access release. Fine-tuning on custom keypoint datasets is the primary intended use case." https://rfdetr.roboflow.com/latest/learn/run/keypoints/ It comes in one size, works at 576 × 576 pixels, and its pretrained checkpoint predicts the 17 COCO person keypoints. The RF-DETR paper https://arxiv.org/abs/2511.09554 covers detection and segmentation, not keypoints, so the mechanism here comes from the 1.11.2 source code. Accuracy and latency numbers come from the RF-DETR benchmarks page https://rfdetr.roboflow.com/latest/learn/benchmarks/ . Our street uses three classes with three skeletons cyclist 17 joints, dog 8, car none : that is the kind of model you would get by fine-tuning, not the pretrained checkpoint. All street visuals are drawn, not model output; uncertainty ellipses and guesses are illustrative. Disclosure: I maintain RF-DETR at Roboflow. Before the details, here is the full path from photo to skeletons in one animation. Each stage takes the previous stage’s output as its input, does one job, and hands its result on. The rest of the post walks through these stages one at a time, with one animation per step. A neural network does not see a street. It sees numbers. RF-DETR Keypoint first resizes the photo to 576 × 576 pixels and cuts it into small 12 × 12 pixel squares, called patches. That makes a grid of 48 × 48 = 2,304 patches. Each patch becomes a list of numbers called a token. The tokens pass through the backbone, a vision transformer https://en.wikipedia.org/wiki/Vision transformer initialised from DINOv2 https://arxiv.org/abs/2304.07193 . Meta trained DINOv2 on 142 million curated images without any labels, so before RF-DETR has seen a single annotated skeleton, its backbone already produces general-purpose visual features. Inside the backbone, tokens compare themselves with each other, so a patch on the rider’s knee can account for the rest of the leg. At the end, a small module called the projector packs everything into a 48 × 48 grid of descriptions, 256 numbers per patch. RF-DETR calls this grid the memory. The keypoint model has a second projector that builds a second memory of the same size from the same backbone output. The box-finding part reads the first; the joint-finding part reads the second. We will meet it again in step 6. A model never sees the street, only grids of descriptions… Many detectors guess a box at every position in the image and then delete the duplicates afterward. RF-DETR asks questions instead. It holds a fixed set of 100 learned queries. Think of each query as a question: “Is there an object I should be responsible for? If so, what is it, and where?” Every query answers with one box and a score for each class, or with “nothing here”, written ∅. Each query starts from a reference box, chosen from the most promising regions of the memory, and works through four decoder layers. In each layer, it reads evidence from the memory, compares notes with the other queries, and updates its answer. It always predicts its box as a shift and resize of that same reference box. Remember the reference box: the joints will be measured from it too. During training, each real object is paired with exactly one query once in each of 13 parallel query groups, which gives the model more practice , chosen by the Hungarian algorithm https://en.wikipedia.org/wiki/Hungarian algorithm so the total fit across all objects is as good as possible. Every other query is taught to answer “nothing here”. A second query that also claims the dog is penalized, so the model learns not to repeat itself, and no NMS non-maximum suppression, the clean-up step that deletes overlapping duplicates is needed. So far, this is exactly how RF-DETR detects objects, with 100 queries here instead of the detector’s 300; I covered that side in an earlier post https://medium.com/@jborovec/300-questions-not-8-400-guesses-how-a-detection-transformer-sees-a-street-685472f6eca8 if you want more depth. Keypoints add one idea on top, and it answers the “whose knee” question before it can even come up: every query brings its own joints. A question that owns an object can also own its knees. Next to each query, the model keeps one extra token per joint in the schema. In our street, the schema is cyclist 17, car 0, dog 8, so every one of the 100 queries carries 25 joint tokens. Each token is a slot that will become one joint: “left knee of whatever this query finds”. A slot starts from a learned token for its joint type, one for “nose”, one for “left knee”, and so on. The token is then scaled and shifted by numbers computed from its own query, a trick called adaptive layer normalization AdaLN . So the cyclist’s query and a car’s query both start their “left knee” slot from the same learned knee, each adapted to its own query. What the object in front of it actually looks like comes in later, in the decoder layers. The slots are not read for every class. A query that ends up as “car” has its joints ignored; one that ends up as “dog” is read from the 8 dog slots. A zero in the schema means “this class is box only”. The pretrained preview checkpoint has just one class with one skeleton, the 17 COCO person keypoints; the street’s three classes come from fine-tuning on your own labels. The question of whose knee it is never arises: each knee slot is born inside one query. In every decoder layer, each query and its joint tokens run a round of self-attention