From 717c5cc8e6485ae8a45aa31bd856fe44734a363a Mon Sep 17 00:00:00 2001 From: Jingwei Zhang Date: Tue, 13 Sep 2022 16:07:58 +0800 Subject: [PATCH] Update docs about PrDiMP and make small changes about PrDiMP (#720) * release prdimp docs and models * fix a potential bug * update docs * update docs * add mefafile.yml * update README.md in homepage * update model_zoo.md * Update README.md * Update README.md * Update model_zoo.md * Update model-index.yml * add metafile.yml * merge from dev-1.x * Update README.md Co-authored-by: Tao Gong --- README.md | 4 +- configs/sot/prdimp/README.md | 117 ++++++++++++++++++ configs/sot/prdimp/metafile.yml | 62 ++++++++++ configs/sot/stark/README.md | 10 +- docs/en/model_zoo.md | 32 ++--- mmtrack/models/sot/prdimp.py | 6 +- mmtrack/models/track_heads/prdimp_cls_head.py | 32 ++++- model-index.yml | 1 + setup.cfg | 2 +- 9 files changed, 239 insertions(+), 27 deletions(-) create mode 100644 configs/sot/prdimp/README.md create mode 100644 configs/sot/prdimp/metafile.yml diff --git a/README.md b/README.md index afd427f3b..a26a55210 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ The master branch works with **PyTorch1.6+**. ## What's New -Release [Mask2Former](configs/vis/mask2former) pretrained models. +Release [Mask2Former](configs/vis/mask2former) and [PrDiMP](configs/sot/prdimp) pretrained models. v1.0.0rc0 was released in 31/08/2022. Please refer to [changelog.md](docs/en/changelog.md) for details and release history. @@ -137,8 +137,8 @@ Supported Datasets Supported Methods - [x] [SiameseRPN++](configs/sot/siamese_rpn) (CVPR 2019) +- [x] [PrDiMP](configs/sot/prdimp) (CVPR2020) - [x] [STARK](configs/sot/stark) (ICCV 2021) -- [ ] [PrDiMP](https://arxiv.org/abs/2003.12565) (CVPR2020) (WIP) Supported Datasets diff --git a/configs/sot/prdimp/README.md b/configs/sot/prdimp/README.md new file mode 100644 index 000000000..389a1032b --- /dev/null +++ b/configs/sot/prdimp/README.md @@ -0,0 +1,117 @@ +# Probabilistic Regression for Visual Tracking + +## Abstract + + + +Visual tracking is fundamentally the problem of regressing the state of the target in each video frame. While significant progress has been achieved, trackers are still prone to failures and inaccuracies. It is therefore crucial to represent the uncertainty in the target estimation. Although current prominent paradigms rely on estimating a state-dependent confidence score, this value lacks a clear probabilistic interpretation, complicating its use. +In this work, we therefore propose a probabilistic regression formulation and apply it to tracking. Our network predicts the conditional probability density of the target state given an input image. Crucially, our formulation is capable of modeling label noise stemming from inaccurate annotations and ambiguities in the task. The regression network is trained by minimizing the Kullback-Leibler divergence. When applied for tracking, our formulation not only allows a probabilistic representation of the output, but also substantially improves the performance. Our tracker sets a new state-of-the-art on six datasets, achieving 59.8% AUC on LaSOT and 75.8% Success on TrackingNet. The code and models are available at [this https URL](https://github.com/visionml/pytracking). + + + +
+ +
+ +## Citation + + + +```latex +@inproceedings{Danelljan2020Probabilistic, + title={Probabilistic Regression for Visual Tracking}, + author={Danelljan, Martin and Van Gool, Luc and Timofte, Radu}, + booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision}, + year={2020} +} +``` + +## Results and models + +### LaSOT + +We provide the last-epoch model with its configuration and training log. + +| Method | Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | Success | Norm precision | Precision | Config | Download | +| :----: | :------: | :---: | :-----: | :------: | :------------: | :-----: | :------------: | :-------: | :------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| PrDiMP | R-50 | - | 50e | 13.9 | - | 59.7 | 67.7 | 60.5 | [config](prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot.py) | [model](https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200-b7dbeca4.pth) \| [log](https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200.json) | + +### TrackingNet + +The last-epoch model on LaSOT is submitted to [the evaluation server on TrackingNet Challenge](https://eval.ai/web/challenges/challenge-page/1805/). We provide the model with its configuration and training log. + +| Method | Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | Success | Norm precision | Precision | Config | Download | +| :----: | :------: | :---: | :-----: | :------: | :------------: | :-----: | :------------: | :-------: | :------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| PrDiMP | R-50 | - | 50e | 13.9 | - | 75.2 | 80.5 | 70.1 | [config](prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-trackingnet.py) | [model](https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200-b7dbeca4.pth) \| [log](https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200.json) | + +### GOT10k + +The results of PrDiMP in GOT10k are reimplemented by ourselves. We only use the GOT10k train set to train the model, which is the common setting on GOT10k, while the setting on the PrDiMP paper is using the GOT10k, LaSOT, TrackingNet and coco to train the model. The result on our setting is lower about 1 than the original PrDiMP setting. The last-epoch model is submitted to [the evaluation server on GOT10k Challenge](http://got-10k.aitestunion.com/). We provide the model with its configuration and training log. + +| Method | Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | AO | SR0.5 | SR0.75 | Config | Download | +| :----: | :------: | :---: | :-----: | :------: | :------------: | :--: | :--------------: | :---------------: | :--------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| PrDiMP | R-50 | - | 50e | 13.9 | - | 62.9 | 72.5 | 52.8 | [config](prdimp_r50_8xb10-50e_got10k.py) | [model](https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k_20220907_173919-fa24df25.pth) \| [log](https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k_20220907_173919.json) | + +## Get started + +### 1. Training + +Due to the influence of parameters such as learning rate in default configuration file, we recommend using 8 GPUs for training in order to reproduce accuracy. The following is an example of training PrDiMP tested on LaSOT dataset. The model on GOT10k is similar like this. + +```shell +# Training PrDiMP on LaSOT、TrackingNet and coco dataset. +# The number after config file represents the number of GPUs used. Here we use 8 GPUs +./tools/dist_train.sh \ + configs/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot.py 8 +``` + +If you want to know about more detailed usage of `train.py/dist_train.sh/slurm_train.sh`, please refer to this [document](../../../docs/en/user_guides/4_train_test.md). + +### 2. Testing and evaluation + +**2.1 Example on LaSOT dataset** + +```shell +# Test PrDiMP on LaSOT testset +# The number after config file represents the number of GPUs used. Here we use 8 GPUs. +./tools/dist_test.sh \ + configs/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot.py 8 \ + --checkpoint ./checkpoints/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200-b7dbeca4.pth +``` + +**2.1 Example on TrackingNet and GOT10k datasets** + +If you want to get the results of the [TrackingNet](https://eval.ai/web/challenges/challenge-page/1805/) and [GOT10k](http://got-10k.aitestunion.com/), please use the following commands to generate result files that can be used for submission. You can modify the saved path in `test_evaluator` of the config. + +```shell +# Test PrDIMP on TrackingNet testset. +# The result is stored in `./results/prdimp_trackingnet.zip` by default. +# We use the lasot checkpoint on LaSOT to test on the TrackingNet. +# The number after config file represents the number of GPUs used. Here we use 8 GPUs. +./tools/dist_test.sh \ + configs/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-trackingnet.py 8 \ + --checkpoint ./checkpoints/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200-b7dbeca4.pth +``` + +```shell +# Test PrDiMP on GOT10k testset. +# The result is stored in `./results/prdimp_got10k.zip` by default. +# The number after config file represents the number of GPUs used. Here we use 8 GPUs. +./tools/dist_test.sh \ + configs/sot/prdimp/prdimp_r50_8xb10-50e_got10k.py 8 \ + --checkpoint ./checkpoints/prdimp_r50_8xb10-50e_got10k_20220907_173919-fa24df25.pth +``` + +### 3.Inference + +Use a single GPU to predict a video and save it as a video. + +```shell +python demo/demo_sot.py \ + configs/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot.py \ + --checkpoint ./checkpoints/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200-b7dbeca4.pth \ + --input demo/demo.mp4 \ + --output sot.mp4 +``` + +If you want to know about more detailed usage of `demo_sot.py`, please refer to this [document](../../../docs/en/user_guides/3_inference.md). diff --git a/configs/sot/prdimp/metafile.yml b/configs/sot/prdimp/metafile.yml new file mode 100644 index 000000000..cceaddc19 --- /dev/null +++ b/configs/sot/prdimp/metafile.yml @@ -0,0 +1,62 @@ +Collections: + - Name: PrDiMP + Metadata: + Training Data: GOT10k, LaSOT, TrackingNet, MSCOCO + Training Techniques: + - Adam + Training Resources: 8x V100 GPUs + Architecture: + - ResNet + Paper: + URL: https://arxiv.org/abs/2003.12565 + Title: Probabilistic Regression for Visual Tracking + README: configs/sot/prdimp/README.md + +Models: + - Name: prdimp_r50_8xb10-50e_got10k + In Collection: PrDiMP + Config: configs/sot/prdimp/prdimp_r50_8xb10-50e_got10k.py + Metadata: + Training Data: GOT10k + Training Memory (GB): 13.9 + Epochs: 50 + Results: + - Task: Single Object Tracking + Dataset: GOT10k + Metrics: + AO: 62.9 + SR0.5: 72.5 + SR0.75: 52.8 + Weights: https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k_20220907_173919-fa24df25.pth + + - Name: prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot + In Collection: PrDiMP + Config: configs/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot.py + Metadata: + Training Data: GOT10k, LaSOT, TrackingNet, MSCOCO + Training Memory (GB): 13.9 + Epochs: 50 + Results: + - Task: Single Object Tracking + Dataset: LaSOT + Metrics: + Success: 59.7 + Norm Precision: 67.7 + Precision: 60.5 + Weights: https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200-b7dbeca4.pth + + - Name: prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-trackingnet + In Collection: PrDiMP + Config: configs/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-trackingnet.py + Metadata: + Training Data: GOT10k, LaSOT, TrackingNet, MSCOCO + Training Memory (GB): 13.9 + Epochs: 50 + Results: + - Task: Single Object Tracking + Dataset: TrackingNet + Metrics: + Success: 75.2 + Norm Precision: 80.5 + Precision: 70.1 + Weights: https://download.openmmlab.com/mmtracking/sot/prdimp/prdimp_r50_8xb10-50e_got10k-lasot-trackingnet-coco_test-lasot_20220822_082200-b7dbeca4.pth diff --git a/configs/sot/stark/README.md b/configs/sot/stark/README.md index 84206d9d7..752940fc0 100644 --- a/configs/sot/stark/README.md +++ b/configs/sot/stark/README.md @@ -63,12 +63,12 @@ The results of STARK in TrackingNet are reimplemented by ourselves. The last-epo ### GOT10k -The results of STARK in GOT10k are reimplemented by ourselves. The last-epoch model on GOT10k is submitted to [the evaluation server on GOT10k Challenge](http://got-10k.aitestunion.com/). We provide the model with its configuration and training log. +The results of STARK in GOT10k are reimplemented by ourselves. The last-epoch model is submitted to [the evaluation server on GOT10k Challenge](http://got-10k.aitestunion.com/). We provide the model with its configuration and training log. -| Method | Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | Success | Norm precision | Precision | Config | Download | -| :-------: | :------: | :---: | :-----: | :------: | :------------: | :-----: | :------------: | :-------: | :----------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| STARK-ST1 | R-50 | - | 500e | 8.45 | - | 68.1 | 77.4 | 62.4 | [config](stark-st1_resnet50_8xb16-500e_got10k-lasot-trackingnet-coco_test-got10k.py) | [model](https://download.openmmlab.com/mmtracking/sot/stark/stark_st1_r50_500e_got10k/stark_st1_r50_500e_got10k_20220223_125400-40ead158.pth) \| [log](https://download.openmmlab.com/mmtracking/sot/stark/stark_st1_r50_500e_got10k/stark_st1_r50_500e_got10k_20220223_125400.log.json) | -| STARK-ST2 | R-50 | - | 50e | 2.31 | - | 68.3 | 77.6 | 62.7 | [config](stark-st2_resnet50_8xb16-50e_got10k-lasot-trackingnet-coco_test-got10k.py) | [model](https://download.openmmlab.com/mmtracking/sot/stark/stark_st2_r50_50e_got10k/stark_st2_r50_50e_got10k_20220226_124213-ee39bbff.pth) \| [log](https://download.openmmlab.com/mmtracking/sot/stark/stark_st2_r50_50e_got10k/stark_st2_r50_50e_got10k_20220226_124213.log.json) | +| Method | Backbone | Style | Lr schd | Mem (GB) | Inf time (fps) | AO | SR0.5 | SR0.75 | Config | Download | +| :-------: | :------: | :---: | :-----: | :------: | :------------: | :--: | :--------------: | :---------------: | :----------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| STARK-ST1 | R-50 | - | 500e | 8.45 | - | 68.1 | 77.4 | 62.4 | [config](stark-st1_resnet50_8xb16-500e_got10k-lasot-trackingnet-coco_test-got10k.py) | [model](https://download.openmmlab.com/mmtracking/sot/stark/stark_st1_r50_500e_got10k/stark_st1_r50_500e_got10k_20220223_125400-40ead158.pth) \| [log](https://download.openmmlab.com/mmtracking/sot/stark/stark_st1_r50_500e_got10k/stark_st1_r50_500e_got10k_20220223_125400.log.json) | +| STARK-ST2 | R-50 | - | 50e | 2.31 | - | 68.3 | 77.6 | 62.7 | [config](stark-st2_resnet50_8xb16-50e_got10k-lasot-trackingnet-coco_test-got10k.py) | [model](https://download.openmmlab.com/mmtracking/sot/stark/stark_st2_r50_50e_got10k/stark_st2_r50_50e_got10k_20220226_124213-ee39bbff.pth) \| [log](https://download.openmmlab.com/mmtracking/sot/stark/stark_st2_r50_50e_got10k/stark_st2_r50_50e_got10k_20220226_124213.log.json) | ## Get started diff --git a/docs/en/model_zoo.md b/docs/en/model_zoo.md index 1a9ebded1..9f5c892bc 100644 --- a/docs/en/model_zoo.md +++ b/docs/en/model_zoo.md @@ -29,62 +29,66 @@ ### DFF (CVPR 2017) -Please refer to [DFF](https://github.com/open-mmlab/mmtracking/blob/master/configs/vid/dff) for details. +Please refer to [DFF](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/vid/dff) for details. ### FGFA (ICCV 2017) -Please refer to [FGFA](https://github.com/open-mmlab/mmtracking/blob/master/configs/vid/fgfa) for details. +Please refer to [FGFA](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/vid/fgfa) for details. ### SELSA (ICCV 2019) -Please refer to [SELSA](https://github.com/open-mmlab/mmtracking/blob/master/configs/vid/selsa) for details. +Please refer to [SELSA](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/vid/selsa) for details. ### Temporal RoI Align (AAAI 2021) -Please refer to [Temporal RoI Align](https://github.com/open-mmlab/mmtracking/blob/master/configs/vid/temporal_roi_align) for details. +Please refer to [Temporal RoI Align](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/vid/temporal_roi_align) for details. ## Baselines of multiple object tracking ### SORT (ICIP 2016) -Please refer to [SORT](https://github.com/open-mmlab/mmtracking/blob/master/configs/mot/sort) for details. +Please refer to [SORT](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/mot/sort) for details. ### DeepSORT (ICIP 2017) -Please refer to [DeepSORT](https://github.com/open-mmlab/mmtracking/blob/master/configs/mot/deepsort) for details. +Please refer to [DeepSORT](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/mot/deepsort) for details. ### Tracktor (ICCV 2019) -Please refer to [Tracktor](https://github.com/open-mmlab/mmtracking/blob/master/configs/mot/tracktor) for details. +Please refer to [Tracktor](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/mot/tracktor) for details. ### QDTrack (CVPR 2021) -Please refer to [QDTrack](https://github.com/open-mmlab/mmtracking/blob/master/configs/mot/qdtrack) for details. +Please refer to [QDTrack](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/mot/qdtrack) for details. ### ByteTrack (ECCV 2022) -Please refer to [ByteTrack](https://github.com/open-mmlab/mmtracking/blob/master/configs/mot/bytetrack) for details. +Please refer to [ByteTrack](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/mot/bytetrack) for details. ### StrongSORT (arvix 2022) -Please refer to [StrongSORT](https://github.com/open-mmlab/mmtracking/blob/master/configs/mot/strongsort) for details +Please refer to [StrongSORT](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/mot/strongsort) for details ## Baselines of single object tracking ### SiameseRPN++ (CVPR 2019) -Please refer to [SiameseRPN++](https://github.com/open-mmlab/mmtracking/blob/master/configs/sot/siamese_rpn) for details. +Please refer to [SiameseRPN++](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/sot/siamese_rpn) for details. + +### PrDiMP (CVPR 2020) + +Please refer to [PrDiMP](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/sot/prdimp) for details. ### STARK (ICCV 2021) -Please refer to [STARK](https://github.com/open-mmlab/mmtracking/blob/master/configs/sot/stark) for details. +Please refer to [STARK](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/sot/stark) for details. ## Baselines of video instance segmentation ### MaskTrack R-CNN (ICCV 2019) -Please refer to [MaskTrack R-CNN](https://github.com/open-mmlab/mmtracking/blob/master/configs/vis/masktrack_rcnn) for details. +Please refer to [MaskTrack R-CNN](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/vis/masktrack_rcnn) for details ### Mask2Former (CVPR 2022) -Please refer to [Mask2Former](https://github.com/open-mmlab/mmtracking/blob/master/configs/vis/mask2former) for details. +Please refer to [Mask2Former](https://github.com/open-mmlab/mmtracking/blob/1.x/configs/vis/mask2former) for details. diff --git a/mmtrack/models/sot/prdimp.py b/mmtrack/models/sot/prdimp.py index 34cc3291c..62e40839d 100644 --- a/mmtrack/models/sot/prdimp.py +++ b/mmtrack/models/sot/prdimp.py @@ -303,9 +303,9 @@ def track(self, img: Tensor, data_samples: SampleList) -> InstanceList: self.classifier.update_classifier(target_bbox, self.frame_num, hard_neg_flag) - result = InstanceData() - result.scores = torch.max(score_map[0]).unsqueeze(0) - result.bboxes = bbox_cxcywh_to_xyxy(bbox.unsqueeze(0)) + result = [InstanceData()] + result[0].scores = torch.max(score_map[0]).unsqueeze(0) + result[0].bboxes = bbox_cxcywh_to_xyxy(bbox.unsqueeze(0)) return result diff --git a/mmtrack/models/track_heads/prdimp_cls_head.py b/mmtrack/models/track_heads/prdimp_cls_head.py index 22d1bbfd2..48b8a15e2 100644 --- a/mmtrack/models/track_heads/prdimp_cls_head.py +++ b/mmtrack/models/track_heads/prdimp_cls_head.py @@ -1,6 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import math -from typing import List, Optional, Tuple, Union +from typing import List, Optional, Sequence, Tuple, Union import torch import torch.nn.functional as F @@ -338,6 +338,29 @@ def predict(self, backbone_feats: Tuple[Tensor], data_samples: SampleList, return new_bbox_center, scores_map, state + def _gen_2d_hanning_windows(self, + size: Sequence, + device: str = 'cuda') -> Tensor: + """Generate 2D hanning window. + + Args: + size (Sequence): The size of 2d hanning window. + device (str): Device the tensor will be put on. Defaults to 'cuda'. + + Returns: + Tensor: 2D hanning window with shape + (num_base_anchors[i] * featmap_sizes[i][0] * featmap_sizes[i][1]). + """ + + def hanning_1d(s): + return 0.5 * (1 - torch.cos( + (2 * math.pi / (s + 1)) * torch.arange(1, s + 1).float())) + + hanning_win = hanning_1d(size[0]).reshape(-1, 1) * hanning_1d( + size[1]).reshape(1, -1) + + return hanning_win.to(device) + def predict_by_feat(self, scores: Tensor, prev_bbox: Tensor, sample_center: Tensor, scale_factor: float) -> Tuple[Tensor, bool]: @@ -368,7 +391,12 @@ def predict_by_feat(self, scores: Tensor, prev_bbox: Tensor, scores.device) score_center = (score_size / 2).to(scores.device) - max_score, max_pos = max_last2d(scores) + scores_hn = scores + if self.locate_cfg.get('hanning_window', False): + scores_hn = scores * self._gen_2d_hanning_windows( + score_size, device=scores.device) + + max_score, max_pos = max_last2d(scores_hn) max_pos = max_pos.flip(0).float() # the displacement of target to the center of score map target_disp_score_map = max_pos - score_center diff --git a/model-index.yml b/model-index.yml index 6a79fc354..bc31f785d 100644 --- a/model-index.yml +++ b/model-index.yml @@ -5,6 +5,7 @@ Import: - configs/mot/bytetrack/metafile.yml - configs/mot/strongsort/metafile.yml - configs/sot/siamese_rpn/metafile.yml + - configs/sot/prdimp/metafile.yml - configs/sot/stark/metafile.yml - configs/vid/dff/metafile.yml - configs/vid/fgfa/metafile.yml diff --git a/setup.cfg b/setup.cfg index 04950424c..9db0e6639 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,5 +13,5 @@ BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true [codespell] -ignore-words-list = mot +ignore-words-list = mot,gool skip = *.json