Giter Club home page Giter Club logo

Comments (7)

wentaozhu avatar wentaozhu commented on August 18, 2024

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.

 avatar commented on August 18, 2024

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.

 avatar commented on August 18, 2024

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.

wentaozhu avatar wentaozhu commented on August 18, 2024

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.

wentaozhu avatar wentaozhu commented on August 18, 2024

For your last question, I have told you to debug and check #4

from deeplung.

blakeliu avatar blakeliu commented on August 18, 2024

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

wentaozhu avatar wentaozhu commented on August 18, 2024

Typically, you can set as -2, -1.5 or -1

from deeplung.

Related Issues (20)

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.