nuwell-chart-models
Modelos ONNX (int8, ~70 MB total) usados pelo Nuwell
para extrair curvas de gráficos no browser (via onnxruntime-web).
model_int8.onnx — Mask2Former Swin-Tiny fine-tuned (separação de curvas)
Segmentação instance de curvas em plot areas de gráficos (linhas, marcadores, tracejados, multi-cor).
| Versão | Recall | F1 | Notas |
|---|---|---|---|
| v3 (atual) | 99.5% | 99.1% | Path C: gen_from_real_aug.py + evaluator_v3.py (cKDTree OR matching), Optuna trial_003 |
| v2 (antigo) | 88-93% | 84% | bipartite matching + Hungarian, pré-2026-07 |
| v1 (PRE_TRIAL003) | 88.4% | - | bipartite tol=8, baseline |
Avaliação em 67 cenários reais (
test_scenarios/coloridas|tracejado|mono_extended).
Arquitetura
- Base:
facebook/mask2former-swin-tiny-coco-instance - Fine-tuned com
num_labels=1(foreground vs background) - Input:
(1, 3, 512, 512)float32 normalizado - Outputs:
class_queries_logits:(1, 100, 2)—[0]=foreground, [1]=no-objectmasks_queries_logits:(1, 100, 128, 128)— sigmoid para binário
Como usar (browser JS)
import * as ort from 'onnxruntime-web';
const buf = await fetch('https://huggingface.co/noelAraujoMoreira/nuwell-chart-models/resolve/main/model_int8.onnx').then(r => r.arrayBuffer());
const session = await ort.InferenceSession.create(buf, { executionProviders: ['wasm'] });
const out = await session.run({ pixel_values: preprocessedTensor });
const clsP = out.class_queries_logits.data; // length 200 (Q=100 × 2 classes)
const mql = out.masks_queries_logits.data; // length 1.638.400 (Q=100 × 128²)
// Foreground score por query:
const score = (q) => {
const l0 = clsP[q*2], l1 = clsP[q*2+1];
const e0 = Math.exp(l0 - Math.max(l0,l1)), e1 = Math.exp(l1 - Math.max(l0,l1));
return e0 / (e0 + e1); // foreground prob
};
Outros modelos
det.onnx— detecção de texto (PP-DetR) — legenda detectioncls.onnx— classificação de orientação de textolatin_rec.onnx— reconhecimento de caracteres latinoslatin_charset.json— charset
Backup
model_int8_PRE_TRIAL003.onnx— backup da versão anterior ao deploy de 2026-07-19.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support