Skip to main content
ClinicalPilot integrates 4 specialized medical imaging classifiers powered by deep learning, each deployed as a standalone Streamlit app and embedded via iframe or direct link.

Available Classifiers

Lung Disease Classifier

AI-powered lung disease classification from chest X-rays

Chest Disease Classifier

AI chest disease detection and analysis

AI Retina Analyser

Diabetic retinopathy detection from retinal images

Skin Cancer Detector

Skin lesion classification for melanoma screening

Classifier Kit Architecture

All classifiers are external Streamlit apps hosted independently. ClinicalPilot embeds them via:
  1. Iframe Embedding (primary method)
  2. Direct Link Redirect (fallback if embedding blocked)
Why External? Each classifier is a full deep learning model (50-500MB). Hosting them as separate Streamlit apps allows:
  • Independent scaling
  • GPU acceleration (Streamlit Cloud GPU)
  • No ClinicalPilot backend dependencies

API Integration

List Available Classifiers

cURL
curl -X GET https://api.clinicalpilot.ai/api/classifiers
{
  "classifiers": [
    {
      "name": "Lung Disease Classifier",
      "description": "AI-powered lung disease classification from chest X-rays",
      "url": "https://lung-disease-classification.streamlit.app/",
      "icon": "🫁",
      "embed": true
    },
    {
      "name": "Chest Disease Classifier",
      "description": "AI chest disease detection and analysis",
      "url": "https://caryaai.streamlit.app/",
      "icon": "🫀",
      "embed": true
    },
    {
      "name": "AI Retina Analyser",
      "description": "Diabetic retinopathy detection from retinal images",
      "url": "https://retinopathy-detection.streamlit.app/",
      "icon": "👁️",
      "embed": true
    },
    {
      "name": "Skin Cancer Detector",
      "description": "Skin lesion classification for melanoma screening",
      "url": "https://skincancer-detection.streamlit.app/",
      "icon": "🔬",
      "embed": true
    }
  ]
}

Backend Implementation

backend/main.py:327
@app.get("/api/classifiers")
async def get_classifiers():
    """List available medical image classifier tools."""
    return {
        "classifiers": [
            {
                "name": "Lung Disease Classifier",
                "description": "AI-powered lung disease classification from chest X-rays",
                "url": "https://lung-disease-classification.streamlit.app/",
                "icon": "🫁",
                "embed": True,
            },
            {
                "name": "Chest Disease Classifier",
                "description": "AI chest disease detection and analysis",
                "url": "https://caryaai.streamlit.app/",
                "icon": "🫀",
                "embed": True,
            },
            {
                "name": "AI Retina Analyser",
                "description": "Diabetic retinopathy detection from retinal images",
                "url": "https://retinopathy-detection.streamlit.app/",
                "icon": "👁️",
                "embed": True,
            },
            {
                "name": "Skin Cancer Detector",
                "description": "Skin lesion classification for melanoma screening",
                "url": "https://skincancer-detection.streamlit.app/",
                "icon": "🔬",
                "embed": True,
            },
        ]
    }

Classifier Details

Lung Disease Classifier

URL: https://lung-disease-classification.streamlit.app/Model: Convolutional Neural Network (CNN) trained on chest X-ray datasetsDetects:
  • Pneumonia (bacterial, viral)
  • COVID-19
  • Tuberculosis
  • Lung cancer
  • Normal lung
Input: Chest X-ray (PA or AP view)Output:
  • Classification label
  • Confidence score (%)
  • Heatmap overlay (Grad-CAM)

Usage Workflow

1

Upload Chest X-Ray

Drag-and-drop DICOM, PNG, or JPEG file
2

Model Inference

CNN processes image in ~2-5 seconds
3

Review Results

  • Label: e.g., “Pneumonia (Bacterial)”
  • Confidence: e.g., 87%
  • Heatmap: Shows which lung regions influenced the prediction
4

Clinical Correlation

AI is not diagnostic. Always correlate with clinical presentation, labs, and radiologist review.

Example Output

Classification: Pneumonia (Bacterial)
Confidence: 87%
Region of Interest: Right lower lobe (Grad-CAM highlights)

Recommendations:
- Correlate with clinical symptoms (fever, cough, sputum)
- Check WBC, CRP, procalcitonin
- Consider sputum culture
- Initiate empiric antibiotics per local guidelines

Frontend Integration

The ClinicalPilot frontend displays classifiers in a modal with iframe embedding:
frontend/index.html (excerpt)
// Fetch classifiers
fetch('/api/classifiers')
  .then(res => res.json())
  .then(data => {
    const classifiers = data.classifiers;
    // Render as cards
    classifiers.forEach(c => {
      const card = document.createElement('div');
      card.innerHTML = `
        <div class="classifier-card" onclick="openClassifier('${c.url}')">
          <span>${c.icon}</span>
          <h3>${c.name}</h3>
          <p>${c.description}</p>
        </div>
      `;
      container.appendChild(card);
    });
  });

// Open classifier in modal
function openClassifier(url) {
  const modal = document.getElementById('classifier-modal');
  const iframe = document.getElementById('classifier-iframe');
  
  // Try iframe embedding
  iframe.src = url;
  modal.style.display = 'block';
  
  // Fallback: if iframe blocked, redirect
  iframe.onerror = () => {
    window.open(url, '_blank');
    modal.style.display = 'none';
  };
}
Some Streamlit apps set X-Frame-Options: DENY, blocking iframe embedding. The frontend automatically falls back to opening the classifier in a new tab.

Limitations & Disclaimers

Medical AI Limitations:
  1. Not Diagnostic: Classifiers provide decision support, not definitive diagnosis.
  2. Requires Clinical Correlation: Always interpret results in context of patient history, exam, and labs.
  3. Radiologist Review: Imaging AI does not replace radiologist interpretation.
  4. Dataset Bias: Models trained on public datasets may underperform on populations underrepresented in training data.
  5. Liability: ClinicalPilot and classifier authors are not liable for clinical decisions based on AI output.

FDA/Regulatory Status

These classifiers are research/educational tools, not FDA-cleared medical devices. Do not use for clinical decision-making without radiologist/dermatologist confirmation.

Best Practices

High-Quality Images

Use proper positioning, lighting, and resolution. Blurry or poorly exposed images reduce accuracy.

Clinical Context

Provide patient history to the interpreting physician (e.g., “AI flagged pneumonia, patient has fever and cough”).

Serial Comparison

Compare AI results to prior imaging when available. Evolution over time is critical.

Document AI Use

Note in the medical record: “AI classifier suggested [finding]. Confirmed by radiology review.”

Adding Custom Classifiers

You can extend the classifier kit by:
  1. Deploy your Streamlit app (Streamlit Cloud, AWS, etc.)
  2. Add to backend list (backend/main.py:327):
{
    "name": "Brain MRI Tumor Detector",
    "description": "Glioblastoma detection from T1-weighted MRI",
    "url": "https://your-streamlit-app.streamlit.app/",
    "icon": "🧠",
    "embed": True,
}
  1. Restart backend — classifier now appears in frontend

Performance & Scaling

Classifier Latency

ClassifierModel SizeInference TimeHosting
Lung Disease120 MB2-5sStreamlit Cloud (CPU)
Chest Disease180 MB3-6sStreamlit Cloud (CPU)
Retina Analyser90 MB2-4sStreamlit Cloud (CPU)
Skin Cancer50 MB1-3sStreamlit Cloud (CPU)
For production with high volume, consider:
  • GPU hosting (Streamlit Cloud Pro, AWS EC2 G5 instances)
  • Model optimization (TensorRT, ONNX Runtime)
  • Batch processing for multiple images

Next Steps

Full Analysis

Run multi-agent clinical assessment after imaging review

Human-in-the-Loop

Radiologist feedback workflow for re-analysis

Build docs developers (and LLMs) love