A diagnostic assistant system for hemorrhage classification using CT scans and OpenRouter API integration
摘要
The need to diagnose traumatic brain injury (TBI) early, especially when care is offered in an emergency situation, is essential. Differentiation of the types of intracranial hemorrhages on Computed Tomography (CT) imaging requires a lot of time, and it is complex in resource-limited contexts. The integration of large language models (LLMs) into clinical tools is opening up new possibilities for rapid, conversational assistance. In this research, we present TBiDx, a chatbot-based diagnostic assistant designed to respond to user queries strictly within the domain of TBI-related hemorrhage classification. The system is powered by the OpenRouter API and developed with a rule-based logic that focuses on six key hemorrhage types: epidural, subdural, subarachnoid, intraventricular, intraparenchymal, and general TBI. A core feature of the system is its ability to perform real-time analysis of user-uploaded CT scans. A fine-tuned ResNet-50 classification model is fully integrated into the backend, allowing the chatbot to receive an image, predict the hemorrhage class, and provide an immediate, conversational explanation of the findings. This end-to-end pipeline translates complex clinical classifications into accessible information for healthcare workers and learners. The chatbot interface is built using HTML/CSS and can be accessed both locally and via a Render-based cloud server. TBiDx is a domain-restricted chatbot that successfully assists in the classification of hemorrhages through direct image processing, putting medical safety and usability at the forefront.