Code Monkey home page Code Monkey logo

pytorch-django-chexnet's People

Contributors

smivv avatar

Stargazers

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

Watchers

 avatar  avatar

pytorch-django-chexnet's Issues

CUDA core dump

Settings:

python 3.6.3
pytorch 0.3.0.post4
django 2.0.1
cuda

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

Getting this insane error:

python manage.py runserver 0:8000
Performing system checks...

System check identified no issues (0 silenced).

You have 14 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.

January 31, 2018 - 04:06:50
Django version 2.0.1, using settings 'chexnetsite.settings'
Starting development server at http://0:8000/
Quit the server with CONTROL-C.
[31/Jan/2018 04:07:07] "GET / HTTP/1.1" 200 404
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1512386481460/work/torch/lib/THC/THCGeneral.c line=70 error=30 : unknown error
Internal Server Error: /handle
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ubuntu/chexnet/pytorch-chexnet/chexnetsite/views.py", line 26, in handle
pred = process([path])
File "/home/ubuntu/chexnet/pytorch-chexnet/classes/model.py", line 57, in process
model = DenseNet121(N_CLASSES).cuda()
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 216, in cuda
return self._apply(lambda t: t.cuda(device))
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 146, in _apply
module._apply(fn)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 146, in _apply
module._apply(fn)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 146, in _apply
module._apply(fn)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 152, in _apply
param.data = fn(param.data)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 216, in
return self._apply(lambda t: t.cuda(device))
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/_utils.py", line 69, in cuda
return new_type(self.size()).copy
(self, async)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/cuda/init.py", line 358, in _lazy_new
_lazy_init()
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/cuda/init.py", line 121, in _lazy_init
torch._C._cuda_init()
RuntimeError: cuda runtime error (30) : unknown error at /opt/conda/conda-bld/pytorch_1512386481460/work/torch/lib/THC/THCGeneral.c:70
[31/Jan/2018 04:07:18] "POST /handle HTTP/1.1" 500 146635
Segmentation fault (core dumped)

Running the network on test image

  1. How do I generate heatmap?

  2. how do I interpret the results? I ran one on this image (xray with nodules detected) and got this result:

[ { "Atelectasis":0.49452733993530273 }, { "Cardiomegaly":0.6072946786880493 }, { "Effusion":0.5043863654136658 }, { "Infiltration":0.6327313780784607 }, { "Mass":0.4583894908428192 }, { "Nodule":0.3783107101917267 }, { "Pneumonia":0.565626323223114 }, { "Pneumothorax":0.46577414870262146 }, { "Consolidation":0.721723198890686 }, { "Edema":0.27183231711387634 }, { "Emphysema":0.6521075963973999 }, { "Fibrosis":0.3962574005126953 }, { "Pleural_Thickening":0.6883941292762756 }, { "Hernia":0.3340536057949066 } ]

How to deploy deep learning pytorch model with Django

hi,I would like to ask how to deploy the pytorch model using Django. When using import argpare in the model(code A),I can not unable to start manage.py .Prompt to enter parameters for calling function(code A).Can you tell me how to solve this problem. I am looking forward to your reply.Thank your!

Running ChexNet on normal chest x ray produces FALSE positive (pretty much every time)

False positives is everywhere.

I ran on few, such as this one: https://radiopaedia.org/cases/normal-chest-x-ray..

Results:

[ { "Atelectasis":0.513898491859436 }, { "Cardiomegaly":0.4632066786289215 }, { "Effusion":0.7996526956558228 }, { "Infiltration":0.3642980754375458 }, { "Mass":0.4949002265930176 }, { "Nodule":0.2438926249742508 }, { "Pneumonia":0.35062509775161743 }, { "Pneumothorax":0.2875746786594391 }, { "Consolidation":0.5513240098953247 }, { "Edema":0.4362095892429352 }, { "Emphysema":0.5255514979362488 }, { "Fibrosis":0.4974825382232666 }, { "Pleural_Thickening":0.38915345072746277 }, { "Hernia":0.5669712424278259 } ]

I ran on few other actual CXR with no known issues.. yet its' producing all kinds of false positives. Any ideas where I might be going wrong?

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.