Posts

Showing posts from August, 2023

Google Summer of Code 2023: AI Model Service Auto Selection by Modality - Final Report

Image
Introduction GSoC is one amazing program that lets students and professionals get into the world of open source, contribute code and also learn back from the program. I definitely learnt a lot by contributing to my mentoring organization LibreHealth through GSoC'23. I now understand the value of open source and will become a lifelong contributor wherever and whenever I can. LibreHealth is an umbrella organization where multiple health information technology projects collaborate. I was actively involved in contributing code to their LibreHealth Radiology application  through the project "AI Model Service Auto Selection by Modality". My contributions to the application were more involved into implementing AI models in the application and also building modules that do automatic model selection, example, when a Radiologist opens up a Mammography image the application automatically triggers the Mammography AI model to produce inferences on the image. Objectives The project des

GSoC Week 13 - Wrapping Up

Image
 This week I worked on two things,  - Implemented the AI Tool OHIF component - Minor bug fixes and logging Implementing the AI Tool OHIF component To give some context, in the OHIF viewer I had to add a button in the toolbar (refer "AI Tool" in the image above) that allows calling any of the existing AI models in the AI Model Service. Prior to this a component was implemented that takes a look at the metadata of the image and calls the respective model that was configured in the admin settings, but only one model could be called for a particular image. In a scenario where we would need to call two models for an image, say we have a model for identifying breast cancer region and another model for identifying type of cancer it would become impossible. We implement the AI Tool so that we can call a secondary or tertiary model. This task was quiet difficult for me since I was new working in JS and also there were new components that I had to work with. I met with my mentor twice

GSoC Week 12

Image
This week with the help of my mentor I was able to figure out the issue where the UI buttons were not reflecting. I progressed on that part as well on implementing Java methods that on click of the OHIF AI react hook buttons the right AI model is called from the AI Model Service. re-Building the viewer component So I had to build the source again after making the changes to the UI component. This is something completely new to me so I will explain the steps, First I had to uncomment the line (as shown in the image) in the docker compose file that rebuilds the OHIF viewer extension changes, Before rebuilding the module, we need to pull the ohif viewer submodules to our codebase, to do that we need to run the following commands marked in the image. This is present in the README.md file in the 'nsf-ftw' branch. Now to start rebuilding the module we can use IntelliJ IDE to open the Maven build project tab. Here select the 'build-viewer' option in the 'Profiles'. You

GSoC Week 11

 This week can be characterized as "Struggle and Progress" I worked on two major things this week, - Integrated the ever so complex kaggle RSNA mammography top performing model - Codebase deep dive and coding for React OHIF hook implementation Kaggle RSNA Mammography Model Integration After going through the codebase multiple times and fixing the inference code on my local everything was working fine except for the part where the image is cropped using a YOLO model or an Otsu thresholding method before being passed to the final classification ConvNext Model. The issues I faced were, The models were tuned for specific GPUs to run much faster but for the LH application we would need to run on CPU or GPU based on their availability. So I needed to use the unoptimized models and figure out a few other complexities surrounding them such as modifying a chunk of codebase, identifying the right model to initialize, etc There were a lot of dependency issues for the YOLO model which I

GSoC Week 10

There was a lot of struggle this week and I am also expecting a lot of difficulties to come by the further weeks. The two biggest challenges I am facing, - Integration of the RSNA Kaggle Mammography classification model - React hook implementation in the OHIF viewer RSNA Kaggle Mammography Model The code base and model complexity that are put available by the top Kaggle solutions of the RSNA Kaggle competitions are large and takes time to decode. I've been working on the top solution that uses a YOLOX model to crop the image and then a CONVNEXT model to perform the classification. The code that's provided is for training and evaluation. It needs to be converted to perform a single image inference. The code base is optimized for specific GPUs but for our case it needs to be generalized to run on CPU or GPU (any). I was able to run the models but the YOLOX model is throwing smaller boxes to crop off. I need to debug and check what is missing. If it's still the case I will nee