Second Light

Some flaws only show under the right light. Move the light and find them.

Loading the photographs…
Light 5

Keyboard: arrow keys move the marker, Enter marks it, [ and ] change the light, C calls it clean, M toggles the magnifier.

How to play and score
  • Find the flaw within 5 seconds for 100 points. After that it loses 2 a second, down to 50. Each wrong tap costs 15, a correct answer still scores at least 20, and Show me scores 0.
  • Six parts per game, one or two of them clean.
  • On a touch screen, press and hold to magnify.
  • After each answer, the bars above the rail estimate how clearly the flaw shows under each light.
  • Answers are the dataset authors’ flaw outlines. A tap counts on the outline or just beside it.

How it works

Inspectors move the lamp because a flaw can vanish under the wrong light. A camera has the same problem.

Real photographs

One viewpoint, ten lighting setups. The photographs come from M²AD, a public dataset with annotated flaws.

Light adds up

Between two setups the page mixes the photographs in linear light, the way real light adds. In-between positions are approximations.

Why move the light

A scratch is a tiny groove. It shows only when its walls catch or block the light.

More on the optics

Why mix in linear light. Image files store brightness on a curve. Light only adds up after that curve is undone, so the page converts both photographs to linear values, blends them and converts back. Blending the stored values directly would make in-between positions too dark.

What a groove does. When light crosses a scratch, one wall catches it and the other falls into shadow, so the line stands out. When light runs along the scratch, both walls look alike and the line can disappear.

Glints are not flaws. Polished edges act like small mirrors. They flare when the lamp, the edge and the camera line up, on intact parts too.

Carve your own

Draw a scratch on a simulated metal plate and watch it appear and fade as the light circles round.

Simulation, not a photograph.

Can the model keep the flaw?

Photographing a part under every light is slow. My network predicts the photo under a light it was not given. Does the flaw survive?

Drag the divider across the flaw: photo on the left, prediction on the right. On the edge chip at light 8, v3 does worse than v2.

Scratch A photographed under light 8
Prediction from one photo using v3
Photo Prediction

Error inside the flaw, predicting from one photo

Mean RGB difference from the real photo, on a scale of 0 to 255. Lower is better.

Metal flaws located from four photos

Found by a separate detector. False alarms fell from 2 of 17 intact parts to 1.

Not yet a general detector. On new plastic parts it located 7 of 20 flaws, and only 2 of 7 fine scratches.

What the numbers mean

Error is the mean absolute RGB difference (0–255) inside the dataset’s flaw outline, over nine hidden lights on 15 metal Holder parts. Located means the detector raised an alarm and its highest-scoring point fell inside the outline; a false alarm is an alarm on an intact part.

The Holder parts are a retest, not a fresh blind test: v2 was scored on the same parts. The new plastic parts stayed sealed until the alarm rule was fixed.

Scratch A is from the retest. Scratch B and the edge chip were kept out of training and scoring.

Samples are small. Fifteen out of fifteen is still consistent with a true rate near 80%.

Two later detector versions failed release checks fixed before testing, so v3 is still the published model.

Model card and full evaluation