Detect objects in images and videos with YOLOX
Run YOLOX object detection in Python on images and video frames, then query and draw the detected objects.
You need to convert color images to grayscale for analysis, preprocessing, or model inputs that require single-channel images.
Images · Notebook · Updated
Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.
You convert RGB images to grayscale in your table using either Pixeltable's built-in .convert() method for standard conversion, or a custom UDF (relies on NumPy and PIL/Pillow) for gamma-corrected conversion when scientific accuracy matters.
You can iterate on transformations before adding them to your table. Use .select() with .collect() to preview results on sample images—nothing is stored in your table. If you want to collect only the first few rows, use .head(n) instead of .collect(). Once you're satisfied, use .add_computed_column() to apply the conversion to all images in your table.
pip install pixeltable numpy
pxt.create_table()@pxt.udfinsert()add_computed_column()Run YOLOX object detection in Python on images and video frames, then query and draw the detected objects.
Automatically identify and locate objects in images using YOLOX object detection models.
Understand when to use bounding boxes versus pixel-level masks for image analysis.
Draw bounding boxes on images to visualize object detection results.