A convolutional neural network, or CNN, uses learned filters to extract patterns from spatially organised data such as images. Intermediate outputs are called feature maps. In a classification application, they contribute to scores for the defined classes. CNN names an architectural family, not the entire system for capturing images, reviewing results and acting on them.
For a business, the useful question is what must be observed in an image and which operation follows. Classifying packages, locating objects and marking a region are different tasks. They need suitable labels, outputs and tests. A model that performs well in a general demonstration requires separate evaluation on the project's images and operating conditions.
We use an invented package-inspection example, a simplified calculation and demonstrative numerical outcomes. These are not statistics or client results. The photographs show setting up a phone camera and browsing images; they do not show a CNN installation, its training dataset or WebHat personnel.

What is a CNN, and where does it fit in computer vision?
Describe the model and visual task separately
A CNN learns parameters for local operations and applies them at multiple input positions. Successive layers can combine features from increasingly wide regions. TensorFlow's educational documentation illustrates this path from image to classification. A class result does not automatically include coordinates of the object responsible for the score.
In a business computer-vision project, we might want to flag whether a package appears deformed. Another project needs to locate every package; a third needs the boundary of a relevant region. Choosing the output precedes choosing the architecture and review interface, because each task asks a different question.
CNNs are not the only visual architecture. Attention-based approaches and combinations of components also exist. Do not choose a winner by name: compare suitable alternatives for the same task, data and operating conditions. The criterion is a usable outcome, including errors and the time needed to review it.
In our guide to types of artificial intelligence, we distinguish technology, objective and autonomy. A CNN performing a bounded visual task does not become an autonomous system merely by classifying images. Permitted actions and operator intervention are separate design decisions that must be specified for the application.
From an image to an output for the chosen task
- Prepared image
Dimensions, channels and preprocessing compatible with the model.
- Learned filters
Local operations produce feature maps.
- Successive representations
Later layers combine information from wider regions.
- Classification output
A specialised head produces scores for the defined classes.
What does an image look like to the neural network?
Pixels, channels and consistent preprocessing
The image becomes a collection of numerical values with dimensions and channels. A colour photograph may use colour channels, whose arrangement must match the model. Resizing, normalisation and channel order are part of preparation. Do not automatically apply identical preprocessing to every model merely because the input files have the same extension.
For our demonstrative packages, document camera distance, framing and lighting. A small detail can disappear during resizing. Cropping edges to obtain a convenient shape may remove precisely the region we need to inspect. Test resolution against the relevant detail, not only the processing speed achieved by a smaller image.
Use the model's required transformation consistently in evaluation and operation. A channel or scaling error can change results without changing learned parameters. Check the preprocessing-pipeline version together with the model version. The system must distinguish an incompatible input from a valid result for a class, so that a preparation error does not silently become an operational decision.
How does a convolutional filter work?
The same local calculation repeats at different positions
A filter numerically combines values within a region to produce an output value. Moving the operation produces a map. Its parameters are learned by the model; reusing them at multiple positions is called parameter sharing. Stanford's CS231n materials explain this principle. Our example below uses values we selected for a hand-checkable calculation.
We use one channel and a very small filter. Multiply corresponding elements and add them, without a bias term in this example. Then apply ReLU, retaining positive values and replacing negative values with zero. This is an arithmetic demonstration, not a filter that identifies an industrial defect or an output measured from a trained network.
A small filter, four positions and an activation
- Input · 3 × 3
- Filter · 2 × 2
- Before ReLU · 2 × 2
- After ReLU · 2 × 2
- The upper-left window
2 × 1 + 1 × (−1) + 3 × 1 + 0 × (−1) = 4.
In a real CNN, the operation also involves channels, filter count and layer configuration. Do not interpret a single cell's value as a certainty percentage. A feature map is an intermediate representation; the final result depends on other components and the task for which the model was trained and evaluated.
What are feature maps and receptive fields?
A layer sees a region; successive layers change coverage
Feature maps are numerical outputs of operations within the network. The receptive field describes the input region capable of influencing an output position. Layer configuration, stride and other architectural choices determine that relationship. Do not assign every map a fixed human object or concept without analysing the particular model and task.
In our example, a shadow and a deformation may produce similar contrast within a small region. Surrounding context and training examples can matter for distinguishing them. Include both situations in the test, with reviewed labels, to establish whether the system uses relevant information rather than an accidental association present in the images.
Sharing a filter does not make the model completely independent of rotation, scale or lighting. Represent and evaluate these variations according to intended use. A result on frontal photographs does not establish performance on oblique or partly covered objects. Define capture requirements and the accepted image domain explicitly within the project.
What roles do stride, padding and pooling play?
Reducing dimensions must retain necessary information
Stride is the step by which an operation moves. Padding adds borders according to configuration, affecting output dimensions. Pooling aggregates regions; max pooling retains a window's maximum separately for each channel. Keras documents these distinct operations. Pooling is not mandatory in every CNN architecture and does not automatically validate image quality.
For an application targeting fine detail, excessive spatial compression can discard useful information. In another task, more compact representations can reduce resource needs. Do not choose parameters through one general rule. Compare the relevant-detail outcome, speed and memory under the conditions of the device or server that will operate the solution.
Connect the technical objective to the real operation: a sufficiently clear image, a response within a useful interval and an exception path. A camera without a new frame, or an uninterpretable image, must not automatically become evidence of a normal package. Capture status is a separate output that the application needs to handle.
How are filters learned, and what happens during inference?
Predicting on new images is not another training run
In supervised classification, examples and defined targets allow an error to be calculated and used to adjust parameters. During inference, the selected model processes a new image. Other pretraining strategies also exist; a CNN architecture does not itself impose one learning method. Document the data, objective and protocol for the particular option.
Our guide to supervised learning and other paradigms explains different learning signals. In this pilot, labels describe the package's visual criterion. Do not confuse them with a physical analysis that cannot be inferred from a photograph. Define exactly what is observable and what requires another verification process.
Training and use: what changes?
- Training
Examples → prediction → error against the target → parameter adjustment.
- Inference
New image → selected model parameters → output checked by the application.
Operator corrections can be retained for a later dataset review with clear rights and versions. They do not automatically alter the deployed model after every button press. Train and evaluate a new version in a separate workflow, then activate it under control, with a way to identify differences in behaviour and the version responsible.
When should we use transfer learning rather than train from scratch?
Start from existing representations and check adaptation
Transfer learning uses a pretrained model as a starting point. One option keeps its base as a feature extractor and trains a new output. Fine-tuning can also adjust base parameters. TensorFlow's tutorial separates these cases. Existing representations are something to evaluate, not evidence that the new domain is already covered.
For packages, materials, backgrounds and image types can differ. Test whether the selected option distinguishes deformation from shadow, including unseen examples from different batches. Review usage rights for the model, weights and data as well. A library licence does not automatically describe every right associated with any model loaded through it.
Placing the work within deep learning for business applications helps separate resource needs: training, inference, image storage and operator review. Compare a smaller model or reused extractor with relevant alternatives without treating parameter count as the only design criterion. Each stage contributes to the application's total workload.
How do we prepare data without compromising the test?
Independent images and labels with clear definitions
Define classes using observable criteria and document borderline cases. A partly covered package in our example may need review rather than an invented label. Check labels before using them as reference truth. Disagreement between reviewers can reveal an instruction needing clarification, not simply a model making mistakes against a perfectly defined target.
Split data so nearly identical images of the same object or sequence do not appear uncontrolled in both training and testing. Grouping follows future use: a new batch, new camera or later period. A score on close copies measures something different from encountering new objects during operation, even if the files have different names.
Augmentation can transform training examples in task-appropriate ways. Not every rotation, reflection or colour change preserves a label. Keep the final test independent and representative of expected captures. Record image origin, version and usage rights; do not collect images of people without an appropriate project-specific justification for their use.

How do we measure whether classification is useful?
Accuracy, precision and recall answer different questions
Our demonstration has a reviewed reference and a defined positive class: a package showing deformation under the selected visual criterion. Count correct flags, missed cases and false alarms separately. Scikit-learn documents the distinction between precision and recall. The numbers below are invented for explanation, not a camera, commercial model or WebHat installation.
One demonstrative set, three different metrics
- 15 · correctly flagged
Deformed packages flagged for inspection.
- 5 · missed
Deformed packages that were not flagged.
- 10 · false alarms
Normal packages incorrectly sent for inspection.
- 70 · correctly normal
Normal packages that were not flagged.
Interpret metrics against the intended consequence. False alarms consume review time, while missed cases remain unflagged. Choose the threshold using development data and check it on the separate test. Include class distribution and conditions in the report so that a strong percentage on a set dominated by normal cases does not conceal misses.
Also inspect results by lighting, material, camera and occlusion where the dataset supports that analysis. Compare the same examples across evaluated options. When a group has too few cases, collect additional relevant examples before treating it as an accepted operating area. Retain mistakes as well as successful images; both are needed to understand behaviour.
How do we integrate a CNN into an actual workflow?
The model produces a proposal within a process. The application connects the image to an object, applies routing rules and displays the required review. In our demonstration, an operator inspects flagged packages. We do not describe this as automatic product certification or infer properties that the photograph cannot support, such as characteristics requiring another measurement.
Proposed package-inspection workflow
- Checked capture
The image matches the object and accepted capture conditions.
- CNN proposal
The model returns scores for the defined task.
- Routing rule
The threshold and capture state determine the inspection path.
- Human review
The operator compares the image with the inspection criterion.
- Traceable record
Retain the decision, version and object link under controlled access.
Monitoring includes capture status, errors, output distribution and human-review observations. Google's ML monitoring guide distinguishes model metrics from real-world-use metrics. For the pilot, also track review duration, cases returned for clarification and what happens after changes to the camera or lighting, instead of observing only an aggregate model score.
Manage data protection in an AI application across the workflow: capture only necessary material, restrict access and define image retention. Measure processing, transfer and the interface together. Fast inference does not automatically compensate for an incorrect image or a mistaken association with the object being inspected.
When comparing with a Transformer and its attention mechanism, keep the same task and criteria. The selected architecture must support the operational outcome and available resources. Do not add components merely to include a technology, and check changes before they enter the users' workflow.
How do we prepare a CNN project with WebHat?
Begin with the object, observable information, authorised images and assisted decision. For custom software development, useful inputs include classification criteria, capture conditions, workload and the system recording review outcomes. These define the pilot and acceptance tests rather than starting from a generic model demonstration.
A custom application with AI integration can bring capture, the model, review and records together. Specify who corrects results, how exceptions are handled and when a new version may be activated. These details make the solution assessable in business activity, not merely in a demonstrative notebook.
A useful deliverable includes test data and conditions, observed errors, the review interface and operating requirements. We can then decide whether more images, better capture or a different component is needed. Correct the identified cause at the appropriate stage rather than automatically replacing the whole solution or adding unrelated complexity.
Frequently asked questions about convolutional neural networks
Can a CNN tell us where every object is?
A classification output describes image classes, not automatically object coordinates. Localisation and segmentation need suitable outputs, labels and evaluation. A CNN can be a component within such models, but specify the task separately so that a class score is not mistaken for a complete spatial result.
Does the programmer draw the filters manually?
In a trained CNN, parameters are learned under the objective. Manually designed filters also exist in classical image processing. Our numerical example uses values chosen for explanation and does not claim to represent filters from a real model or measurements from an industrial deployment.
Is a GPU compulsory?
Requirements depend on the model, resolution, workload, latency and operating environment. Test the particular option on the intended infrastructure. Training and inference have different needs, and total process duration also includes capture, transfer, preprocessing and review of the output, not just the network calculation.
Can we use images the company already has?
Yes, if they are relevant, carry appropriate rights and may be used for the project's purpose. Check conditions, labels, versions and case coverage. Presentation photographs do not automatically form a representative dataset for the images expected during operation, even when they show the same product category.
Does a high class score mean the result is verified?
Interpret the score according to the model and its evaluation. It does not replace a reference or operational control. Check errors, thresholds and conditions under which the output is accepted, and route unsuitable cases through the agreed review path rather than treating confidence alone as approval.
Is a CNN always better than a visual Transformer?
Compare the task, data and conditions consistently, using quality and resource metrics. The architectural family does not establish the result on its own. Choose the option that passes project criteria and can be operated within the company's system, including its maintenance and review requirements.