Manuscript Offprint

arXiv:2610.25256

PanoDent-KD: From Generalist Knowledge Distillation to Cross-Dataset Specialist Detection and Embedded Deployment in Panoramic Radiographs

Muhammad Waqas Ashraf, Imad Ali Shah, Ali Hassan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reliable panoramic-radiograph detection requires consistency across datasets with different class definitions and deployment software. We present PanoDent-KD, an auditable 1280-pixel YOLO26m pipeline linking a 12-class source generalist, feature-level knowledge distillation (KD), exact classifier-row transfer, teacher-free five-class specialization, and embedded deployment. A common training and evaluation pipeline compares three source-training arms across three seeds: a supervised baseline (B1), single-teacher KD (STKD), and multi-teacher KD (MTKD). Five shared classifier rows initialize nine OralXrays-9 specialists, while the backbone, FPN–PAN neck, and dual-detection-head topology are retained unchanged. On the 2,686-image test subset, all three arms achieve macro box F1 near 0.82. B1 achieves the highest three-seed arm-level mean macro box F1 ( 0.8239±0.00270.8239 \pm 0.0027) and mAP50:95mAP_{50:95} ( 0.6130±0.00670.6130 \pm 0.0067). STKD seed 1, selected after development but before final testing, was used for deployment. Its Jetson Orin Nano Super FP16 TensorRT engine achieves 77.03-ms median and 80.86-ms P95 prediction-call latency, throughput of 12.90 images/s, and gross total-module energy of 1.39 J/image, with high numerical agreement between within-device PyTorch and TensorRT FP16 inference. These findings demonstrate the feasibility of an auditable, device-specific deployment workflow, but do not establish clinical validity or improved target-domain accuracy from KD.

1. Introduction

Panoramic radiographs summarize the dentition, jaws, restorations, and adjacent structures, but their breadth creates scale variation, superposition, artifacts, and protocol-dependent boundaries. Hospital-scale resources now support multi-object study: OralXrays-9 contains 12,688 radiographs and nine anomaly classes [8]; UMFIH provides development and external cohorts [25, 26]; and a related 12-class task removes two exceptionally rare labels [12]. DENTEX [15], Tufts [29], and CariesXrays [7] illustrate the diversity of acquisition and ontology.

The main challenge is transferring models between datasets, not only model size. Tooth numbering [41], apicallesion [13], bone-loss [20], and restoration systems [1] learn recognizable structures, yet internal accuracy does not establish robustness to another hospital or prevalence. Dental and medical-imaging guidance therefore emphasizes intended use, provenance, partitioning, reference standards, uncertainty, and deployment context [14, 30, 36, 39, 42, 45]. Radiographic models can deteriorate between institutions [48], exploit shortcuts [9], and hide important failure strata behind aggregates [28]. Distillation is an appealing bridge: a large teacher may organize features for a compact student. But a small source validation gain may arise from contamination, seed variation, metric policy, or checkpoint choice and disappear after target fine-tuning. Leakage analyses motivate exact-content auditing [19, 38], while domain theory and dataset-bias studies predict that source risk does not determine target risk [3, 40]. PanoDent-KD asks whether source feature distillation survives external source testing, five-class specialization, and hardware-specific export. We audit source partitions, harmonize evaluation, train B1/STKD/MTKD over three seeds, and reserve the final test for the selected checkpoint. All nine source checkpoints independently pass transfer preflight; five shared classifier rows initialize teacher-free OralXrays-9 specialists. One deployment checkpoint is frozen before final-test result access and exported as a pure student.

The audit bounds every claim. Forty-two exact-image groups cross source train and validation sets, so the released split supports historical comparison rather than a new state-of-the-art claim. Target train and development have no exact-content, stem, or inode overlap. A blinded review found two test images that also appear in training: the frozen exclusion rule creates the 2,686-image test subset. As panoramic patterns can remain identifying [10], the published panel is hash-selected, metadata-stripped, manually screened, and used under the retained non-commercial publication terms.

Figure 1 separates the executed source student and its OralXrays-9 specialist transformation: the former exposes

∗^{*}Correspondence: waqas51006@gmail.com

PanoDent-KD — model architecture and cross-dataset specialization

Executed YOLO26m topology · source-only heterogeneous feature distillation · teacher-free five-class TensorRT deployment

Student/inference

training loss

→ frozen teacher

Specialist/export

Backbone · YOLO26m student

Figure

C3k2 / CSP micro-architecture

1x1 split

C3k x1 / Bottlenecks

residual feature transform

short CSP branch

C2PSA context

split

PSA attention

  • FFN residual

fuse

640×64

320×256

160×512

80×512

40×512

OPG input

1280×1280×3

L0 Conv

3×3 / s2

L1 Conv

3×3 / s2

L2 C3k2

CSP features

L3 Conv / 2

L4 C3k2

L5 Conv / 2

L6 C3k2

L7-8

Conv+C3k2

L9 SPPF

L10 C2PSA

C3 - L4

C4 - L6

C5 - L10

FPN top-down + PAN bottom-up

C5 - 40°

L22

L13 - P4

L19 - P4

C3k2 - 80×512

C3k2 - 80×512

L16 - P3

C3k2 - 160×256

L23 end-to-end Detect x3 scales

ONE-TO-MANY · auxiliary training branch

F1

box tower

input-64→64→4

direct L1

class tower

[DW3×3 + PW1×1]×2

→ 256 → 1×1 / nc

dashed = training-only; removed from the fused deployment graph

ONE-TO-ONE · end-to-end inference branch

F1

detach in train

box tower

input-64→64→4

regm=1

class tower

[DW3×3 + PW1×1]×2

→ 256 → 1×1 / nc

decode

sigmoid

top-k

NMS-free output

B × 300 × 6

fused export: one-to-many pruned · nc = 12 source / 5 specialist

Source-stage heterogeneous feature KD · ADCD-12 only

Three Detect-input levels aligned independently · teachers frozen, eval, no-grad

Training variants

B1

Supervised source baseline

LtestL_{test} only

STKD

YOLO26x teacher X

wx=1.0w_{x} = 1.0

MTKD

YOLO26x X + YOLOv8x V

wx=.5⋅wv=.5w_{x} = .5 \cdot w_{v} = .5

MTKD is the custom cross-family wrapper

YOLO26x X - frozen

160×384

AX.3: 1x1 Conv no-bias

  • BN · 256 → 384

YOLO26m student taps

80×768

AX.4: 1x1 Conv no-bias

  • BN · 512 → 768

AX.5: 1x1 Conv no-bias

  • BN · 512 → 768

YOLOv8x V · MTKD only

AV.3: 1x1 Conv no-bias

  • BN · 256 → 320

AV.4: 1x1 Conv no-bias

  • BN · 512 → 640

AV.5: 1x1 Conv no-bias

  • BN · 512 → 640

σL1=max⁡\sigma_{L1} = \max sigmoid(raw class score)

Optimization objective

L=Ldet+6∑jαj∑s∈{8,16,32}Dj,s,∑jαj=1.L = L_{\text{det}} + 6 \sum_{j} \alpha_j \sum_{s \in \{8, 16, 32\}} D_{j,s}, \quad \sum_{j} \alpha_j = 1.

AL: independent trainable 1×1 Conv (bias-free) + BN

back-propagation: student + adapters only · teachers excluded from optimizer / EMA / serialization

PanoDent-KD — executed methodology workflow

Fixed-protocol source study · class-aware specialization · single final evaluation · agreement-gated edge handoff

→ Executed flow → Source KD → Transfer → Final test

validation-selected checkpoints

(a) ADCD-12 construction - fixed data plan

Public ADCD

14 labels · OPG boxes

source release

Project-defined ADCD-12

IMP · PRR · OBT · END · CAR · BON

IMT · API · ROT · FUR · ORD · SRD

APS / ROR excluded

Development splits

train 1,375 / 18,497

val 153 / 1,968

images / boxes

Fixed reporting sets

internal 100 / 1,365

external 180 / 2,962

no development feedback

Reproducibility contract

manifest + split hashes · deterministic seeds {0,1,2}

3 invalid zero-area boxes dropped · duplicate groups audited

Frozen source-study inputs

data identities · class order · splits · evaluation policy

(b) Controlled benchmark and ADCD source-student study

Architecture screen under one common evaluator

YOLO26 M/L/X - corrected RT-DETR-L · YOLOv8x-1024 · RF-DETR-L

invalid RT-DETR remap row excluded

Fixed role assignment

YOLO26m student · YOLO26x accuracy teacher · YOLOv8x heterogeneous teacher

B1 · supervised

YOLO26m student

Ldet only

no teacher

STKD

frozen YOLO26x

teacher weight 1.0

P3 / P4 / P5 feature KD

Custom MTKD

YOLO26x + YOLOv8x

weights 0.5 / 0.5

independent 1×1 Conv+BN adapters

shared: 1280° · 75 epochs · AdamW · seeds 0/1/2 · confidence-weighted L2 · dis=6

3 methods × 3 seeds = 9 source students

validation-selected best_student.pt · pure-student checkpoints

(c) Source testing with fixed settings

Nine validation-selected source checkpoints

same class order and checkpoint identity carried into evaluation

Fixed evaluation settings

Image size: 1280, Conf. .001, IoU: .70, and max acc_{acc}: 300

validation-only checkpoint choice · tests reporting-only · no model/threshold tuning

Internal test

100 images · 1,365 boxes

reporting-only endpoint

External test

180 images · 2,962 boxes

locked evidence endpoint

Recorded metrics

P · R · F1 · mAP50 · mAP 0.95_{0.95} · class wise metrics · latency

9 transfer-qualified source checkpoints

(d)

(d) Class-aware ADCD-12 - OralXrays-9 transfer

Source checkpoint cohort

B1 / STKD / MTKD × seeds 0,1,2

all nine checkpoints pass the transfer prelight

Exact five-row class-output mapping

ADCD rows

0 - IMP

2 - OBT

3 - END

4 - CAR

7 - API

Specialist rows

0 - IMP

1 - OBT

2 - END

3 - CAR

4 - API

nc 12 → 5 · cv3 + one2one_cv3 · P3 / P4 / P5

only the five homologous class-output rows are remapped

Compatible state-dict audit · 9/9 passed

loaded=756 · remapped=12

skipped=0 · newly initialized=0

no optimizer state transferred

9 initialized five-class specialists

source lineage and paired seed retained

(e) OralXrays-9 specialist – final evaluation

Strict-five development partition

published train split: 10,000 images

8,000 train + 2,000 dev · disjoint

IMP · OBT · END · CAR · API

Published test

2,688 images

not used until final evaluation

(no model-selection feedback)

Teacher-free specialist fine-tuning

YOLO26m · nc=5 · 75 epochs · paired source/fine-tune seed · no teacher or KD adapter

B1 / STKD / MTKD source lineage × seeds 0,1,2

Paired Seed

B1

STKD

MTKD

Seed: 0

B1-0

STKD-0

MTKD-0

Seed: 1

B1-1

STKD-1

MTKD-1

Seed: 2

B1-2

STKD-2

MTKD-2

9 frozen specialist checkpoints

all checkpoint identities fixed before final-test inference

Single final evaluation

all 9 frozen checkpoints · fixed thresholds

macro/micro F1 · AP/mAP · classwise

duplicate screening and blind review first

Development-only selection

STKD · seed 1 · threshold 0.340

best_student.pt

(f) Student-only FP16 edge handoff

Selected specialist

STKD · seed 1

fused best_student.pt

ONNX

opset 17

static export

TensorRT engine

FP16 · batch 1

1280 × 1280

Jetson Orin Nano Super target

YOLO26m specialist · NMS-free inference · five-class boxes

Acceptance gates executed in order

environment

PyTorch eval

engine eval

Agreement

environment audit → PT evaluation → engine evaluation → prediction agreement

deployment evidence is accepted only after the applicable gate

Agreement-gated acceptance

benchmark run after the within-Orin agreement check passes

FP16 engine; INT8 not used

Edge deployment · five-class bounding boxes

Figure 1. PanoDent-KD architecture. (top) YOLO26m source student (1280 × 1280); STKD/MTKD add frozen teachers via 1 × 1 Conv+BN adapters. (bottom) The specialist keeps this topology, maps source rows [0, 2, 3, 4, 7] to target rows [0, 1, 2, 3, 4] (756 tensors loaded, 12 remapped), trains 75 teacher-free epochs, and exports the pure student in FP16.

the deployable backbone–neck–head topology and source-only KD attachments, whereas the latter expands the exact five-row transfer, teacher-free specialization, and student-only edge route. The main contribution is not a new KD

PanoDent-KD — executed methodology workflow

Protocol-locked source study · class-aware specialization · sealed closing evaluation · parity-gated edge handoff

executed flow

source KD

transfer

→ sealed-set gate

validation-selected checkpoints

(a) ADCD-12 construction and protocol lock

(b) Controlled benchmark and ADCD source-student study

Figure

(c) Locked source evaluation and evidence ledger

(d) Class-aware ADCD-12 - OralXrays-9 transfer

(e) OralXrays-9 specialist campaign and closing gate

(f) Student-only FP16 edge handoff

Figure 2. PanoDent-KD workflow. (a) Data plan; (b) source architecture screen and B1/STKD/MTKD training; (c) source testing; (d) five-row transfer to OralXrays-9; (e) nine teacher-free specialists, STKD seed 1 selected on development data (confidence 0.340), single final evaluation; (f) FP16 TensorRT export and Orin checks. No teacher or KD adapter is used in specialist training or inference.

method. It is a checked workflow combining (i) three-seed source and nine-run target comparisons, (ii) recorded class-row and weight transfer, (iii) fixed final evaluation, and (iv) runtime-agreement checks and real-device speed, power, and memory measurements.

References (45)