Comments (12)
from chexnet-with-localization.
It worked for me after I changed the name in denseNet_localization.py module.densenet121.features.denseblock4.denselayer16.conv.2 to module.densenet121.features.denseblock4.denselayer16.conv2
And I had some package version issues as well.
from chexnet-with-localization.
Do you use Pytorch==0.2.0 and torchvision==0.2.0 ?
from chexnet-with-localization.
I am using the below version since I had some problem with torchvision 0.2.0.
torch==1.1.0
torchvision==0.2.2
Additional info:
I ran my training by using the below requirements in Ubuntu 16.04.
python== 3.5.6
pip 19.1.1
pkg-resources 0.0.0
setuptools 41.0.1
wheel 0.33.4
cycler==0.10.0
decorator==4.4.0
imageio==2.5.0
joblib==0.13.2
matplotlib==2.1.1
networkx==2.3
numpy==1.13.3
opencv-python==3.4.0.12
pandas==0.24.2
Pillow==6.0.0
pyparsing==2.4.0
python-dateutil==2.8.0
pytz==2019.1
PyWavelets==1.0.3
scikit-image==0.13.1
scikit-learn==0.21.1
scipy==1.0.0
six==1.12.0
torch==1.1.0
torchvision==0.2.2
from chexnet-with-localization.
If I use torchvision 0.2.0 and torch==1.0.1 I get the following error.
warn("The default mode, 'constant', will be changed to 'reflect' in "
0
Traceback (most recent call last):
File "denseNet_localization.py", line 76, in <module>
model = DenseNet121(8).cuda()
File "denseNet_localization.py", line 65, in __init__
self.densenet121 = torchvision.models.densenet121(pretrained=True)
File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 26, in densenet121
**kwargs)
File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 142, in __init__
bn_size=bn_size, growth_rate=growth_rate, drop_rate=drop_rate)
File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 98, in __init__
layer = _DenseLayer(num_input_features + i * growth_rate, growth_rate, bn_size, drop_rate)
File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 77, in __init__
self.add_module('norm.1', nn.BatchNorm2d(num_input_features)),
File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 180, in add_module
raise KeyError("module name can't contain \".\"")
KeyError: 'module name can\'t contain "."'
So I have upgraded torchvision to 0.2.2. and torch==1.1.0. and my train went successful. When I try to run denseNet_localization.py file then I got the above error.
from chexnet-with-localization.
Ok, so it seems that the errors are just caused by the different version of packages.
from chexnet-with-localization.
I changed
module.densenet121.features.denseblock4.denselayer16.conv.2 to module.densenet121.features.denseblock4.denselayer16.conv2
but still have same problem.
What should I do ... ??
I'm using
torch (1.0.1.post2)
torchvision (0.2.2.post3)
File "denseNet_localization.py", line 247, in <module>
output = gcam.generate(target_layer="module.densenet121.features.denseblock4.denselayer16.conv2")
File "denseNet_localization.py", line 211, in generate
fmaps = self._find(self.all_fmaps, target_layer)
File "denseNet_localization.py", line 199, in _find
raise ValueError('Invalid layer name: {}'.format(target_layer))
ValueError: Invalid layer name: module.densenet121.features.denseblock4.denselayer16.conv2```
from chexnet-with-localization.
I changed
module.densenet121.features.denseblock4.denselayer16.conv.2 to module.densenet121.features.denseblock4.denselayer16.conv2
but still have same problem.
What should I do ... ??I'm using
torch (1.0.1.post2)
torchvision (0.2.2.post3)File "denseNet_localization.py", line 247, in <module> output = gcam.generate(target_layer="module.densenet121.features.denseblock4.denselayer16.conv2") File "denseNet_localization.py", line 211, in generate fmaps = self._find(self.all_fmaps, target_layer) File "denseNet_localization.py", line 199, in _find raise ValueError('Invalid layer name: {}'.format(target_layer)) ValueError: Invalid layer name: module.densenet121.features.denseblock4.denselayer16.conv2```
have you solved this problem? I'm facing the same issue.
from chexnet-with-localization.
I changed
module.densenet121.features.denseblock4.denselayer16.conv.2 to module.densenet121.features.denseblock4.denselayer16.conv2
but still have same problem.
What should I do ... ??
I'm using
torch (1.0.1.post2)
torchvision (0.2.2.post3)File "denseNet_localization.py", line 247, in <module> output = gcam.generate(target_layer="module.densenet121.features.denseblock4.denselayer16.conv2") File "denseNet_localization.py", line 211, in generate fmaps = self._find(self.all_fmaps, target_layer) File "denseNet_localization.py", line 199, in _find raise ValueError('Invalid layer name: {}'.format(target_layer)) ValueError: Invalid layer name: module.densenet121.features.denseblock4.denselayer16.conv2```
have you solved this problem? I'm facing the same issue.
from chexnet-with-localization.
If I use torchvision 0.2.0 and torch==1.0.1 I get the following error.
warn("The default mode, 'constant', will be changed to 'reflect' in " 0 Traceback (most recent call last): File "denseNet_localization.py", line 76, in <module> model = DenseNet121(8).cuda() File "denseNet_localization.py", line 65, in __init__ self.densenet121 = torchvision.models.densenet121(pretrained=True) File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 26, in densenet121 **kwargs) File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 142, in __init__ bn_size=bn_size, growth_rate=growth_rate, drop_rate=drop_rate) File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 98, in __init__ layer = _DenseLayer(num_input_features + i * growth_rate, growth_rate, bn_size, drop_rate) File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 77, in __init__ self.add_module('norm.1', nn.BatchNorm2d(num_input_features)), File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 180, in add_module raise KeyError("module name can't contain \".\"") KeyError: 'module name can\'t contain "."'
So I have upgraded torchvision to 0.2.2. and torch==1.1.0. and my train went successful. When I try to run denseNet_localization.py file then I got the above error.
Hello @rajdeinno how did u solve this error please healp me in this regard.
Thanks @rajdeinno
from chexnet-with-localization.
If I use torchvision 0.2.0 and torch==1.0.1 I get the following error.
warn("The default mode, 'constant', will be changed to 'reflect' in " 0 Traceback (most recent call last): File "denseNet_localization.py", line 76, in <module> model = DenseNet121(8).cuda() File "denseNet_localization.py", line 65, in __init__ self.densenet121 = torchvision.models.densenet121(pretrained=True) File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 26, in densenet121 **kwargs) File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 142, in __init__ bn_size=bn_size, growth_rate=growth_rate, drop_rate=drop_rate) File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 98, in __init__ layer = _DenseLayer(num_input_features + i * growth_rate, growth_rate, bn_size, drop_rate) File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torchvision/models/densenet.py", line 77, in __init__ self.add_module('norm.1', nn.BatchNorm2d(num_input_features)), File "/home/administrator/Desktop/Projects/xray/chexnet/setup3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 180, in add_module raise KeyError("module name can't contain \".\"") KeyError: 'module name can\'t contain "."'
So I have upgraded torchvision to 0.2.2. and torch==1.1.0. and my train went successful. When I try to run denseNet_localization.py file then I got the above error.
Hello @rajdeinno how did u solve this error please healp me in this regard.
Thanks @rajdeinno
check this.
#7 (comment)
from chexnet-with-localization.
Hi Tang, I am able to generate the bound_box.txt file after I execute the denseNet_localization.pyfile. how to visualize the bound box text file into the input image? as you mentioned in ground-truth label (red) and its prediction (blue). Thanks in advance.. Please assist me on this..
…
Sent from my iPhone
On 28-May-2019, at 17:57, T.H. Tang @.***> wrote: It seem that the errors are just caused by the different version of packages. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
@rajdeinno hello sir after generating BB file how you print BB on that image with heatmap of that image?
Pleae help
from chexnet-with-localization.
Related Issues (20)
- Hello, What license is your project? HOT 1
- the format of the input data HOT 1
- Localization Eval Metric Definition&&Code Wanted. HOT 1
- Heatmap Visualization of HOT 2
- avg_size array in denseNet_Localization.py HOT 4
- Weights not used in training batch HOT 3
- About BBox_List_2017.csv
- ModuleNotFoundError: No module named 'judger_medical' HOT 1
- How to remove the memory problem?
- Error in During testing the model need the number of output to perform testing? HOT 1
- issue
- list out of index issue arise in preprocessing.py
- How to run find_bbox_size.py?
- where's thresholds.npy come from? HOT 5
- loading non existent file 'train_X_small.npy' HOT 4
- ValueError: Target and input must have the same number of elements HOT 2
- How to run this on a single image ? HOT 2
- How to do inference using this model? HOT 12
- how to visualise the bounding_box.txt file in an image? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chexnet-with-localization.