GSoC Week 6

This week, I was deeply involved in refining and optimizing the model selection hook's implementation on the AI model service end. I also discovered that the existing cheXnet model was not integrated correctly, and I spent some time rectifying that. On top of these tasks, I'm concerned that I have not been able to arrange a meeting with my mentor despite numerous requests. Hopefully, that will change next week.


Refining the Model Selection Method

Last week, I implemented the model selection method on the AI Model Service end, but some settings, such as the DICOM tag information required for model selection, were hardcoded. Other property-related information was also hardcoded. This week, I focused on separating the hardcoded elements and parameters into a separate YAML configuration file and refactoring the codebase. I learned that using a YAML configuration simplifies the maintenance of the codebase by reducing boilerplate code.


Subsequently, I updated the model call method to be dynamic so that task information or model information could be passed dynamically to the bounding-box method.


In its previous iteration, the bounding box method could only call the cheXnet model, as it was the only model available. The requirement now is to decouple the bounding box method to enable it to call multiple models such as cheXnet, mammogram, brain, etc.


Previously, the call would be:


https://localhost:5000/bounding-box


Now, it's been updated to:


https://localhost:5000/bounding-box/<task>


Where <task> can be cheXnet, Mammography, etc.


Fixing the cheXnet Model

While testing the cheXnet model, I discovered that the model weights were not loading correctly or were incompatible with the Densenet121 model present in the codebase. I determined that this was because the model weights had been trained on an older PyTorch version that was no longer available or compatible. I faced many issues because the model weights were sourced from a git repo codebase that did not specify the package versions.


To rectify this, I acquired a codebase for the cheXnet model and trained it. After properly evaluating the new model for AUC-ROC scores, I used the newly trained model weights to integrate it into the application. I also integrated it with newer grad cam implementations and libraries, which took some time but ultimately worked. Now, the cheXnet model functions as intended.


I have not yet submitted a Merge Request for this work since I need to review the updates with my mentor.


Addressing Failing Test Cases in the AI Model Service

After pushing the updated code for the model selection and the cheXnet model, I encountered some failing test cases. These failures resulted from changes in the bounding box method. After updating the test cases, they ran without any issues.


However, there's still one failed test case for the newly integrated cheXnet model. It fails when DICOM images are passed as parameters, but it works fine when JPEGs are used. I suspect there might be an issue with data loading for DICOM, and I will be working on this.

Comments

Popular posts from this blog

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

My First GSoC - LibreHealth Community Bonding Period

GSoC Week 2