Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Replace RadIO with TorchIO for patch-based inference #666

Merged
merged 6 commits into from
Feb 23, 2022

Conversation

fepegar
Copy link
Contributor

@fepegar fepegar commented Feb 18, 2022

Write a detailed description of your PR here.

Please follow the guidelines for PRs contained here. Checklist:

  • Ensure that your PR is small, and implements one change.
  • Add unit tests for all functions that you introduced or modified.
  • Run PyCharm's code cleanup tools on your Python files.
  • Link the correct GitHub issue for tracking.
  • Update the Changelog file: Describe your change in terms of
    Added/Changed/Removed/... in the "Upcoming" section.
  • When merging your PR, replace the default merge message with a description of your PR,
    and if needed a motivation why that change was required.

@fepegar
Copy link
Contributor Author

fepegar commented Feb 18, 2022

I "fixed" some mypy errors by explicitly ignoring them. I'm not sure this is the best solution.

InnerEye/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@ant0nsc ant0nsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking GREAT! Lots of ugly code replaced by uncle tio ;-)

Copy link
Contributor

@javier-alvarez javier-alvarez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#665 Lets address this one before merging and run manual regression test on prostate and H&N

@fepegar
Copy link
Contributor Author

fepegar commented Feb 22, 2022

Comparison RadIO vs TorchIO

I suspect the tiny differences might be due to implementation details. For example, if an image needs to be 3 voxels larger along a specific dimensions, we could add 2 voxels at the beginning and 1 at the end, or vice versa.

Quantitative

RadIO

Structure 25% 50% 75% count max mean min std
external 0.992 0.996 0.997 109.0 0.998 0.994706 0.969 0.003560
femur_l 0.978 0.980 0.982 109.0 0.988 0.979541 0.962 0.003938
femur_r 0.978 0.980 0.981 109.0 0.987 0.979486 0.967 0.003760
bladder 0.960 0.971 0.979 109.0 0.990 0.965761 0.840 0.023162
rectum 0.856 0.899 0.921 109.0 0.961 0.886587 0.636 0.048407
prostate 0.823 0.867 0.903 109.0 0.954 0.853202 0.629 0.068248
seminalvesicles 0.758 0.799 0.841 109.0 0.909 0.785954 0.189 0.089569

TorchIO

Structure 25% 50% 75% count max mean min std
external 0.992 0.996 0.997 109.0 0.998 0.994642 0.969 0.003591
femur_l 0.978 0.980 0.982 109.0 0.988 0.979596 0.962 0.003923
femur_r 0.978 0.980 0.982 109.0 0.988 0.979596 0.966 0.003847
bladder 0.960 0.972 0.978 109.0 0.990 0.965532 0.824 0.024132
rectum 0.857 0.899 0.916 109.0 0.963 0.884596 0.630 0.050930
prostate 0.822 0.864 0.905 109.0 0.953 0.853560 0.612 0.067435
seminalvesicles 0.758 0.800 0.840 109.0 0.913 0.786560 0.155 0.089954

Qualitative

ezgif-4-5713aa4c9e

@fepegar
Copy link
Contributor Author

fepegar commented Feb 22, 2022

I can run H&N too, but I suspect results will be very similar again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants