roboflow/supervision · error · ValueError

{task} not supported. Supported tasks are: {SUPPORTED_TASKS_

Error message

{task} not supported. Supported tasks are: {SUPPORTED_TASKS_FLORENCE_2}

What it means

Error "{task} not supported. Supported tasks are: {SUPPORTED_TASKS_FLORENCE_2}" thrown in roboflow/supervision.

Source

Thrown at src/supervision/detection/vlm.py:541

        resolution_wh: (output_width, output_height) to which we rescale the boxes.

    Returns:
        A tuple of `(xyxy, labels, masks, obb_boxes)` where `xyxy` is an array
            of shape `(n, 4)` in format `[x1, y1, x2, y2]`, `labels` is an
            optional array of shape `(n,)` with class labels, `masks` is an
            optional array of shape `(n, h, w)` with segmentation masks, and
            `obb_boxes` is an optional array of shape `(n, 4, 2)` with oriented
            bounding boxes.

    Raises:
        ValueError: If the top-level Florence 2 payload has multiple tasks or
            if a task payload is malformed.
    """
    if len(result) != 1:
        raise ValueError(f"Expected result with a single element. Got: {result}")
    task = next(iter(result.keys()))
    if task not in SUPPORTED_TASKS_FLORENCE_2:
        raise ValueError(
            f"{task} not supported. Supported tasks are: {SUPPORTED_TASKS_FLORENCE_2}"
        )
    result = result[task]

    if task in ["<OD>", "<CAPTION_TO_PHRASE_GROUNDING>", "<DENSE_REGION_CAPTION>"]:
        xyxy = np.array(result["bboxes"], dtype=np.float32)
        labels = np.array(result["labels"])
        return xyxy, labels, None, None

    if task == "<REGION_PROPOSAL>":
        xyxy = np.array(result["bboxes"], dtype=np.float32)
        # provides labels, but they are ["", "", "", ...]
        return xyxy, None, None, None

    if task == "<OCR_WITH_REGION>":
        xyxyxyxy = np.array(result["quad_boxes"], dtype=np.float32)
        xyxyxyxy = xyxyxyxy.reshape(-1, 4, 2)
        xyxy = np.array([polygon_to_xyxy(polygon) for polygon in xyxyxyxy])

View on GitHub (pinned to 7f254d9784)

Solutions

  1. Use one of the supported Florence-2 tasks listed in the error message (e.g. object detection, caption, OCR variants).
  2. For unsupported Florence-2 prompts, parse the raw string output manually instead of using the connector.

When it happens

Trigger: Thrown at src/supervision/detection/vlm.py:541 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of roboflow/supervision@7f254d9784 (2026-08-15). Data as JSON: /api/errors/b759aee7dae82069. Report an issue: GitHub.