A familiar shape
Traffic cones are used around the world to mark road works, close lanes, redirect traffic and warn of hazards. They are usually bright orange, often with white or silver reflective bands, and shaped like tall, pointed cones with a square base. Their bright colour makes them easy for drivers to see.
Detecting cones
Computer vision systems in vehicles, road maintenance equipment and mapping projects may need to detect traffic cones. A detection model draws a box around each cone it finds in an image. It learns from many labelled photographs of roads with cones.
The colour shortcut
Because nearly all training cones are bright orange, a model might learn that bright orange areas are cones. It could then mistake other orange things, such as a pumpkin, a worker's high-visibility jacket, an orange car or a sign, for cones. It could also miss cones whose colour is hard to see.
Orange non-cones
To test for this shortcut, the test set should include ordinary orange objects that are not cones: orange bins, balls, fruit, clothing, barrels and signs. If the model labels these as cones, it is relying heavily on colour rather than shape.
Cones without bright orange
The test should also include genuine cones whose colour is weak or unusual: faded cones that have turned pale, dirty cones, cones photographed at dusk or at night, cones in fog, and cones of other colours, such as yellow, blue or white, which are used in some places. A model that misses these is depending too much on colour.
Greyscale images
Converting images to greyscale removes colour entirely. If a model detects cones well in colour but poorly in greyscale, it is relying heavily on colour. If it still detects them, it has learned their shape. Comparing results in colour and greyscale measures the role colour plays.
Context clues
Context also matters. Cones usually appear on roads, beside barriers or in lines. A model might learn to expect cones in such places. A test with cones in unusual settings, such as a car park or a sports field, and roads without cones checks whether context is driving the result.
The most direct test
The pair that most directly tests the colour shortcut is a non-cone orange object alongside a genuine cone with weak or unusual colour. If the model detects the orange object but misses the pale cone, it has learned colour, not cones.
A history of cones
Early traffic cones made of concrete were used in the United States in the 1910s. In the 1940s, Charles Scanlon, a street painter in Los Angeles, developed a rubber cone, which was patented in 1943. Today, cones are made of plastic or rubber in many sizes, and often carry reflective bands so they are visible at night.
Responsible testing
The NIST AI Risk Management Framework encourages developers to identify how AI systems could be fooled. For a cone detector, the colour shortcut is an obvious risk to test.
Knocked-over cones
Cones are sometimes knocked over, lying on their sides, or partly crushed by vehicles. Their outline then looks very different from an upright cone. A test set should include fallen and damaged cones, so that the model's ability to recognise cones in all states is measured, not just perfect upright examples.
Groups of cones
Cones often stand in long lines, partly hiding each other from the camera.
Reflective bands
At night, reflective bands shine brightly in headlights, while the orange body looks dark.
Try the arithmetic
If a model detects 95 of 100 bright cones but only 60 of 100 faded cones, and wrongly flags 30 of 100 orange non-cones, colour is clearly playing too large a role.
The idea to take away
A detector might label every orange patch as a cone. Add orange objects that are not cones and photograph real cones with weak colour. The comparison gives shape, context and colour separate opportunities to influence the result.
Sources & further reading
Figures in the example are illustrative. Photograph: Traffic cones london.jpg by Secretlondon, CC BY-SA 3.0, via Wikimedia Commons; cropped and resized. Reference organisations do not endorse this website.

