Documentation
Complete guide to using Derma-AI for skin lesion classification
Getting Started
Derma-AI provides a simple web interface for skin lesion classification. Follow these steps to begin:
1
Upload Image
Upload a dermatoscopic image using the drag-and-drop interface
2
Run Prediction
Click the "Predict" button to analyze the image
3
View Results
Review classification results and confidence scores
API Reference
POST /api/predict
Submit an image for classification
Request
Content-Type: multipart/form-data
{
"image": <file>
}Response
{
"prediction": {
"class": "melanoma",
"confidence": 0.87,
"probabilities": {
"melanoma": 0.87,
"nevus": 0.08,
"basal_cell_carcinoma": 0.03,
"actinic_keratosis": 0.02
},
"grad_cam_url": "https://api.derma-ai.com/gradcam/abc123.png"
},
"processing_time": 1.2,
"model_version": "v2.1.0"
}Model Details
Architecture
- • ViT + EfficientNet Fusion
- • Input Size: 224×224
- • Parameters: 120M
- • Pre-trained on ImageNet
Performance
- • Accuracy: 89.9%
- • F1-Score: 0.9766
- • AUC-ROC: 0.9766
- • Training F1: 0.9999
Supported Classes
Melanoma
Melanocytic Nevus
Basal Cell Carcinoma
Actinic Keratosis
Benign Keratosis
Dermatofibroma
Vascular Lesion
Integration Guide
JavaScript/React Integration
const formData = new FormData();
formData.append('image', imageFile);
const res = await fetch('/api/predict', {
method: 'POST',
body: formData
});
const result = await res.json();Python (requests) Integration
import requests
with open("lesion.jpg", "rb") as img:
res = requests.post("https://api.derma-ai.com/predict", files={"image": img})
print(res.json())Code Examples
Troubleshooting
Common Issues
Image Upload Fails
Ensure image is under 10MB and in JPG/PNG format
Low Confidence
Ensure good image lighting and focus
API Rate Limit
Free users are limited to 100 requests/day
Best Practices
- Use dermatoscopic images when possible
- Ensure lesion is well-lit and centered
- Trim excessive hair or glare
- Always consult a dermatologist
Support
Need help? Contact:
- Email: support@derma-ai.com
- GitHub: github.com/derma-ai
- Docs: https://docs.derma-ai.com