Skip to content

yolox

pixeltable.ext.functions.yolox

yolo_to_coco

yolo_to_coco(detections: Json) -> Json

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 (Json) –

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

Returns:

  • Json

    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: Image, *, model_id: String, threshold: Float = 0.5) -> Json

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 (String) –

    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:

  • Json

    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)