vitordigitizing commited on
Commit
94086a2
Β·
verified Β·
1 Parent(s): 9ca84cb

Update faceless_processing.py

Browse files
Files changed (1) hide show
  1. faceless_processing.py +9 -9
faceless_processing.py CHANGED
@@ -91,10 +91,10 @@ class LineartConfig:
91
  canny_low: int = 30 # fallback only (auto-Canny active by default)
92
  canny_high: int = 120 # fallback only
93
  bilateral_d: int = 8 # strong smoothing to kill texture
94
- bilateral_sigma_color: int = 120 # aggressive colour smoothing
95
- bilateral_sigma_space: int = 120
96
- gaussian_ksize: int = 13 # larger pre-blur for cleaner edges
97
- min_contour_perimeter: float = 60.0 # removes debris while keeping body/clothing structure
98
  interior_line_thickness: int = 3 # thinner than silhouette, embroidery-appropriate
99
 
100
  # Secondary detail pass β€” OFF (adds too much clothing/texture noise)
@@ -106,12 +106,12 @@ class LineartConfig:
106
  detail_bilateral_d: int = 7
107
  detail_bilateral_sigma: int = 60
108
 
109
- # Embroidery stitch feasibility β€” only lines long enough for stitching
110
- min_embroidery_stitch_px: int = 50
111
 
112
- # Auto-Canny sigma β€” lower = fewer, stronger edges only (structural lines).
113
- # 0.25 detects only major boundaries, filters out wrinkles/skin texture.
114
- canny_sigma: float = 0.25
115
 
116
  # Aspect ratio filter: 0 = disabled. Enable (e.g. 1.8) only if blob noise reappears.
117
  min_aspect_ratio: float = 0
 
91
  canny_low: int = 30 # fallback only (auto-Canny active by default)
92
  canny_high: int = 120 # fallback only
93
  bilateral_d: int = 8 # strong smoothing to kill texture
94
+ bilateral_sigma_color: int = 90 # less aggressive β€” preserves child/small boundaries
95
+ bilateral_sigma_space: int = 90
96
+ gaussian_ksize: int = 9 # moderate pre-blur (13 was too large for small subjects)
97
+ min_contour_perimeter: float = 30.0 # lower β€” children have shorter contour lines
98
  interior_line_thickness: int = 3 # thinner than silhouette, embroidery-appropriate
99
 
100
  # Secondary detail pass β€” OFF (adds too much clothing/texture noise)
 
106
  detail_bilateral_d: int = 7
107
  detail_bilateral_sigma: int = 60
108
 
109
+ # Embroidery stitch feasibility β€” lower to preserve small subjects (children)
110
+ min_embroidery_stitch_px: int = 20
111
 
112
+ # Auto-Canny sigma β€” 0.28 catches softer edges of smaller subjects (children, hands)
113
+ # while still filtering out most skin/fabric texture noise.
114
+ canny_sigma: float = 0.28
115
 
116
  # Aspect ratio filter: 0 = disabled. Enable (e.g. 1.8) only if blob noise reappears.
117
  min_aspect_ratio: float = 0