Skip to content

yolox

pixeltable.ext.functions.yolox

yolo_to_coco

yolo_to_coco(detections: JsonT) -> JsonT

Converts the output of a YOLOX object detection model to COCO format.

YOLOX is part of the pixeltable.ext package: long-term support in Pixeltable is not guaranteed.

Parameters:

  • detections (JsonT) –

    The output of a YOLOX object detection model, as returned by yolox.

Returns:

  • JsonT

    A dictionary containing the data from detections, converted to COCO format.

Examples:

Add a computed column that converts the output tbl.detections to COCO format, where tbl.image is the image for which detections were computed:

>>> tbl['detections'] = yolox(tbl.image, model_id='yolox_m', threshold=0.8)
... tbl['detections_coco'] = yolo_to_coco(tbl.detections)

yolox

yolox(images: ImageT, *, model_id: str, threshold: float = 0.5) -> JsonT

Computes YOLOX object detections for the specified image. model_id should reference one of the models defined in the YOLOX documentation.

YOLOX is part of the pixeltable.ext package: long-term support in Pixeltable is not guaranteed.

Requirements:

  • pip install git+https://github.com/Megvii-BaseDetection/YOLOX

Parameters:

  • model_id (str) –

    one of: yolox_nano, yolox_tiny, yolox_s, yolox_m, yolox_l, yolox_x

  • threshold (float, default: 0.5 ) –

    the threshold for object detection

Returns:

  • JsonT

    A dictionary containing the output of the object detection model.

Examples:

Add a computed column that applies the model yolox_m to an existing Pixeltable column tbl.image of the table tbl:

>>> tbl['detections'] = yolox(tbl.image, model_id='yolox_m', threshold=0.8)