Zing Forum

Reading

Explainable AI Diagnosis System for Skin Diseases: Practice of Hybrid Architecture Combining CNN and Decision Tree

This article introduces an end-to-end skin disease classification system that combines convolutional neural networks for deep feature extraction and decision tree classifiers for explainable diagnosis, achieving an accuracy of 94.12% on 7 skin disease classification tasks.

医疗AI皮肤病诊断可解释AICNN决策树机器学习深度学习计算机视觉临床决策支持
Published 2026-05-31 00:46Recent activity 2026-05-31 00:50Estimated read 8 min
Explainable AI Diagnosis System for Skin Diseases: Practice of Hybrid Architecture Combining CNN and Decision Tree
1

Section 01

[Introduction] Explainable AI Diagnosis System for Skin Diseases: Practice of Hybrid Architecture Combining CNN and Decision Tree

This article introduces an end-to-end skin disease classification system that combines convolutional neural networks (CNN) for deep feature extraction and decision tree classifiers for explainable diagnosis, achieving an accuracy of 94.12% on 7 skin disease classification tasks. This project is open-source under the MIT license, aiming to address the pain points in skin disease diagnosis and the "black box" problem of deep learning models.

2

Section 02

Project Background and Challenges: Pain Points in Skin Diagnosis and AI Black Box Problem

Skin disease diagnosis has always been a difficult problem in the medical field. Many skin diseases have highly similar visual manifestations, making manual diagnosis time-consuming and error-prone. Although deep learning models perform well in image classification, their "black box" nature limits clinical adoption—doctors need to know the basis of AI diagnosis rather than just probability scores. This project aims to resolve this contradiction: while maintaining high accuracy, it provides explainable and traceable diagnostic decision paths.

3

Section 03

Core Architecture: CNN Feature Extraction + Decision Tree Classification + Clinical Feature Fusion

The project adopts an innovative hybrid architecture:

  1. CNN Backbone Network: Automatically extracts texture, shape, and color features from skin lesion images without manual design.
  2. Decision Tree Classifier: Replaces traditional neural network classifiers, with advantages of full transparency, traceability, explainability, and auditability.
  3. Clinical Feature Fusion: Integrates patients' clinical metadata (Asymmetry A, Border B, Color C, Diameter D, age, gender, anatomical location) to make diagnosis more comprehensive and reliable.
4

Section 04

Key Technical Methods: Preprocessing, Mathematical Basis of Decision Trees, and Class Balance Strategies

Image Preprocessing: Uses black hat morphological transformation to detect hair and fast marching method for reconstruction; morphological filtering to denoise and enhance contrast; digital image inpainting to restore occluded areas. Mathematical Basis of Decision Trees: Evaluates split quality based on Gini impurity and information entropy, applies cost-complexity pruning to reduce overfitting. Class Imbalance Handling: Uses SMOTE oversampling, class weight adjustment, and balanced training strategies to address class imbalance in medical datasets. Hyperparameter Optimization: Optimizes decision tree parameters such as maximum depth, minimum samples for splitting, and split evaluation criteria via grid search.

5

Section 05

Performance: 94.12% Accuracy in 7 Skin Disease Classification Tasks

The system performs excellently on 7 skin disease classification tasks:

Metric Value
Overall Accuracy 94.12%
Number of Classification Categories 7
Architecture CNN + Decision Tree
The precision, recall, and F1-score of each category are between 0.91 and 0.97, showing good generalization ability and balanced performance.
6

Section 06

Visualization and Explainability Tools: Decision Tree Structure and Feature Importance Analysis

The project provides rich visualization tools:

  • Decision Tree Visualization: Exports structure using Graphviz to intuitively view node splitting conditions and decision paths.
  • Feature Importance Analysis: Quantifies the contribution of each feature to classification decisions.
  • Confusion Matrix and Classification Report: Shows the performance of each category and identifies easily confused disease types.
7

Section 07

Future Development Directions: Improvement Plans such as ViT Integration and Clinical Dashboard

The project plans the following improvement directions:

  1. Integrate Vision Transformer (ViT) to replace CNN for feature extraction.
  2. Compare the performance of ensemble methods such as Random Forest and XGBoost with a single decision tree.
  3. Add Grad-CAM visualization to show the image areas focused on by the CNN.
  4. Develop a web-based clinical dashboard for easy use by doctors.
  5. Optimize the model to support real-time inference deployment.
  6. Integrate multi-modal data such as pathological sections and genomic data.
8

Section 08

Practical Insights: Medical AI Needs to Balance Performance and Explainability

This project provides important references for medical AI development:

  1. Balance Between Explainability and Performance: The hybrid architecture proves that deep learning feature extraction capabilities and traditional model explainability can be obtained simultaneously.
  2. Domain Knowledge Integration: Incorporates medical ABCD rules to make the system more in line with clinical practice.
  3. End-to-End Engineering: Demonstrates the complete medical AI project process from data preprocessing to model deployment.
  4. Open-Source Collaboration: The MIT license encourages community participation and promotes the democratization of medical AI. This is an excellent reference implementation that shows the balance between technical advancement and clinical practicality.