Better default settings

This commit is contained in:
Arnaud_Cayrol 2026-02-13 20:58:38 +01:00
parent c51afcebb1
commit 1c0d7a2620
2 changed files with 17 additions and 16 deletions

View file

@ -133,9 +133,9 @@ pub struct BrightnessConfig {
impl Default for BrightnessConfig { impl Default for BrightnessConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
enabled: false, enabled: true,
min_brightness: 0.1, min_brightness: 0.1,
max_brightness: 0.95, max_brightness: 0.9,
} }
} }
} }
@ -180,8 +180,8 @@ pub struct BlurConfig {
impl Default for BlurConfig { impl Default for BlurConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
enabled: false, enabled: true,
min_sharpness: 25.0, min_sharpness: 20.0,
} }
} }
} }
@ -212,7 +212,7 @@ impl Default for OutputConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
size: 512, size: 512,
keep_intermediates: false, keep_intermediates: true,
} }
} }
} }
@ -254,8 +254,8 @@ impl Default for HeadPoseConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
enabled: true, enabled: true,
max_yaw: 35.0, max_yaw: 20.0,
max_pitch: 35.0, max_pitch: 20.0,
} }
} }
} }
@ -296,8 +296,8 @@ pub struct EyeFilterConfig {
impl Default for EyeFilterConfig { impl Default for EyeFilterConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
enabled: false, enabled: true,
min_ear: 0.2, min_ear: 0.22,
} }
} }
} }
@ -411,11 +411,11 @@ pub struct TimestampConfig {
impl Default for TimestampConfig { impl Default for TimestampConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
enabled: false, enabled: true,
position: TextPosition::BottomLeft, position: TextPosition::BottomLeft,
year: true, year: true,
month: false, month: true,
day: false, day: true,
} }
} }
} }
@ -457,8 +457,8 @@ pub struct TimeIntervalConfig {
impl Default for TimeIntervalConfig { impl Default for TimeIntervalConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
enabled: false, enabled: true,
max_photos: 1, max_photos: 5,
time_range: TimeRange::Day, time_range: TimeRange::Day,
} }
} }
@ -612,7 +612,7 @@ impl Default for VideoConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
enabled: true, enabled: true,
framerate: 15, framerate: 20,
codec: "libx264".to_string(), codec: "libx264".to_string(),
crf: 23, crf: 23,
} }
@ -754,7 +754,7 @@ mod tests {
let config = Config::default(); let config = Config::default();
assert_eq!(config.processing.output.size, 512); assert_eq!(config.processing.output.size, 512);
assert_eq!(config.processing.face_resolution.min_size, 80); assert_eq!(config.processing.face_resolution.min_size, 80);
assert_eq!(config.video.framerate, 15); assert_eq!(config.video.framerate, 20);
} }
#[test] #[test]

View file

@ -386,6 +386,7 @@ mod tests {
config.processing.brightness.enabled = false; config.processing.brightness.enabled = false;
config.processing.head_pose.enabled = false; config.processing.head_pose.enabled = false;
config.processing.eye_filter.enabled = false; config.processing.eye_filter.enabled = false;
config.processing.timestamp.enabled = false;
let pipeline = Pipeline::with_steps_from_config(&config); let pipeline = Pipeline::with_steps_from_config(&config);
let ids = pipeline.step_ids(); let ids = pipeline.step_ids();