NODES:Directory Loader, Filter Images Without Faces, Detect Faces and Draw Detection Box
Loads all images from a directory in a batch torch tensor. The width and height of all images are upscaled to match those of the largest image file in the directory using PIL's
Image.LANCZOS
Loads all images from a direcotry as list of torch tensors, allowing the user to preview images like the built-in
"Preview Image"
node and select one from the list to be the node's output.
Takes as input a batch of images and returns only those which contain at least one face in it using
facenet_pytorch
's implementation ofMTCNN
Custom node which loads all images from a directory to a Gallery Manager object which can perform some custom functions defined in the extension.
Warning:
The operations performed with Gallery Managers take place in the OS file system using the charloratools package, for more information please check the package's github. While using the operation nodes in ComfyUI you can expect their return inside the "output" folder. Uses thePreview Image Node
to show the images that were batched in the UI.
Custom nodes which allow easy conversion between
GalleryManager
outputs andtorch's tensor batches of images
Custom node which
adds all images from 2 Gallery Manager nodes into a single torch image batch
tensor (Will duplicate the repeated images in the result.), Also Returns a Gallery Manager Object.
Takes as input a batch of images and a single reference image and returns images from the batch which contain the reference image using
facenet_pytorch
's implementation ofMTCNN
andInceptionResnetV1
Takes as input a batch of images and returns only those which contain at least one face in it using facenet_pytorch's implementation of
MTCNN
. The returned images have theMTCNN
's predicted detection boxes drawn usingopencv-python
library.
Compares the hashes of all images in a batch and deletes the images with repeated hashes. Takes as input the torch tensor image batch and a string representing which hashing function to use. The available ones are :
sha256
,P-Hash
,D-Hash
,Average-Hash
andCrop-Resistant-Hash
Generates a standalone HTML image gallery from a torch tensor batch of images. The gallery is saved in the output's folder as
generated_img_gallery.html
orgenerated_img_gallery_{unique_datetime_string}
if there's already a file with that name. The gallery uses js and css distributed by public cdn's to improve the display experience.
Filters images with multiple faces - Takes as input a torch image batch and returns only those which have only a single face on it.