Nodes/ComfyUI-Impact-BIGdetector-BBOX-SEGS/🎯 Cascade Detector Advanced (Bbox/Segm, Staged)
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.

By Devourer56Β·Created 7 months agoΒ·Updated 6 months agoΒ· 0
🎯 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)

NameTypeDefaultDescription
imageIMAGEβ€”
modeCOMBOsequential3 options: sequential, parallel, parallel_per_segment
target_sizeINT64064–16384β€”
max_sizeINT102464–16384β€”
iou_thresholdFLOAT1.000–1β€”
include_masks_in_outputBOOLEANtrueβ€”
simplify_masksBOOLEANtrueβ€”
simplify_kernel_sizeINT51–21β€”
simplify_iterationsINT11–10β€”
segs_inputoptSEGSβ€”
stage_1_enabledoptBOOLEANtrueβ€”
stage_1_detector_typeoptCOMBObbox2 options: bbox, segm
stage_1_bbox_detectoroptBBOX_DETECTORβ€”
stage_1_segm_detectoroptSEGM_DETECTORβ€”
stage_1_confidenceoptFLOAT0.250–1β€”
stage_1_iou_thresholdoptFLOAT0.450–1β€”
stage_1_dilationoptINT0-512–512β€”
stage_1_classesoptSTRINGβ€”
stage_1_crop_factoroptFLOAT1.01–10β€”
stage_1_scale_modeoptCOMBObbox3 options: bbox, crop_region, fixed
stage_1_target_sizeoptINT64064–16384β€”
stage_1_max_sizeoptINT102464–16384β€”
stage_1_process_emptyoptBOOLEANtrueβ€”
stage1_input_filter_labelsoptSTRINGComma-separated labels to PROCESS on Stage 1 (e.g., 'person,car'). Empty = process all input segments.
min_confidenceoptFLOAT0.000–1β€”
min_bbox_widthoptINT11–16384β€”
min_bbox_heightoptINT11–16384β€”
stage_2_enabledoptBOOLEANtrueβ€”
stage_2_detector_typeoptCOMBObbox2 options: bbox, segm
stage_2_bbox_detectoroptBBOX_DETECTORβ€”
stage_2_segm_detectoroptSEGM_DETECTORβ€”
stage_2_confidenceoptFLOAT0.250–1β€”
stage_2_iou_thresholdoptFLOAT0.450–1β€”
stage_2_dilationoptINT0-512–512β€”
stage_2_classesoptSTRINGβ€”
stage_2_crop_factoroptFLOAT1.01–10β€”
stage_2_scale_modeoptCOMBObbox3 options: bbox, crop_region, fixed
stage_2_target_sizeoptINT64064–16384β€”
stage_2_max_sizeoptINT102464–16384β€”
stage_2_process_emptyoptBOOLEANfalseβ€”
stage2_input_filter_labelsoptSTRINGComma-separated labels to PROCESS on Stage 2 (e.g., 'face'). Empty = process all Stage 1 results.
stage_3_enabledoptBOOLEANtrueβ€”
stage_3_detector_typeoptCOMBObbox2 options: bbox, segm
stage_3_bbox_detectoroptBBOX_DETECTORβ€”
stage_3_segm_detectoroptSEGM_DETECTORβ€”
stage_3_confidenceoptFLOAT0.250–1β€”
stage_3_iou_thresholdoptFLOAT0.450–1β€”
stage_3_dilationoptINT0-512–512β€”
stage_3_classesoptSTRINGβ€”
stage_3_crop_factoroptFLOAT1.01–10β€”
stage_3_scale_modeoptCOMBObbox3 options: bbox, crop_region, fixed
stage_3_target_sizeoptINT64064–16384β€”
stage_3_max_sizeoptINT102464–16384β€”
stage_3_process_emptyoptBOOLEANfalseβ€”
stage3_input_filter_labelsoptSTRINGComma-separated labels to PROCESS on Stage 3 (e.g., 'eyes,nose'). Empty = process all Stage 2 results.
drop_sizeoptINT11–100β€”

Outputs (8)

NameTypeDescription
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β€”