Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Almost results are Zero. #30

Closed
kimna4 opened this issue Aug 13, 2018 · 16 comments
Closed

Almost results are Zero. #30

kimna4 opened this issue Aug 13, 2018 · 16 comments

Comments

@kimna4
Copy link

kimna4 commented Aug 13, 2018

Hello, I tried run your code using "ssd_vgg16_train_voc.yml"

But, almost results are zero and doesn't increase.

=======================================================
AP for aeroplane = 0.0000
AP for bicycle = 0.0000
AP for bird = 0.0000
AP for boat = 0.0000
AP for bottle = 0.0000
AP for bus = 0.0000
AP for car = 0.0000
AP for cat = 0.0000
AP for chair = 0.0000
AP for cow = 0.0000
AP for diningtable = 0.0000
AP for dog = 0.0000
AP for horse = 0.0000
AP for motorbike = 0.0000
AP for person = 0.0001
AP for pottedplant = 0.0003
AP for sheep = 0.0000
AP for sofa = 0.0000
AP for train = 0.0000
AP for tvmonitor = 0.0000
Mean AP = 0.0000

Results:
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000

================================================

Above result are printed at epoch 5.
Although the number epoch is too low, there are problems.
Please tell me the way to fix these problems if you know.

Thank you.

@shufanwu
Copy link

I met the same problem and i have trained the model nearly 700 epoch for 300 images with batch size 32

@cvtower
Copy link

cvtower commented Oct 12, 2018

The same problem met.

@anjandeepsahni
Copy link

Any solutions yet for this issue?

@kimna4
Copy link
Author

kimna4 commented Oct 24, 2018

I use another SSD code (https://github.com/qijiezhao/pytorch-ssd) instead of this code.
With this code, I can meet the performance which written at SSD paper.

@cvtower
Copy link

cvtower commented Oct 24, 2018

I use another SSD code (https://github.com/qijiezhao/pytorch-ssd) instead of this code.
With this code, I can meet the performance which written at SSD paper.

Hi @kimna4 ,
Is the imagenet pretrained model needed to reproduce the performance,
Or training from scratch could also repfoduce?

Thanks very much for your help!

@kimna4
Copy link
Author

kimna4 commented Oct 25, 2018

Hi @cvtower ,

You can get the pretrained model from here ( https://github.com/amdegroot/ssd.pytorch ).
I think that the repository is a master code. So you can get a lot of information here.

Thank you

@1453042287
Copy link

i don't know why but i use the same model to finetune the BDD100K dataset, and i get a quite well result:
AP for bike = 0.2777
AP for bus = 0.4525
AP for car = 0.4817
AP for motor = 0.2510
AP for person = 0.2840
AP for rider = 0.2626
AP for traffic light = 0.1715
AP for traffic sign = 0.2024
AP for train = 0.0001
AP for truck = 0.4366
Mean AP = 0.2820

@cvtower
Copy link

cvtower commented Nov 21, 2018

i don't know why but i use the same model to finetune the BDD100K dataset, and i get a quite well result:
AP for bike = 0.2777
AP for bus = 0.4525
AP for car = 0.4817
AP for motor = 0.2510
AP for person = 0.2840
AP for rider = 0.2626
AP for traffic light = 0.1715
AP for traffic sign = 0.2024
AP for train = 0.0001
AP for truck = 0.4366
Mean AP = 0.2820

Hi,
This problem will be met when training from scratch, and the pre-trained model could almost reproduce the result.

@cvtower
Copy link

cvtower commented Nov 21, 2018

Hi all,

After checking the source code and cfg files, i found that the default .yml cfg file for most network contains only 'test' phase, that is no training will ever happen during default "training".
I could train from scratch normally now.

To solve this issue:

  1. modify the .yml file-add train into the phase list , and prepare corresponding datasets
  2. if you use pytorch 0.4.0 and met other errors, previous issues will provide solution.

@whuzs
Copy link

whuzs commented Mar 14, 2019

why i run the demo, it's none result?

ids, count = nms(boxes, scores, self.nms_thresh, self.top_k)
ValueError: not enough values to unpack (expected 2, got 0)

@blueardour
Copy link

@whuzs see #15 please

@blueardour
Copy link

@whuzs also try: add 'scores.size(0) == 0' in detection.py as follows:
scores = conf_scores[cl][c_mask]
if scores.size(0) == 0 or scores.dim() == 0:
continue

@qiaoyaya2011
Copy link

@cvtower hi, after i modify the .yml file-add train into the phase list ,i also meet the same problem.
AP for human0 = 0.0000
AP for head = 0.0000
AP for cloth = 0.0000
AP for fire = 0.0000
Mean AP = 0.0000

Results:
0.000
0.000
0.000
0.000
0.000

but torch version is 1.3.0

@qiaoyaya2011
Copy link

@cvtower i have solved it

@goodlixu
Copy link

@cvtower i have solved it

hello,
I met the same problem, can you tell me how did you solve this problem?

@foreverYoungGitHub
Copy link
Collaborator

I think the initialization weights in the master branch has some issues. That cause the problem for low AP when we train from scratch. But it should be fixed by the dev branch. Please try the code in the dev branch. Will close the issues for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants