Medical AI and First Response Assistant - AI Project Idea
- Codersarts
- Apr 18
- 4 min read
Optimizing and Fine-Tuning DeepSeek R1 Model Using LoRA on PubMed, MedQA, and BioASQ; Designing a Flutter-Based GUI Integrating Whisper Voice Input and Coqui TTS; Enabled Dual Operational Modes for Emergency Response and Medical Queries.

1. Project Overview
1.1 Project Title: Medical AI and First Response Assistant
1.2 Purpose
The purpose of this project is to develop an AI-powered assistant that serves dual purposes:
Emergency Response Mode: Provide rapid, accurate first-response guidance in critical medical situations.
Medical Query Mode: Answer detailed medical questions for educational or informational purposes.
The project involves optimizing and fine-tuning the DeepSeek R1 model using Low-Rank Adaptation (LoRA) on medical datasets (PubMed, MedQA, BioASQ) and building a user-friendly Flutter-based graphical user interface (GUI) with Whisper for voice input and Coqui TTS for text-to-speech output.
1.3 Learning Objectives
Gain hands-on experience in fine-tuning large language models (LLMs) using LoRA.
Understand medical dataset preprocessing and model optimization.
Develop skills in cross-platform app development with Flutter.
Integrate speech recognition (Whisper) and text-to-speech (Coqui TTS) into a functional GUI.
Apply AI in real-world medical and emergency response scenarios.
1.4 Target Audience
Students with intermediate knowledge of AI/ML, programming (Python, Dart), and GUI development.
Intended end-users: Medical professionals, first responders, and students.
2. Scope
2.1 In-Scope
Fine-tuning the DeepSeek R1 model using LoRA on PubMed, MedQA, and BioASQ datasets.
Designing and implementing a Flutter-based GUI with two operational modes:
Emergency Response Mode
Medical Query Mode
Integrating Whisper for voice input and Coqui TTS for audio output.
Testing the system for accuracy, usability, and responsiveness.
2.2 Out-of-Scope
Deployment of the application to app stores.
Real-time integration with live medical databases or hardware devices (e.g., wearables).
Training the DeepSeek R1 model from scratch (pre-trained model will be provided).
Multi-language support beyond English.
3. Functional Requirements
3.1 Model Optimization and Fine-Tuning
Dataset Preparation:
Preprocess and clean data from PubMed (research articles), MedQA (medical Q&A), and BioASQ (biomedical Q&A).
Ensure datasets are formatted for compatibility with DeepSeek R1 and LoRA.
Fine-Tuning with LoRA:
Use LoRA to efficiently fine-tune DeepSeek R1 for medical domain knowledge.
Optimize model performance for accuracy and response time.
Evaluation:
Test model accuracy on a validation subset of MedQA and BioASQ.
Achieve at least 80% accuracy on medical question-answering tasks.
3.2 GUI Development
Framework: Use Flutter for cross-platform compatibility (Android, iOS, and desktop).
Modes:
Emergency Response Mode:
Quick, concise responses for first-aid instructions (e.g., CPR, choking).
Voice-activated input and audio output prioritized for hands-free operation.
Medical Query Mode:
Detailed responses to medical questions (e.g., symptoms, drug interactions).
Support for both text and voice input/output.
Features:
Clean, intuitive interface with mode-switching toggle.
Real-time voice input using Whisper API/model.
Audio output of responses using Coqui TTS.
Error handling for poor voice input or model failures.
3.3 Integration
Connect the fine-tuned DeepSeek R1 model to the Flutter GUI via an API or local inference.
Ensure seamless interaction between Whisper (input), DeepSeek R1 (processing), and Coqui TTS (output).
4. Non-Functional Requirements
4.1 Performance
Model response time: < 3 seconds for emergency mode, < 5 seconds for query mode.
GUI load time: < 2 seconds on standard hardware (e.g., mid-range smartphone or laptop).
4.2 Usability
Interface should be simple and accessible for non-technical users.
Voice commands must be recognized with >90% accuracy in quiet environments.
4.3 Scalability
System should handle up to 10 concurrent users in testing without performance degradation.
4.4 Reliability
Model should provide medically accurate responses in >80% of test cases.
GUI should not crash during voice input/output operations.
5. Technical Requirements
5.1 Tools and Technologies
AI/ML:
DeepSeek R1 (pre-trained model).
LoRA for fine-tuning.
Python, PyTorch, or TensorFlow for model training.
Datasets: PubMed, MedQA, BioASQ (provided or accessible online).
GUI:
Flutter (Dart) for cross-platform development.
Whisper (open-source speech-to-text).
Coqui TTS (open-source text-to-speech).
Hardware:
GPU-enabled system for model training (e.g., NVIDIA GPU).
Standard laptop/smartphone for GUI testing.
5.2 Dependencies
Pre-trained DeepSeek R1 model availability.
API keys or local setup for Whisper and Coqui TTS.
Stable internet for dataset downloads and potential API calls.
6. Deliverables
6.1 Code
Python scripts for dataset preprocessing and model fine-tuning.
Flutter codebase for the GUI application.
Integration scripts (e.g., API or local inference setup).
6.2 Documentation
Technical Report:
Overview of model fine-tuning process and results.
GUI design and implementation details.
Challenges faced and solutions implemented.
User Manual: Instructions for installing and using the application.
6.3 Demonstration
A working prototype showcasing both modes (emergency and query).
Video or live demo of voice input/output functionality.
7. Timeline
Phase | Tasks | Duration | Deadline |
Phase 1: Research | Study DeepSeek R1, LoRA, Flutter, Whisper, Coqui TTS | 1 week | Apr 16, 2025 |
Phase 2: Data Preparation | Preprocess PubMed, MedQA, BioASQ datasets | 1 week | Apr 23, 2025 |
Phase 3: Model Fine-Tuning | Fine-tune DeepSeek R1 using LoRA | 2 weeks | May 07, 2025 |
Phase 4: GUI Development | Build Flutter GUI with mode-switching | 2 weeks | May 21, 2025 |
Phase 5: Integration | Integrate model, Whisper, and Coqui TTS | 1 week | May 28, 2025 |
Phase 6: Testing & Refinement | Test system, fix bugs, optimize performance | 1 week | Jun 04, 2025 |
Phase 7: Documentation | Write technical report and user manual | 1 week | Jun 11, 2025 |
Phase 8: Submission | Submit deliverables and demo | - | Jun 12, 2025 |
Note: The timeline date is provided for your convenience in planning; you can adjust it as needed and begin working on this project accordingly.
8. Assumptions
Students have basic knowledge of Python, Dart, and AI/ML concepts.
Access to necessary hardware (GPU for training, laptop/phone for GUI).
Datasets and pre-trained models are available or downloadable.
9. Constraints
Limited to open-source tools and datasets (no proprietary software).
Project must be completed within the 8-week timeline.
Team size: 1-4 students (adjust scope based on team size).
10. Success Criteria
Fine-tuned model achieves >80% accuracy on medical Q&A tasks.
GUI successfully switches between emergency and query modes.
Voice input/output works seamlessly in a demo environment.
All deliverables (code, documentation, demo) submitted by Jun 12, 2025.
11. Support and Resources
Mentor/Instructor: Available for weekly check-ins and troubleshooting.
References:
DeepSeek R1 documentation.
LoRA research papers/tutorials.
Flutter, Whisper, and Coqui TTS official docs.
Community: Online forums (e.g., Stack Overflow, GitHub issues).
Comentários