01

A tricky object

Most objects in photographs are opaque, with clear colours and textures of their own. A clear glass marble is different. Because it is transparent, it shows the background behind it, bent and magnified by the curved glass. Its appearance depends heavily on what it sits on.

02

A detection task

Imagine a model trained to find marbles in photographs, marking the centre of each one. It might be used in a game, a toy factory or a robotics demonstration. The model learns from labelled images, each marble marked with a single point at its centre.

03

A possible shortcut

If most training photographs show marbles on the same patterned carpet, the model may learn to look for the distorted carpet pattern seen through the glass, rather than the circular edge and highlights of the marble itself. It would work well on that carpet but could fail elsewhere.

04

Changing only the background

To test this, place the same set of marbles on different backgrounds: plain white, plain dark, patterned carpet, wood grain and newspaper. Keep the camera, lighting and marbles the same. Only what lies beneath the glass changes.

05

Reading the results

If the model detects the marbles on one background but repeatedly misses them on another, the background is influencing its decisions. A robust detector should find the same marbles regardless of what they rest on, because the marbles themselves have not changed.

06

Why transparency is hard

Transparent and reflective objects are a well-known challenge in computer vision. Glass, water and clear plastic take on the colours of their surroundings, and their edges can be faint. Highlights and refractions provide clues, but they vary with lighting and background.

07

Improving the detector

To reduce reliance on the background, the training set should include marbles on many different surfaces, under different lights. Including images with plain backgrounds can help the model learn the marble's own features, such as its round outline, reflections and coloured core.

08

Counting and tracking

If the model is used to track moving marbles, for example in a game, background shortcuts become even more important. As marbles roll across different surfaces, a detector that depends on one pattern could lose track of them. Testing across backgrounds simulates these real conditions.

09

Marble games

Marbles have been played with around the world for centuries. In one South Asian game, kanche, players flick marbles towards a hole or try to knock others out of a circle. Many marble games depend on judging position and distance, something a vision system tracking marbles would also need to do.

10

Testing with care

The NIST AI Risk Management Framework encourages developers to test whether AI systems rely on irrelevant features that could fail in new conditions. Moving objects to new backgrounds is a simple, revealing test of this kind.

11

Different kinds of marble

Marbles come in many types: clear glass, coloured glass with swirls, opaque clay and shiny metal. A detector trained only on clear marbles might struggle with opaque ones, or the reverse. Testing with a mixture of types shows whether the model recognises the round shape common to all of them, or depends on features of one type.

12

Lighting effects

Bright lights create small highlights on marbles that help a detector find them.

13

Overlapping marbles

When marbles touch or sit behind one another, they are harder to separate. Tests should include clusters as well as scattered marbles.

14

Labels for clusters

In clusters, each marble still gets exactly one centre mark, even when only part is visible.

15

Try the arithmetic

If a model finds 24 of 25 marbles on a plain background but only 15 of the same 25 on a patterned carpet, its detection rate drops from 96 per cent to 60 per cent.

16

The idea to take away

A transparent marble shows a bent image of its background. A model may learn the background instead of the marble. Moving the same marbles across backgrounds, and comparing detections, reveals whether the background is acting as a shortcut.

FOLLOW THE EVIDENCE

Sources & further reading

Figures in the example are illustrative. Photograph: original AI-generated illustration (Adobe Firefly), created for this story. Reference organisations do not endorse this website.