# Product Recognition AI

> Source: <https://blog.roboflow.com/product-recognition-ai/>
> Published: 2026-07-10 16:50:25+00:00

*Product recognition AI automatically helps businesses verify that physical items match transaction records such as receipts or invoices by combining object detection with text recognition. By orchestrating custom SKU-level detection models and GLM-OCR within Roboflow Workflows, companies can completely automate checkout validation and order packing to eliminate human billing errors.*

Product recognition AI is becoming one of the most practical uses of computer vision in [retail](https://blog.roboflow.com/retail-store-item-detection-using-yolov5/), [warehousing](https://roboflow.com/industries/warehousing?ref=blog.roboflow.com), [logistics](https://roboflow.com/industries/logistics?ref=blog.roboflow.com), and smart checkout systems. Businesses already capture many images through CCTV cameras, mobile phones, checkout cameras, warehouse cameras, and packing stations. Product recognition AI turns those images into useful information.

Instead of only asking, *“What is in this image?”*, a product recognition system can answer business questions such as:

- Is this product available on the shelf?
- Is this product present on the bill?
- Is the shelf price correct?
- Is the product placed according to the planogram?
- Are any products missing or misplaced?

This makes product recognition AI more than a detection task. It becomes a way to automate audits, prevent errors, and improve operations.

In this blog, you will learn what product recognition AI is, where it can be used, and how it can solve real business problems. I will show how to build a practical *Product-to-Bill Verification System* using Roboflow, where the AI detects products from an image, reads the bill or receipt, and checks whether the detected products are actually present in the bill.

This helps connect computer vision with real workflows such as checkout verification, packing validation, [inventory checking](https://blog.roboflow.com/how-to-use-computer-vision-to-monitor-inventory/), and billing error detection.

## What Is Product Recognition AI?

Product recognition AI is a computer vision task that identifies products from images or videos. A product can be recognized by its packaging, shape, color, logo, label, barcode, or visual similarity to known catalog images.

In a simple form, product recognition AI find a product such as “Coke bottle,” “chips packet,” or “medicine box”, in image, identify SKU, count quantities, read label etc. A product recognition system may use different AI tasks together:

| AI task | Purpose | Example |
|---|---|---|
| Detection | Finds product locations in an image | Detect each product on a counter |
| Classification | Identifies the product category or SKU | Classify item as `jetson nano 2gb` |
| OCR | Reads text from bills, labels, or packaging | Extract product names from a receipt |
| Visual matching | Matches product image with a catalog | Find visually similar product |
| Counting | Counts products or shelf facings | Count 12 bottles on a shelf |
| Business logic | Converts AI output into a decision | Pass, fail, or review required |

For retail and logistics, the most useful system is usually not a single model. It is a complete workflow that combines product detection, text reading, matching logic, and reporting.

## Applications of Product Recognition AI

Product recognition AI can be used anywhere a business needs to identify, count, verify, or track physical products from images or video. Following are some use case examples that show that product recognition AI is not limited to detecting products but it can support real business decisions, reduce manual work, and improve operational accuracy.

### Retail shelf monitoring

Retail shelf monitoring is one of the most practical applications of product recognition AI. A store employee or fixed camera captures a shelf image, and the AI system detects products, empty spaces, and shelf gaps. This helps retailers know whether products are available or whether shelves need restocking. A shelf monitoring system detects both products and the absence of products on retail shelves, which can be used to check whether shelves are fully stocked.

[How to Use a Product Recognition API](https://blog.roboflow.com/product-recognition-api/).

### Planogram compliance

A planogram is the expected shelf layout that defines where each product should be placed. Product recognition AI can compare the real shelf image with the expected planogram and detect misplaced products, wrong brand mixing, missing facings, or empty shelf sections.

[How to Create a Retail Planogram using Computer Vision](https://blog.roboflow.com/how-to-create-a-retail-planogram-using-computer-vision/).

### Out-of-stock detection

Out-of-stock detection focuses on finding empty shelf spaces or missing products. Instead of waiting for staff to manually inspect aisles, the AI system can detect empty facings and trigger an alert. An automated computer vision system sends an alert when empty facings are detected.

### Shelf price verification

In retail stores, shelf labels and POS prices may not always match. Product recognition AI combined with OCR can detect shelf labels, read product names and prices, and compare them with the POS database. A shelf price verification system uses computer vision to detect shelf labels, crops them, extracts product and price information, checks the result against POS data, and returns an annotated image showing matches and mismatches.

### Automated checkout and smart stores

In smart checkout systems, cameras can recognize products placed on a checkout counter or picked by a customer. The system can add detected products to the customer’s cart or verify that all products were scanned correctly. Roboflow’s retail store item detection example mentions use cases such as store shelf inventory tracking and smart stores where customers pick items and are automatically charged.

### Inventory counting

Product recognition AI can also count products in shelves, warehouses, or storage areas. For example, a camera can count how many boxes, cans, bottles, or packets are visible. This helps businesses reduce manual counting and improve inventory visibility. You can find retail and consumer goods datasets and models on Roboflow universe that can be used as a starting point for retail product detection projects.

[Top Retail and Consumer Goods Datasets](https://universe.roboflow.com/browse/retail?ref=blog.roboflow.com)at Roboflow Universe.

### Pick-and-pack verification

In fulfillment and logistics, product recognition AI can verify whether the correct items were picked and packed before shipping. This is useful for e-commerce, electronics, grocery delivery, pharmacy, and warehouse dispatch. The system uses computer vision for locating product, barcode scanning, dimension validation, and label verification for logistics workflows.

## Example Use Case: Product-to-Bill Verification System

In this example, I will show you how to build a *Product-to-Bill Verification System* using Roboflow Workflows.

The idea is simple:

AI detects products from an image or camera, reads the bill or receipt, and checks whether the detected products are present in the bill.

This is useful because many business errors happen when the physical product and the document do not match. A product may be packed but not billed. A product may be billed but not physically present. A wrong SKU may be scanned. A quantity may be incorrect. These errors can happen in retail checkout, self-checkout, warehouse dispatch, e-commerce packing, returns, and pharmacy billing and more.

The system takes two inputs:

**Product image:** This can come from a checkout camera, packing station camera, mobile phone, or uploaded image.**Receipt or bill image:** This can be a receipt photo, invoice image, or a PDF converted into an image before OCR.

The workflow then returns a final decision:

| Result | Meaning |
|---|---|
`pass` |
Every detected product was found on the bill |
`fail` |
One or more detected products were missing from the bill |
`review_required` |
The AI was not confident enough to make a final decision |

This third status is important. In real deployments, the system should not force a pass or fail when detection quality is poor. If no product is detected, if only a generic product class is found, or if confidence is too low, the workflow should send the case for human review.

**Why this use case has business value?**

A Product-to-Bill Verification System can help businesses reduce mistakes and losses at important transaction points. For example, in a retail checkout counter, the system can check whether one or all products placed on the counter are included in the bill. In a warehouse packing station, the system can compare packed products with the invoice before shipping. In a return counter, the system can verify whether the returned product exists in the original bill.

| Business problem | How the system helps |
|---|---|
| Product placed on counter but not billed | Flags missing item |
| Product billed but not physically present | Flags extra bill item |
| Wrong SKU scanned | Detects product mismatch |
| Packing mistake | Verifies order before shipping |
| Return fraud | Compares returned item with bill |
| Manual checking is slow | Automates visual verification |

This makes the use case practical to deploy and scale because it connects AI output directly to a business decision.

### Workflow Overview

The Roboflow [Workflow](https://app.roboflow.com/workflows/embed/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3b3JrZmxvd0lkIjoiOWJ2ZzBHNHFoWVRDSzFJQVFpcmciLCJ3b3Jrc3BhY2VJZCI6InZjQmw1Y0x3bUtQallLTGNRemV1VkE4UlRhNjIiLCJ1c2VySWQiOiJ2Y0JsNWNMd21LUGpZS0xjUXpldVZBOFJUYTYyIiwiaWF0IjoxNzgzNTc4MjA4fQ.LnWE-4ZVMtAxf8-DgaLPnPHKvoraKzc7hQ2uFMvm_q0?ref=blog.roboflow.com) follows this structure:

The workflow uses two main AI components:

- A custom object detection model to detect products.
- GLM-OCR to read the receipt text.

It also uses custom Python logic to normalize product names and compare them with the receipt text. Roboflow supports custom Python blocks in Workflows through Serverless v2 API, Dedicated Deployments, and local inference, which makes this kind of business-specific matching logic possible inside a visual workflow.

### Model Used for Product Detection

The product image is analyzed with a custom Roboflow object detection model:

```
pick-n-pack/2
```

This model is trained for a pick-and-pack style verification use case. Instead of detecting only a generic class such as `product`

, it detects specific product classes such as:

```
jetson_nano_2gb
opla_iot
reterminal
```

This is important because the detected class name becomes the product identity that will be checked against the bill. For example, if the model detects:

```
jetson_nano_2gb
```

the workflow needs to check whether the receipt contains a matching product name, such as:

```
Jetson Nano
Jetson Nano 2GB
NVIDIA Jetson
```

The product detection model gives structured output such as class name, bounding box, and confidence score. The class name is used for matching, the bounding box is used for visualization, and the confidence score is used to decide whether the result can be trusted.

### Receipt Reading with GLM-OCR

The second input is the receipt image. The receipt is read using:

```
GLM-OCR
```

[GLM-OCR](https://docs.roboflow.com/deploy/supported-models/glm-ocr?ref=blog.roboflow.com) transcribes visible text from an image and is suitable for reading documents, signs, receipts, and other text-heavy visual inputs. In this system, GLM-OCR extracts text such as:

```
Jetson Nano
OPLA IoT Kit
reTerminal
Quantity: 1
Total: ...
```

That extracted receipt text is then passed into the verification logic. It uses GLM-OCR as the main receipt reading model, then compares the OCR text against the product names detected by the custom object detection model.

### Product Name Processing

A common problem in product recognition systems is that model class names and receipt names do not always look the same. For example, the model may output:

```
jetson_nano_2gb
```

but the receipt may show:

```
Jetson Nano
```

To solve this, the workflow uses a custom Python block called:

```
Product_Name_Processor
```

This block converts raw model class names into receipt-searchable aliases. For example, `jetson_nano_2gb`

can become aliases such as `jetson nano 2gb`

, `jetsonnano2gb`

, `jetson`

, `nano`

, and `2gb`

. The workflow uses these aliases so the receipt text does not need to match the model class name perfectly. This makes the system more practical because real receipts often use shorter, inconsistent, or human-readable names.

### Product Bill Verification Logic

After product names are normalized and receipt text is extracted, the workflow uses another custom Python block:

```
Product_Bill_Verifier
```

This block compares the detected product aliases against the receipt OCR text. It supports several types of matching:

| Matching type | Example |
|---|---|
| Exact match | `jetson nano` matches `jetson nano` |
| Compact match | `jetsonnano` matches `Jetson Nano` |
| Partial match | `jetson` matches a longer receipt item |
| Fuzzy match | Handles small OCR or spelling differences |

The verifier also avoids false confidence. If no product is detected, if only a generic class such as `product`

is detected, or if product detection confidence is too low, the result becomes `review_required`

instead of `pass`

or `fail`

.

This is important for production systems because the workflow should not make a final decision when the visual evidence is weak.

### Final Workflow Output

The workflow returns both visual and structured outputs. The final visual output is the receipt image with a text overlay showing:

- Verification result
- Detected products
- Products found on the bill
- Products missing from the bill
- Review reason, if needed

The structured output can include:

```
{
  "verification_result": "fail",
  "all_found": false,
  "detected_products": ["jetson_nano_2gb", "opla_iot"],
  "present_products": ["jetson_nano_2gb"],
  "missing_products": ["opla_iot"],
  "receipt_text": "Jetson Nano 2GB ...",
  "review_reason": "None"
}
```

This structured result is useful because it can be sent to a dashboard, POS system, warehouse management system, quality-control log, or alerting system.

### Example Scenario

Suppose the product image contains:

```
jetson_nano_2gb
opla_iot
reterminal
```

The receipt OCR extracts:

```
Jetson Nano
reTerminal
```

The workflow result becomes:

```
fail
```

because `opla_iot`

was detected in the product image but not found on the receipt. The final report may show:

```
Detected products: jetson_nano_2gb, opla_iot, reterminal
Present on bill: jetson_nano_2gb, reterminal
Missing from bill: opla_iot
Verification result: fail
```

This gives the user a clear action, check the missing product before completing checkout, shipping, or order closure.

## How to build Product-to-Bill Verification System

Follow the steps given below to build this system.

### Step 1: Create a product detection project and annotate images

Create an object detection project in Roboflow. Upload product images captured in the same environment where the system will be used. For example, if the system will run at a packing station, collect images from that packing station. If it will run at checkout, collect checkout counter images. Recommended classes should be SKU-level classes, not only generic classes. Instead of:

```
electronic_development_kit
```

use:

```
jetson_nano_2gb
opla_iot
reterminal
```

SKU-level labels are important because the bill contains product names, not just generic product categories. Annotate each product with bounding boxes.

### Step 2: Build dataset version and train the model

Train a Roboflow object detection model and test it on unseen product images. A good model should:

- Detect all visible products.
- Identify the correct SKU.
- Work under different lighting conditions.
- Handle different product positions and angles.
- Avoid confusing similar-looking products.

Roboflow supports multiple model types for deployment, including object detection, classification, segmentation, keypoint, and multimodal models. Models can be deployed through Serverless Hosted API, Dedicated Deployment, self-hosted Roboflow Inference, and Workflows depending on the model and deployment target.

### Step 3: Add two workflow inputs

Create a Roboflow Workflow with two inputs:

```
image
receipt_image
```

The first input is used for product detection. The second input is used for OCR. The product image goes to the object detection model. The receipt image goes to GLM-OCR.

### Step 4: Detect products

Add the custom product detection model:

```
pick-n-pack/2
```

This block detects products and outputs class names, bounding boxes, and confidence scores. You can also add visualization blocks to draw product boxes and labels on the product image. This helps users visually confirm what the model detected.

### Step 5: Read the receipt

Add GLM-OCR block and connect the receipt image to it. GLM-OCR extracts the receipt text and sends it to the verification block. For image-based receipts, this can work directly. For PDFs, the PDF should first be converted into an image or handled through a document-processing step before OCR. The following prompt is used in this block for task type `Custom Prompt`

:

```
Read this bill or receipt. Extract the purchased product names, item descriptions, SKUs, and quantities exactly as visible. Return plain text only.
```

### Step 6: Normalize product names

Add the `Product_Name_Processor`

custom Python block. This block turns model-friendly class names into receipt-friendly aliases. For example:

```
opla_iot
```

can become:

```
opla iot
oplaiot
opla
iot
```

This increases the chance of finding the product in receipt text even when the receipt uses a shorter or different format.

Following is the code for this block, you may customize code according to your need.

``` python
def run(self, product_predictions):
    import re

    STOP_WORDS = {"product", "products", "item", "items", "box", "pack", "unit", "the", "a", "an"}

    def normalize(value):
        value = str(value or "").lower()
        value = value.replace("_", " ").replace("-", " ").replace("/", " ")
        value = re.sub(r"[^a-z0-9]+", " ", value)
        return re.sub(r"\s+", " ", value).strip()

    def make_aliases(label):
        base = normalize(label)
        tokens = [t for t in base.split(" ") if t and t not in STOP_WORDS]
        aliases = set()
        if base:
            aliases.add(base)
            aliases.add(base.replace(" ", ""))
        if tokens:
            aliases.add(" ".join(tokens))
            aliases.add("".join(tokens))
        for token in tokens:
            if len(token) >= 3:
                aliases.add(token)
        # Add simple split/compact variants for labels such as jetson_nano_2gb, opla_iot, reterminal.
        compact = "".join(tokens)
        if compact:
            aliases.add(compact)
            if compact.startswith("re") and len(compact) > 4:
                aliases.add("re " + compact[2:])
        return sorted(v for v in aliases if v)

    names = []
    if product_predictions is not None:
        raw_names = product_predictions.data.get("class_name", [])
        names = list(raw_names) if raw_names is not None else []

    products = []
    seen = set()
    for name in names:
        original = str(name)
        normalized = normalize(original)
        if normalized and normalized not in seen:
            seen.add(normalized)
            products.append({
                "original": original,
                "normalized": normalized,
                "aliases": make_aliases(original),
            })

    processed_names = [p["normalized"] for p in products]
    return {
        "product_name_data": {"products": products},
        "processed_product_names": processed_names,
        "processed_product_names_text": ", ".join(processed_names) if processed_names else "No products detected",
    }
```

### Step 7: Verify products against the bill

Add the `Product_Bill_Verifier`

custom Python block. This block receives:

```
product_predictions
receipt_text
product_name_data
```

It compares detected products with receipt text and returns:

```
detected_products
present_products
missing_products
verification_result
all_found
review_reason
match_details
```

The verifier returns:

`pass`

when every detected product is found on the bill.`fail`

when one or more detected products are missing.`review_required`

when the result is not reliable enough.

Following is the code for this block.

``` python
def run(self, product_predictions, receipt_text, product_name_data=None):
    import re
    import difflib
    import numpy as np

    GENERIC_PRODUCT_NAMES = {"product", "products", "item", "items", "object", "objects", "unknown"}
    LOW_CONFIDENCE_THRESHOLD = 0.5

    def normalize(value):
        value = str(value or "").lower()
        value = value.replace("_", " ").replace("-", " ").replace("/", " ")
        value = re.sub(r"[^a-z0-9]+", " ", value)
        return re.sub(r"\s+", " ", value).strip()

    def fallback_products_from_predictions(predictions):
        names = []
        if predictions is not None and hasattr(predictions, "data"):
            raw_names = predictions.data.get("class_name", [])
            names = list(raw_names) if raw_names is not None else []
        products = []
        seen = set()
        for name in names:
            original = str(name)
            normalized = normalize(original)
            if normalized and normalized not in seen:
                seen.add(normalized)
                products.append({"original": original, "normalized": normalized, "aliases": [normalized, normalized.replace(" ", "")]})
        return products

    def receipt_windows(words, max_len=5):
        windows = []
        n = len(words)
        for i in range(n):
            for length in range(1, max_len + 1):
                if i + length <= n:
                    windows.append(" ".join(words[i:i + length]))
        return windows

    def get_low_confidence_names(predictions):
        if predictions is None or not hasattr(predictions, "confidence") or predictions.confidence is None:
            return []
        confs = list(predictions.confidence)
        names = []
        if hasattr(predictions, "data"):
            raw_names = predictions.data.get("class_name", [])
            names = list(raw_names) if raw_names is not None else []
        low = []
        for i, conf in enumerate(confs):
            try:
                c = float(conf)
            except Exception:
                continue
            if c < LOW_CONFIDENCE_THRESHOLD:
                low.append(str(names[i]) if i < len(names) else "unknown")
        return low

    raw_text = str(receipt_text or "")
    normalized_receipt = normalize(raw_text)
    compact_receipt = normalized_receipt.replace(" ", "")
    receipt_words = normalized_receipt.split()
    windows = receipt_windows(receipt_words, 5)

    products = []
    if isinstance(product_name_data, dict):
        products = product_name_data.get("products", []) or []
    if not products:
        products = fallback_products_from_predictions(product_predictions)

    detected = [str(p.get("original") or p.get("normalized") or "") for p in products]
    normalized_detected = [normalize(p) for p in detected]
    low_confidence_names = get_low_confidence_names(product_predictions)

    review_reasons = []
    if len(products) == 0:
        review_reasons.append("No product was detected, so bill verification cannot be trusted.")
    if any(name in GENERIC_PRODUCT_NAMES for name in normalized_detected):
        review_reasons.append("Only a generic product class was detected, not a specific product name.")
    if low_confidence_names:
        review_reasons.append("Low-confidence product detection: " + ", ".join(low_confidence_names))

    present = []
    missing = []
    match_details = {}

    for product in products:
        original = str(product.get("original") or product.get("normalized") or "")
        aliases = product.get("aliases", []) or []
        normalized_name = normalize(product.get("normalized") or original)
        candidates = [normalize(a) for a in aliases] + [normalized_name]
        candidates = [c for c in dict.fromkeys(candidates) if c]

        best_score = 0.0
        best_match = ""
        found = False

        for candidate in candidates:
            compact_candidate = candidate.replace(" ", "")
            if candidate in normalized_receipt or compact_candidate in compact_receipt:
                found = True
                best_score = 1.0
                best_match = candidate
                break
            for window in windows:
                score = difflib.SequenceMatcher(None, candidate, window).ratio()
                compact_score = difflib.SequenceMatcher(None, compact_candidate, window.replace(" ", "")).ratio()
                score = max(score, compact_score)
                if score > best_score:
                    best_score = float(score)
                    best_match = window

        if found or best_score >= 0.78:
            present.append(original)
            found = True
        else:
            missing.append(original)

        match_details[original] = {
            "found": bool(found),
            "best_match": best_match,
            "best_score": round(float(best_score), 3),
            "aliases_checked": candidates,
        }

    if review_reasons:
        result = "review_required"
        all_found = False
        qc_result = "fail"
    else:
        all_found = len(products) > 0 and len(missing) == 0
        result = "pass" if all_found else "fail"
        qc_result = result

    review_reason = " ".join(review_reasons) if review_reasons else "None"

    return {
        "detected_products": detected,
        "present_products": present,
        "missing_products": missing,
        "detected_products_text": ", ".join(detected) if detected else "No products detected",
        "present_products_text": ", ".join(present) if present else "None",
        "missing_products_text": ", ".join(missing) if missing else "None",
        "receipt_text": raw_text,
        "verification_result": result,
        "qc_result": qc_result,
        "review_reason": review_reason,
        "all_found": bool(all_found),
        "product_count": int(len(detected)),
        "match_details": match_details,
    }
```

### Step 8: Add visual overlay and outputs

Finally, add a text overlay on the receipt image. This makes the result easy to understand for store staff, warehouse staff, or auditors. The output can include:

```
output_image
verification_result
all_found
detected_products
present_products
missing_products
receipt_text
review_reason
match_details
qc_result
```

This gives both human-readable and machine-readable results.

The output of the workflow looks similar to following.

## Where This System Can Be Used

A Product-to-Bill Verification System can be used anywhere businesses need to confirm that the physical products match the bill, receipt, invoice, or order record. It is especially useful in checkout, packing, dispatch, and return workflows where even small product mismatches can cause billing errors, customer complaints, or inventory losses.

**Retail checkout verification:** At a checkout counter, the system can detect products placed in front of the cashier and compare them with the generated bill. This helps catch missed scans, wrong products, or quantity mismatch.**Self-checkout verification:** In self-checkout, customers scan products themselves. A product-to-bill system can verify that scanned items match the visible products, reducing mistakes and possible fraud.**E-commerce packing verification:** Before an online order is packed and shipped, a camera can capture the products and compare them with the invoice. This helps reduce wrong deliveries and customer complaints.**Warehouse dispatch:** In warehouses, the system can verify whether products being dispatched match the bill, packing slip, or purchase order.**Return verification:** When a customer returns a product, the system can compare the returned item with the original bill to confirm whether the item belongs to that transaction.

## Best Practices for Scaling

To make this system reliable at scale, keep these points in mind:

**Use SKU-level classes:** Generic classes are not enough for bill verification. The system needs specific product identities.**Add product aliases:** Receipts may not use the same product names as the model. Maintain aliases for each product, such as short names, brand names, SKU names, and compact versions.**Use confidence thresholds:** Low-confidence detections should not create automatic pass or fail decisions. They should go to`review_required`

.**Keep human review for uncertain cases:** A good production system should support human review when the AI is uncertain. This reduces false decisions.**Store verification logs:** Save the product image, receipt image, OCR text, detected products, missing products, and final result. This helps with auditing and model improvement.**Retrain with real failures:** When the model misses a product or confuses two SKUs, add those examples back into the dataset and retrain.**Connect with business systems:** The final result can be connected to a POS system, warehouse management system, order database, dashboard, or alerting tool.

## Product Recognition AI Conclusion

Product recognition AI is not only about detecting products in images. Its real value comes when product detection is connected to business workflows. With [Roboflow](https://app.roboflow.com/?ref=blog.roboflow.com), we can build a practical Product-to-Bill Verification System that detects products, [reads a receipt using OCR](https://blog.roboflow.com/how-to-read-receipts-with-ai/), normalizes product names, compares detected products with bill text, and returns a clear result `pass`

, `fail`

, or `review_required`

. A strong product recognition AI system should not just say what it sees. It should help the business decide what action to take next.

**Cite this Post**

Use the following entry to cite this post in your research:

[Timothy M](/author/timothy/). (Jul 10, 2026).
Product Recognition AI. Roboflow Blog: https://blog.roboflow.com/product-recognition-ai/
