Moved the face orientation detection to before blur detection in the pipeline

This commit is contained in:
Arnaud_Cayrol 2026-02-15 21:18:35 +01:00
parent 49385782af
commit 98db2e2630
3 changed files with 10 additions and 10 deletions

View file

@ -295,7 +295,7 @@
type="range"
bind:value={config.processing.blur.min_sharpness}
min="10"
max="50"
max="150"
step="1"
/>
<span class="value">{Number(config.processing.blur.min_sharpness).toFixed(0)}</span>

View file

@ -184,7 +184,7 @@ impl Default for BlurConfig {
fn default() -> Self {
Self {
enabled: true,
min_sharpness: 100.0,
min_sharpness: 75.0,
}
}
}

View file

@ -100,8 +100,8 @@ impl Pipeline {
/// 2. DecodeImageStep - Load and orient the image (always)
/// 3. CropAndResizeStep - Extract face region with padding and resize to output size (always)
/// 4. BrightnessStep - Filter by luminance on face region within cropped image (if enabled)
/// 5. BlurStep - Filter blurry images using gradient magnitude (if enabled)
/// 6. HeadPoseStep - Filter non-frontal faces (if enabled)
/// 5. HeadPoseStep - Filter non-frontal faces (if enabled)
/// 6. BlurStep - Filter blurry images using gradient magnitude (if enabled)
/// 7. LandmarksStep - Detect 68 facial landmarks (always)
/// 8. EyeFilterStep - Filter closed eyes by EAR (if enabled)
/// 9. AlignmentStep - Align face based on eye positions and resize to final output (always)
@ -127,16 +127,16 @@ impl Pipeline {
pipeline.add_step(Box::new(BrightnessStep));
}
// Optional: Blur detection
if config.processing.blur.enabled {
pipeline.add_step(Box::new(BlurStep));
}
// Optional: Head pose validation
if config.processing.head_pose.enabled {
pipeline.add_step(Box::new(HeadPoseStep));
}
// Optional: Blur detection
if config.processing.blur.enabled {
pipeline.add_step(Box::new(BlurStep));
}
// Core: Always detect landmarks (required for alignment)
pipeline.add_step(Box::new(LandmarksStep));
@ -166,8 +166,8 @@ impl Pipeline {
pipeline.add_step(Box::new(DecodeImageStep));
pipeline.add_step(Box::new(CropAndResizeStep));
pipeline.add_step(Box::new(BrightnessStep));
pipeline.add_step(Box::new(BlurStep));
pipeline.add_step(Box::new(HeadPoseStep));
pipeline.add_step(Box::new(BlurStep));
pipeline.add_step(Box::new(LandmarksStep));
pipeline.add_step(Box::new(EyeFilterStep));
pipeline.add_step(Box::new(AlignmentStep));