Skip to main content
YOLOX object detection functions. View source on GitHub

UDFs


yolo_to_coco() udf

Converts the output of a YOLOX object detection model to COCO format. Signature:
yolo_to_coco(detections: Json)-> Json
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.
Example: 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.add_computed_column(detections=yolox(tbl.image, model_id='yolox_m', threshold=0.8))
tbl.add_computed_column(detections_coco=yolo_to_coco(tbl.detections))

yolox() udf

Computes YOLOX object detections for the specified image. model_id should reference one of the models defined in the YOLOX documentation. Requirements:
  • pip install pixeltable-yolox
Signature:
yolox(
    images: Image,
    model_id: String,
    threshold: Float
)-> Json
Parameters:
  • model_id (String): one of: yolox_nano, yolox_tiny, yolox_s, yolox_m, yolox_l, yolox_x
  • threshold (Float): the threshold for object detection
Returns:
  • Json: A dictionary containing the output of the object detection model.
Example: Add a computed column that applies the model yolox_m to an existing Pixeltable column tbl.image of the table tbl:
tbl.add_computed_column(detections=yolox(tbl.image, model_id='yolox_m', threshold=0.8))
I