Duankaiwen / CenterNet

Codes for our paper "CenterNet: Keypoint Triplets for Object Detection" .
MIT License
1.86k stars 384 forks source link

a test problem #50

Open ZhenLiuBuaa opened 5 years ago

ZhenLiuBuaa commented 5 years ago

hello, i run test.py ,but has a error this is the test error Traceback (most recent call last): File "test.py", line 99, in test(testing_db, args.split, args.testiter, args.debug, args.suffix) File "test.py", line 61, in test testing(db, nnet, result_dir, debug=debug) File "/home/lz/python/CenterNet/CenterNet-master/test/coco.py", line 321, in testing return globals()[system_configs.sampling_function](db, nnet, result_dir, debug=debug) File "/home/lz/python/CenterNet/CenterNet-master/test/coco.py", line 317, in kp_detection db.evaluate(result_json, cls_ids, image_ids) File "/home/lz/python/CenterNet/CenterNet-master/db/coco.py", line 176, in evaluate coco_dets = coco.loadRes(result_json) File "data/coco/PythonAPI/pycocotools/coco.py", line 318, in loadRes if 'caption' in anns[0]: IndexError: list index out of range

this is log cfg_file: config/CenterNet-104.json loading all datasets... split: minival loading from cache file: cache/coco_minival2014.pkl loading annotations into memory... Done (t=0.33s) creating index... index created! system config... {'batch_size': 2, 'cache_dir': 'cache', 'chunk_sizes': [2], 'config_dir': 'config', 'data_dir': './data', 'data_rng': <mtrand.RandomState object at 0x7f6dd59b9990>, 'dataset': 'MSCOCO', 'decay_rate': 10, 'display': 5, 'learning_rate': 0.00025, 'max_iter': 480000, 'nnet_rng': <mtrand.RandomState object at 0x7f6dd59b99d8>, 'opt_algo': 'adam', 'prefetch_size': 6, 'pretrain': None, 'result_dir': 'results', 'sampling_function': 'kp_detection', 'snapshot': 5000, 'snapshot_name': 'CenterNet-104', 'stepsize': 450000, 'test_split': 'testdev', 'train_split': 'trainval', 'val_iter': 500, 'val_split': 'minival', 'weight_decay': False, 'weight_decay_rate': 1e-05, 'weight_decay_type': 'l2'} db config... {'ae_threshold': 0.5, 'border': 128, 'categories': 80, 'data_aug': True, 'gaussian_bump': True, 'gaussian_iou': 0.7, 'gaussian_radius': -1, 'input_size': [511, 511], 'kp_categories': 1, 'lighting': True, 'max_per_image': 100, 'merge_bbox': False, 'nms_algorithm': 'exp_soft_nms', 'nms_kernel': 3, 'nms_threshold': 0.5, 'output_sizes': [[128, 128]], 'rand_color': True, 'rand_crop': True, 'rand_pushes': False, 'rand_samples': False, 'rand_scale_max': 1.4, 'rand_scale_min': 0.6, 'rand_scale_step': 0.1, 'rand_scales': array([0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2, 1.3]), 'special_crop': False, 'test_scales': [1], 'top_k': 70, 'weight_exp': 8} loading parameters at iteration: 480000 building neural network... module_file: models.CenterNet-104 total parameters: 210062960 loading parameters... loading model from cache/nnet/CenterNet-104/CenterNet-104_480000.pkl

thanks for your help

ZhenLiuBuaa commented 5 years ago

so,the output file results.json is a empty list

ZhenLiuBuaa commented 5 years ago

i made some change to this code I change the torch.backends.cudnn.benchmark = False for a train error I set the cuda devices = 1 i dont know weather the test problem is caused by these

ZhenLiuBuaa commented 5 years ago

i find in test process ,kp.py line 265, kp = kp_(inter) kp data is unnormal ,some value is bigger than 1e30 and inter data is right

ZhenLiuBuaa commented 5 years ago

this is kp data @Duankaiwen kp.txt

_

ZhenLiuBuaa commented 5 years ago

this is the test error Traceback (most recent call last): File "test.py", line 99, in test(testing_db, args.split, args.testiter, args.debug, args.suffix) File "test.py", line 61, in test testing(db, nnet, result_dir, debug=debug) File "/home/lz/python/CenterNet/CenterNet-master/test/coco.py", line 321, in testing return globals()[system_configs.sampling_function](db, nnet, result_dir, debug=debug) File "/home/lz/python/CenterNet/CenterNet-master/test/coco.py", line 317, in kp_detection db.evaluate(result_json, cls_ids, image_ids) File "/home/lz/python/CenterNet/CenterNet-master/db/coco.py", line 176, in evaluate coco_dets = coco.loadRes(result_json) File "data/coco/PythonAPI/pycocotools/coco.py", line 318, in loadRes if 'caption' in anns[0]: IndexError: list index out of range

Duankaiwen commented 5 years ago

@ZhenLiuBuaa Sorry, i'm a little busy these days, so i did't reply to you immediately. Please put 'pdb.set_trace()' in line 93 in test/coco.py to make sure the images are read correctly.

ZhenLiuBuaa commented 5 years ago

Thanks for your reply.I think maybe the cudnn.benchmark value influence the model structure. The saved model is a little bigger than what you provided. Good luck to you.

发件人: Kaiwen Duan 发送时间: 2019年6月10日 20:19 收件人: Duankaiwen/CenterNet 抄送: ZhenLiuBuaa; Mention 主题: Re: [Duankaiwen/CenterNet] a test problem (#50)

@ZhenLiuBuaa Sorry, i'm a little busy these days, so i did't reply to you immediately. Please put 'pdb.set_trace()' in line 93 in test/coco.py to make sure the images are read correctly. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

yushanshan05 commented 5 years ago

@ZhenLiuBuaa I met the same problem. Can you telll me how to solve this problem. Thanks!

ZhenLiuBuaa commented 5 years ago

@ZhenLiuBuaa I met the same problem. Can you telll me how to solve this problem. Thanks!

i think if you want test the model,you should set cudnn.benchmark=True.if not ,you can train your model with cudnn.benchmark=False