The Premier Autonomous Agent for P. falciparum Diagnostics.
MicroSmart PF is a high-performance diagnostic interface that bridges Computer Vision and Clinical Reasoning. It automates the detection of Malaria parasites in thin blood smears and generates WHO-compliant pathology reports in real-time.
Designed as a professional "Cockpit" for lab technicians and pathologists, it prioritizes speed, accuracy, and dark-mode ergonomics.
MicroSmart PF is the specialized malaria node of the larger MicroSmart Project. We are building a constellation of autonomous agents for hematology and cytology.
- MicroSmart PF: P. falciparum Malaria (Active)
- MicroSmart Heme: Hematology & CBC Analysis (In Development)
- MicroSmart Cyto: Cervical Cancer Screening (R&D)
- The Eye (Vision Agent): Powered by YOLOv8. Scans slides at ~40ms/frame to detect Trophozoites, Gametocytes, and WBCs with pixel-perfect bounding boxes.
- The Brain (Reasoning Agent): Powered by Llama 3.3 (via Cerebras). Interprets raw cellular counts, calculates parasitemia levels, and acts as a virtual pathologist to write the final report.
- Professional Workbench: A collapsible, 3-pane dashboard designed for high-throughput screening.
- Batch Processing: Queue multiple slides and process them sequentially without blocking the UI.
- Smart Viewer: High-fidelity deep zoom with AI/RAW toggles (Spacebar shortcut).
- Filmstrip Navigation: Rapidly switch between patient samples using Arrow Keys.
- Zero-Latency UX: Local-first state management with optimized React rendering.
git clone [https://github.com/ujpm/microsmart_pf.git](https://github.com/ujpm/microsmart_pf.git)
cd microsmart_pf
The backend handles image processing and AI inference.
- Create a virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Configure API Keys: Create a
.envfile inbackend/and add your Cerebras key:
CEREBRAS_API_KEY="csk-REPLACE_WITH_YOUR_KEY"
- Launch the Server:
Note: We bind to
0.0.0.0to ensure access from cloud IDEs (Codespaces/Gitpod).
uvicorn src.main:app --reload --host 0.0.0.0 --port 8000
The frontend is the interactive cockpit.
- Open a new terminal.
- Setup and run:
cd frontend
npm install
npm run dev
- Access the workbench at:
http://localhost:5173
graph LR
User[Lab Technician] -->|Uploads Batch| Cockpit[React Workbench]
Cockpit -->|Queue Management| Backend[FastAPI Server]
subgraph "The Double-Engine"
Backend -->|Raw Slide| Vision[YOLOv8 'The Eye']
Vision -->|Bounding Boxes + Counts| Backend
Backend -->|Aggregated Data| Brain[Llama 3.3 'The Brain']
Brain -->|Clinical Pathology Report| Backend
end
Backend -->|JSON Analysis| Cockpit
Cockpit -->|Visualizes| Display[Smart Viewer & Console]
| Key | Action |
|---|---|
| Spacebar | Toggle between AI Annotation and Raw Image |
| Arrow Right | Next Slide |
| Arrow Left | Previous Slide |
Architecture & Development Designed by UJPM
License
This project is open source under the MIT License. See LICENSE for details.