● Checking ViT Backend...
GR
Guest Researcher Research Session
FINAL-YEAR PROJECT Β· VISION TRANSFORMER & GRAD-CAM

CellVision: Intelligent Sickle Cell Detection & Health Support Platform

A modern medical research platform combining Vision Transformer (ViT-Base/16) deep learning with Grad-CAM visual explainability to classify red blood cell morphology and assist sickle cell healthcare education.

ViT-Base/16

Transformer Architecture

98.41%

Held-out Test Accuracy

Grad-CAM

Visual Explainability

17 Modules

Patient & Clinical Hub

πŸ”¬

RBC Morphology Classification

Analyzes individual erythrocyte smear images to distinguish normal circular cells from elongated sickle cells using 196 self-attention patch tokens.

πŸ‘οΈ

Grad-CAM Attention Mapping

Inspects spatial attention maps generated from the penultimate transformer block (blocks[-2].norm1) to verify morphological focus areas.

🩺

Symptom & Triage Guidance

Interactive educational questionnaire for tracking vaso-occlusive pain, jaundice, fever, and hydration with clear emergency red flags.

πŸ’¬

AI Health Assistant

Curated educational guidance for sickle cell crisis prevention, daily hydration targets, Hydroxyurea information, and hospital visits.

Create CellVision Account

Join the research platform to manage scans, track symptoms, and set reminders.

PROTOTYPE DEMO This is a prototype registration interface. No real credentials or sensitive patient data are transmitted or stored.

Platform Sign In & Recovery

Access your personalized research workspace, previous blood smear evaluations, and saved reports.

PROTOTYPE DEMO Demo authentication mode. Click Sign In to Demo Session to explore the dashboard.

Sign In

Forgot password?

Password Recovery

Enter your registered email address to receive a secure recovery link.

Welcome back, Guest Researcher πŸ‘‹

CellVision Patient & Research Control Center Β· ViT-Base/16 Pipeline Active

ViT Inference Ready
AI Analyses Completed
0
This local session
Model Accuracy
98.41%
Held-out test set
Daily Hydration Target
2.2 / 3.0 L
73% completed today
Emergency Helpline (India)
112
National 24/7 Helpline

Analysis Distribution

Morphology breakdown of completed analyses in this session

0 Scans
Normal / Circular RBC 0 (0%)
Sickle / Elongated RBC 0 (0%)

No analyses conducted yet. Upload an image in AI Analysis to populate chart.

πŸ’‘ Sickle Cell Wellness Tip

Maintain Optimal Hydration:

Dehydration increases blood viscosity and accelerates red blood cell sickling. Clinical guidelines recommend at least 8 to 10 glasses (2.5 to 3.0 Liters) of water daily for individuals with Sickle Cell Disease to minimize vaso-occlusive crisis risk.

Recent Analyses

Live log of blood cell classifications conducted in this session

πŸ”¬

No analysis records yet.

Upload and analyze a red blood cell image in AI Image Analysis to view recent results here.

Upload Blood Cell Image

Upload a red blood cell image to begin analysis.

Choose an image to begin.

Quick test samples:
πŸ”¬

Analysis Results Will Appear Here

Upload an image above and click "Analyze Image with ViT" to generate the 3-column classification and Grad-CAM visualization.

ViT-Base/16 Model Performance

Empirical validation metrics and evaluation on held-out test blood cell smear datasets.

Test Set Accuracy

98.41%

62 / 63 correct classifications

Macro Precision

98.39%

Balanced across classes

Macro Recall

98.44%

Sensitivity for sickled RBCs

Macro F1-Score

98.41%

Harmonic mean of precision & recall

Confusion Matrix (Held-out Test Cohort)

Validation results evaluated on 63 unseen microscopic RBC images.

True \ Predicted Normal RBC (Circular) Sickle Cell RBC (Elongated) Class Recall
Normal RBC 31 (True Neg) 1 (False Pos) 96.88%
Sickle Cell RBC 0 (False Neg) 31 (True Pos) 100.00%
πŸ“Œ Validation Scope: Evaluated on individual cell crops from the erythrocytesIDB benchmark. High sensitivity (100% on test sickle cells) applies to single-cell crops.

Model Architecture Specifications

Base Architecture: Vision Transformer (`vit_base_patch16_224`)
Input Resolution: 224 Γ— 224 pixels, RGB channels
Patch Size: 16 Γ— 16 pixels (196 total patches)
Embedding Dimension: 768-dimensional token vectors
Transformer Encoder: 12 blocks with multi-head self-attention
Grad-CAM Target Layer: `model.blocks[-2].norm1` (Penultimate Block)
Checkpoint Size: 343,261,973 bytes (~327.4 MB / 343.3 MB)
Checkpoint Location: `models/vit_final_checkpoint.pth`

Symptom Assessment Questionnaire

Educational triage survey to evaluate pain symptoms and hydration habits.

🚨

Urgent Medical Notice (India)

If you or someone with Sickle Cell Disease is experiencing severe chest pain, sudden difficulty breathing, high fever (> 100.4Β°F / 38Β°C), or acute crisis, call 112 immediately or proceed to the nearest emergency department. Do not wait to complete or calculate symptom survey scores.

0 (No Pain) 3 - Mild Discomfort 10 (Severe Crisis)

Symptom Assessment Results

Educational triage summary and general wellness recommendations.

Moderate Risk Β· Early Warning Symptoms
Assessed: Just Now

Assessment Breakdown

Reported pain score: 3/10 (Mild). Mild fatigue and adequate hydration reported. No high fever detected.

General Self-Care Guidance:

  • πŸ’§ Hydrate: Drink water or electrolyte fluids to maintain intravascular blood flow and reduce sickling.
  • πŸ›Œ Rest & Warmth: Stay in a warm room; keep limbs covered. Avoid cold air and never apply ice to painful areas.
  • πŸ’Š Doctor's Plan: Follow the individualized pain or medication plan prescribed by your hematologist.
  • πŸ“ˆ Monitor: Re-check symptoms. If pain intensifies or spreads to the chest, seek clinical care.

🚨 Emergency Red Flags (Dial 112 in India):

Regardless of questionnaire score, seek emergency hospital care immediately if you notice: sudden chest pain or tightness, shortness of breath, fever > 100.4Β°F (38Β°C), sudden weakness/numbness, or severe abdominal swelling.

My Reports & Evaluation History

Review previous microscopic image predictions, confidence levels, and symptom triage summaries.

Date & Time Evaluation Type Predicted Morphology / Score Confidence / Status Visual CAM Action
No evaluation records in this session. Complete an analysis to see reports here.

Find a Hematologist & Reference Center

Locate comprehensive sickle cell centers and certified hematology clinicians in India.

πŸ”
Quick City Filter:
DIRECTORY NOTICE Showing verified national sickle cell reference hospitals and research centers in India. To enable appointment booking with private local clinics, a regional healthcare provider API (e.g. ABDM Health Facility Registry) must be configured.
πŸ₯

All India Institute of Medical Sciences (AIIMS)

Department of Hematology & Bone Marrow Transplant

πŸ“ Sri Aurobindo Marg, Ansari Nagar, New Delhi - 110029

πŸ•’ OPD: Mon–Fri (8:30 AM – 1:00 PM) Β· Emergency: 24/7

πŸ“ž Tel: 011-26588500 / 26588700

πŸ”¬

National Institute of Immunohematology (ICMR-NIIH)

Comprehensive Hemoglobinopathy & Sickle Cell Research Lead

πŸ“ 13th Floor, KEM Hospital New Multi-storeyed Bldg, Parel, Mumbai - 400012

πŸ•’ Mon–Fri: 9:00 AM – 5:30 PM

πŸ“ž Tel: 022-24138518 / 24138519

πŸ‘¨β€βš•οΈ

Christian Medical College (CMC)

Department of Hematology & Stem Cell Transplantation

πŸ“ Ida Scudder Road, Vellore, Tamil Nadu - 632004

πŸ•’ Mon–Sat: 8:00 AM – 5:00 PM

πŸ“ž Tel: 0416-2281000 / 2282010

πŸ₯

Postgraduate Institute of Medical Education & Research (PGIMER)

Department of Clinical Hematology & Medical Oncology

πŸ“ Sector 12, Chandigarh - 160012

πŸ•’ OPD: Mon–Fri: 8:30 AM – 2:00 PM

πŸ“ž Tel: 0172-2747585

🩺

Veer Surendra Sai Institute of Medical Sciences (VIMSAR)

Sickle Cell Institute & Hemoglobinopathy Specialty Clinic

πŸ“ Burla, Sambalpur, Odisha - 768017

πŸ•’ Mon–Sat: 9:00 AM – 4:00 PM

πŸ“ž Tel: 0663-2430768

πŸ₯

Indira Gandhi Govt Medical College & Hospital (IGGMCH)

Regional Sickle Cell Anemia Center of Excellence

πŸ“ CA Road, Mominpura, Nagpur, Maharashtra - 440018

πŸ•’ Mon–Sat: 8:00 AM – 4:00 PM

πŸ“ž Tel: 0712-2725274

Sickle Cell Health Assistant Hub

Interactive educational assistant for sickle cell disease, hydration, crisis prevention, and ViT explainability.

KNOWLEDGE PROTOTYPE This assistant uses a curated medical-research knowledge base. It is not an autonomous LLM and does not provide clinical diagnosis or medication prescriptions. In an emergency in India, dial 112.
πŸ€–
CellVision Health Assistant (Curated Knowledge Engine) Educational Guidance Β· Not Clinical Advice Β· Emergency: Dial 112
Hello! I am your CellVision Health Assistant. You can ask me about sickle cell crisis triggers, hydration requirements, Hydroxyurea, single-cell ViT analysis, or when to seek emergency hospital care.

My Wellness & Medication Reminders

Track daily medications (Hydroxyurea, Folic Acid), hydration milestones, and medical checkups.

PROTOTYPE DEMO Medication schedules shown below are demonstrative. Always follow the exact dosage and timing prescribed by your physician.
Medication 08:00 AM Daily

Hydroxyurea (500mg)

Take 1 capsule with food. Increases fetal hemoglobin (HbF) to inhibit red blood cell polymerisation.

Supplement 09:00 AM Daily

Folic Acid (1mg)

Assists rapid erythropoiesis (RBC synthesis) needed due to accelerated red cell turnover.

Hydration Every 2 Hours

Water Intake (250 mL)

Daily goal: 3.0 Liters total fluid intake to maintain microvascular blood flow.

Clinic Visit Nov 12, 10:30 AM

Routine Hematology Checkup

Complete Blood Count (CBC), Reticulocyte count, and Liver Function monitoring.

Learn & Explore: Sickle Cell Science & AI

Clear, educational guides on genetics, red cell morphology, and Vision Transformer explainability.

1. GENETIC FOUNDATION

Sickle Cell Disease & the HbS Mutation

Sickle Cell Disease is an autosomal recessive disorder caused by a single point mutation in the HBB gene on chromosome 11. An adenine-to-thymine substitution (GAG β†’ GTG) replaces hydrophilic glutamic acid with hydrophobic valine at position 6 of the beta-globin (Ξ²-globin) protein chain. Under low oxygen tension, abnormal hemoglobin S (HbS) molecules polymerize into rigid helical rods, distorting erythrocytes into rigid crescent shapes.

2. CELL MORPHOLOGY

Circular versus Elongated Red Blood Cells

Healthy erythrocytes are flexible biconcave discs (~7.5 ΞΌm diameter) capable of deforming through tiny 3 ΞΌm capillaries. In contrast, sickled erythrocytes become stiff, crescent- or needle-like elongated cells with reduced deformability, shortened lifespan (~10–20 days vs 120 days), and high adherence to vascular endothelium, leading to vascular occlusion and tissue ischemia.

3. COMPUTER VISION

How Vision Transformers (ViT) Process Cells

Instead of local convolution filters, the vit_base_patch16_224 model divides a 224Γ—224 image into 196 non-overlapping patches (each 16Γ—16 pixels). Each patch is linearly projected into a 768-dimensional token. Multi-head self-attention mechanisms compare all 196 patch tokens simultaneously, allowing the network to capture global shape elongation and curvature across the entire cell.

4. EXPLAINABLE AI

What Grad-CAM Shows and Its Limitations

Grad-CAM computes gradients of the target class score with respect to patch tokens at the penultimate transformer block (blocks[-2].norm1). It highlights spatial regions that most strongly influenced the classification. Key limitation: The model was trained solely on isolated single-cell crops. In multi-cell smears, background dominance and multiple normal cells prevent whole-smear localization, which is why individual cell cropping is necessary.

5. CLINICAL AWARENESS

When to Seek Urgent Medical Care (Red Flags)

Individuals with sickle cell disease must seek immediate emergency medical care (dial 112 in India) if they develop: severe chest pain, fever > 100.4Β°F (38Β°C), sudden shortness of breath, severe unremitting headache, sudden weakness or numbness on one side, or acute abdominal pain. Early clinical intervention is critical to prevent complications like Acute Chest Syndrome.

Patient & Researcher Profile

Manage display name and view non-sensitive session preferences.

PROTOTYPE DEMO This profile is a demonstration view. Only your display name is persisted locally in this browser. No passwords, medical records, or confidential details are stored.
GR

Guest Researcher

Research ID: CV-2026-8814

Active Session
Blood Genotype (Demo): HbSS (Sickle Cell Anemia)
Blood Group: O Positive (O+)
Primary Hematologist: Dr. Marcus Vance, MD
National Emergency Helpline: 112 (India)

Edit Profile Information

Settings & Privacy

Configure local application behavior, backend API connectivity, and data retention.

Local Backend API Endpoint

Configure the URL of the Python FastAPI prediction backend (`backend_api.py`).

Backend status: Checking...

Data Retention & Local Processing Verification

All image processing and model evaluations run 100% locally on your machine via http://127.0.0.1:8000. No blood smear images, patient names, or medical records are uploaded to external cloud servers or third-party APIs.

Model Verification & Checkpoint Integrity

Checkpoint Path: models/vit_final_checkpoint.pth
Verified Checkpoint Size: 343,261,973 bytes (~327.4 MB / 343.3 MB)
Architecture: Vision Transformer (`vit_base_patch16_224`)
Trained Classes: `['circular', 'elongated']`

Help & Support Hub

Emergency helplines (India), user guides, and frequently asked questions.

🚨

Medical Emergency Services (India)

For urgent medical emergencies, acute chest syndrome, or severe pain crisis, call 112 (National Emergency Number) or 108 / 102 (Ambulance) immediately. Do not delay emergency hospital evaluation.

Why does the model predict Circular on a whole blood smear image?

The Vision Transformer was trained on 224Γ—224 images of single isolated red blood cells. When an entire microscopic slide with dozens of cells and large background spaces is uploaded, the individual cells shrink to tiny pixel groups and the background overwhelms the patch embeddings. To test sickled cells in a multi-cell image, use our interactive Crop / Select Single Cell tool on the AI Analysis page.

How does Grad-CAM visualize model decisions?

Grad-CAM computes gradients of the target class score with respect to patch feature maps in the penultimate transformer block (blocks[-2].norm1). The 196 patch tokens are reshaped into a 14Γ—14 grid and interpolated into a heatmap showing which cell edges influenced the classification.

Is my image data kept private?

Yes. The application communicates only with your local machine at 127.0.0.1:8000. No images or evaluation data are transmitted across the internet.

πŸšͺ

Confirm Session Logout

Are you sure you want to end your current CellVision session? You will be safely returned to the Home page.