question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I am facing the following error when I eval the pre-trained model on CityPersons dataset.

  File "./tools/test_city_person.py", line 230, in <module>
    main()
  File "./tools/test_city_person.py", line 222, in main
    MRs = validate('datasets/CityPersons/val_gt.json', args.out)
  File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_demo.py", line 13, in validate
    cocoEval = COCOeval(cocoGt, cocoDt, 'bbox')
  File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_MR_multisetup.py", line 76, in __init__
    self.params = Params(iouType=iouType) # parameters
  File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_MR_multisetup.py", line 525, in __init__
    self.setDetParams()
  File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_MR_multisetup.py", line 501, in setDetParams
    self.recThrs = np.linspace(.0, 1.00, np.round((1.00 - .0) / .01) + 1, endpoint=True)
  File "<__array_function__ internals>", line 6, in linspace
  File "/home/mingzhi/anaconda3/envs/pedestron/lib/python3.7/site-packages/numpy/core/function_base.py", line 113, in linspace
    num = operator.index(num)
TypeError: 'numpy.float64' object cannot be interpreted as an integer

When I train the model and eval my own trained models, I am having this problem: File "./tools/test_city_person.py", line 230, in <module> main() File "./tools/test_city_person.py", line 222, in main MRs = validate('datasets/CityPersons/val_gt.json', args.out) File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_demo.py", line 11, in validate cocoDt = cocoGt.loadRes(dt_path) File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/coco.py", line 313, in loadRes if 'caption' in anns[0]: IndexError: list index out of range

How can I solve the above two problems?? I know for the second one, it seems the model does not detect, but why?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
msha096commented, Sep 8, 2020

Numpy problem solution update: Just in case someone has the same problem with NumPy version. You could either downgrade NumPy to lower version (lower than 1.18) (I failed with this solution) To use with NumPy >=1.18, you could try pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'(this solution does not work for me but it works for someone using MMDetection)

The solution works for me is: LOC 501 of the file /Pedestron/tools/cityPerson/eval_MR_multisetup.py, change self.recThrs = np.linspace(.0, 1.00, np.round((1.00 - .0) / .01) + 1, endpoint=True) into self.recThrs = np.linspace(.0, 1.00, 101, endpoint=True)

Cheers

0reactions
123ddddcommented, Jan 16, 2022

Try 20-40 epochs.

The LR is too large for one GPU. And that is the reason. After reducing LR, I got around 22% MR on reasonable when I train 12 epochs. How many epochs did you train to get around 14% MR ?

Hi, could you pls show the config here? I also have to choose a small LR for the training, the default LR is large for one GPU case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple comparisons problem - Wikipedia
In statistics, the multiple comparisons, multiplicity or multiple testing problem occurs when one considers a set of statistical inferences simultaneously ...
Read more >
Multiple Testing Problem / Multiple Comparisons
This large number of false alarms produced when you run multiple hypothesis tests is called the multiple testing problem. (Or multiple comparisons problem)....
Read more >
1 Why is multiple testing a problem? 2 The Bonferroni correction
1 Why is multiple testing a problem? Say you have a set of hypotheses that you wish to test simultaneously. The first idea...
Read more >
Common pitfalls in statistical analysis: The perils of multiple ...
In this article, we look at the consequences of multiple testing and explore various methods to deal with this issue. Keywords: Biostatistics, data ......
Read more >
How to Avoid 7 Common Software-Testing Problems
There are seven common software testing issues that we see time and time again, each of which can be easily avoided. And it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found