# config for ivsign ir live sdk
# VERSION

############# 算法配置 #############

# sdk授权字符串
#license = HL-IC

# 摄像头名称，在授权范围内
#cam_name =

# 活体模式，可选: rgb/rgb-ir/rgb-ir-depth
live_mode = rgb-ir

# 算法类别，可选：Default/Mobile/Server
algorithm_class = Default

# 双眼距离范围（像素)
min_eye_dist = 30
max_eye_dist = 1000

# 人脸采集感兴趣区，以矩形区域像素坐标表示（以可见光为依据，其他图像会根据位置进行对应变换）
roi_left = 0
roi_top = 0
roi_width = 0
roi_height = 0

# 需要检测到睁开眼睛的数量
need_eyes = 0

# 是否需要嘴巴部位完整
need_mouth = true

# 是否允许多人脸出现在采集区域内，如果允许，则会采集面积的最大人脸
allow_many_face = true

# 是否允许嘴巴张着
allow_mouth_open = false

# 口罩模式 0:忽略口罩结果  1:必须戴口罩  2:必须摘下口罩
face_mask_mode = 0

# 是否将手当做非活体
allow_hand_nonlive = false

# 人脸规范化图像中双眼距离占图像宽度的比例
crop_face_eye_dist = 0.27

# 人脸规范化图像中眼睛与图像顶部的距离占图像高度的比例
crop_face_eye_top = 0.53

# 人脸规范化是否需要将人脸角度进行校正
crop_face_rotate = false

# 人脸规范化图背景灰度：0-255，负数代表不进行背景处理
crop_face_background = 255

# 人脸抠图背景颜色 默认白色
crop_background_color = 16777215

# 近红外摄像头成像位置相对于可见光的横向偏移（在两个图居中对齐的前提下）
ir_image_offset_x = 0

# 根据rgb图像人脸扩展出的给ir图像的roi区域的扩展像素
rgb2ir_roi_extend_x = 45
rgb2ir_roi_extend_y = 35

############# 摄像头配置 #############

# 可将光摄像头分辨率
rgb_camera_width = 640
rgb_camera_height = 480

# 近红外摄像头分辨率
ir_camera_width = 640
ir_camera_height = 480

# 摄像头旋转角度，可选0/90/180/270
camera_rotation = 0

############# 预览配置 #############

# 是否播放声音
play_audio = true

# 是否保持图像的原始宽高比
preview_keep_ratio = false

# 旋转角度，可选0/90/180/270
preview_rotation = 0

# 是否镜像
preview_mirror = true

# 是否显示红外图
preview_show_ir = true

# 是否显示红外人脸图
preview_show_ir_face = false

# 是否显示文字提示
preview_show_text = true

# 是否显示人脸框
preview_show_face = true

# 是否显示超时时间
preview_show_timeout = true

# 是否显示ROI
preview_show_roi = true

# 人脸框颜色
preview_face_rect_color = FFFF0000

# 人脸框线宽
preview_face_rect_width = 10

# 预览界面的蒙版图片
preview_mask = preview_mask_good.png

# 音频播放间隔
sound_delay_seconds = 1.0

# 提示文本、声音、蒙版图片的本地化设置
i18n_no_face = 未检测到人脸
i18n_no_face_color = FFFF0000
i18n_no_face_sound = 未检测到人脸.wav
#i18n_no_face_sound_duration_seconds =
i18n_no_face_mask = preview_mask_bad.png
i18n_good_face = 人脸检测通过
i18n_good_face_color = FFFF0000
i18n_good_face_sound = 人脸检测通过.wav
#i18n_good_face_sound_duration_seconds=
i18n_good_face_mask =
i18n_non_live = 人脸分析失败
i18n_non_live_color = FFFF0000
i18n_non_live_sound = 人脸分析失败.wav
#i18n_non_live_sound_duration_seconds =
i18n_non_live_mask =
i18n_keep = 人脸检测中
i18n_keep_color = FFFF0000
i18n_keep_sound = 人脸检测中.wav
#i18n_keep_sound_duration_seconds =
i18n_keep_mask =
i18n_near = 人脸过近
i18n_near_color = FFFF0000
i18n_near_sound = 人脸过近.wav
#i18n_near_sound_duration_seconds =
i18n_near_mask =
i18n_far = 人脸过远
i18n_far_color = FFFF0000
i18n_far_sound = 人脸过远.wav
#i18n_far_sound_duration_seconds =
i18n_far_mask =
i18n_tilted = 请摆正姿态
i18n_tilted_color = FFFF0000
i18n_tilted_sound = 请摆正姿态.wav
#i18n_tilted_sound_duration_seconds =
i18n_tilted_mask =
i18n_side = 请将人脸居中
i18n_side_color = FFFF0000
i18n_side_sound = 请将人脸居中.wav
#i18n_side_sound_duration_seconds =
i18n_side_mask =
i18n_moving = 请稳定姿态
i18n_moving_color = FFFF0000
i18n_moving_sound = 请稳定姿态.wav
#i18n_moving_sound_duration_seconds =
i18n_moving_mask =
i18n_cam_pos = 请检查成像
i18n_cam_pos_color = FFFF0000
i18n_cam_pos_sound = 请检查成像.wav
#i18n_cam_pos_sound_duration_seconds =
i18n_cam_pos_mask =
i18n_no_mouth = 嘴部检测失败
i18n_no_mouth_color = FFFF0000
i18n_no_mouth_sound = 嘴部检测失败.wav
#i18n_no_mouth_sound_duration_seconds =
i18n_no_mouth_mask =
i18n_no_eye = 眼睛检测失败
i18n_no_eye_color = FFFF0000
i18n_no_eye_sound = 眼睛检测失败.wav
#i18n_no_eye_sound_duration_seconds =
i18n_no_eye_mask =
i18n_no_nose = 鼻子检测失败
i18n_no_nose_color = FFFF0000
i18n_no_nose_sound = 鼻子检测失败.wav
#i18n_no_nose_sound_duration_seconds =
i18n_no_nose_mask =
i18n_bad_light = 光线质量差
i18n_bad_light_color = FFFF0000
i18n_bad_light_sound = 光线质量差.wav
#i18n_bad_light_sound_duration_seconds =
i18n_bad_light_mask =
i18n_many_face = 检测到多人脸
i18n_many_face_color = FFFF0000
i18n_many_face_sound = 检测到多人脸.wav
#i18n_many_face_sound_duration_seconds =
i18n_many_face_mask =
i18n_hand_near_face = 请移开手
i18n_hand_near_face_color = FFFF0000
i18n_hand_near_face_sound =
#i18n_hand_near_face_sound_duration_seconds =
i18n_hand_near_face_mask =
i18n_occlusion = 请移开遮挡
i18n_occlusion_color = FFFF0000
i18n_occlusion_sound = 请移开遮挡.wav
#i18n_occlusion_sound_duration_seconds =
i18n_occlusion_mask =
i18n_face_mask = 请摘掉口罩
i18n_face_mask_color = FFFF0000
i18n_face_mask_sound = 请摘掉口罩.wav
#i18n_face_mask_sound_duration_seconds =
i18n_face_mask_mask =
i18n_need_face_mask = 请戴上口罩
i18n_need_face_mask_color = FFFF0000
i18n_need_face_mask_sound = 请戴上口罩.wav
#i18n_need_face_mask_sound_duration_seconds =
i18n_need_face_mask_mask =
i18n_glasses = 请摘掉眼镜
i18n_glasses_color = FFFF0000
i18n_glasses_sound = 请摘掉眼镜.wav
#i18n_glasses_sound_duration_seconds =
i18n_glasses_mask =
i18n_hair_occlusion = 请露出额头
i18n_hair_occlusion_color = FFFF0000
i18n_hair_occlusion_sound = 请露出额头.wav
#i18n_hair_occlusion_sound_duration_seconds =
i18n_hair_occlusion_mask =
i18n_mouth_open = 请勿张开嘴巴
i18n_mouth_open_color = FFFF0000
i18n_mouth_open_sound = 请勿张开嘴巴.wav
#i18n_mouth_open_sound_duration_seconds =
i18n_mouth_open_mask =


i18n_capture_wait = 请正视摄像头，准备拍照
i18n_capture_wait_color = FF00A2E8
i18n_capture_success = 拍照成功
i18n_capture_success_color = FF22B14C
i18n_capture_fail = 拍照失败
i18n_capture_fail_color = FFED1C24

############# 简易采集配置 #############

# 采集超时时间
timeout_seconds = 15

# 采集窗口标题
preview_window_title = 活体人脸采集

# 窗口显示位置，-1代表自动居中
preview_window_left = -1
preview_window_top = -1
preview_window_width = 640
preview_window_height = 480

############# 内部配置 #############

live_rgb_thresh = 0
live_rgb_ex_thresh = 0
live_ir_thresh = 0.3
live_ir_ex_thresh = 0
live_ir_mask_thresh = 0.3
mask3d_live_rgb_thresh = 0
mask3d_live_ir_thresh = 0
ai_forgery_live_thresh = 0
live_depth_thresh = 0.3
hand_detect_thresh = 0
face_occlusion_thresh = 0
face_mask_thresh = 0.20
glasses_thresh = 0
hair_occlusion_thresh = 0
mouth_occlusion_thresh = 0
nose_occlusion_thresh = 0.54
eye_occlusion_thresh = 0.35
face_motion_thresh = 150
face_pos_max_yaw = 35
face_pos_max_pitch = 35
face_pos_max_roll = 35
light_min_val = 10
light_max_val = 250
#ir_light_min_val = 40
#ir_light_variance_val = 200
#ir_face_blur_val = 0.25

min_frame_num_live = 1
min_frame_num_nonlive = 1
focus_enlarge = 2.0
rgb_ir_mode_detect_ir = false
live_process_frame_time = 0
debug_mode = false
log_file_path =
onnx_impl=CellOnnx