ComfyUI Node
π― Cascade Detector Advanced (Bbox/Segm, Staged)
Cascaded detector with INPUT LABEL FILTERING before detection on each stage. NEW: stageX_input_filter_labels filters WHICH segments get processed on each stage (e.g., Stage 2 processes ONLY 'face' segments from Stage 1). This prevents wasted detection attempts (e.g., searching for eyes on arms/torso) and enables efficient multi-stage workflows. FIXED: Correctly handles non-square resolutions (e.g., 1152x1280) and Impact Pack compatibility by using numpy masks.
π― Cascade Detector Advanced (Bbox/Segm, Staged)
- image
- segs_input
- stage_1_bbox_detector
- stage_1_segm_detector
- stage_2_bbox_detector
- stage_2_segm_detector
- stage_3_bbox_detector
- stage_3_segm_detector
- segs_output_all_stages (Combined)
- preview_image (Combined Detections)
- cropped_fragments_image (All Detections)
- stage1_segs (Stage 1 Results)
- stage2_segs (Stage 2 Results)
- stage3_segs (Stage 3 Results)
- masked_fragments_image (Masked Fragments)
- image_bypass (Original if No Detections)
βmodesequentialβΊ
βtarget_size640βΊ
βmax_size1024βΊ
βiou_threshold1.00βΊ
βinclude_masks_in_outputtrueβΊ
βsimplify_maskstrueβΊ
βsimplify_kernel_size5βΊ
βsimplify_iterations1βΊ
βstage_1_enabledtrueβΊ
βstage_1_detector_typebboxβΊ
βstage_1_confidence0.25βΊ
βstage_1_iou_threshold0.45βΊ
βstage_1_dilation0βΊ
βstage_1_classesβΊ
βstage_1_crop_factor1.0βΊ
βstage_1_scale_modebboxβΊ
βstage_1_target_size640βΊ
βstage_1_max_size1024βΊ
βstage_1_process_emptytrueβΊ
βstage1_input_filter_labelsβΊ
βmin_confidence0.00βΊ
βmin_bbox_width1βΊ
βmin_bbox_height1βΊ
βstage_2_enabledtrueβΊ
βstage_2_detector_typebboxβΊ
βstage_2_confidence0.25βΊ
βstage_2_iou_threshold0.45βΊ
βstage_2_dilation0βΊ
βstage_2_classesβΊ
βstage_2_crop_factor1.0βΊ
βstage_2_scale_modebboxβΊ
βstage_2_target_size640βΊ
βstage_2_max_size1024βΊ
βstage_2_process_emptyfalseβΊ
βstage2_input_filter_labelsβΊ
βstage_3_enabledtrueβΊ
βstage_3_detector_typebboxβΊ
βstage_3_confidence0.25βΊ
βstage_3_iou_threshold0.45βΊ
βstage_3_dilation0βΊ
βstage_3_classesβΊ
βstage_3_crop_factor1.0βΊ
βstage_3_scale_modebboxβΊ
βstage_3_target_size640βΊ
βstage_3_max_size1024βΊ
βstage_3_process_emptyfalseβΊ
βstage3_input_filter_labelsβΊ
βdrop_size1βΊ
CategoryDetection/Cascade
Inputs (56)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| mode | COMBO | sequential | 3 options: sequential, parallel, parallel_per_segment |
| target_size | INT | 64064β16384 | β |
| max_size | INT | 102464β16384 | β |
| iou_threshold | FLOAT | 1.000β1 | β |
| include_masks_in_output | BOOLEAN | true | β |
| simplify_masks | BOOLEAN | true | β |
| simplify_kernel_size | INT | 51β21 | β |
| simplify_iterations | INT | 11β10 | β |
| segs_inputopt | SEGS | β | |
| stage_1_enabledopt | BOOLEAN | true | β |
| stage_1_detector_typeopt | COMBO | bbox | 2 options: bbox, segm |
| stage_1_bbox_detectoropt | BBOX_DETECTOR | β | |
| stage_1_segm_detectoropt | SEGM_DETECTOR | β | |
| stage_1_confidenceopt | FLOAT | 0.250β1 | β |
| stage_1_iou_thresholdopt | FLOAT | 0.450β1 | β |
| stage_1_dilationopt | INT | 0-512β512 | β |
| stage_1_classesopt | STRING | β | |
| stage_1_crop_factoropt | FLOAT | 1.01β10 | β |
| stage_1_scale_modeopt | COMBO | bbox | 3 options: bbox, crop_region, fixed |
| stage_1_target_sizeopt | INT | 64064β16384 | β |
| stage_1_max_sizeopt | INT | 102464β16384 | β |
| stage_1_process_emptyopt | BOOLEAN | true | β |
| stage1_input_filter_labelsopt | STRING | Comma-separated labels to PROCESS on Stage 1 (e.g., 'person,car'). Empty = process all input segments. | |
| min_confidenceopt | FLOAT | 0.000β1 | β |
| min_bbox_widthopt | INT | 11β16384 | β |
| min_bbox_heightopt | INT | 11β16384 | β |
| stage_2_enabledopt | BOOLEAN | true | β |
| stage_2_detector_typeopt | COMBO | bbox | 2 options: bbox, segm |
| stage_2_bbox_detectoropt | BBOX_DETECTOR | β | |
| stage_2_segm_detectoropt | SEGM_DETECTOR | β | |
| stage_2_confidenceopt | FLOAT | 0.250β1 | β |
| stage_2_iou_thresholdopt | FLOAT | 0.450β1 | β |
| stage_2_dilationopt | INT | 0-512β512 | β |
| stage_2_classesopt | STRING | β | |
| stage_2_crop_factoropt | FLOAT | 1.01β10 | β |
| stage_2_scale_modeopt | COMBO | bbox | 3 options: bbox, crop_region, fixed |
| stage_2_target_sizeopt | INT | 64064β16384 | β |
| stage_2_max_sizeopt | INT | 102464β16384 | β |
| stage_2_process_emptyopt | BOOLEAN | false | β |
| stage2_input_filter_labelsopt | STRING | Comma-separated labels to PROCESS on Stage 2 (e.g., 'face'). Empty = process all Stage 1 results. | |
| stage_3_enabledopt | BOOLEAN | true | β |
| stage_3_detector_typeopt | COMBO | bbox | 2 options: bbox, segm |
| stage_3_bbox_detectoropt | BBOX_DETECTOR | β | |
| stage_3_segm_detectoropt | SEGM_DETECTOR | β | |
| stage_3_confidenceopt | FLOAT | 0.250β1 | β |
| stage_3_iou_thresholdopt | FLOAT | 0.450β1 | β |
| stage_3_dilationopt | INT | 0-512β512 | β |
| stage_3_classesopt | STRING | β | |
| stage_3_crop_factoropt | FLOAT | 1.01β10 | β |
| stage_3_scale_modeopt | COMBO | bbox | 3 options: bbox, crop_region, fixed |
| stage_3_target_sizeopt | INT | 64064β16384 | β |
| stage_3_max_sizeopt | INT | 102464β16384 | β |
| stage_3_process_emptyopt | BOOLEAN | false | β |
| stage3_input_filter_labelsopt | STRING | Comma-separated labels to PROCESS on Stage 3 (e.g., 'eyes,nose'). Empty = process all Stage 2 results. | |
| drop_sizeopt | INT | 11β100 | β |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| segs_output_all_stages (Combined) | SEGS | β |
| preview_image (Combined Detections) | IMAGE | β |
| cropped_fragments_image (All Detections) | IMAGE | β |
| stage1_segs (Stage 1 Results) | SEGS | β |
| stage2_segs (Stage 2 Results) | SEGS | β |
| stage3_segs (Stage 3 Results) | SEGS | β |
| masked_fragments_image (Masked Fragments) | IMAGE | β |
| image_bypass (Original if No Detections) | IMAGE | β |