5b02cff5 both

pull/24762/head
ZwX1616 3 years ago
parent fbf1d2f581
commit 12d742153c
  1. 4
      selfdrive/modeld/models/dmonitoring_model.current
  2. 2
      selfdrive/modeld/models/dmonitoring_model.onnx
  3. 4
      selfdrive/modeld/models/dmonitoring_model_q.dlc
  4. 8
      selfdrive/monitoring/driver_monitor.py

@ -1,2 +1,2 @@
b16cb60c-9eb5-4538-9375-24c2d1349f7f
796077546d8bf72db947441973b94a39ce895dbc
5b02cff5-2b29-431d-b186-372e9c6fd0c7
bf33cc569076984626ac7e027f927aa593261fa7

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2ba42e1dc4ea800dc0ad75be0c8a8181aae334acf9889a5fd9b9e5059c8020e8
oid sha256:aca1dd411b5f488bea605dc360656e631fc4301968a589ea072e2220c8092600
size 9157561

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:80702bf5fc2f2d2c748f6e12738827abfaafd286243699b9c0d3eca05897dfff
size 2636901
oid sha256:d146b1d1fd9d40d57d058e51d285f83676866e26d9e5aff9fa27623ce343b58a
size 2636941

@ -77,7 +77,7 @@ class DistractedType:
DISTRACTED_BLINK = 2
DISTRACTED_E2E = 4
def face_orientation_from_net(angles_desc, pos_desc, rpy_calib, is_rhd):
def face_orientation_from_net(angles_desc, pos_desc, rpy_calib):
# the output of these angles are in device frame
# so from driver's perspective, pitch is up and yaw is right
@ -92,7 +92,7 @@ def face_orientation_from_net(angles_desc, pos_desc, rpy_calib, is_rhd):
# no calib for roll
pitch -= rpy_calib[1]
yaw -= rpy_calib[2] * (1 - 2 * int(is_rhd))
yaw -= rpy_calib[2]
return roll_net, pitch, yaw
class DriverPose():
@ -232,14 +232,14 @@ class DriverStatus():
# self.wheel_on_right = self.wheelpos_learner.filtered_stat.M > self.settings._WHEELPOS_THRESHOLD
# else:
# self.wheel_on_right = rhd_pred > self.settings._WHEELPOS_THRESHOLD
driver_data = driver_state.driverDataLH
driver_data = driver_state.driverDataRH if self.wheel_on_right else driver_state.driverDataLH
if not all(len(x) > 0 for x in (driver_data.faceOrientation, driver_data.facePosition,
driver_data.faceOrientationStd, driver_data.facePositionStd,
driver_data.readyProb, driver_data.notReadyProb)):
return
self.face_detected = driver_data.faceProb > self.settings._FACE_THRESHOLD
self.pose.roll, self.pose.pitch, self.pose.yaw = face_orientation_from_net(driver_data.faceOrientation, driver_data.facePosition, cal_rpy, self.wheel_on_right)
self.pose.roll, self.pose.pitch, self.pose.yaw = face_orientation_from_net(driver_data.faceOrientation, driver_data.facePosition, cal_rpy)
self.pose.pitch_std = driver_data.faceOrientationStd[0]
self.pose.yaw_std = driver_data.faceOrientationStd[1]
model_std_max = max(self.pose.pitch_std, self.pose.yaw_std)

Loading…
Cancel
Save