ComfyUI-aichemy-nodes

ComfyUI-aichemy-nodes
★ 6

YOLOv8分割掩码缩放对齐ComfyUI集成
用于处理YOLOv8分割掩码的缩放与对齐,方便在ComfyUI中将分割结果调整到目标分辨率或画布,简化后续合成与编辑。
💡 将YOLOv8分割掩码缩放并对齐到目标画布以便合成。
🍴 3 Forks💻 Python🔄 2024-05-22
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/6862a2001521
📦 requirements.txt
certifi==2023.11.17
charset-normalizer==3.3.2
contourpy==1.2.0
cycler==0.12.1
filelock==3.13.1
fonttools==4.47.2
fsspec==2023.12.2
hub-sdk==0.0.3
idna==3.6
Jinja2==3.1.3
kiwisolver==1.4.5
MarkupSafe==2.1.3
matplotlib==3.8.2
mpmath==1.3.0
networkx==3.2.1
numpy==1.26.3
opencv-python==4.9.0.80
packaging==23.2
pandas==2.1.4
pillow==10.2.0
psutil==5.9.7
py-cpuinfo==9.0.0
pyparsing==3.1.1
python-dateutil==2.8.2
pytz==2023.3.post1
PyYAML==6.0.1
requests==2.31.0
scipy==1.11.4
seaborn==0.13.1
six==1.16.0
sympy==1.12
thop==0.1.1.post2209072238
torch==2.1.2
torchvision==0.16.2
tqdm==4.66.1
typing_extensions==4.9.0
tzdata==2023.4
ultralytics==8.1.1
urllib3==2.1.0
YOLOv8-workflow
YOLOv8-comparison
📄 README

ComfyUI aichemy nodes

Simple node to handle scaling of YOLOv8 segmentation masks

Installation

Download or git clone this repository inside ComfyUI/custom_nodes/ directory or use the Manager.

  • Git clone this repo to the ComfyUI/custom_nodes/ path or use the Manager.
  • git clone https://github.com/HAL41/ComfyUI_aichemy_nodes

    Nodes

    YOLOv8 Segmentation

    While the returned annotated image from YOLOv8 has proper scaling, the returned mask does not. The segmentation is done on a lower resolution and with padding. The mask doesn’t align properly when you try to simply resize the mask to the original resolution.

    This simple node does the computation to remove the padding and resize the mask to the original resolution. This way you can quickly compose images together using the mask found by YOLOv8 model.

    The comparison can be seen on the following image. The image on the left shows the properly scaled annotated images straight from YOLOv8. The top row shows the bad composite image created by scaled mask from standard YOLOv8 node. The bottom row shows the same images using this custom node. As you can see the border above shoulders is gone as well as the early cropping on the bottom of the image.

    The two images can be compared here: