nyukat / GMIC

An interpretable classifier for high-resolution breast cancer screening images utilizing weakly supervised localization
https://doi.org/10.1016/j.media.2020.101908
GNU Affero General Public License v3.0
163 stars 48 forks source link

RetrieveROIModule on left border and mask not updated for some images #13

Closed jamesjjcondon closed 3 years ago

jamesjjcondon commented 3 years ago

Hey,

see visualisation for 0_R-MLO.png image

This occurs for only some ROIs eg 0_L-MLO.png: image

I'm exploring around here but any pointers would be much appreciated.

Also, the max value approach will be counfounded by markers, and probably perform poorly for women with very dense breasts eg: image

In my case, all patches can't get past x=0 (stuck on the left border).

Is this just me?

seyiqi commented 3 years ago

Hi @jamesjjcondon ,

What's the PyTorch version that you are using? Here is the results for 0_R-MLO.png I obtained with PyTorch 1.1.0: 0_R-MLO

It seems to me that the patch selection logic does not behave as it's expected in your environment. For instance, in your 0_R-MLO.png, while the benign lesion in the lower breast is highlighted by the saliency map, the patch selection module does not select any patch on the highlighted regions.

A.S.

jamesjjcondon commented 3 years ago

Thanks for that,

Struggling with dependencies. What python version are you using? are you using virtualenv? Are you able to remake a fresh environment? Depending on the python version, I'm having trouble with deprecations on Ubuntu 20.04.

seyiqi commented 3 years ago

This is the OS info that we primarily run experients on: Operating System: Red Hat Enterprise Linux CPE OS Name: cpe:/o:redhat:enterprise_linux:7.6:GA:server Kernel: Linux 4.14.0-115.33.1.el7a.ppc64le Architecture: ppc64-le

I think both Python 3.6.x and 3.7.x should work. I believe the main reason is PyTorch version. If you have an empty env, then pip install -r requirements.txt should do the work.

jamesjjcondon commented 3 years ago

Thanks @seyiqi . There are some sym link issues with virtualenv on ubuntu 20.04 and using sudo defaults to python3.8. Works with torch 1.1.0.

jamesjjcondon commented 3 years ago

max_idx_x = max_idx_x.type(torch.long) # max_idx_x is float in torch 1.8

Needs to go in above line 199 in tools.get_max_window for torch 1.8

On Sun, 28 Mar 2021, 17:50 Yuanhong Chen, @.***> wrote:

I think the reason we always get x=0 is due to the following code in 'scr/utilities/tools.py', max_idx_x = max_linear_idx / W_map max_idx_y = max_linear_idx - max_idx_x * W_map max_idx_y here will always output 0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nyukat/GMIC/issues/13#issuecomment-808858787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIAOZR3JODTQM5V6AEFC4Q3TF3KCPANCNFSM4XVRFYQQ .