mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-10-01 03:43:51 +08:00
Revert fullframe DM model (#24812)
* Revert "fullframe DM: flip RHD yaw to use matching thresholds"
This reverts commit ce7daabc8847d18ba46e5d1879f5a6958d04ccc7.
* Revert "fullframe DM model (#24762)"
This reverts commit 817be81fb19004f4873881f6b29dcdfffbe7e3a8.
* revert cereal
old-commit-hash: c646eeee0a
This commit is contained in:
@@ -9,43 +9,44 @@
|
||||
|
||||
#define CALIB_LEN 3
|
||||
|
||||
#define OUTPUT_SIZE 84
|
||||
#define OUTPUT_SIZE 45
|
||||
#define REG_SCALE 0.25f
|
||||
|
||||
typedef struct DriverStateResult {
|
||||
typedef struct DMonitoringResult {
|
||||
float face_orientation[3];
|
||||
float face_orientation_std[3];
|
||||
float face_orientation_meta[3];
|
||||
float face_position[2];
|
||||
float face_position_std[2];
|
||||
float face_position_meta[2];
|
||||
float face_prob;
|
||||
float left_eye_prob;
|
||||
float right_eye_prob;
|
||||
float left_blink_prob;
|
||||
float right_blink_prob;
|
||||
float sunglasses_prob;
|
||||
float sg_prob;
|
||||
float poor_vision;
|
||||
float partial_face;
|
||||
float distracted_pose;
|
||||
float distracted_eyes;
|
||||
float occluded_prob;
|
||||
float ready_prob[4];
|
||||
float not_ready_prob[2];
|
||||
} DriverStateResult;
|
||||
|
||||
typedef struct DMonitoringModelResult {
|
||||
DriverStateResult driver_state_lhd;
|
||||
DriverStateResult driver_state_rhd;
|
||||
float poor_vision_prob;
|
||||
float wheel_on_right_prob;
|
||||
float dsp_execution_time;
|
||||
} DMonitoringModelResult;
|
||||
} DMonitoringResult;
|
||||
|
||||
typedef struct DMonitoringModelState {
|
||||
RunModel *m;
|
||||
bool is_rhd;
|
||||
float output[OUTPUT_SIZE];
|
||||
std::vector<uint8_t> net_input_buf;
|
||||
std::vector<uint8_t> resized_buf;
|
||||
std::vector<uint8_t> cropped_buf;
|
||||
std::vector<uint8_t> premirror_cropped_buf;
|
||||
std::vector<float> net_input_buf;
|
||||
float calib[CALIB_LEN];
|
||||
float tensor[UINT8_MAX + 1];
|
||||
} DMonitoringModelState;
|
||||
|
||||
void dmonitoring_init(DMonitoringModelState* s);
|
||||
DMonitoringModelResult dmonitoring_eval_frame(DMonitoringModelState* s, void* stream_buf, int width, int height, int stride, int uv_offset, float *calib);
|
||||
void dmonitoring_publish(PubMaster &pm, uint32_t frame_id, const DMonitoringModelResult &model_res, float execution_time, kj::ArrayPtr<const float> raw_pred);
|
||||
DMonitoringResult dmonitoring_eval_frame(DMonitoringModelState* s, void* stream_buf, int width, int height, int stride, int uv_offset, float *calib);
|
||||
void dmonitoring_publish(PubMaster &pm, uint32_t frame_id, const DMonitoringResult &res, float execution_time, kj::ArrayPtr<const float> raw_pred);
|
||||
void dmonitoring_free(DMonitoringModelState* s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user