---
title: "Object Detection in Videos"
description: "Detect objects in a video frame by frame: Pixeltable extracts the frames, runs YOLOX models on them and reassembles the frames into a video. Compare detection models and evaluate them against ground truth."
url: "https://www.pixeltable.com/notebooks/object-detection-in-videos"
updated: "2026-10-13"
---

# Object Detection in Videos

Detect objects in a video frame by frame: Pixeltable extracts the frames, runs YOLOX models on them and reassembles the frames into a video. Compare detection models and evaluate them against ground truth.

- **Type:** Notebook
- **Group:** Video

## What it covers

- automatic frame extraction
- running complex functions against frames (in this case, the YOLOX object detection models)
- reassembling frames back into videos

## What it uses

- **Install:** `pip install pixeltable pixeltable-yolox`
- **Pixeltable calls:** `video.frame_iterator()`, `yolox.yolox()`, `vision.eval_detections()`, `vision.mean_ap()`, `pxt.create_table()`, `pxt.create_view()`, `insert()`, `add_computed_column()`, `group_by()`

## A look at the code

```python
# Create a computed column to compute detections using the `yolox_tiny`
# model.
# We'll adjust the confidence threshold down a bit (the default is 0.5)
# to pick up even more bounding boxes.

frames_view.add_computed_column(
    detections_tiny=yolox(
        frames_view.frame, model_id='yolox_tiny', threshold=0.25
    )
)
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/use-cases/object-detection-in-videos.ipynb
- **Docs page:** https://docs.pixeltable.com/howto/use-cases/object-detection-in-videos
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/use-cases/object-detection-in-videos.ipynb
