Matthieu68857/pokemon-cards-detection, a DETR
(facebook/detr-resnet-50 fine-tuned) with one class, Card, exported to ONNX for
transformers.js. It finds where the cards are in a photo, not which
cards they are.
onnx/model_quantized.onnx: 8-bit weights (about 43 MB). On the test images it finds the same cards as the
original model, with scores within 0.01.import { pipeline } from '@huggingface/transformers'
const detector = await pipeline('object-detection', '<this repository>', { dtype: 'q8', device: 'wasm' })
const cards = await detector(image, { threshold: 0.7 })
Exported with optimum-cli export onnx --task object-detection and quantised with
onnxruntime.quantization.quantize_dynamic (QUInt8).
Matthieu68857/pokemon-cards-detection