MedPrompt: LLM-CNN Fusion with Weight Routing for Medical Image Segmentation and Classification
Preprint
Abstract
Current medical image analysis systems are typically task-specific, requiring separate models for classification and segmentation, and lack the flexibility to support user-defined workflows. To address these challenges, we introduce MedPrompt, a unified framework that combines a few-shot prompted Large Language Model (Llama-4-17B) for high-level task planning with a modular Convolutional Neural Network (DeepFusionLab) for low-level image processing. The LLM interprets user instructions and generates structured output to dynamically route task-specific pretrained weights. This weight routing approach avoids retraining the entire framework when adding new tasks-only task-specific weights are required, enhancing scalability and deployment. We evaluated MedPrompt across 19 public datasets, covering 12 tasks spanning 5 imaging modalities. The system achieves a 97% end-to-end correctness in interpreting and executing prompt-driven instructions, with an average inference latency of 2.5 seconds, making it suitable for near real-time applications. DeepFusionLab achieves competitive segmentation accuracy (e.g., Dice 0.9856 on lungs) and strong classification performance (F1 0.9744 on tuberculosis). Overall, MedPrompt enables scalable, prompt-driven medical imaging by combining the interpretability of LLMs with the efficiency of modular CNNs.Keywords
All Related Versions
This publication has 46 references indexed in Scilit:
- Zeus: zero-shot LLM instruction for union segmentation in multimodal medical imagingInternational Journal of Machine Learning and Cybernetics, 2025
- Data and image processing for intelligent glaucoma detection and optic disc segmentation using deep convolutional neural network architectureDiscover Computing, 2025
- Leveraging anatomical constraints with uncertainty for pneumothorax segmentationHealth Care Science, 2024
- PY-Net: Rethinking segmentation frameworks with dense pyramidal operations for optic disc and cup segmentation from retinal fundus imagesBiomedical Signal Processing and Control, 2023
- Swin-Unet: Unet-Like Pure Transformer for Medical Image Segmentation2023
- Making the Most of Text Semantics to Improve Biomedical Vision–Language Processing2022
- COVID-CT-Mask-Net: prediction of COVID-19 from CT scans using regional featuresApplied Intelligence, 2022
- The Role of Imaging in Health Screening: Screening for Specific ConditionsAcademic Radiology, 2021
- Convolutional neural networks in medical image understanding: a surveyEvolutionary Intelligence, 2021
- Recent Advancements in Retinal Vessel SegmentationJournal of Medical Systems, 2017