---
id: 18487
lang: en
title: "The AI Scored 92% on Testing, But Saw Root Canals in Healthy Teeth on Planmeca Scans"
published_at: "2026-11-27 22:24:18"
source_name: "Habr AI"
source_url: "https://habr.com/ru/articles/1113422/?utm_campaign=1113422&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18487"
categories: ["research", "creative"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# The AI Scored 92% on Testing, But Saw Root Canals in Healthy Teeth on Planmeca Scans

> **Краткая суть (BLUF):** A neural network for dental panoramic X-rays reached 92% weighted F1 (a balance of precision and recall) on test scans, but on a real Planmeca scan it attributed root canal treatment to healthy teeth. The likely cause: Planmeca scans resemble the MOPG-7 dataset, the only source containing crowns and root canals, so the model learned to recognize the data source rather than the disease. That's why you should test a model on scans from your own equipment.  • Planmeca sharpness is nearly an order of magnitude lower: 3.5 versus 51.7–86.9 • Feature similarity of Planmeca to MOPG-7 is 92.8%, to DENTEX only 33.8% • On 27 DentiAsk scans, 91% of caries was found, but only 50% of healthy scans were correctly identified

Imagine you train a model on photos from a single source, it scores 92% on validation, and on your real equipment it produces nonsense. That is exactly what happened in a research experiment with AI for Planmeca 3D dental panoramic X-rays, described on Habr. Here, 92% is the weighted F1, a summary metric that accounts for both the share of findings detected and the share of correct positive detections. On test scans from open datasets it looked excellent. On a real Planmeca scan, the classifier declared intact teeth to have been treated. The author stresses upfront: this is not a medical device or a diagnostic tool, he has no clinical data, and everything is built on open datasets.

## Why one network for the whole panorama hit a ceiling

The task: detect pathologies on a two-dimensional panorama reconstructed from CBCT (cone-beam computed tomography). The open datasets were collected on different equipment, so discrepancies were expected. The author started with YOLOv8l at 1280 px input and the four DENTEX classes: caries, deep caries, retained tooth, and periapical lesion. Mean average precision (mAP50) on 144 scans was 58.9%. The model finds retained teeth confidently (93.8%), but confuses caries and deep caries with each other.

Next came a series of improvements: merging the two caries classes, retraining on three classes (68.5%), 1536 px input (63.3%), cropping the dental arch with box merging via WBF (about 69%). Periapical lesions remained the weak point: of 30, the model confidently found 12, found 6 more with low confidence, mistook four for caries, and missed eight. All the tweaks together yielded gains of a few hundredths, and the author concluded that the problem formulation itself was the limit.

## Two steps: find the tooth, then analyze it separately

A dentist needs an answer like "tooth #46, suspected caries," not a box on an image. So the task was split. The first model, YOLO11s at 640 px, finds teeth and numbers them by the FDI system (32 classes). On 63 validation scans it achieves 95.8% mAP50. The second classifies a 256×256 tooth crop with an 18% margin and local contrast normalization via CLAHE.

The classifier was extended to eight classes by adding crowns, root canals, and destroyed teeth from the MOPG-7 dataset. On validation, crowns and root canals were recognized with precision and recall above 95%. The weakest performance was for deep caries (recall 45.6%) and periapical lesions (recall 16% on 25 examples). Caries was often confused with healthy teeth: the model labeled 52 true caries cases as healthy and 35 healthy teeth as caries.

On the Planmeca scan, the detector found 18 numbered teeth. The classifier, however, assigned root canal treatment to teeth #11 and #14 with 96% and 100% confidence, although on the scan they look intact. Changing preprocessing (no normalization, global stretching, per-crop normalization) changed nothing, so the problem is not contrast.

## The model learned the dataset, not the disease

The author compared crops of healthy teeth from three sources. Sharpness (median variance of the Laplacian) was 51.7 for MOPG-7, 86.9 for DENTEX, and 3.5 for Planmeca. The comparison is approximate, since the resolutions differ. The features the network "sees" showed more: the similarity of a typical healthy Planmeca tooth to MOPG-7 is 92.8%, to DENTEX 33.8%. To the network, Planmeca looks like MOPG-7.

The trap lies in the sources of the classes. Crowns, root canals, and destroyed teeth exist only in MOPG-7, while deep caries, retained teeth, and lesions exist only in DENTEX. The classifier may have learned not to distinguish root canal treatment from a healthy tooth, but instead to recognize "a scan from MOPG-7" and assign that class to everything similar. This is a hypothesis: it best matches the numbers, but it is not proven, and verifying it requires a labeled Planmeca sample.

Version v4.0 (multi-label on ConvNeXt-Tiny, where a tooth can have both caries and a crown) proved useless: only 123 positives remained, and F1 = 100% on six crowns showed nothing. In v4.2, labels were assigned to teeth by overlap, positives rose to 3,313, metrics began being computed separately per source, and weighted F1 reached 92.2%. On Planmeca, plausible crowns appeared on #16 and #17, but caries on #47 again looked doubtful. Without expert labeling, it cannot be said whether the model got better or merely changed the type of error.

External validation on 27 DentiAsk scans with the question "is there caries?" at a 0.55 threshold found 90.9% of cases, but correctly identified healthy scans in only 50%. Among false positives at the tooth level, 16 of 25 were molars. The sample is small, so the intervals are wide.

## What to do in practice

- Check which dataset each class came from. If a class exists in only one source, the model may be learning the source.
- Compute metrics separately per source, not as a single overall number.
- Do not tune a model on a single scan: five "improvements" on one frame changed the type of error, not the accuracy.
- If a class is unlabeled in a source, do not count it as zero: exclude such pairs from the loss calculation with a mask.

The author's next step is a test on 30–50 Planmeca scans labeled by a dentist, with no tuning, followed by fine-tuning on a small labeled set. He also needs to fix the tooth detector, which sometimes produces double boxes on one tooth and misses teeth. The prototype remains a hint for the dentist, not a diagnosis. The lesson extends beyond dentistry: validation on someone else's equipment says almost nothing about quality on yours.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/articles/1113422/?utm_campaign=1113422&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18487
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
