MSc Thesis Defence: Synergy of Computer Vision and Natural Language Processing in Tuberculosis Diagnostics and Education

On June 29, 2026, MSc candidate Nikola Kavarić successfully defended his thesis entitled “Synergy of Computer Vision and Natural Language Processing in Tuberculosis Diagnostics and Education” within the Artificial Intelligence Master’s programme at the University of Donja Gorica. Through its support for the programme, mentoring activities, and development of competencies in artificial intelligence and high-performance computing, NCC Montenegro contributes to preparing young researchers to develop interdisciplinary AI solutions for healthcare. The thesis investigates the combination of computer vision and Retrieval-Augmented Generation approaches for detecting signs of tuberculosis and providing educational explanations of medical findings.

Mr. Nikola Kavaric during the defence

ABSTRACT – The aim of this thesis is the development and evaluation of a system that combines computer vision and Retrieval-Augmented Generation (RAG) models for the automatic detection of signs of tuberculosis in chest X-ray images and the educational explanation of findings. The initial hypothesis was that it is possible to develop a functional prototype capable of recognizing pathological changes in X-ray images and generating informative, literature-grounded responses for users. Within this research, a CNN model for binary classification and YOLO models for the localization of pathological changes were developed and evaluated. The CNN model achieved an accuracy of 97% on the test set, representing a solid and measurable contribution. The YOLO models adequately demonstrated the concept of localization, with certain limitations related to dataset size and class imbalance. In addition to the visual module, a RAG prototype was implemented, utilizing a local medical document base to generate responses to user queries. The integration was implemented at the prototype level, without clinical validation. Based on the obtained results, the hypothesis was partially confirmed — to a significant extent for the CNN classification component within the test dataset used, while the YOLO and RAG components, due to dataset limitations and the absence of expert-verified reference answers, should be treated as proof-of-concept components. The thesis demonstrates that a modular combination of these technologies can serve as a useful foundation for the development of educational tools in the field of medical diagnostics.