核心功能:
detector SEGS 自动标记脸、手、人物。
* bbox 识别区域,模型有手和脸。
* SAM 精准识别手和脸的边缘。
detailer 重绘
实现思路:
1.detector识别标记脸、手的mask。
2.使用detailer对mask区域进行重绘。
Guide_size、guide_size_for、max_size 都是控制重绘区域的参数。
guide_size_for 设置为 BBOX时,BBOX识别的区域最小边要放大到Guide_size(256)后再进行重绘,如果该区域尺寸大于Guide_size(256),则不做放大处理,直接重绘。但长边最大尺寸不超过max_size(768),如果识别区域是一个长条,需要注意修改这个尺寸,以保证短边有充足重绘空间。
* You can load models for BBOX_MODEL or SEGM_MODEL using MMDetDetectorProvider. If you load a bbox model, only BBOX_MODEL is valid in the output, and if you load a segm model, only SEGM_MODEL is valid. 您可以使用MMDetDetectorProvider加载BBOX_MODEL或SEGM_MODEL的模型。如果您加载bbox模型,则只有BBOX_MODEL在输出中有效,如果您加载segm模型,则只有SEGM_MODEL有效。
* Currently, Impact Pack is providing the more sophisticated SAM model instead of the SEGM_MODEL for silhouette extraction. 目前,Impact Pack正在提供更复杂的SAM模型,而不是SEGM_MODEL进行剪影提取。
* The default downloaded bbox model currently only detects the face area as a rectangle, and the segm model detects the silhouette of a person. 默认下载的bbox模型目前仅检测面部区域为矩形,segm模型检测一个人的轮廓。
* The difference between BBOX Detector (Combine) and BBOX Detector (SEGS) is that the former outputs a single mask by combining all detected bboxes, and the latter outputs SEGS consisting of various information, including the cropped image, mask pattern, crop position, and confidence, for each detection. SEGS can be used in other .ForEach nodes. BBOX Detector (Combine) 和BBOX Detector (SEGS)的区别在于,前者通过组合所有检测到的bbox来输出单个掩码,而后者输出由各种信息组成的SEGS,包括每个检测的裁剪图像、掩码模式、裁剪位置和置信度。SEGS可用于其他.对于每个节点。
* The "noise_mask" option determines whether to add noise only to the masked area when generating an image using "KSampler". If enabled, denoising will not be applied outside the masked area, which can result in a safer generation with stronger denoising, but it may not always produce good results. The middle image shows the result when the "noise_mask" option is disabled, and the image on the right shows the result when the "noise_mask" option is enabled. 「noise_mask」选项决定了在使用「KSampler」生成图像时,是否仅对蒙版区域添加噪声。如果启用该选项,去噪将不会应用于蒙版区域之外,这可以生成更安全、去噪更强的图像,但不一定总能产生好的结果。中间的图像显示了禁用「noise_mask」选项时的结果,右侧的图像显示了启用「noise_mask」选项时的结果。
## Detector Node
* threshold: Detect only those object whose recognized confidence is above this set value.
* dilation: Expand the detected mask area.
* crop_factor: Determine how many times the surrounding area should be included in the detail recovery process based on the detected mask area. If this value is small, the restoration may not work well because the surrounding context cannot be known.
## Detailer Node
* guide_size: This feature attempt detail recovery only when the size of the detected mask is smaller than this value. If the size is larger, this feature increase the resolution and attempt detail recovery.仅当检测到的掩码的大小小于此值时,此功能才会尝试细节恢复。如果尺寸较大,此功能会增加分辨率并尝试细节恢复。
* guide_size_for: This parameter determines whether guide_size is used based on the size of the detected face (bbox) or the size of the crop area that includes the face and is broadly cropped by crop_factor.此参数确定guide_size是否基于检测到的面的大小(bbox)或包含面并由crop_factor广泛裁剪的裁剪区域的大小。
* max_size: The guide_size increases the scale so that the shorter side reaches the guide_size. For masks with elongated shapes, this can cause a significant scale up. The max_size limits the maximum size of one side.Guide_size增加了刻度,使较短的一面达到guide_size。对于细长形状的口罩,这可能会导致显著的规模。Max_size限制了一侧的最大尺寸。
* feather: When compositing the recovered details onto the original image, this feature use a gradient to composite it so that the boundaries are not visible. The thickness of this gradient is determined.当将恢复的细节合成到原始图像上时,此功能使用梯度将其合成,以便边界不可见。这个梯度的厚度是确定的。
* force_inpaint: force_inpaint will try to force regeneration even if it is smaller than guide_size . This function is useful when you simply want to change to another type of prompt other than the function to save details. However, in this case, upscale is forcibly fixed to 1. 在使用 force_inpaint 函数时,用户想要改变提示类型,而不是使用保存细节的函数。force_inpaint 函数的作用是尝试强制重新生成,即使尺寸比指导尺寸(guide_size)小,这在用户仅希望更改提示类型时非常有用,而不是使用保存细节的函数。
* noise_mask: The decision to limit the area to be regenerated using KSampler with a mask depends on whether the noise_mask is enabled or disabled. When noise_mask is enabled, only the masked area of the image is regenerated, whereas when it is disabled, the image generation occurs for the entire cropped area, with only the mask area being cut and pasted.决定使用 KSampler 和遮罩(mask)限制要重新生成的区域取决于是否启用了 noise_mask。当启用 noise_mask 时,仅重新生成图像的遮罩区域,而当禁用时,整个裁剪区域进行图像生成,只有遮罩区域会被剪切并粘贴。
* This feature adopt the properties of KSampler because this feature use it to recover details. 这项功能采用了 KSampler 的特性,因为它利用 KSampler 来恢复细节。
inpatient重绘
手动绘制mask,输入Ksampler或者MaskDetailaer中重绘。这个与detector+Detailaer的区别在于一个手动绘制mask,一个自动绘制。
加微信 mxdiaZ 回复ai即可受邀进ai讨论群