benchmarks.hota.models.extract_segments_with_queries
def extract_segments_with_queries(outputs, target_size, threshold = 0.5, mask_threshold = 0.5, overlap = 0.8)Reimplement Mask2Former panoptic post-processing, recording source queries.
Additionally records each segment's source decoder-query index so its
appearance embedding can be recovered.
Returns ``(segmentation (H, W) int32, segments [{id,label_id,score,q}],
emb_keep (K_kept, D))``. Bit-identical to
``post_process_panoptic_segmentation`` for the segmentation map and segment
ids/labels; ``emb_keep`` is the kept-query decoder hidden state, indexed by
each segment's recorded ``q``.
Source: unitrack/benchmarks/hota/models.py:60