An AI project in a plant needs four things: real examples of the decision you want to automate, taken from your own operation; the right answer for each example, recorded by the people who make that decision today; a part of the examples kept apart to test the model on; and the fields of the system that will receive the result. It rarely needs years of history or a data warehouse. It does need data that matches the job.
Four things, whatever the model
| Project | Examples | The right answer | The receiving system |
|---|---|---|---|
| Visual inspection | images of good and defective parts, taken where the camera will sit | an inspector's call on each image | the reject gate, the quality record, the ERP |
| Documents and orders | real examples of each document type, a few months' worth | what a person entered from each one | the ERP fields each document has to fill |
| AI inside a product or system | the data the product or system already produces | a written definition of a right answer | the product or system itself |
The table follows the data list on our industrial AI page. The rest of this article explains why each part matters.
Examples from where the model will work
A model learns the conditions it is shown. Images from a catalog, another plant or a desk teach it someone else's lighting, angles and parts. Order emails from one large customer teach it one layout. The examples have to come from the place and the flow where the model will run, with the variety that place really has: the shifts, the products, the dirty days.
That is why "do you have data?" is the wrong first question. The right one is: do we have examples of this decision, from this place, as it really happens?
A right answer, written down by the people who know
A model learns from examples with their answers, usually called labels. The labels come from the people who make the decision today: inspectors for parts, customer service for orders, maintenance for faults.
Labeling is also where the definition of the job gets settled. Two inspectors may disagree about the same part. Where they do, the disagreement is written down and decided by the person who owns quality, before the model learns from either. Without that, the model learns whichever inspector labeled the most images.
A test set the model never sees
The error rate that matters is the one measured on examples the model was not trained on. So part of the examples is kept apart from the start and used only for testing.
How they are split matters as much as how many. If neighboring frames of one video end up on both sides, the test only checks whether the model remembers that video. Splitting by whole recording, or by whole day or whole customer, keeps the test honest. The error is then stated for each kind of mistake, because a missed defect and a false reject cost different things.
The cases you do not have yet
Every plant changes: a new product, a new supplier's packaging, a new customer's order form. Before a model goes live, it is worth testing what it does with a case it has never seen, by leaving one out of training on purpose. The result tells you how the model will fail when the plant changes, and whether that failure is safe.
One project: footage from one station
We built a vision system for a plant that counts the crates stacked on pallets at a station, from one camera above and one at the side. Its data shows the parts above.
- Examples from where it works. Every image came from that station.
- A test set kept apart. 1,757 images for training and 524 held out for testing, split by whole recording, so no test recording was seen in training.
- A case it had not seen. In a trial with two crate types left out of training, most of their sides went unfound; the count barely moved, because each column's top crate was still found.
- The error by kind. Of the crate sides labeled in the test images, the model found 93.3 percent, and 83.8 percent of what it marked as a crate side was one.
The data also carried a rule of its own: people at the station are detected and blacked out before an image is kept. The full case, with how each error's cost set the thresholds, is in our article on AI visual inspection.
When the data is not there
Often it is not, and that is normal. A good line makes few defects, so there are few images of them. A maintenance team has repaired machines for years, but nobody recorded the signals before each failure. Orders were typed in, but the emails were not kept with them.
Then the first phase of the project collects the data. For inspection, the camera goes up at the station before any model is trained, and inspectors label what it sees over weeks of normal production. For orders, the incoming emails are kept with what was entered from each. For maintenance, the readings are recorded and each repair is logged against them; until there is a failure history, limits and a trend can do the work, as our article on predictive maintenance explains.
The digital audit says what exists, what is missing and how long collecting it takes, before anything is built. It can also conclude that a rule or a plain integration does the job without a model.
Questions about data for AI projects
What data do we need before an AI project?
Real examples of the decision from your own operation, the right answer for each from the people who make it today, a part of them kept apart for testing, and the fields of the system that will receive the result. If they are not there, the first phase collects them.
How much data does an AI model need?
It depends on the decision and how much it varies, so the honest answer comes from looking at your operation. Variety matters more than volume: every product, shift and condition the model will meet, and enough examples of the rare cases.
Can we use public datasets or data from another plant?
They can help a model get started, but the error rate that counts is the one measured on your own examples. A model is ready for your line only when it has been tested on data from that line.
Who labels the data?
The people who make the decision today, guided by a written definition of each answer. Disagreements between them are settled by the person who owns the decision, before the model learns.