Skip to content

jstit/ComfyUI-Yolo-Cropper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI-Yolo-Cropper

A very simple ComfyUI node to help you create image crops and masks using YoloV8.

It is usefull for creating square crops when working with controlnets, ip-adapters etc that need 1:1 ratio input like 1024x1024 for example.

It uses YoloV8 - Ultralytics - with COCO 80 objects for detection added with a specific feature for face detection.

When multiple objects are detected, it will return the biggest bounding box.

All necessary models will be downloaded automatically at first use.

image

Install

To install this node in addition to an existing installation of ComfyUI, you can follow the following steps:

1. goto ComfyUI/custom_nodes dir in terminal(cmd)
2. git clone https://github.com/tooldigital/ComfyUI-Yolo-Cropper.git
3. Restart ComfyUI

Input

  • image = Any input image will do
  • object = dropdown list with COCO 80 objects, it has face as an extra.
  • padding = padding that is added to the square crop (not the orginal crop)

Output

  • bounding box = array of values x,y,width,height
  • image yolo detections = an image showing all detected assets and bounding boxes
  • image original crop = the image cropped according the actual bounding box
  • image square crop = the image cropped according a square bounding box starting from the center of the original bounding box
  • mask orginal crop = a black and white mask cropped according the actual bounding box
  • mask square crop = a black and white mask cropped according a square bounding box starting from the center of the original bounding box

Basic flow with face and person

image

Basic flow with object - parking meter

image

Flow using IP-Adapter FaceID

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%