A column and a scale
A liquid-in-glass thermometer has a thin tube of liquid, traditionally mercury or coloured alcohol, that expands as it warms and rises up the tube. A scale printed or engraved beside the tube shows the temperature corresponding to each height. The reading comes from comparing the top of the column with the scale.
Many scales
Thermometers are made for many purposes, with different ranges. A room thermometer might show from about minus 10 to 50 degrees Celsius, a clinical thermometer only from about 35 to 42, and a laboratory thermometer from minus 10 to 110. The same length of tube can represent very different ranges.
Different units
Thermometers may use different units. The Celsius scale sets water's freezing point at 0 and boiling point at 100 degrees. The Fahrenheit scale, still common in the United States, sets them at 32 and 212. Some thermometers show both scales side by side. A reading of 20 means quite different temperatures in the two units.
A misleading shortcut
If a model is trained mostly on one type of thermometer, it might learn that a column reaching a certain point in the image always means the same temperature. It would then misread thermometers with different ranges, sizes or units, because it has learned a fixed relationship between pixels and degrees rather than reading the scale.
Same height, different temperature
Two photographs could show liquid columns at exactly the same height in pixels, yet indicate different temperatures. One thermometer might be marked from 0 to 50 degrees, the other from 0 to 100. Or one might be in Celsius and the other in Fahrenheit. Only by reading each scale can the model give the right answer.
Training on variety
To learn to read scales properly, the model should be trained on thermometers with different ranges, sizes, units and designs. It must learn to find the scale markings and numbers in each image and use them to interpret the column height.
Include the unit
Every label should include the unit as well as the number: 22 degrees Celsius, not just 22. The model should also report the unit in its predictions. A number without a unit is incomplete, and could be dangerously misleading in medicine, cooking or science.
Testing the scale
A good test set includes thermometers with scales and units not seen in training, or with unusual ranges. If the model still reads them correctly, it has learned to interpret scales. If not, it has learned a shortcut tied to familiar thermometers.
Mercury and alcohol
Mercury thermometers were common for centuries but are being phased out in many countries because mercury is toxic, under an international agreement, the Minamata Convention on Mercury, adopted in 2013. Many modern liquid thermometers use coloured alcohol or other liquids instead, and digital thermometers are widely used.
Responsible testing
The NIST AI Risk Management Framework encourages developers to make sure AI outputs are meaningful and correctly interpreted. For a thermometer reader, that means always reporting the unit and reading the actual scale.
Reading angle
Looking at a thermometer from above or below the level of the liquid makes the column appear higher or lower than it really is, an effect called parallax. Photographs taken at an angle can introduce the same error. Tests should include images taken straight on and at angles.
Thin lines
The liquid column may be very thin and hard to see against the scale.
Try the arithmetic
A reading of 68 degrees Fahrenheit equals 20 degrees Celsius, because °C = (°F − 32) × 5 ÷ 9 = 36 × 5 ÷ 9 = 20. The two scales meet only at minus 40, where both read the same.
The idea to take away
A liquid column's height means something only relative to its scale. Train on thermometers with different ranges and units, and include the unit in every label. Identical pixel heights need not mean the same temperature.
Sources & further reading
Figures in the example are illustrative. Photograph: Mercury Thermometer.jpg by Anonimski, CC BY-SA 3.0, via Wikimedia Commons; cropped and resized. Reference organisations do not endorse this website.

