Universitat Oberta de Catalunya (UOC)
AI Agent for brain tumor detection and classification through MRI imaging
Abstract
dc:description.abstractThis Final Master’s Thesis presents the development of an agentic application capable of classifying brain tumors into gliomas, meningiomas, pituitary tumors or no tumors through MRI images by using trained machine learning (ML) models. The project involved three main phases: training ML models, developing an Artificial Intelligence agent, and building the agentic application. At first, various ML models, including Support Vector Machines, Random Forests and convolutional neural networks (CNN), were trained and evaluated on a brain tumor MRI dataset. CNNbased models achieved a better performance in the classification task in comparison to classical ML models. In particular, the ResNet50- and ResNet101-based CNNs obtained accuracies of > 98%. Then, a ReAct AI agent was created using the Autogen framework, enabling it with short-term memory usage and with tool calling to invoke the trained ML models for brain tumor classification. This allowed the integration between non-deterministic large language models (LLMs) and deterministic ML-based tools. Finally, a user-friendly GUI was implemented, together with the integration of an MCP server for tool calling and LiteLLM, for LLMs routing. The resulting agentic application showed great performance in both answering to general requests of the user and classifying MRI images from the testing dataset. However, limitations emerged when the system was validated with external images due to the training dataset composition: only T1-weighted images were available for tumor classes while the no tumor class included both T1- and T2-weighted images. Consequently, the AI agent, using the trained models as tools, misclassified T2-weighted images, reducing the performance in those cases. Despite these limitations, the project successfully showcased the feasibility and potential of combining large language models with ML-based tools into AI agents for medical image classification.
Degree
thesis:*- Grantor dc:publisher
- Universitat Oberta de Catalunya (UOC)
- Year dc:date.issued
- 2025
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Datzira Llimargas, Oriol
Subjects
dc:subject × 11Rights
dc:rights.accessrights- Statement dc:rights.accessrights
-
- info:eu-repo/semantics/openAccess
- CC BY-NC
- Licence dc:rights.uri
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/10609/152801