Charging-Station Keypoints and 3D Localization
A YOLOv11n pose model predicts six charging-station landmarks; calibrated PnP estimates the station’s camera-relative rotation and translation for docking.

Tools & Skills
- Pose Estimation
- YOLOv11
- PnP
- Robot Docking
- NCNN
- OpenCV
- Camera Calibration
- KLT Tracking
- Edge Deployment
- Outcome
- Six detected landmarks and calibrated PnP estimate the charging station’s 3D pose.
Six landmarks for docking
I trained a compact YOLOv11n pose model to recognize a charging station and localize six ordered landmarks. The goal was to give the docking system a geometric estimate of the station relative to the robot’s camera, beyond a detection box alone.
The dataset has one charging-station class and six keypoints with x, y, and visibility annotations. A small manually labeled dataset captures the station’s consistent appearance. The landmark ordering matches a known 3D station model.
From image points to camera-relative pose
The inference path combines three inputs:
- Six image-space landmark positions from the pose model.
- The corresponding known 3D station points, including base and raised landmarks.
- Camera intrinsics and lens-distortion coefficients.
The PnP runner filters landmarks at a confidence threshold of 0.8 and currently requires all six landmarks to pass. It then calls OpenCV’s iterative solvePnP to estimate rotation and translation in the camera coordinate system. Translation uses the same units as the 3D model, which is specified in millimeters.
Reprojected landmarks and coordinate axes provide a visual check that the estimated pose agrees with the image. Calibration and landmark correspondence are essential: a detected station alone is insufficient to recover a reliable 3D pose.
Tracking and edge export
A separate experimental inference script combines detections with Lucas–Kanade optical flow and a short weighted history to stabilize tracked keypoints. This is a distinct tracking path from the direct PnP runner.
The model-export entry point targets NCNN with 320 × 320 input for CPU inference. The exported pose network supplies landmark predictions; calibrated pose estimation and robot control are subsequent integration stages.
Demonstration context
The linked demonstration shows vision-guided docking in the robot system. This project covers the learned perception and pose-estimation component that supports alignment and parking. The related sprayer-robot detector uses the same broader model-development environment for object detection.
Evidence & demonstration
Demos & project media

Vision-guided auto-parking using keypoint detection and PnP-based 3D pose estimation.
Video description
Detected points track a marked target on the grass. A second view pairs the camera feed with the estimated charging-station pose as the robot approaches.


