Testing problem
See original GitHub issueI 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:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
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)
intoself.recThrs = np.linspace(.0, 1.00, 101, endpoint=True)
Cheers
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.