GSoC Week 7

This week I was able to discuss with my mentor on  my progress and the merge requests. I took him through the changes I made. My mentor suggested a few minor updates to make and there were methods for which the GET method were not setup and we also questioned what their functionality would be.

Updates to the Bounding Box Endpoint

The /bounding-box endpoint was necessarily a POST method where payload consisting of the image and its relevant information is sent to perform model inference and return them back. The GET method which was previously defined returned all models available in the application. It was redundant to the /models method. We decided to update the /bounding-box GET method to return only the models available under it and their versions. For this task I reorganized the folder structure from models/cheXnet to models/bounding_box/cheXnet. This update opens up a lot of flexibility in terms of integrating models.

In future we can have more models under /models/bounding_box and calling the GET method of the /bounding-box would return all models under it. Again if we need to integrate just a classifier based model we can create models/classifier in our folder structure and integrate models under it.

Challenges with Test Cases


Once the updates were made there were test cases that started failing. I had to check them and update the test cases. Since the functionality of the endpoints were changing they needed to be updated. There is still one particular test case in the lh-radiology application that I am not able to figure out. It provides different results compared to my local system and the gitlab CI/CD.

I created a new test case for the \model-selection method but it was failing. In the /model-selection method we are capturing the DICOM tags of the image, finding the modality and redirecting to the appropriate model. After some reading I figured redirecting within flask and trying to do unit tests using pytest would fail but more importantly I read redirecting within a flask endpoint is not right since it increase complexity and reduces performance. I think now it is better to just call the method by importing them instead of calling its endpoint. I will need to discuss this with my Mentor before moving forward.

Rebasing Commits 

I made some multiple comments which I rebased to single comments for readability.

Upcoming Tasks

I will work on refactoring the model selection code to call the methods from imports rather than endpoints. Then I will start working on implementing a Mammography tumor classification model. I believe more or less the model selection hook is complete.


The cheXnet model after discussion with my mentor is good to go and now the outputs are fine now,



Comments

Popular posts from this blog

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

GSoC Week 1

My First GSoC - LibreHealth Community Bonding Period