Inspiration

In many labs, especially in resource-limited settings, the most critical diagnostic tool is still a human eye staring through a microscope. We know this because we've been there.

Our team has firsthand experience working tirelessly in the lab, manually counting thousands of cells, with our eyes aching and a long queue of slides waiting. We know the pressure to be both fast and perfectly accurate.

At the same time, we've felt the anxiety of being the patient, waiting days for a simple blood count that holds the key to a diagnosis.

This manual bottleneck is a huge source of pain for everyone. We decided to build the tool we wish we had: MicroSmart, an AI assistant to give technicians a "second set of eyes," break the bottleneck, and get answers to patients faster.

What it does

MicroSmart is an AI-powered microscopy assistant, built into a fast, accessible Telegram bot. It turns the slow, manual counting process into a rapid, digitally-assisted workflow.

It's a "Session," Not a Snapshot: A diagnosis can't come from one look. Our bot mimics a real lab tech by starting a "session," guiding the user to upload 5-10 images from different microscopic fields.

It's a "QC Tech": The bot runs real-time blur detection on every upload. Out-of-focus images are instantly rejected, so the AI only analyzes high-quality, clinically-valid data.

It's a "Calculator": Instead of just raw counts, the system aggregates the data from all images and provides a final, clinically-relevant concentration (e.g., WBC: 4.0 x 10⁹/L).

It's "Transparent": The final report is clean, HTML-formatted, and shows both the per-image counts and the final aggregated result, so the tech can trust and verify the output.

How we built it

We built MicroSmart on a modern, decoupled architecture to ensure it's fast, stable, and scalable.

The AI Backend (api_server.py): A high-speed FastAPI server that runs our core logic. It uses a YOLOv8 model for cell detection and OpenCV for our real-time blur check.

The Bot Client (telegram_bot.py): A python-telegram-bot application that manages the entire user experience. We use a ConversationHandler to create the multi-step "session" logic.

The "Brain" (In-Progress): We are integrating Google's Gemini API (google-generativeai) to add a "Discuss with AI" feature.

⚠️ A Note for Judges & Testers

We believe in open-source and making our project fully accessible. However, we've had significant challenges finding a stable, free-tier host that can reliably run our AI model server (api_server.py).

Because of this, you must run the project locally following the "Getting Started" guide on GitHub.

We've tried to make the setup as clear as possible, but if you run into any issues, please do not hesitate to email us at uwizeyimanajp2@gmail.com. We will be happy to assist you.

Challenges we ran into

Our biggest challenge was inexperience, which was a powerful, if stressful, motivator.

Learning AI from Scratch: None of us had trained an object detection model before. We were a team of 2 lab techs who just love code, not AI researchers. We had to teach ourselves the entire YOLOv8 pipeline from data annotation to training in a very short timeframe.

The "Two-Server Problem": Making our two separate apps (telegram_bot.py and api_server.py) talk to each other reliably was a huge challenge. They both run on asyncio event loops, and we spent a lot of time debugging httpx timeouts and deadlocks to make their communication fast and robust.

Accomplishments that we're proud of

We Built Our First AI! We went from "What is YOLO?" to a working, stable AI model in record time. Seeing it correctly identify cells for the first time was a massive win for us.

We (Ironically) Built Our Replacement: As lab techs, our proudest accomplishment is that we built a tool that's... well... good enough to take our own jobs! We created an AI assistant that we ourselves would genuinely use to be faster and more accurate. We're proud of that, even if it's a bit funny.

It's a Tool, Not a Toy: We're incredibly proud that our bot provides a clinically relevant result ($$x 10⁹/L$$), not just a raw count. That's the difference between a cool demo and a useful tool.

What we learned

AI is 10% Model, 90% Data: The AI model is the "engine," but the data is the fuel. Our blur-check feature is just as important as the AI, because "garbage in" (a blurry photo) leads to "garbage out" (a wrong diagnosis).

"Speak the User's Language": A count of 211 WBC is useless. A concentration of $$3.17 x 10¹²/L$$ is a clinical result. We learned to build the app for the end-user, not for the computer.

Build the "Scaffolding" First: Our first idea was a massive, complex system. We learned to scale back and build one thing perfectly: a stable batch-analysis platform. Now that the foundation is strong, we can add more features (like the LLM) on top.

What's next for MicroSmart

This platform is ready to grow. Our next steps are clear:

Phase 3 (The Brain): Solve the asyncio bug and fully launch the "Discuss with AI" Gemini feature.

Phase 4 (The 10x Upgrade): Retrain our AI to perform a full WBC differential (neutrophils, lymphocytes, etc.) and identify RBC morphologies (spherocytes, target cells).

Phase 5 (Expansion): Use our proven architecture to add new modules for other critical, manual-microscopy tasks, including urine sediment (identifying crystals and casts) and stool samples (identifying parasite eggs).

Built With

Share this project:

Updates