Receipt Detection

An object detection model (YOLOX-M), trained on 1 class, scoring 87.2% mAP.

View on Pictographclearobject 路 Object Detection 路 YOLOX-M 路 FP32 路 Apache License 2.0

Overview

This is an object detection model built on YOLOX-M. It expects 640x640 input and runs in FP32 precision. The ONNX weights are in this repo; run them with the Pictograph SDK (below) or open the model on Pictograph to test it in-browser, call the hosted API, or deploy it as an always-on endpoint.

Performance

Headline: 87.2% mAP.

Metric Value
mAP 87.2%
mAP@50 100.0%
Recall 87.5%

Classes

Class index matches the model's output order.

# Class
0 receipt

Training

Setting Value
Input size 640x640
Epochs 20
Batch size 12
Learning rate 0.01
Model size m
Precision FP32
Version 1.0.0

Use this model

The weights are exported to ONNX (yolox-c4b9f885.onnx). Run them framework-natively with ONNX Runtime, or with the Pictograph SDK, which applies the model's pre/post-processing for you.

ONNX Runtime

from huggingface_hub import hf_hub_download
import onnxruntime as ort

onnx = hf_hub_download("pictograph/receipt-detection", "yolox-c4b9f885.onnx")
sess = ort.InferenceSession(onnx, providers=["CPUExecutionProvider"])
inp = sess.get_inputs()[0]
print(inp.name, inp.shape)  # NCHW float32; preprocess to the model's input size + normalization
# outputs = sess.run(None, {inp.name: preprocessed_batch})

Pictograph SDK

from huggingface_hub import hf_hub_download
from pictograph import load_model, DetectionModel, DetectionResult

onnx = hf_hub_download("pictograph/receipt-detection", "yolox-c4b9f885.onnx")

model: DetectionModel = load_model(
    onnx, task="object_detection", format="onnx",
)
result: DetectionResult = model.predict(image="photo.jpg")
print(result)

License

Released under Apache License 2.0.


Trained and published with Pictograph - annotate, train, and deploy from one API.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Evaluation results