A Privacy-Preserving System for Skin Disease Diagnosis Using a Lightweight CNN and TensorFlow.js for Client-Side Inference
Abstract
Skin diseases are among the most prevalent health concerns worldwide, ranging from mild conditions such as acne and eczema to life-threatening disorders like melanoma. Early and accurate diagnosis is critical for effective treatment; however, access to dermatological care remains limited in many regions due to a shortage of specialists and diagnostic resources. The similarity in visual features across different skin conditions further complicates timely detection and increases the risk of misdiagnosis.This research aims to design and implement an intelligent, accessible, and privacy-preserving system for automated skin disease diagnosis. The primary objective is to democratize dermatological screening by enabling real-time, low-cost, and user-friendly diagnostic assistance that can operate without dependence on clinical infrastructure.To achieve this, a custom Convolutional Neural Network (CNN) model developed and trained on publicly available dermoscopic datasets, including HAM10000. The dataset underwent preprocessing techniques such as resizing, normalization, augmentation, and class balancing to improve generalization. The trained CNN then converted to a browser-compatible TensorFlow.js format and integrated with a ReactJS-based web application. This architecture enables client-side inference, ensuring data privacy and offline functionality while providing immediate diagnostic feedback.Experimental results demonstrate that the proposed model achieves high classification performance, with an average accuracy exceeding 87% and balanced precision, recall, and F1-scores across multiple disease categories. Inference times were consistently under one second on modern laptops and smartphones, validating the system’s suitability for real-time use.This work highlights the potential of lightweight deep learning models combined with web technologies to deliver accessible dermatological diagnostic support, particularly in low-resource environments. It contributes to advancing digital health solutions that improve early detection, reduce healthcare disparities, and empower users with affordable, privacy-focused diagnostic tools.
Keywords: Skin disease diagnosis, Convolutional Neural Networks (CNN), Dermoscopic image analysis, TensorFlow.js, ReactJS, Browser-based inference, Privacy-preserving AI, Real-time medical imaging, Digital health, HAM10000 dataset
