histocartography / patho-quant-explainer

Code for replicating results presented in the paper: "Quantifying Explainers of Graph Neural Networks in Computational Pathology"
MIT License
43 stars 7 forks source link

Error when trying to run Step 1: Cell graph generation #6

Open glejdis opened 2 years ago

glejdis commented 2 years ago

I already downloaded the data from here https://www.bracs.icar.cnr.it/. Used RoI images. But when I try to run Step 1: Cell graph generation using: python generate_cell_graphs.py --data_path ./../data/test --save_path ./quant-gnn-explainers-data

I receive the error:

Warning: ./../data/test/3_FEA/BRACS_1228_FEA_1.png failed during deep feature extraction. Warning: ./../data/test/3_FEA/BRACS_1228_FEA_1.png failed during kNN graph building. Warning: ./../data/test/3_FEA/BRACS_1228_FEA_1.png failed during nuclei concept extraction.

What could be the issue?

Thank you

PushpakPati commented 2 years ago

Can you please share the full trace of the error?

glejdis commented 2 years ago

(/vol/ideadata/oc69ubiw/conda/pathoexplainer) oc69ubiw@idea-hetep:/vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/core$ python generate_cell_graphs.py --data_path /vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/data/test --save_path /vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/core/quant-gnn-explainers-data /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torchvision/image.so: undefined symbol: _ZN3c106detail19maybe_wrap_dim_slowEllb warn(f"Failed to load image Python extension: {e}") Start analysing 569 images /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/sklearn/decomposition/_dict_learning.py:1187: FutureWarning: By default transform_alpha will be equal toalpha instead of 1.0 starting from version 1.2 warnings.warn( File already downloaded. /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.HoverNet' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.Encoder' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.Conv2dWithActivation' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.BNReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.activation.ReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.ResidualBlock' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.SamepaddingLayer' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.Decoder' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.Upsample2x' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.upsampling.Upsample' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torch/serialization.py:671: SourceChangeWarning: source code of class 'histocartography.ml.models.hovernet.DenseBlock' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning) /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead. warnings.warn( /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing weights=ResNet34_Weights.IMAGENET1K_V1. You can also use weights=ResNet34_Weights.DEFAULT to get the most up-to-date weights. warnings.warn(msg) Downloading: "https://download.pytorch.org/models/resnet34-b627a593.pth" to /home/rzlin/oc69ubiw/.cache/torch/hub/checkpoints/resnet34-b627a593.pth 100%|██████████████████████████████████████| 83.3M/83.3M [00:01<00:00, 86.4MB/s] 0%| | 0/569 [00:00<?, ?it/s]/vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/sklearn/decomposition/_dict_learning.py:1187: FutureWarning: By default transform_alpha will be equal toalpha instead of 1.0 starting from version 1.2 warnings.warn( Warning: /vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/data/test/3_FEA/BRACS_1228_FEA_1.png failed during nuclei detection. Warning: /vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/data/test/3_FEA/BRACS_1228_FEA_1.png failed during deep feature extraction. Warning: /vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/data/test/3_FEA/BRACS_1228_FEA_1.png failed during kNN graph building. Warning: /vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/data/test/3_FEA/BRACS_1228_FEA_1.png failed during nuclei concept extraction. 0%| | 0/569 [00:02<?, ?it/s] Traceback (most recent call last): File "/vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/core/generate_cell_graphs.py", line 168, in generate_cell_graph( File "/vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/core/generate_cell_graphs.py", line 145, in generate_cell_graph g_list=[graph],

Younger330 commented 1 year ago

I have the same question, did you solve this problem?