CalibrationBenchmark
SUMMARY
CalibrationBenchmark cross-validates one target/IntrinsicOptions configuration: cross-validated reprojection error, plus an optional hand-eye round-trip error. Call run() once per configuration you want to compare, and collect the BenchmarkResults yourself.
The Skill
python
from telekinesis.axon import CalibrationBenchmark, IntrinsicOptionsThe Code
python
from telekinesis.axon import CalibrationBenchmark, IntrinsicOptions
from telekinesis.axon.targets import CharucoTarget
target = CharucoTarget(squares_x=6, squares_y=9, square_length=0.012, marker_length=0.009)
bench = CalibrationBenchmark()
result = bench.run(
images=my_images,
target=target,
options=IntrinsicOptions(),
robot_poses=my_robot_poses, # optional, enables the round-trip metric
eye_in_hand_options=IntrinsicOptions(), # optional
n_splits=5,
)
CalibrationBenchmark.save_json([result], "calibration_benchmark.json")
print(CalibrationBenchmark.format_results([result]))Initialization
python
bench = CalibrationBenchmark()CalibrationBenchmark takes no constructor parameters, every configuration is passed to run() instead.
Skills
| Skill | Description |
|---|---|
| Run | Full benchmark: cross-validated reprojection error, plus an optional hand-eye round-trip error. |
| Cross Validate | Mean reprojection error over held-out folds of a set of images. |
| Hand-Eye Roundtrip | Recover base_T_board from all frames and report the round-trip reprojection error. |
Best Practices
- Compare
held_out_reprojection_errortoreprojection_error, not just look at either alone. They should be close. A held-out error that's substantially higher than the full-fit error means the model is overfitting the specific views it was calibrated on, usually a sign of too few or too repetitive views (see IntrinsicCalibrator Best Practices) rather than a fundamentally bad camera. - There's no universal "good" reprojection error, it depends on resolution and the precision your downstream task needs. Treat a benchmark run as a comparison tool: calibrate the same data with a couple of
IntrinsicOptionsvariants (different corner detectors, differentcalibrate_camera_flags) and letheld_out_reprojection_errorpick between them, rather than chasing an absolute number.