Spaces:
Running
on
Zero
Running
on
Zero
update workflow, optimize face mask
Browse files
app.py
CHANGED
|
@@ -493,7 +493,7 @@ def generate_image(model_image, hairstyle_template_image):
|
|
| 493 |
)
|
| 494 |
|
| 495 |
growmask_502 = growmask.expand_mask(
|
| 496 |
-
expand=
|
| 497 |
tapered_corners=True,
|
| 498 |
mask=get_value_at_index(layermask_personmaskultra_v2_327, 1),
|
| 499 |
)
|
|
@@ -633,9 +633,9 @@ def generate_image(model_image, hairstyle_template_image):
|
|
| 633 |
|
| 634 |
facesegmentation_505 = facesegmentation.segment(
|
| 635 |
area="face+forehead (if available)",
|
| 636 |
-
grow=-
|
| 637 |
grow_tapered=False,
|
| 638 |
-
blur=
|
| 639 |
analysis_models=get_value_at_index(faceanalysismodels_506, 0),
|
| 640 |
image=get_value_at_index(
|
| 641 |
layerutility_imagescalebyaspectratio_v2_331, 0
|
|
@@ -669,9 +669,9 @@ def generate_image(model_image, hairstyle_template_image):
|
|
| 669 |
|
| 670 |
facesegmentation_838 = facesegmentation.segment(
|
| 671 |
area="face+forehead (if available)",
|
| 672 |
-
grow
|
| 673 |
grow_tapered=False,
|
| 674 |
-
blur=
|
| 675 |
analysis_models=get_value_at_index(faceanalysismodels_840, 0),
|
| 676 |
image=get_value_at_index(layerutility_imageblend_v2_399, 0),
|
| 677 |
)
|
|
@@ -867,9 +867,9 @@ def generate_image_bald(model_image):
|
|
| 867 |
|
| 868 |
facesegmentation_505 = facesegmentation.segment(
|
| 869 |
area="face+forehead (if available)",
|
| 870 |
-
grow=-
|
| 871 |
grow_tapered=False,
|
| 872 |
-
blur=
|
| 873 |
analysis_models=get_value_at_index(faceanalysismodels_506, 0),
|
| 874 |
image=get_value_at_index(
|
| 875 |
layerutility_imagescalebyaspectratio_v2_331, 0
|
|
|
|
| 493 |
)
|
| 494 |
|
| 495 |
growmask_502 = growmask.expand_mask(
|
| 496 |
+
expand=30,
|
| 497 |
tapered_corners=True,
|
| 498 |
mask=get_value_at_index(layermask_personmaskultra_v2_327, 1),
|
| 499 |
)
|
|
|
|
| 633 |
|
| 634 |
facesegmentation_505 = facesegmentation.segment(
|
| 635 |
area="face+forehead (if available)",
|
| 636 |
+
grow=-20,
|
| 637 |
grow_tapered=False,
|
| 638 |
+
blur=51,
|
| 639 |
analysis_models=get_value_at_index(faceanalysismodels_506, 0),
|
| 640 |
image=get_value_at_index(
|
| 641 |
layerutility_imagescalebyaspectratio_v2_331, 0
|
|
|
|
| 669 |
|
| 670 |
facesegmentation_838 = facesegmentation.segment(
|
| 671 |
area="face+forehead (if available)",
|
| 672 |
+
grow=-20,
|
| 673 |
grow_tapered=False,
|
| 674 |
+
blur=51,
|
| 675 |
analysis_models=get_value_at_index(faceanalysismodels_840, 0),
|
| 676 |
image=get_value_at_index(layerutility_imageblend_v2_399, 0),
|
| 677 |
)
|
|
|
|
| 867 |
|
| 868 |
facesegmentation_505 = facesegmentation.segment(
|
| 869 |
area="face+forehead (if available)",
|
| 870 |
+
grow=-20,
|
| 871 |
grow_tapered=False,
|
| 872 |
+
blur=51,
|
| 873 |
analysis_models=get_value_at_index(faceanalysismodels_506, 0),
|
| 874 |
image=get_value_at_index(
|
| 875 |
layerutility_imagescalebyaspectratio_v2_331, 0
|