Publish ResNet18-C3 geometry checkpoint
Browse filesFiles changed (4)
123456789101112131415161718192021222324252627282930313233343536373839404142---library_name: pytorchtags:- barcode- geometry- resnet18- tps---
# Wemeet ResNet18-C3 geometry model
This folder contains the Stage 2 geometry model for the Wemeet barcoderestoration pipeline. It predicts 48 normalized source control points for afixed 16×3 destination grid. It does not generate pixels; the SW TPSrectifier consumes the coordinates.
## Files
- `model_state_dict.pt`: deployment state dictionary used by `wemeet.ai.geometry`.- `best.pt`: full training checkpoint, including optimizer state and training metadata.- `config.json`: architecture, preprocessing, dataset revision, and metrics.
## Input contract
- input: BGR `uint8` detected crop, converted to grayscale- resize: 160×384 (height×width), `INTER_AREA`- grayscale is repeated to three channels- ImageNet mean/std normalization- output: `(48, 2)` normalized `(x, y)` source points
## Training result
- checkpoint epoch: 48- validation mean control-point error: 1.3723 px- validation control-point P95: 3.7989 px- held-out exact-decode rescue rate: 71.1333% (synthetic target-only)- held-out exact-decode misread rate: 0.4667%
The held-out decode result is synthetic data only. Real detector crops andphotographed invoices still require a separate evaluation.123version https://git-lfs.github.com/spec/v1oid sha256:da4f9f34be532de72958b3dde8dfa3a3bc6595e08c8125de64ce37bd961b0b7esize 386952081234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465{ "model_type": "ResNet18-C3", "architecture": "ResNet18 through layer3 + 1x1 adapter + 16x3 geometry head", "checkpoint_epoch": 48, "input_hw": [ 160, 384 ], "control_grid": [ 16, 3 ], "output_shape": [ 48, 2 ], "preprocess": { "grayscale_to_three_channels": true, "resize_interpolation": "cv2.INTER_AREA", "imagenet_normalization": true }, "dataset_revision": "a833a3a5944148cb9815ccbd1f05aced50f6c464", "config": { "data_root": "synthetic/v1", "epochs": 50, "batch_size": 8, "num_workers": 1, "lr": 0.0001, "weight_decay": 0.0001, "smooth_l1_beta": 0.02, "target": 5000, "hard": 3500, "first_ok": 1500, "val_fraction": 0.1, "seed": 42, "output_dir": "runs/restoration-resnet18-c3-v1", "run_name": "restoration-resnet18-c3-v1", "no_pretrained": false, "offline_wandb": false, "model": "ResNet18-C3", "input_hw": [ 160, 384 ], "control_grid": [ 16, 3 ], "device": "cuda", "train_size": 27024, "validation_size": 2976, "dataset_root": "synthetic/v1" }, "metrics": { "control_point_mean_px": 1.3722766367017583, "control_point_rmse_px": 2.7067718992951098, "control_point_p95_px": 3.7989081903811424, "rescue_rate": 0.7113333333333334, "misread_rate": 0.004666666666666667 }, "files": { "model_state_dict.pt_sha256": "038559beb75efc6935d2431c0fdb6bfa355862cd4e3fdf6c422cd5c84bbae18c", "best.pt_sha256": "da4f9f34be532de72958b3dde8dfa3a3bc6595e08c8125de64ce37bd961b0b7e" }}123version https://git-lfs.github.com/spec/v1oid sha256:038559beb75efc6935d2431c0fdb6bfa355862cd4e3fdf6c422cd5c84bbae18csize 12921125geometry/resnet18-c3/README.mdAdded+42
geometry/resnet18-c3/best.ptAdded+3
geometry/resnet18-c3/config.jsonAdded+65
geometry/resnet18-c3/model_state_dict.ptAdded+3