Port StarPilot vision speed limits to FrogPilot - #321
AppleExpl01t wants to merge 16 commits into
Conversation
Integrate two-stage U.S. sign recognition with temporal confirmation, camera and producer freshness checks, managed inference, and the existing speed limit controller and Qt settings. Add regression coverage and retain model provenance and license notices. All 61 feature and Params tests pass; model licensing and on-device validation remain documented merge prerequisites.
Match FrogPilot camera metadata and configure message-frequency checks for the worker loop. Add regression tests and exercise actual VisionIPC, messaging, model inference, native parameters, and controller expiry together. All 64 feature and Params tests pass.
Track the source of pending and denied changes so expired, disabled, or deselected vision cannot leave a stale prompt or queued approval behind. Preserve confirmation behavior for other sources. All 72 feature and Params tests pass. Complete Qt UI build and isolated settings selection/cancellation checks also passed.
|
Thank you for your PR! If you're not already in the FrogPilot Discord, feel free to join and let me know you've opened a PR! |
Detailed VSL investigation and validation historyThe feature document is being condensed to usage, architecture, reproduction commands, current validation and limitations. This preserves the detailed investigation history from the previous documentation revision for reviewer reference. These are the existing September 19-20 results; the documentation cleanup does not change runtime code or rerun those experiments. Host, replay and C3 investigation records (2026-09-19 to 2026-09-20)Host validation record (2026-09-19)Linux x86-64 under WSL, Python 3.12.3, OpenCV 4.11.0:
These host results do not establish comma hardware performance, labeled route C3 investigation and follow-up validation (2026-09-19)Initial vehicle testing of The worker now consumes A separate worker bug was reproduced using the C3's physical cameras and driving The reader-capacity fix passes 100 host tests (87 feature tests and 13 Params Revision
The temporary calibration instrumentation was removed from the device's source Drive investigation and shadow-filter regression (2026-09-19)The subsequent C3 road trial reported Offline replay reproduced a specific rejection on a clearly visible 30 mph sign: At 6.67 sampled frames per second over a 60-second full-resolution recording, All 142 host tests pass, including shadowed neutral/cool white signs, dim colored Glare recognition and scheduling follow-up (2026-09-20)Further review found two independent limitations: sunset-tinted and glare-covered Current host checks pass 219 tests (206 feature tests and 13 Params tests), Dense inference over ten 60-second full-resolution clips (12,000 actual frames) The same ten minutes were decoded to NV12 and sent at their recorded camera
Earlier RGB-only replay and timing simulations missed failures exposed by this Before adding the heading fallback, a native C3 build completed and an isolated Those earlier C3 results precede the heading fallback. The final three-model Desktop process and UI replayA separate WSL checkout now runs the actual The desktop adapter uses its own messaging/Params prefix, the recorded Running the real vision entry point exposed a confirmation-time crash: the The visible desktop replay also exposed clipping of the fifth source row at The combined desktop run selected 30 mph at recording time 58.20 seconds, Final candidate C3 validation and tester feedback (2026-09-20)Runtime revision
After installation, the tester reported that the feature worked very well on The native checks and road feedback supersede the earlier uninstalled/untested |
Adds camera sign recognition as an optional Vision source in FrogPilot's existing Speed Limit Controller. The controller continues to own source priorities, offsets, confirmations, driver overrides and cruise caps. Detection is off by default; Qt supports control and display-only use. Recognized U.S. values are mph regardless of display units.
Draft. A nighttime drive exposed a repeated 30→70 mph misread that raised the cruise target. Every accepted classifier number now requires agreement from the separate OCR model, followed by matching observations in two captured frames. Automatic increases remain available when confirmation is disabled.
The revised integration also fixes two source-loss behaviors: an expired Vision reading cannot bypass confirmation when handing over to a higher map limit, and losing the reading alone cannot accelerate toward a higher stored cruise setting. The displayed reading becomes unavailable while the engaged controller retains its last Vision cruise ceiling until an accepted replacement or the documented driver actions release it.
Recognition rejects the observed yellow-header school-sign layout rather than assuming its condition is active. It uses the lowest agreeing classifier score, without a weighted detector score or a crop-count bonus. This score is not calibrated accuracy. Measured crop/tint/glare/OCR fallbacks remain bounded. The worker has explicit input preparation, frame processing and clock ownership; shared test helpers and separate setup/validation documents reduce duplication. Fresh map segment/direction changes replace road-name-only clearing.
Validation
Installed and reboot-verified on the C3 as VSL-Port at
b7827177d. Native artifact hashes and the running Panda firmware signature matched, Qt and expected services were running, and all 21 checked tuning/SLC settings were preserved. The post-reboot offroad check recorded zero invalid device, manager or Panda messages. This is desk verification; no new road test is claimed.The tested runtime is
ba5d6469dfa4da0598f3365063e3ac8fcf4a6a94;b7827177d42637cc43942f817c4b08deed2d1cd1changes only its documentation and also passed the staged native build. Setup and behavior and validation details describe the evidence and limits.Broader labeled-route accuracy, missed signs, physical sign identity, lane/conditional applicability, sustained control deadlines and road validation remain open. The header guard handles an observed layout; it does not determine conditional activation. Full-rate HEVC replay on C3 was not validated because software decoding could not provide 20 FPS. Python/Mici UI integration is outside this Qt port. Private recordings are not included.
Credit and licensing
Credit to firestar5683 and the StarPilot contributors for the detector/classifier and original preprocessing, and PaddlePaddle/PaddleOCR for text recognition. Models are pinned and license notices are retained. The StarPilot weights declare AGPL-3.0; licensing/provenance and corresponding-source acceptance remain upstream prerequisites. See model provenance and licenses. Cleanup and test results do not imply maintainer approval.