GithubHelp home page GithubHelp logo

thtang / chexnet-with-localization Goto Github PK

View Code? Open in Web Editor NEW
314.0 14.0 108.0 178.38 MB

Weakly Supervised Learning for Findings Detection in Medical Images

Home Page: https://www.csie.ntu.edu.tw/~yvchen/f106-adl/doc/HTCMedical.pdf

License: GNU General Public License v3.0

Python 100.00%
chexnet densenet nih chest-xray-images chestxray14 weakly-supervised-learning pytorch bounding-boxes medical-imaging chest-x-ray8

chexnet-with-localization's Introduction

Hi there 👋

chexnet-with-localization's People

Contributors

mhfu0 avatar thtang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chexnet-with-localization's Issues

issue

Traceback (most recent call last):
File "/content/CheXNet-with-localization/preprocessing.py", line 11, in
image_folder_path = sys.argv[1] # folder contain all images
IndexError: list index out of range

Error in During testing the model need the number of output to perform testing?

I am running test file to validate the results.
The data loaded and preprocess sucessfully and when I load model with out_size as given in code to 8 its says the below erorr?
What is the solution?
Did the code need to update?
or model in the Pytorch are missing something.

File "C:\ProgramData\Anaconda3\envs\chest-loc\lib\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 "C:\ProgramData\Anaconda3\envs\chest-loc\lib\site-packages\torchvision\models\densenet.py", line 77, in init self.add_module('norm.1', nn.BatchNorm2d(num_input_features)), File "C:\ProgramData\Anaconda3\envs\chest-loc\lib\site-packages\torch\nn\modules\module.py", line 178, in add_module raise KeyError("module name can't contain "."") KeyError: 'module name can't contain "."'
Help me in this regard.
Thanks
@thtang

About BBox_List_2017.csv

Hello, I want to train my own data using your weakly supervised net, however, while preparing the necessary files, I'm in trouble of creating my own BBox_List_2017.csv ,cause I have about 2000 labels to calculate these four values : x y w h, my thought on this at present is that maybe I could read the xml files and automatically calculate those four values, then put them in the csv file. But It's so hard to find the algorithm to complete this requirement.

I'm wondering what is your measure to finish the BBox_List_2017.csv. Could you please give me some advice on this? I would appreciate that a lot!

Invalid layer name: module.densenet121.features.denseblock4.denselayer16.conv.2

Hi,

I got the below error while running denseNet_localization.py file.

Traceback (most recent call last):
  File "/media/administrator/D/XRay/CheXnet_Demo/denseNet_localization.py", line 227, in <module>
    output = gcam.generate(target_layer="module.densenet121.features.denseblock4.denselayer16.conv.2")
  File "/media/administrator/D/XRay/CheXnet_Demo/denseNet_localization.py", line 186, in generate
    fmaps = self._find(self.all_fmaps, target_layer)
  File "/media/administrator/D/XRay/CheXnet_Demo/denseNet_localization.py", line 174, in _find
    raise ValueError('Invalid layer name: {}'.format(target_layer))
ValueError: Invalid layer name: module.densenet121.features.denseblock4.denselayer16.conv.2

any help would be really appriciated.. Thanks in advance..

list out of index issue arise in preprocessing.py

Traceback (most recent call last):
File "/content/CheXNet-with-localization/preprocessing.py", line 11, in
image_folder_path = sys.argv[1] # folder contain all images
IndexError: list index out of range
any sloution??

how to visualise the bounding_box.txt file in an image?

I am able to generate the bound_box.txt file after I execute the denseNet_localization.py file.

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..

where's thresholds.npy come from?

Hi, i found you using different thresholds for each class, this seems interesting.
How did you generate the thresholds for each class? and why?

Localization Eval Metric Definition&&Code Wanted.

Recently I am working on reconstruct your work's localization part.
I fill up the Eval Part with Precision and Recall as eval metric.
But the I just can not get your report's result even with the boundingbox.txt you provided.
So I wonder if you could provide me with the Eval related code.
I promise for scientific research only.

How to run find_bbox_size.py?

Thank you very much for your project!
I am trying to run the find_bbox_size.py for obtaining IOU scores.

This is the annotation in the find_bbox_size.py.

Find the size of bounding boxes
Usage: python3 find_bbox_size.py <train_heatmap> <valid_heatmap>
<{train,valid}heatmap> contains .npy files named 'heatmap_.npy'
describing the heatmap of positive cases predicted by our model
files in <valid_heatmap> will only be used to calculate IOU scores
is the order of each validation image (in valid.txt)
is the disease class in alphabetical order (0-7)

Where to obtain <train_heatmap> <valid_heatmap>?
Follow your prompts,<{train,valid}heatmap> contains .npy files named 'heatmap_.npy'

I really hope to receive your answer!
Thanks!

How to remove the memory problem?

Hello, sir thanks for the repo. I have done image preprocessing. Now I want to train the network but as the memory dumped in preprocessing but still, I have been done it. In training, the system hanged and RAM memory is full, I have 64GB ram with 50GB+ paging (virtual ram).
Do you have any idea how to tackle this error?
@thtang Thanks for your concern

Weights not used in training batch

Hi! Thanks for this project. I noticed the weights for each training batch are not used. How did you incorporate them in training? I read in your report that your mean AUC ended up being better with them.

Heatmap Visualization of

Could anyone visualize the heatmap using GradCAM?

After changing the name in denseNet_localization.py module.densenet121.features.denseblock4.denselayer16.conv.2 to module.densenet121.features.denseblock4.denselayer16.conv2

It then returns Nan values for the heatmap.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.