Medical usage limitations
Not a diagnostic tool
This model has critical limitations that prevent its use as a clinical diagnostic device:Not FDA approved or medically certified
Not FDA approved or medically certified
- No regulatory approval for clinical use
- Not validated through clinical trials
- Does not meet medical device standards (FDA, CE, etc.)
- Should never replace professional dermatological examination
Training data limitations
Training data limitations
- Training dataset may not represent all populations equally
- Potential bias in skin tone representation
- Limited coverage of rare lesion variants
- Dataset age and source not verified in production
No liability for medical decisions
No liability for medical decisions
- Predictions should not influence medical treatment
- Always consult qualified healthcare professionals
- Developers assume no liability for medical outcomes
- Tool may produce false positives or false negatives
Required disclaimers
Any deployment of this application must prominently display:Required User Warnings:
- This tool is for educational purposes only
- Not intended for medical diagnosis or treatment decisions
- Consult a dermatologist for any skin concerns
- Do not delay seeking medical care based on results
- Accuracy is not guaranteed and varies by image quality
Technical limitations
Model accuracy constraints
The model’s predictive capability has inherent boundaries: Accuracy factors:- Image quality: Blurry, poorly lit, or low-resolution images reduce accuracy
- Lesion positioning: Partial lesions or multiple lesions in frame affect results
- Skin tone: Model performance may vary across different skin tones
- Image artifacts: Filters, compression, or editing can distort predictions
- Context missing: No patient history, lesion evolution, or clinical context
Classification limitations
The model is restricted to 7 specific lesion types:- Actinic Keratoses
- Basal Cell Carcinoma
- Benign Keratoses
- Dermatofibroma
- Melanoma
- Melanocytic Nevus
- Vascular Lesion
- Lesion types not in the training set
- Normal skin (will force-classify into one of 7 categories)
- Non-skin objects (will still produce a prediction)
- Multiple lesions simultaneously (processes whole image)
The model uses softmax output, meaning it always assigns probabilities summing to 100% across the 7 classes, even for completely irrelevant images.
Input constraints
Image requirements:- Format: JPEG, PNG, WebP, or other browser-supported formats
- Size: Any size (automatically resized to 75×100)
- Color: RGB color images (grayscale may produce unpredictable results)
- Content: Single lesion centered in frame for best results
- Video files (only static images)
- Dermoscopic images (model trained on standard photography)
- Infrared or specialized medical imaging
- Multi-spectral imaging
Image preprocessing artifacts
Image preprocessing artifacts
The model resizes all inputs to 75×100 pixels using nearest neighbor interpolation:Implications:
- High-resolution details are lost during downsampling
- Aspect ratio distortion if original image is not 3:4 ratio
- Nearest neighbor interpolation may introduce aliasing
- Very small lesions (less than 10% of image) may lose critical features
Browser and platform limitations
Compatibility constraints
Browser requirements
Modern browsers only (Chrome 57+, Firefox 52+, Safari 11+, Edge 79+)
JavaScript required
Application fails completely if JavaScript is disabled
WebGL recommended
Significantly slower without WebGL support (10x slower on CPU)
Memory requirements
May crash on devices with less than 2 GB RAM
Mobile device constraints
Performance issues:- Slower inference (400-1000 ms vs 50-150 ms on desktop)
- Battery drain during repeated predictions
- Large initial download (99 MB) on cellular connections
- May not work on older mobile browsers
- Current implementation uses file upload only
- No real-time camera feed analysis
- No multi-shot or burst mode support
Network dependencies
Privacy and security limitations
Data handling
Current implementation processes images entirely client-side: Privacy positives:- Images never uploaded to server
- No image storage or logging
- Predictions computed locally
- HIPAA-compliant processing (no data transmission)
- No audit trail or prediction logging
- Cannot review past predictions
- No data for model improvement or debugging
- Browser history/cache may retain images locally
Security considerations
Client-side vulnerabilities
Client-side vulnerabilities
Browser-based execution introduces security risks:
- Model tampering: Malicious actors could modify model.json or weights
- XSS attacks: Vulnerable if application doesn’t sanitize inputs
- Supply chain: Dependency on TensorFlow.js CDN integrity
- No authentication: Anyone can access and use the model
- Serve model files over HTTPS only
- Implement Subresource Integrity (SRI) for TensorFlow.js
- Use Content Security Policy (CSP) headers
- Regular security audits of dependencies
No user authentication or rate limiting
No user authentication or rate limiting
Current implementation lacks access controls:
- Anyone can use the model unlimited times
- No abuse prevention or rate limiting
- No usage analytics or monitoring
- Cannot block malicious users
Image quality limitations
Optimal image characteristics
For best results, images should meet these criteria:| Characteristic | Optimal | Acceptable | Poor |
|---|---|---|---|
| Lighting | Bright, even, natural light | Indoor lighting | Dark, shadowy, extreme glare |
| Focus | Sharp, clear lesion edges | Slight blur | Out of focus, motion blur |
| Distance | Lesion fills 30-70% of frame | 10-90% of frame | Less than 10% or more than 95% of frame |
| Angle | Perpendicular to skin surface | Up to 30° angle | Extreme angles, side views |
| Background | Plain skin surface | Some hair/skin texture | Clothing, objects in frame |
| Resolution | More than 500px on shortest side | 200-500px | Less than 200px |
The model was trained on dermatological images with specific characteristics. Real-world smartphone photos may differ significantly in quality and composition.
Common image problems
Poor lighting reduces accuracy
Poor lighting reduces accuracy
- Too dark: Cannot distinguish lesion features
- Too bright: Washed out colors and lost texture
- Shadows: Creates false boundaries and color variations
- Flash reflection: Specular highlights obscure lesion
Compression artifacts introduce noise
Compression artifacts introduce noise
Heavy JPEG compression can distort lesion characteristics:
- Blocky artifacts alter texture perception
- Color banding affects pigmentation analysis
- Edge distortion impacts border irregularity detection
Scaling and aspect ratio distortion
Scaling and aspect ratio distortion
The model’s 75×100 input size creates aspect ratio constraints:
- Images are stretched/squished to 3:4 aspect ratio
- Circular lesions may appear elliptical
- Affects shape-based features in classification
Functional limitations
Missing features
The current implementation lacks several important capabilities: No batch processing:- Can only analyze one image at a time
- No comparison between multiple images
- Cannot track lesion changes over time
- Predictions disappear on page reload
- Cannot review or export past results
- No tracking of prediction confidence trends
- Cannot input patient age, sex, or history
- No lesion size measurement
- No anatomical location consideration
- No symptom information (itching, bleeding, etc.)
- Only provides class name and confidence
- No explanation of features detected
- No visualization of what model “sees”
- No alternative diagnoses or differential considerations
Error handling limitations
- Model load failure (shows generic error)
- Out of memory errors on low-end devices
- Corrupted or malformed image files
- Very large images causing browser freeze
- Network timeout during model download
Ethical and bias limitations
Algorithmic bias concerns
Potential bias sources:- Skin tone: Model may perform better on lighter skin tones if training data is imbalanced
- Demographics: Age, sex, and ethnicity representation in training set unknown
- Geographic: Lesions more common in certain populations may be underrepresented
- Image source: Medical vs. consumer photos may have different characteristics
- Training dataset composition not documented in codebase
- No per-demographic accuracy metrics available
- Cannot verify fairness across protected groups
Responsible AI considerations
Deployment of this model requires careful consideration:Informed consent and user education
Informed consent and user education
Users must understand:
- How the model works (basic CNN architecture)
- What data is processed (image stays in browser)
- Limitations and potential errors
- Not a replacement for medical care
- Potential for false positives and false negatives
Accessibility limitations
Accessibility limitations
Current implementation may exclude users:
- No screen reader support for predictions
- Color-dependent UI may not work for colorblind users
- No keyboard navigation support
- Requires manual file upload (no voice input)
- English-only interface and class names
Regulatory and legal limitations
Compliance requirements for medical use
To legally deploy as a medical device, would require:- FDA 510(k) clearance or De Novo classification (USA)
- CE marking under MDR (European Union)
- Clinical validation studies
- Quality management system (ISO 13485)
- Post-market surveillance and adverse event reporting
- Labeling and instructions for use
Liability and risk
Developers and deployers may face legal liability if:
- Application is marketed as a diagnostic tool
- Users delay medical care based on predictions
- Misdiagnosis leads to patient harm
- Privacy breaches occur (even if client-side)
- Regulatory requirements are not met
Future improvements
Recognized limitations that could be addressed in future versions:- Model validation: Comprehensive accuracy testing across demographics
- Explainability: Grad-CAM or attention maps showing decision factors
- Uncertainty quantification: Bayesian approaches to estimate prediction confidence
- Expanded classes: Support for more lesion types and “unknown” category
- Quality checks: Automatic image quality assessment before prediction
- Temporal analysis: Track lesion changes over multiple images
- Accessibility: WCAG 2.1 AA compliance for interface
- Mobile optimization: Native apps with camera integration
- Offline-first: Service worker for full offline capability
- Federated learning: Privacy-preserving model improvements from user data
Contributions and improvements are welcome. See the project repository for development guidelines.