Visit ComfyUI Online for ready-to-use ComfyUI environment
Perform image segmentation using pre-trained models for extracting specific elements with precision.
The ImageSegmentationPipeline node is designed to perform image segmentation tasks using pre-trained models from the Hugging Face Transformers library. This node allows you to extract specific categories or objects from an image by generating a mask that highlights the desired elements. By leveraging state-of-the-art models, such as those fine-tuned on datasets like Cityscapes, this node provides a powerful tool for AI artists to isolate and manipulate parts of an image with precision. Whether you are working on complex compositions or need to focus on particular objects within a scene, the ImageSegmentationPipeline simplifies the process, making it accessible even to those without a deep technical background.
This parameter expects an image file that you want to process. The image serves as the input for the segmentation model to analyze and generate the corresponding mask. The image should be in a format supported by the PIL library, such as JPEG or PNG.
This parameter is a string that specifies the name of the category or object you want to extract from the image. For example, if you are interested in segmenting cars from a street scene, you would set this parameter to "car". The accuracy of the segmentation depends on the model's training data and its ability to recognize the specified category.
This parameter allows you to choose the pre-trained model to be used for the segmentation task. The available options are "mattmdjaga/segformer_b2_clothes" and "nvidia/segformer-b1-finetuned-cityscapes-1024-1024". The default model is "mattmdjaga/segformer_b2_clothes". Each model has been fine-tuned on different datasets and may perform better on specific types of images or categories.
The output of this node is an image that contains the mask of the specified category. The mask highlights the areas of the input image that correspond to the category name provided. If the category is not found in the image, the output will be None. This mask can be used for further image processing tasks, such as compositing or applying effects to specific parts of the image.
© Copyright 2024 RunComfy. All Rights Reserved.