Spaces:
Sleeping
Sleeping
Update faceless_processing.py
Browse files- 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 =
|
| 95 |
-
bilateral_sigma_space: int =
|
| 96 |
-
gaussian_ksize: int =
|
| 97 |
-
min_contour_perimeter: float =
|
| 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 β
|
| 110 |
-
min_embroidery_stitch_px: int =
|
| 111 |
|
| 112 |
-
# Auto-Canny sigma β
|
| 113 |
-
#
|
| 114 |
-
canny_sigma: float = 0.
|
| 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
|