Comments (7)
LBB is the ground truth, which should be not have too many bounding boxes. For PBB, we typically use threshold to remove bounding boxes of small probabilities. After that, we use NMS to further reduce some overlapped bounding boxes. You can find them in the evaluationScript/frocwrtdetpepchluna16.py
from deeplung.
Thanks,
While running training using:
#!/bin/bash
set -e
# python prepare.py
cd detector
maxeps=150
f=9
CUDA_VISIBLE_DEVICES=0,1
/usr/bin/python3.5 main.py --model res18 -b 4 --save-dir res18/retrft96$f/ --epochs $maxeps --config config_training$f
I get:
RuntimeError: dimension specified as -1 but tensor has no dimensions
The faulty line is here:
def hard_mining(neg_output, neg_labels, num_hard):
print('neg_output: {}'.format(len(neg_output)))
print('num_hard: {}'.format((num_hard)))
_, idcs = torch.topk(neg_output, min(num_hard, len(neg_output)))
neg_output = torch.index_select(neg_output, 0, idcs)
neg_labels = torch.index_select(neg_labels, 0, idcs)
return neg_output, neg_labels
Full stack:
Train phase
Batch size: 4
neg_output: 0
num_hard: 8
Traceback (most recent call last):
File "main.py", line 402, in <module>
main()
File "main.py", line 212, in main
train(train_loader, net, loss, epoch, optimizer, get_lr, args.save_freq, save_dir)
File "main.py", line 234, in train
loss_output = loss(output, target)
File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 357, in __call__
result = self.forward(*input, **kwargs)
File "/home/shlomo/db/dev/baidu-2018/detector/layers.py", line 182, in forward
neg_output, neg_labels = hard_mining(neg_output, neg_labels, self.num_hard * batch_size)
File "/home/shlomo/db/dev/baidu-2018/detector/layers.py", line 153, in hard_mining
_, idcs = torch.topk(neg_output, min(num_hard, len(neg_output)))
RuntimeError: dimension specified as -1 but tensor has no dimensions
from deeplung.
Hi,
I understand that For PBB, you use threshold to remove bounding boxes of small probabilities and after that you use NMS to further reduce some overlapped bounding boxes. however, even running NMS on a single PBB take few hours and it does not finish.
Is this the expected behavior?
How come each BB has 2.5 Million entries?
Thanks!
from deeplung.
You need to first remove box with small probability, that is detp in ./evaluationScript/frocwrtdetpepchluna16.py
If there are many boxes left, try to use bigger detp.
After it, use NMS. If there are many boxes left before NMS, you need to increase your threshold for removing boxes.
from deeplung.
For your last question, I have told you to debug and check #4
from deeplung.
@wentaozhu curious!!!
In code ./evaluationScript/frocwrtdetpepchluna16.py, function convertcsv
what is the range of the pbb[pbb[:,0]? How can i decide detp value?
from deeplung.
Typically, you can set as -2, -1.5 or -1
from deeplung.
Related Issues (20)
- AttributeError: 'str' object has no attribute 'shape' HOT 2
- How does this network determine the candidate ? HOT 1
- Preprocessing HOT 1
- noduleCADEvaluationLUNA16compare error HOT 5
- For faster NMS HOT 11
- Reducing training image size HOT 3
- .
- How to train a dpn detector HOT 5
- Why ConCatenate the cropped nodule pixel in the nodule classification? HOT 3
- Pretrained weights gets changed after importing weights from Pytorch to ONNX. HOT 1
- Is there a lack of false positive reduction stages in the code? HOT 1
- FROC value is very low for subset09 LUNA16 dataset HOT 2
- question about fuction and parameter HOT 3
- About cross-validation
- FROC curve
- ‘>‘ not supported between instances of ‘NoneType‘ and ‘int‘
- Not understanding the inputs to the pretrained model
- About config_training file
- Bug report and possible fix solution HOT 1
- det2cls.py
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 deeplung.