SEGS to Face Crop Data:
SEGS to Face Crop Data retrieves an already-prepared cropped image and its associated crop region from one selected entry in a SEGS collection. It is useful when you want to pass a particular detected area into a later image-processing step while keeping the region information associated with that crop. The node selects and returns existing data; it does not detect faces, create a new crop, or verify that the selected entry contains a face.
SEGS to Face Crop Data Input Parameters:
segs
A required SEGS collection containing the entry you want to retrieve. The node reads the selected entry’s stored cropped image and crop region, so the data in this collection directly determines both results. Supply a SEGS collection whose selected entry has those values available. No default value or size limit is specified for this input.
face_index
Selects an entry from the collection inside segs by its position. Index 0 selects the first entry, 1 the second, and so on; the selected entry supplies both outputs. The minimum is 0 and the default is 0. No maximum is specified in the interface, but the value must be smaller than the number of available entries. The name reflects an intended face-selection use, although the node itself does not check whether the entry is a face.
SEGS to Face Crop Data Output Parameters:
image
The selected entry’s stored cropped_image, returned through an IMAGE socket. This is the crop already present in the SEGS entry, not an image newly cropped by this node. You can use it in downstream steps that accept an image.
crop_data
The selected entry’s stored crop_region, returned through a CROP_DATA socket. It carries the region information associated with the returned image, allowing a compatible downstream node to use that crop location. The exact contents of the region value are determined by the supplied SEGS entry; this node passes it through unchanged.
SEGS to Face Crop Data Usage Tips:
- Start with
face_indexset to0when you want the first available entry. Increase it only after confirming the SEGS collection contains additional entries. - Connect a SEGS source that already includes cropped images and crop regions. This node retrieves those stored values rather than generating them.
- Keep the
imageandcrop_dataoutputs from the same node together when a later step needs both the crop and its associated region.
SEGS to Face Crop Data Common Errors and Solutions:
IndexError: list index out of range
- Explanation: The requested
face_indexmay be beyond the available entries, or the collection may be empty. The exact message can vary with the collection type. - Solution: Check that your SEGS source produced at least one entry, then choose an index from
0up to one less than the entry count.
TypeError: 'NoneType' object is not subscriptable
- Explanation: The node may have received
Noneinstead of a usable SEGS collection. It needs to read both the collection and a selected entry. - Solution: Check the connection to
segsand confirm the upstream node produced a valid result.
AttributeError: ... has no attribute 'cropped_image' or AttributeError: ... has no attribute 'crop_region'
- Explanation: The selected entry does not provide one of the stored values this node reads.
- Solution: Use a compatible SEGS source and check that the selected entry contains both a cropped image and crop region.
TypeError: '...' object is not subscriptable
- Explanation: The value supplied as
segs, or the collection within it, does not support the indexed access this node requires. - Solution: Connect a valid SEGS output rather than an image, a single entry, or another incompatible value.
