AI VISION

Teaching a machine to read mould.

By the end of this page you will know what our vision looks at in a photograph, what it learned from, how it turns a picture into a named mould family with a confidence, and where it stops and asks you for a better photograph.

THE HARD PART

A photograph shows you less than you think.

Ask a laboratory what is growing on a wall and the answer comes back in two parts, like a name. Aspergillus is the surname: a family, with family habits, family preferences and a family reputation. The species is the first name, and it is often not decidable from a photograph at all without a microscope. So our vision reports the genus, reports how confident it is, and is honest about where the photograph stops being enough.

Colour is the first thing people reach for and the least reliable thing in the frame. One genus grows olive on painted plasterboard, close to black on saturated paper facing, and a flat dust grey once it has dried out. Warm room light shifts it again. So does the phone, which sharpens and colours to taste before you ever see the file. Your eye corrects for all of that without being asked. Software does not.

Then there is the harder problem, and it is not about mould at all. Nobody tells a classifier what to look at. It is shown a photograph and the right answer, thousands of times over, and each time it nudges itself to be a little less wrong. There is no stage where a person points into the frame and says: that greenish patch, there, that is the thing. So it hunts for whatever reliably predicts the answer, and it takes whatever is cheapest.

Think of a new starter handed a stack of photographs and told which drawer each one belongs in, with no explanation. If every photograph bound for the third drawer happens to have a blue folder in the corner, they will file by blue folder. It works, it is quick, and nobody told them the folder was irrelevant. Software is that new starter, except it never asks a question and never tells you which rule it settled on.

Put it in a building and the trap is obvious. If one genus is nearly always photographed on a bathroom ceiling, the classifier has two questions available. What is the shape, texture, edge and colour of this colony, which is hard. Or: is this a ceiling, which is easy. Ceilings are flat, pale, evenly lit and shot from below. If the easy question predicts the answer just as well, the easy question is what gets learned.

It is the student who revised from one practice paper where every long answer happened to be C. They scored beautifully, the marking was honest, and the result meant nothing at all. And the confidence is the dangerous part. A model that says it is not sure is a nuisance. A model that is fluently, calmly, articulately wrong will be believed, by a client, by an insurer, possibly by you at four o'clock on a Friday.

Everything on the rest of this page exists to close that trap. None of it is clever. It is discipline about what goes in, because nobody gets to tell the model what to look at. The photographs are the instruction manual.

HOW IT LEARNS

One photograph becomes many lessons.

Every tile below is the same specimen, altered in a way that does not change the answer. The network is shown all six and learns what survives the alteration.

  • ORIGINAL

  • ROTATE 90°

  • MIRROR

  • CROP + ZOOM

  • CONTRAST

  • HUE SHIFT

The same drawn specimen six ways: as photographed, turned, flipped, cropped close, pushed for contrast and shifted in colour. The mould is identical in every tile. Only the photograph changed, and the answer must not.

You recognise a friend from the side, in a hat, at dusk, half turned away. You are not matching a stored photograph. You learned the structure of a face and everything else fell away as accident. Augmentation teaches a network the same indifference. One photograph is fed in many times over, turned, flipped, cropped, brightened and colour shifted, with the answer held constant every time.

The effect is quietly profound. Rotation says the answer does not live in which way is up. Cropping says it does not live in how much of the frame the colony fills, which matters enormously in practice: a survey shot from the doorway and a macro of the same patch do not look remotely alike to software. Colour and contrast shifts say it does not live in the light bulb. What is left, once all of that has been declared irrelevant, is the structure of the growth itself. None of this is proprietary. It is textbook practice, surveyed thoroughly by Shorten and Khoshgoftaar in the Journal of Big Data, and we use it the way the field uses it.

What augmentation cannot do is invent coverage that was never there. Twenty photographs spread across four materials, three properties and three lighting conditions are worth more than two hundred taken on one afternoon in one bathroom. Turning the two hundred upside down does not fix them. Spread beats volume, and that is a discipline of capture, not of code.

WHAT IT LEARNS FROM

Open science, verified in the lab.

Read it left to right: where the images come from, what happens to them, and the two places the finished vision runs. The lower path is the one that keeps everybody honest.

OPEN MYCOLOGICALDATASETS · OPENFUNGIGENUS COLLECTIONLAB PARTNER SPECIMENSLAB VERIFIEDSPECIMENSAUGMENTATIONMANY VIEWS, ONE TRUTHTRAININGBINARY DETECTORMOULD OR NO MOULDGENUS CLASSIFIERSIX GENERA · NO MOULDTESTS WHAT IT LEARNED
OPEN MYCOLOGICALDATASETS ·OPENFUNGIGENUS COLLECTIONLAB PARTNERSPECIMENSAUGMENTATIONMANY VIEWS, ONE TRUTHTRAININGBINARY DETECTORMOULD ORNO MOULDGENUS CLASSIFIERSIX GENERA ·NO MOULDTESTS WHAT IT LEARNEDLAB VERIFIEDSPECIMENS
Each instrument learned from the source built for it: open datasets such as OpenFungi taught the binary detector, and the dedicated genus collection from our laboratory partner taught the genus classifier. Both pass through augmentation and training. The dashed path along the bottom is the yardstick. Images whose genus a laboratory confirmed are held back from teaching so that they can mark the homework instead.

PUBLIC TECHNIQUES, LAYERED WITH PROPRIETARY REFINEMENTS DEVELOPED WITH LABORATORY PARTNERS. THE SPECIFICS STAY IN THE LAB.

The corpus is layered, and the two instruments learned from different parts of it. The quick mould or no mould detectors learned with the help of open datasets such as OpenFungi, which publishes macroscopic and microscopic images of fungal genera including Aspergillus and Penicillium. The genus classifier learned from a dedicated collection of genus-labelled specimen photographs, developed in collaboration with Joseph Langford, Principal Scientist, Civil & Domestic Environmental Sciences. Field photographs contributed by trade professionals under a structured capture programme broaden both. And laboratory verified specimens alone are allowed to test what either instrument learned.

That last distinction is the one that matters most, and it is the one most often skipped. A photograph can do two entirely different jobs. It can teach, which almost any reasonable image can do. Or it can mark, which means testing whether the software actually got it right. If the answer key was itself a judgement made by eye, the test measures agreement with that judgement rather than correctness, which is marking your own homework with your own answers. Anything can help it learn. Only laboratory confirmed images can tell you whether it learned the right thing.

Every training image carries its context: surface, room, distance, light. That is a capture discipline rather than a clever algorithm, and it exists for one reason. It lets us audit what the model is actually learning from, and it makes the coverage grid checkable rather than a feeling. Genus down the side, surface along the top: the job is to fill it in far enough that no row can be identified by its column.

Coverage also has to be local. Models trained on whatever the open web offers are overwhelmingly American, and the British and Australian building fabric is a different visual vocabulary: Artex ceilings, uPVC window reveals, paper faced plasterboard, timber skirting and coving. A classifier that has never seen a textured ceiling is guessing the moment it meets one.

And then the least intuitive part of the whole exercise. A model that has never been shown a clean ceiling cannot tell you a ceiling is clean. It can only tell you which genus the ceiling most resembles, and it will do it with every appearance of confidence. So clean surfaces are collected with the same care as the mould, along with the confusables: water staining, soot and thermal ghosting, efflorescence, dust, rust, cobwebs, blown plaster. A photograph of a clean wall is not a wasted photograph. On most jobs, clean is the answer the client is hoping for, so it needs to be an answer the software can actually give.

INSIDE THE CLASSIFIER

From 1,024 clues to one clear answer.

The left column is what the network noticed in your photograph. Each column after it narrows the possibilities. The right column is its answer, and one lit path shows a single decision travelling the whole way.

ACREMONIUMASPERGILLUSCHAETOMIUMCLADOSPORIUMPENICILLIUMSTACHYBOTRYSNO MOULDINPUT · 1,024 FEATURESDENSE · 256DENSE · 64OUTPUT · 7 · SOFTMAXWHAT IT NOTICEDNARROWINGNARROWINGITS ANSWER
ACREMONIUMASPERGILLUSCHAETOMIUMCLADOSPORIUMPENICILLIUMSTACHYBOTRYSNO MOULD1,024256647WHAT ITNOTICEDNARROWINGNARROWINGITSANSWER
Four columns, left to right. The first holds the 1,024 things the vision noticed in your photograph, drawn as ten nodes with an ellipsis for the rest. The next two narrow that down. The last is the answer: seven named outcomes, each with a confidence. The lit line follows one decision the whole way through, from a single clue to Penicillium.

The first pass is done by a backbone, a general purpose vision network that has already learned, on millions of ordinary photographs, what an edge is, what a texture is, what a boundary between two materials looks like. We use a family of lightweight convolutional neural network architectures developed by Google, specifically the networks that Howard and colleagues published in 2017, designed to run inside a phone rather than a data centre. Reusing that general sight and teaching only the last part of the network a new question is called transfer learning, and it is why a specialist classifier does not need the internet's worth of photographs to become useful.

What the backbone hands over is 1,024 numbers describing your photograph. Not pixels: descriptions. From there the head of the classifier is a panel of specialists. The first layer of 256 units reads all 1,024 clues and each unit votes on a pattern it cares about. A layer of 64 listens to those votes and narrows again. The last layer holds exactly seven opinions, one per possible answer, and softmax turns them into a final show of hands: seven confidences that add up to one whole, with the tallest as the answer.

Two of the head's steps exist purely to keep the panel honest. Batch normalisation keeps the numbers flowing between layers in a steady range so training does not lurch. Dropout switches off a random handful of the specialists on every training round, so the network can never come to depend on one loud voice. It has to learn an answer that survives whoever happens to be absent.

A confidence is only worth having if it is honest, and the field has known since Guo and colleagues at ICML 2017 that modern networks tend to state their answers more forcefully than the evidence deserves. So calibration is treated as work in its own right, not a by-product. The system is also allowed a third verdict: it can answer that it cannot tell from this photograph and ask for a better one. And when it does report mould, it can show where in the frame the evidence sits, which is the practical descendant of the work Zeiler and Fergus began on making a network's attention visible.

The seven answers.

Acremonium. Slower growing, and associated with long term moisture.

Aspergillus. A large, ubiquitous genus, common on damp building materials.

Chaetomium. Favours chronically wet paper faced materials such as plasterboard.

Cladosporium. Among the most common moulds indoors and outdoors, and a regular on damp walls and window reveals.

Penicillium. Widespread indoors, and the genus behind penicillin.

Stachybotrys. The slow growing genus on saturated cellulose materials, known to the public as black mould.

No mould. The seventh answer, and on most jobs the one the client is hoping for. It is only available because clean surfaces were collected as deliberately as the growth.

TWO INSTRUMENTS

One decides yes or no, the other decides what the likely risk factors are.

Mould Detect runs two types of AI Vision, and the division of labour is deliberate. The first is a binary detector: one question, mould or no mould, answered fast. It is the triage instrument, built to be quick and cautious, and it runs wherever the job needs it, in the app in your hand or in the cloud. In a loft with no signal, the read can happen on the handset, and the photograph does not have to leave it.

The second is the specialist this page has been describing: the genus classifier, the multi-classifier that picks up where the detector leaves off and narrows a photograph to one of six genera, or no mould, with a confidence attached. One instrument answers yes or no. The other names what you are likely dealing with.

Neither is a lesser copy of the other, and the pairing is the point. Speed first, depth second, and an honest answer either way: if a photograph cannot support a verdict, the system is allowed to say so and ask for a better one. And every model we serve has to prove it behaves like the approved model before it answers anybody.

GLOSSARY

The words, plainly.

Every term this page uses, in one sentence each. Nothing here needs a computing background.

Artificial intelligence (AI)
Software that learns its behaviour from examples rather than following rules a person wrote out by hand.
Augmentation
Making many training examples out of one photograph by turning, flipping, cropping and shifting it, so the model learns the mould rather than the photograph.
Backbone
The general purpose vision network that does the first pass of looking, before a small head is trained on one specific question.
Batch normalisation
A step between layers that keeps the numbers flowing through the network in a steady range, so training stays stable.
Calibration
The work of making a stated confidence mean what it says, so that answers given at eight in ten confidence are right about eight times in ten.
Classifier
The part of the system that sorts a photograph into one of a fixed set of answers.
CNN (convolutional neural network)
A network that looks at small patches of an image at a time and builds up from edges and textures to whole shapes.
Confidence
The strength the model attaches to its own answer, reported next to the answer rather than hidden behind it.
Confusables
Things that look like mould in a photograph and are routinely mistaken for it, such as water staining, soot, dust and salt deposits.
Coverage
The spread of a photograph collection across surfaces, rooms, scales and lighting conditions, which matters more than the raw number of photographs.
Dropout
A training habit that switches off a random part of the network each round, so no single path can come to dominate the answer.
Efflorescence
The white salt bloom that appears on masonry and plaster as water moves through the material and evaporates, and a classic mould lookalike.
Embedding
The list of numbers a network produces to describe an image, arranged so that things which look alike end up with similar numbers.
False negative
A miss: real mould that the system failed to report.
False positive
A false alarm: something reported as mould that was not mould.
Genus and species
The two levels of a biological name, where the genus is the family surname (Aspergillus) and the species is the first name (fumigatus).
Ground truth
The answer a system is measured against, and the reason it matters a great deal who or what supplied that answer.
Inference
Running an already trained model on a new photograph to get an answer, as opposed to training it.
Microscopy
Examining a sample under a microscope, which is how many species level identifications are actually settled.
Mycology
The study of fungi, including the moulds that grow in buildings.
On-device processing
Analysis that happens on the phone itself, so it is instant, works without a signal, and the photograph need not leave the handset.
Shortcut learning
When a model latches onto something easy that happens to predict the answer, such as the room it was photographed in, instead of the thing you meant it to learn.
Softmax
The final step that turns the network's raw scores into a set of confidences that add up to one whole.
Substrate
The material the mould is growing on: plasterboard, grout, timber, fabric, paper.
Training
Showing a model example after example with the right answer attached, adjusting it slightly each time so that it would have been less wrong.
Transfer learning
Starting from a network that has already learned to see general shapes and textures, then teaching it one new question of your own.
Validation set
Photographs held back from training and used only to check what was learned.

HOW WE HELP

Mould Detect gives you tools, information and support for confident decisions. If you suspect a mould issue, use our apps to understand and document what you are seeing, and always seek professional advice. Where possible, confirm with laboratory testing to fully understand your situation.

See what your home is growing.

Early access is opening now. Point a phone at the wall, get the genus and the confidence, and keep the record.