Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bugfix] test resize with pad_shape (#3421)
## Motivation When using `test_cfg` for `data_preprocessor`, `predict_by_feat` resizes to the original size, not the padded size. ``` data_preprocessor = dict( type="SegDataPreProcessor", #type="SegDataPreProcessorWithPad", mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], bgr_to_rgb=True, pad_val=0, seg_pad_val=255, test_cfg=dict(size=(128, 128))) ``` Refar to: https://github.com/open-mmlab/mmsegmentation/blob/main/mmseg/models/decode_heads/san_head.py#L589-L592 ## Checklist 1. Pre-commit or other linting tools are used to fix the potential lint issues. 2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness. 3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMDet3D. 4. The documentation has been modified accordingly, like docstring or example tutorials.
- Loading branch information