Blog

    How to Use Machine Vision to Calculate Palletized Boxes in a Warehouse: Count Records, Confidence and Recounts

    By GauravSeptember 2, 20269 mins read
    On this page

    How to use machine vision to calculate palletized boxes in a warehouse starts with an honest limit: a camera sees the outside of a pallet, not the boxes hidden in its middle. The software has to combine what it sees with what the pallet should contain, and say how sure it is.

    Logistics and supply chain operations leads will find how pallet counting works at receiving and shipping, what the count record holds, how confidence decides between accepting a count and recounting, and how to plan the build.

    How do you use machine vision to calculate palletized boxes in a warehouse?

    You use machine vision to calculate palletized boxes in a warehouse by photographing each visible face of a pallet, detecting the boxes on each face, inferring layers and columns, and comparing the result with the expected count. Agnotic Technologies builds this so every count carries a confidence level, and doubtful pallets go to a manual recount.

    Counting pallets by hand at receiving?

    We build vision counts with a confidence score and a recount path, tied to the WMS receipt.

    The camera supplies evidence. The decision to accept a pallet, adjust stock or open a claim stays with your receiving rules and, where confidence is low, with a person.

    What can a camera actually see on a pallet?

    A camera can see the outer faces of a pallet, and on a regular stack that is usually enough to infer the full count. On a mixed or irregular stack it is not.

    • Regular single-product pallets: boxes of one size in a repeating pattern, where visible layers and columns imply the hidden boxes.
    • Partial top layers: the top view shows how many boxes the last layer holds.
    • Mixed pallets: several box sizes, where hidden boxes cannot be inferred from the outside.
    • Wrapped pallets: stretch film adds glare and softens edges, so lighting and camera angle matter.

    Decide up front which pallet types the system will count and which go straight to a manual count. Forcing mixed pallets through the model produces numbers nobody should trust.

    How does the counting pipeline work step by step?

    The counting pipeline works in six steps, from capturing the images to deciding what happens to the pallet.

    • Step 1, capture: fixed cameras at a receiving lane, or a handheld app, take images of two or more sides and the top.
    • Step 2, identify the pallet: the app reads the pallet label barcode so images and count attach to the right logistic unit.
    • Step 3, detect boxes: a model finds box faces in each image and estimates rows and columns per side.
    • Step 4, infer the count: layers times boxes per layer, cross-checked between views and adjusted for a partial top layer.
    • Step 5, compare: the result is checked against the expected count from the ship notice or the label.
    • Step 6, decide: accept, review or recount, based on confidence and the size of any difference.

    Where does the expected count come from?

    The expected count comes from the shipment data and the pallet label, and a vision count is only useful when it is compared with one of them.

    In the GS1 General Specifications, Application Identifier (37) holds the count of trade items or trade item pieces contained in a logistic unit. It is the mandatory completion of AI (02), which identifies the GTIN of the contained items on the same unit.

    When the supplier prints AI (02) and AI (37) on the pallet label, the app reads the declared count directly. Otherwise the count comes from the ship notice line linked to the pallet's SSCC, or from the standard pallet configuration in the item master.

    • Label count: what the supplier says is on this pallet.
    • Ship notice count: what the supplier says it sent on this order line.
    • Standard configuration: how many boxes per layer, and layers per pallet, the item normally ships in.

    What should the count record hold?

    The count record should hold the pallet's identity, the images and detections, every count involved, the confidence and the final outcome.

    • Pallet: SSCC, GTIN of the contents, receiving dock, time and the operator or camera station.
    • Images: every view used, stored with the detections drawn on, so a reviewer sees what the model saw.
    • Counts: boxes per layer, layers, the inferred total and the expected total from each source.
    • Confidence: an overall score and the reason it is low, such as glare, a blocked view or a mixed stack.
    • Outcome: accepted, adjusted after recount or disputed, with who decided and when.

    The EPCIS 2.0 standard defines an AggregationEvent for contained objects aggregated within a containing entity, and gives "at location X, at time T, the following cases were verified as being on the following pallet" as a typical EPCIS event.

    That model fits the count record. Once a pallet is accepted, the system can record which cases or quantities sit on which pallet, and later moves can refer to the pallet instead of every box.

    How should confidence decide between accept and recount?

    Confidence should decide the path, but the thresholds belong to the operation, not to the model. A high-value product may need a recount at confidence levels that are fine for low-value goods.

    • Accept: confidence is high and the count matches the expected total.
    • Review: confidence is high but the count differs from the expected total, so a person checks the images first.
    • Recount: confidence is low, whatever the count says, so a person counts the pallet by hand.
    • Exclude: pallet types the system is not set up for go straight to manual handling.

    Track how recounts turn out. If recounts keep confirming the vision count, thresholds can be relaxed for that product. If they keep correcting it, the model or the camera setup needs work.

    Designing the manual recount

    Design the manual recount as part of the system rather than a fallback outside it, because it produces the ground truth the model is judged against.

    • Show the images with detections, so the counter knows which face looked wrong.
    • Record the recount as a separate value, and never overwrite the vision count.
    • Capture the reason when they differ: a hidden void, a damaged layer, the wrong product or a model error.
    • Feed confirmed recounts into the evaluation set for the next model version.

    Choosing fixed cameras or a handheld app

    Fixed cameras suit high-volume receiving lanes where pallets pass a known point. A handheld app suits lower volumes and docks where a fixed station would get in the way.

    • Fixed station: consistent lighting, angles and distances, so counts are more repeatable.
    • Handheld app: cheaper to start and portable, but results depend on how the operator frames each photo.
    • Guided capture: outlines on the app screen showing where to stand narrow the gap between the two.

    Lighting and camera setup at the dock

    Lighting and camera position cause more counting errors than the model, so treat the capture setup as part of the system and test it before training anything.

    • Diffuse light: soft, even lighting reduces glare from stretch film and shiny cartons.
    • Fixed distances: mark where pallets stop so every image has the same scale.
    • Several angles: two sides and the top let the software cross-check columns and layers.
    • Clean lenses: dust on a dock camera blurs edges slowly, so add lens checks to the daily routine.

    A worked example: inbound cartons at a receiving lane

    A worked example: a warehouse receives pallets of one carton size from a supplier whose labels carry the SSCC but no count. The ship notice lists the cases expected for each SSCC.

    A fixed station photographs two sides and the top. The model finds the same number of columns on both sides and a full top layer, so the inferred total matches the notice with high confidence, and the receipt posts.

    The next pallet shows a gap in the top layer that one side view does not confirm. The count differs from the notice and confidence is lower, so the pallet goes to recount. The counter finds a crushed carton removed in transit, records the reason, and the receipt posts with the shortage noted for the supplier claim.

    What are the common mistakes with machine vision pallet counting?

    The common mistakes with machine vision pallet counting come from asking the camera for more than it can see, or from losing the evidence that shows whether it was right.

    • Counting mixed pallets: the model reports a number for boxes it could never see.
    • No pallet identity: images are stored but cannot be tied to an SSCC or a receipt.
    • Overwriting the count: the recount replaces the vision count and nobody can measure accuracy.
    • One threshold for everything: high-value and low-value goods share the same acceptance rule.
    • Ignoring the setup: glare from film or lights causes more errors than the model itself.

    What does vision pallet counting mean for your build plan?

    Vision pallet counting needs a capture setup, a detection model trained on your pallets, counting logic, a review and recount workflow, and integration with receiving in the WMS. Collect real images early, because they shape everything else.

    • Pick one receiving lane and the pallet types it handles.
    • Collect and label images of those pallets in real lighting.
    • Agree thresholds and recount rules with operations and finance.
    • Connect counts to receipts in the WMS only after a parallel run against manual counts.

    How does Agnotic build machine vision for pallet counting?

    Agnotic builds the capture app or station software, the detection and counting model, the confidence rules, the review and recount screens and the connection to your WMS receiving process. We begin with a parallel run against manual counts so you can see where the system is right and where it is not.

    Counts with evidence and a recount path

    Every pallet count carries its images, its confidence and who confirmed it.

    Sources

    Frequently Asked Questions

    Not directly. On regular single-product stacks it infers hidden boxes from visible layers and columns. On mixed or irregular pallets it cannot, and those should be counted by hand.

    Talk to an engineer about your project

    Send us a few photos of typical pallets at your receiving dock. We will tell you which ones a camera can count and how the recount would work.