HC-MTS skin triage — ConvNeXt-Base int8 ONNX (mobile)
Quantized int8 ONNX heads of the HC-MTS skin triage models, used for on-device inference (ONNX Runtime CPU) in the DocGlasses Android app.
Research use only. Not a medical device and not a diagnosis.
Files
| File | Bytes | Role |
|---|---|---|
gate_convnext.int8.onnx | 88465274 | Gate: healthy vs lesion (2-way softmax) + not-skin logit (sigmoid) |
l1_convnext.int8.onnx | 88465274 | L1: malignant / benign_neoplastic / non_neoplastic |
l15_convnext.int8.onnx | 88472470 | L1.5: 10 rash families (run only for non_neoplastic) |
mobile_config.json | Labels, temperature and abstain thresholds | |
benchmark_report.json | int8 vs PyTorch agreement and CPU latency |
Tensor contract
- Input
image:float32NCHW[1,3,384,384], RGB, values 0–255 (the graph applies/255and ImageNet mean/std). - Resize the longest side to 384 and centre-pad with black.
- Output
logits:[1,C]. - L1:
softmax(logits / 0.8), abstain if max prob < 0.727. - L1.5:
softmax(logits), abstain if max prob < 0.4.
Python
import numpy as np
import onnxruntime as ort
from PIL import Image
img = Image.open("photo.jpg").convert("RGB")
s = 384 / max(img.size)
img = img.resize((round(img.width * s), round(img.height * s)))
canvas = Image.new("RGB", (384, 384))
canvas.paste(img, ((384 - img.width) // 2, (384 - img.height) // 2))
x = np.asarray(canvas, dtype=np.float32).transpose(2, 0, 1)[None]
sess = ort.InferenceSession("l1_convnext.int8.onnx", providers=["CPUExecutionProvider"])
logits = sess.run(["logits"], {"image": x})[0][0]
Source and data
Mirrored from Gowtham25/hc-mts-models (mobile/).
Training images remain under their original licenses (ISIC CC-BY-NC, SCIN,
Fitzpatrick17k CC-BY-NC-SA, among others); check those terms before any commercial use.