mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-12 07:23:45 +08:00
Initialize stop-sign verifier state in reset fixture
This commit is contained in:
@@ -6,7 +6,9 @@ from unittest.mock import patch
|
||||
import numpy as np
|
||||
|
||||
from openpilot.starpilot.speed_limits.vision.traffic_signs import TrafficSignModelCore as VisionModelCore
|
||||
from openpilot.starpilot.speed_limits.vision.speed_face import StopFaceVerifier
|
||||
from openpilot.starpilot.speed_limits.vision.stop_signs import StopDetection, SignDetectorOutputs, decode_stop_signs
|
||||
from openpilot.starpilot.speed_limits.vision.tests import _identity_fixture as identity_fixture
|
||||
|
||||
|
||||
class TestStopSigns(unittest.TestCase):
|
||||
@@ -48,6 +50,8 @@ class TestStopSigns(unittest.TestCase):
|
||||
def test_reset_and_invalid_new_frame_clear_stop_detections(self):
|
||||
core = VisionModelCore.__new__(VisionModelCore)
|
||||
core.history = deque()
|
||||
core.net = SimpleNamespace(rgb256=None)
|
||||
core._stop_face_filter = StopFaceVerifier(identity_fixture.Net('aux'))
|
||||
core.stop_detections = (StopDetection(.9, (10, 10, 30, 30)),)
|
||||
core.reset()
|
||||
self.assertEqual(core.stop_detections, ())
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "4f2793b520dfe1cf29afef335e3cdcb47a8cc0f45db6c6ca13df1d94abd8c0ca", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "3d47e789d99238a97b8545ff5c6d8e4b93cfc4db337783a531e10e1e7d472efd", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user