-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Benchmark CT-Dataset KiTS19 #36
base: main
Are you sure you want to change the base?
Conversation
question = "<img> Please segment the kidney and tumor in the CT images." | ||
|
||
batcher_input._add_text_prompt("user", question) | ||
if prompt: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you have suggested, we perhaps should always do the conversion within class, so that BatcherInput only takes Numpy Array as input for both images and segmentation masks. @corentin-ryr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right it would simplify the usage of the tool. For now let's keep it this way and we will revisit it soon.
answer = torch.LongTensor(answer) | ||
one_hot_answer = one_hot(answer, num_classes= self.num_classes).movedim(-1, 1) | ||
|
||
return one_hot_answer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The calculation of DICE score has two modes: one-hot and index.
My idea is: we default on the one-hot encoding, so for different datasets, probably pre-processing is needed. The return will always be a hot-encoded LongTensor. @corentin-ryr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another solution would be to only have single-class masks (binary masks) and allow the batcher to return multiple masks in case there are multiple labels in the dataset.
We can either have :
- complex question asking to label multiple things and the batcher has to return multiple masks
- split the questions to have 2 different questions: one to label the kidney and another to label the tumor. This way it simplifies the metric computation and it will be easier to stratify (compute overall accuracy and accuracy on just kidney/tumor).
Created KiTS Segmentation Task
To-do: