* 2eedcd90-b7db-46cb-86be-740f48ded7ab/700

* cleanup some constants

* update model replay ref
pull/32144/head
YassineYousfi 1 year ago committed by GitHub
parent 99285ef1f2
commit 6c3a33a6d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      selfdrive/modeld/constants.py
  2. 8
      selfdrive/modeld/modeld.py
  3. 4
      selfdrive/modeld/models/supercombo.onnx
  4. 2
      selfdrive/test/process_replay/model_replay_ref_commit

@ -18,9 +18,6 @@ class ModelConstants:
HISTORY_BUFFER_LEN = 99
DESIRE_LEN = 8
TRAFFIC_CONVENTION_LEN = 2
NAV_FEATURE_LEN = 256
NAV_INSTRUCTION_LEN = 150
DRIVING_STYLE_LEN = 12
LAT_PLANNER_STATE_LEN = 4
LATERAL_CONTROL_PARAMS_LEN = 2
PREV_DESIRED_CURV_LEN = 1

@ -59,8 +59,6 @@ class ModelState:
'traffic_convention': np.zeros(ModelConstants.TRAFFIC_CONVENTION_LEN, dtype=np.float32),
'lateral_control_params': np.zeros(ModelConstants.LATERAL_CONTROL_PARAMS_LEN, dtype=np.float32),
'prev_desired_curv': np.zeros(ModelConstants.PREV_DESIRED_CURV_LEN * (ModelConstants.HISTORY_BUFFER_LEN+1), dtype=np.float32),
'nav_features': np.zeros(ModelConstants.NAV_FEATURE_LEN, dtype=np.float32),
'nav_instructions': np.zeros(ModelConstants.NAV_INSTRUCTION_LEN, dtype=np.float32),
'features_buffer': np.zeros(ModelConstants.HISTORY_BUFFER_LEN * ModelConstants.FEATURE_LEN, dtype=np.float32),
}
@ -94,8 +92,6 @@ class ModelState:
self.inputs['traffic_convention'][:] = inputs['traffic_convention']
self.inputs['lateral_control_params'][:] = inputs['lateral_control_params']
self.inputs['nav_features'][:] = inputs['nav_features']
self.inputs['nav_instructions'][:] = inputs['nav_instructions']
# if getCLBuffer is not None, frame will be None
self.model.setInputBuffer("input_imgs", self.frame.prepare(buf, transform.flatten(), self.model.getCLBuffer("input_imgs")))
@ -168,8 +164,6 @@ def main(demo=False):
model_transform_main = np.zeros((3, 3), dtype=np.float32)
model_transform_extra = np.zeros((3, 3), dtype=np.float32)
live_calib_seen = False
nav_features = np.zeros(ModelConstants.NAV_FEATURE_LEN, dtype=np.float32)
nav_instructions = np.zeros(ModelConstants.NAV_INSTRUCTION_LEN, dtype=np.float32)
buf_main, buf_extra = None, None
meta_main = FrameMeta()
meta_extra = FrameMeta()
@ -257,8 +251,6 @@ def main(demo=False):
'desire': vec_desire,
'traffic_convention': traffic_convention,
'lateral_control_params': lateral_control_params,
'nav_features': nav_features,
'nav_instructions': nav_instructions,
}
mt1 = time.perf_counter()

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4fb2cec9ef759cb1164ee2d27b338338a5a9302f427ad95f9b021361b02e1a2
size 52263406
oid sha256:a7a267b5026a0fab61095092d9af20c1dcd70311817c80749adcf6c0a0879061
size 50660999

@ -1 +1 @@
60b00d102b3aedcc74a91722d1210cc6905b0c8f
512c45131ff7eb48bf101f9eae50a389efba6930

Loading…
Cancel
Save