xingyizhou / CenterTrack

Simultaneous object detection and tracking using center points.
MIT License
2.38k stars 526 forks source link

MOT17_fulltrain TEST error, but train is ok, half_train and test is also ok. #107

Closed MillionaireChen closed 4 years ago

MillionaireChen commented 4 years ago

(pytorch13_py37) @abc01-Super-Server:~/CenterTrack/CenterTrack-master/src$ python test.py tracking --exp_id mot17_fulltrain --dataset mot --dataset_version 17test --pre_hm --ltrb_amodal --track_thresh 0.4 --pre_thresh 0.5 --resume Using tensorboardX /home/共享文件/anaconda3/envs/pytorch13_py37/lib/python3.7/site-packages/sklearn/utils/linearassignment.py:21: DeprecationWarning: The linearassignment module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead. DeprecationWarning) Running tracking Using tracking threshold for out threshold! 0.4 Fix size testing. training chunk_sizes: [16] input h w: 544 960 heads {'hm': 1, 'reg': 2, 'wh': 2, 'tracking': 2, 'ltrb_amodal': 4} weights {'hm': 1, 'reg': 1, 'wh': 0.1, 'tracking': 1, 'ltrb_amodal': 0.1} head conv {'hm': [256], 'reg': [256], 'wh': [256], 'tracking': [256], 'ltrb_amodal': [256]} Namespace(K=100, add_05=False, amodel_offset_weight=1, arch='dla_34', aug_rot=0, backbone='dla34', batch_size=16, chunk_sizes=[16], custom_dataset_ann_path='', custom_dataset_img_path='', data_dir='/homeCenterTrack/CenterTrack-master/src/lib/../../data', dataset='mot', dataset_version='17test', debug=0, debug_dir='/home/CenterTrack/CenterTrack-master/src/lib/../../exp/tracking/mot17_fulltrain/debug', debugger_theme='white', demo='', dense_reg=1, dep_weight=1, depth_scale=1, dim_weight=1, dla_node='dcn', down_ratio=4, efficient_level=0, eval_val=False, exp_dir='/home/CenterTrack/CenterTrack-master/src/lib/../../exp/tracking', exp_id='mot17_fulltrain', fix_res=True, fix_short=-1, flip=0.5, flip_test=False, fp_disturb=0, gpus=[0], gpus_str='0', head_conv={'hm': [256], 'reg': [256], 'wh': [256], 'tracking': [256], 'ltrb_amodal': [256]}, head_kernel=3, heads={'hm': 1, 'reg': 2, 'wh': 2, 'tracking': 2, 'ltrb_amodal': 4}, hm_disturb=0, hm_hp_weight=1, hm_weight=1, hp_weight=1, hungarian=False, ignore_loaded_cats=[], input_h=544, input_res=960, input_w=960, keep_res=False, kitti_split='3dop', load_model='/home/CenterTrack/CenterTrack-master/src/lib/../../exp/tracking/mot17_fulltrain/model_last.pth', load_results='', lost_disturb=0, lr=0.000125, lr_step=[60], ltrb=False, ltrb_amodal=True, ltrb_amodal_weight=0.1, ltrb_weight=0.1, map_argoverse_id=False, master_batch_size=16, max_age=-1, max_frame_dist=3, model_output_list=False, msra_outchannel=256, neck='dlaup', new_thresh=0.4, nms=False, no_color_aug=False, no_pause=False, no_pre_img=False, non_block_test=False, not_cuda_benchmark=False, not_idaup=False, not_max_crop=False, not_prefetch_test=False, not_rand_crop=False, not_set_cuda_env=False, not_show_bbox=False, not_show_number=False, num_classes=1, num_epochs=70, num_head_conv=1, num_iters=-1, num_layers=101, num_stacks=1, num_workers=4, nuscenes_att=False, nuscenes_att_weight=1, off_weight=1, optim='adam', out_thresh=0.4, output_h=136, output_res=240, output_w=240, pad=31, pre_hm=True, pre_img=True, pre_thresh=0.5, print_iter=0, prior_bias=-4.6, public_det=False, qualitative=False, reg_loss='l1', reset_hm=False, resize_video=False, resume=True, reuse_hm=False, root_dir='/home/CenterTrack/CenterTrack-master/src/lib/../..', rot_weight=1, rotate=0, same_aug_pre=False, save_all=False, save_dir='/home/CenterTrack/CenterTrack-master/src/lib/../../exp/tracking/mot17_fulltrain', save_framerate=30, save_img_suffix='', save_imgs=[], save_point=[90], save_results=False, save_video=False, scale=0, seed=317, shift=0, show_track_color=False, skip_first=-1, tango_color=False, task='tracking', test=False, test_dataset='mot', test_focal_length=-1, test_scales=[1.0], track_thresh=0.4, tracking=True, tracking_weight=1, trainval=False, transpose_video=False, use_kpt_center=False, use_loaded_results=False, val_intervals=10000, velocity=False, velocity_weight=1, video_h=512, video_w=512, vis_gt_bev='', vis_thresh=0.3, weights={'hm': 1, 'reg': 1, 'wh': 0.1, 'tracking': 1, 'ltrb_amodal': 0.1}, wh_weight=0.1, zero_pre_hm=False, zero_tracking=False) Using MOT 17 17test ann_file test.json ==> initializing val data from /home/CenterTrack/CenterTrack-master/src/lib/../../data/mot17/annotations/test.json, images from /home/CenterTrack/CenterTrack-master/src/lib/../../data/mot17/test ... loading annotations into memory... Done (t=0.04s) creating index... index created! Creating video index! Loaded MOT 17test val 15948 samples Creating model... Using node type: (<class 'model.networks.dla.DeformConv'>, <class 'model.networks.dla.DeformConv'>) Warning: No ImageNet pretrain!! loaded /home/CenterTrack/CenterTrack-master/src/lib/../../exp/tracking/mot17_fulltrain/model_last.pth, epoch 70 mot17_fulltrainTraceback (most recent call last): File "test.py", line 194, in prefetch_test(opt) File "test.py", line 87, in prefetch_test for ind, (img_id, pre_processed_images) in enumerate(data_loader): File "/home/共享文件/anaconda3/envs/pytorch13_py37/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next return self._process_data(data) File "/home/共享文件/anaconda3/envs/pytorch13_py37/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data data.reraise() File "/home/共享文件/anaconda3/envs/pytorch13_py37/lib/python3.7/site-packages/torch/_utils.py", line 385, in reraise raise self.exc_type(msg) AttributeError: Caught AttributeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/anaconda3/envs/pytorch13_py37/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/home/anaconda3/envs/pytorch13_py37/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/anaconda3/envs/pytorch13_py37/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "test.py", line 40, in getitem calib = img_info['calib'] if 'calib' in img_info else self.get_default_calib(image.shape[1], image.shape[0]) AttributeError: 'NoneType' object has no attribute 'shape'

Thanks the awsome works you have done!

MillionaireChen commented 4 years ago

sorry ,my bad. The reason why this error appears is that the test set of "mot17_fulltrain" is all the train set. Such that if this error appears, all you have to do is:

  1. cd ../../data/mot17
  2. cp -r train/. test and then, everything is going to be ok. (this works for me).But the preconditions is that "mot17_halftrain","mot17_halftest" and "mot17_fulltrain" run in a correct way.