ComfyUI > Nodes > ComfyUI_KimNodes > 🍒BoundingBox_Cropper✀边界框裁剪

ComfyUI Node: 🍒BoundingBox_Cropper✀边界框裁剪

Class Name

BoundingBox_Cropper

Category
🍒 Kim-Nodes/✂ Crop | 裁剪工具
Author
Kim (Account age: 2536days)
Extension
ComfyUI_KimNodes
Latest Updated
2025-09-22
Github Stars
0.05K

How to Install ComfyUI_KimNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI_KimNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_KimNodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🍒BoundingBox_Cropper✀边界框裁剪 Description

Extracts image regions using bounding box coordinates for tasks like object detection and segmentation.

🍒BoundingBox_Cropper✀边界框裁剪:

The BoundingBox_Cropper node is designed to facilitate the extraction of specific regions from an image based on predefined bounding box coordinates. This node is particularly useful for tasks that require focusing on certain areas of an image, such as object detection, image segmentation, or any application where isolating parts of an image is necessary. By leveraging bounding box coordinates, the node can efficiently crop images to highlight or analyze specific sections, thereby enhancing the precision and relevance of image processing tasks. The node's ability to handle multiple bounding boxes and its flexibility in selecting specific indices or cropping all detected boxes make it a versatile tool in the AI artist's toolkit.

🍒BoundingBox_Cropper✀边界框裁剪 Input Parameters:

image

The image parameter represents the input image tensor that the node will process. It is expected to be in the format (B, H, W, C), where B is the batch size, H is the height, W is the width, and C is the number of channels. This parameter is crucial as it provides the raw data from which the bounding boxes will be used to crop specific regions. The image must be in the correct format to ensure accurate cropping.

bboxes

The bboxes parameter is a list of bounding box coordinates that define the regions of the image to be cropped. Each bounding box is typically represented by four values: (x1, y1, x2, y2), which denote the top-left and bottom-right corners of the box. This parameter is essential for guiding the cropping process, as it specifies the exact areas of interest within the image.

bbox_index

The bbox_index parameter determines which bounding box to use for cropping. It is an integer value with a default of 0, a minimum of -1, and a maximum of 100. If set to -1, the node will output cropped images for all detected bounding boxes. This parameter allows users to control whether they want to focus on a specific bounding box or process all available boxes, providing flexibility in image processing tasks.

🍒BoundingBox_Cropper✀边界框裁剪 Output Parameters:

IMAGE

The output parameter IMAGE is a list of cropped images resulting from the bounding box coordinates applied to the input image. Each cropped image corresponds to a specific bounding box, and the list can contain multiple images if multiple bounding boxes are processed. This output is crucial for further analysis or processing, as it provides the isolated regions of interest from the original image.

🍒BoundingBox_Cropper✀边界框裁剪 Usage Tips:

  • To crop all detected bounding boxes in an image, set the bbox_index parameter to -1. This will ensure that every bounding box is processed, and you receive a list of all cropped regions.
  • Ensure that the input image is in the correct format (B, H, W, C) to avoid errors during processing. If your image is not in this format, consider reshaping it before using the node.

🍒BoundingBox_Cropper✀边界框裁剪 Common Errors and Solutions:

Invalid image format

  • Explanation: This error occurs when the input image is not in the expected format (B, H, W, C).
  • Solution: Verify the shape of your input image and ensure it matches the required format. If necessary, reshape the image tensor to the correct dimensions.

Index out of range

  • Explanation: This error happens when the bbox_index specified is greater than the number of available bounding boxes.
  • Solution: Check the number of bounding boxes available and ensure that the bbox_index is within the valid range. If you want to process all bounding boxes, set bbox_index to -1.

🍒BoundingBox_Cropper✀边界框裁剪 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_KimNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.