1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| class TrueNegativeGenerator: """ 真负例生成器 """ def __init__(self): self.scenario_params = { 'gaze_deviation': True, 'attention_state': 'ATTENTIVE', 'context': 'SAFE_AWARENESS' } def generate_mirror_check_scenario(self): """ 生成后视镜检查场景 """ return { 'gaze_target': 'REARVIEW_MIRROR', 'gaze_duration': 1.5, 'head_pose': {'yaw': -30, 'pitch': 5}, 'attention_state': 'ATTENTIVE', 'context': 'LANE_CHANGE_PREPARATION', 'expected_classification': 'TRUE_NEGATIVE', 'reason': 'Safety-required mirror check before lane change' } def generate_intersection_scanning(self): """ 生成交叉路口扫描场景 """ return { 'gaze_pattern': 'SCANNING', 'gaze_targets': ['LEFT', 'FORWARD', 'RIGHT', 'MIRRORS'], 'scan_duration': 4.0, 'attention_state': 'ATTENTIVE', 'context': 'INTERSECTION_APPROACH', 'expected_classification': 'TRUE_NEGATIVE', 'reason': 'Multi-stimulus awareness scanning' } def generate_dashboard_glance(self): """ 生成仪表盘查看场景 """ return { 'gaze_target': 'DASHBOARD', 'gaze_duration': 0.8, 'head_pose': {'yaw': 15, 'pitch': -20}, 'attention_state': 'ATTENTIVE', 'context': 'NAVIGATION_CHECK', 'expected_classification': 'TRUE_NEGATIVE', 'reason': 'Brief navigation prompt check before turn' }
|