megvii-research / MOTR

[ECCV2022] MOTR: End-to-End Multiple-Object Tracking with TRansformer
Other
622 stars 92 forks source link

GT Boxes #56

Open EddieEduardo opened 2 years ago

EddieEduardo commented 2 years ago

Hi, thanks for sharing the codes, but I am confused about the bbox foramt as follows: in dataset/joint.py/class DetMOTDetection:--> """ def _pre_single_frame(self, idx: int):

**if osp.isfile(label_path): labels0 = np.loadtxt(label_path, dtype=np.float32).reshape(-1, 6)

        # normalized cewh to pixel xyxy format
        labels = labels0.copy()
        labels[:, 2] = w * (labels0[:, 2] - labels0[:, 4] / 2)
        labels[:, 3] = h * (labels0[:, 3] - labels0[:, 5] / 2)
        labels[:, 4] = w * (labels0[:, 2] + labels0[:, 4] / 2)
        labels[:, 5] = h * (labels0[:, 3] + labels0[:, 5] / 2)**

The dataset I am using is MOT17, it seems that the bboxes format that GT files provide are (x,y,w,h), but here in the above func, the gt boxes are used as (center_x,center_y,w,h), I am not sure if there is something wrong with it ?

EddieEduardo commented 2 years ago

Hi, after training, I tested the models with my own dataset which has the same format as MOT17 using the weights I trained, but no results are output, please see below: (base) [root@node02 MOTR-main]# python3 submit.py \

--meta_arch motr \
--dataset_file e2e_joint \
--epoch 50 \
--with_box_refine \
--lr_drop 35 \
--lr 2e-4 \
--lr_backbone 2e-5 \
--pretrained exps/e2e_motr_r50_joint/checkpoint0049.pth \
--output_dir exps/e2e_motr_r50_joint \
--batch_size 1 \
--sample_mode 'random_interval' \
--sample_interval 10 \
--sampler_steps 50 90 150 \
--sampler_lengths 2 3 4 5 \
--update_query_pos \
--merger_dropout 0 \
--dropout 0 \
--random_drop 0.1 \
--fp_ratio 0.3 \
--query_interaction_layer 'QIM' \
--extra_track_attn \
--data_txt_path_train ./datasets/data_path/mot17.train \
--data_txt_path_val ./datasets/data_path/mot17.test \
--resume exps/e2e_motr_r50_joint/checkpoint0049.pth \
--exp_name pub_submit_17

Training with Extra Self Attention in Every Decoder. Training with Self-Cross Attention. loaded exps/e2e_motr_r50_joint/checkpoint0049.pth 0%| | 0/405 [00:00<?, ?it/s]/root/Documents/MOTR-main/models/position_encoding.py:51: UserWarning: floordiv is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). dim_t = self.temperature * (2 (dim_t // 2) / self.num_pos_feats) /root/anaconda3/envs/base/lib/python3.10/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1646755897462/work/aten/src/ATen/native/TensorShape.cpp:2228.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 405/405 [00:26<00:00, 15.23it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 755/755 [00:58<00:00, 12.95it/s] totally 0 dts 0 occlusion dts 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1262/1262 [01:41<00:00, 12.38it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 282/282 [00:22<00:00, 12.38it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 272/272 [00:21<00:00, 12.61it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 363/363 [00:24<00:00, 14.80it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 444/444 [00:32<00:00, 13.77it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 758/758 [00:58<00:00, 12.87it/s] totally 0 dts 0 occlusion dts 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2508/2508 [03:07<00:00, 13.36it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 454/454 [00:32<00:00, 13.86it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 718/718 [00:53<00:00, 13.41it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 238/238 [00:17<00:00, 13.97it/s] totally 0 dts 0 occlusion dts 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 764/764 [01:03<00:00, 11.99it/s] totally 0 dts 0 occlusion dts copy reuslts for same sequences:

Could anyone tell me where I should fix up to solve this issue? Thanks a lot !!!!!!

gracebae0123 commented 1 year ago

have you figured it out? I'm getting the same result

carpeug commented 1 year ago

the same. have you found a solution? @gracebae0123 @EddieEduardo