Computer Vision Mini Lab

One image. Three questions. Explore classification, object detection, and segmentation directly in your browser.

What are we asking the computer?

Use the same image for all three experiments.

1. Choose an image

No image selected. Choose an image to begin.

2. Ask the computer

Your image will appear here.

3. Results

Classification

A label for the whole image.

Not run yet.

Object Detection

Classes plus bounding boxes.

Not run yet.

Segmentation

Which pixels belong to each object? The masks are shown over the image.

Not run yet.

What changed?

The image did not change. The question changed.

Classification → WHAT
Detection → WHAT + WHERE
Segmentation → WHICH PIXELS

More spatially precise questions require more spatially precise outputs.

Technologies used

This demonstration uses Hugging Face Transformers.js to run pretrained machine-learning models in the browser.

Transformers.js documentation · Vanilla JavaScript tutorial

Important notes

⚠️ This may load your browser. Running machine-learning models locally can use substantial CPU, GPU, memory and battery resources. Larger models may take time to initialise.
⏳ The first run may be slow. A model is downloaded when a task is first used and may be cached by the browser afterwards.
🌐 Internet connection required. This page loads the JavaScript library and pretrained models from external services when they are not cached.
🔬 Educational demonstration. These are general-purpose pretrained models. Predictions can be wrong; confidence scores are not guarantees.
📷 Privacy. Avoid sensitive or personally identifiable photographs in classroom demonstrations. The inference is performed in the browser, while model files are downloaded from Hugging Face.