INNER CODE UNIT · Python
height_scale
fashn-AI/fashn-vton-1.5 · scripts/debug_masks.py:107
height_scale = seg_pred.shape[0] / baseline_height
print(f"Height scale factor: {height_scale:.3f} (height: {seg_pred.shape[0]})")
# Add body parts to mask based on body coverage
labels_ids_dict = FASHN_LABELS_TO_IDS.copy()
original_labels = labels_to_segment_indices.copy()
if mask_limbs:
if body_coverage in ("full", "upper"):
labels_to_segment_indices += [labels_ids_dict["arms"], labels_ids_dict["torso"]]
if body_coverage in ("full", "lower"):
labels_to_segment_indices += [labels_ids_dict["legs"]]
print(f"Original label indices: {original_labels}")
print(f"Labels to segment (with limbs): {labels_to_segment_indices}")
# Create base mask
mask = np.isin(seg_pred, labels_to_segment_indices)