lufficc / SSD

High quality, fast, modular reference implementation of SSD in PyTorch
MIT License
1.52k stars 384 forks source link

demo.py on COCO #186

Closed Keeping7 closed 3 years ago

Keeping7 commented 3 years ago

@lufficc Thank you for your patience in answering my previous questions. You say: vgg_ssd512_coco_trainval35k: 4 GPU, about 2 days, 0:12:19 vgg_ssd300_coco_trainval35k: 2 GPU, about 1 day, 10:14:12 Under this training time, the machine used is GTX1080Ti? TITAN Xp? or any others?

However, I meet a new issue. demo.py in this repository is only supported by VOC benchmark? When I run demo.py on COCO benchmark, it makes the following mistakes:

(0001/0001) 000000039551.jpg: objects 02 | load 015ms | inference 1078ms | FPS 1 Traceback (most recent call last): File "E:/Try/demo.py", line 123, in main() File "E:/Try/demo.py", line 114, in main run_demo(cfg=cfg, File "C:\Users\YG\anaconda3\lib\site-packages\torch\autograd\grad_mode.py", line 15, in decorate_context return func(*args, **kwargs) File "E:/Try/demo.py", line 73, in run_demo drawn_image = draw_boxes(image, boxes, labels, scores, class_names).astype(np.uint8) File "C:\Users\YG\anaconda3\lib\site-packages\vizer\draw.py", line 92, in draw_boxes class_name = class_name_map[this_class] if class_name_map is not None else str(this_class) IndexError: tuple index out of range

How should I do it? I need your help. Thank you very much.

lufficc commented 3 years ago
  1. TITAN Xp
  2. You should set dataset_type to coco: https://github.com/lufficc/SSD/blob/master/demo.py#L90