Skip to content

Commit 4b69cba

Browse files
committed
Update README
1 parent e3ac35e commit 4b69cba

File tree

7 files changed

+26
-1
lines changed

7 files changed

+26
-1
lines changed

Docs/pics/img_mask_blur_21.jpg

45.2 KB
Loading

Docs/pics/img_mask_blur_41.jpg

47.8 KB
Loading

Docs/pics/img_mask_blur_61.jpg

50.4 KB
Loading

Docs/pics/img_mask_erode_0.jpg

52.4 KB
Loading

Docs/pics/img_mask_erode_20.jpg

50.8 KB
Loading

Docs/pics/img_mask_erode_40.jpg

49 KB
Loading

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,35 @@ Config files contain two main parts:
101101
- *crop_size* - size of images SimSwap models works with.
102102
- *checkpoint_type* - the official model works with 224x224 crops and has different pre/post processings (imagenet like). Latest official repository allows you to train your own models, but the architecture and pre/post processings are slightly different (1. removed Tanh from the last layer; 2. normalization to [0...1] range). **If you run the official 224x224 model then set this parameter to "official_224", otherwise "none".**
103103
- *face_alignment_type* - affects reference face key points coordinates. **Possible values are "ffhq" and "none". Try both of them to see which one works better for your data.**
104-
- *erosion_kernel_size* - attenuates the size of the post-processing mask. You might want to play with this parameter (**tested values are in the range [4...40]**).
104+
- *erode_mask_value* - a non-zero value. It's used for the post-processing mask size attenuation. You might want to play with this parameter.
105+
- *smooth_mask_value* - an odd non-zero value. It's used for smoothing edges of the post-processing mask. Usually is set to *erode_mask_value* + 1.
105106
- *face_detector_threshold* - values in range [0.0...1.0]. Higher value reduces probability of FP detections but increases the probability of FN.
106107
- *specific_latent_match_threshold* - values in range [0.0...inf]. Usually takes small values around 0.05.
107108

109+
### Examples of post-processing mask
110+
111+
<details>
112+
<summary><b>Effect of the erode_mask_value</b></summary>
113+
114+
erode_mask_value = 0
115+
![img_mask_erode_0.jpg](Docs/pics/img_mask_erode_0.jpg "erode_mask_value = 0")
116+
erode_mask_value = 20
117+
![img_mask_erode_20.jpg](Docs/pics/img_mask_erode_20.jpg "erode_mask_value = 20")
118+
erode_mask_value = 40
119+
![img_mask_erode_40.jpg](Docs/pics/img_mask_erode_40.jpg "erode_mask_value = 40")
120+
</details>
121+
122+
<details>
123+
<summary><b>Effect of the smooth_mask_value</b></summary>
124+
125+
smooth_mask_value = 21
126+
![img_mask_blur_21.jpg](Docs/pics/img_mask_blur_21.jpg "smooth_mask_value = 21")
127+
smooth_mask_value = 41
128+
![img_mask_blur_41.jpg](Docs/pics/img_mask_blur_41.jpg "smooth_mask_value = 41")
129+
smooth_mask_value = 61
130+
![img_mask_blur_41.jpg](Docs/pics/img_mask_blur_61.jpg "smooth_mask_value = 61")
131+
</details>
132+
108133
### Overriding parameters with CMD
109134
Every parameter in a config file can be overridden by specifying it directly with CMD. For example:
110135

0 commit comments

Comments
 (0)