Home

Awesome

DySample: Learning to Upsample by Learning to Sample

<p align="center"><img src="complexity.jpg" width="500" title="Complexity"/></p>

Code for the ICCV 2023 paper Learning to Upsample by Learning to Sample.

We present DySample, an ultra-lightweight and effective dynamic upsampler. While impressive performance gains have been witnessed from recent kernel-based dynamic upsamplers such as CARAFE, FADE, and SAPA, they introduce much workload, mostly due to the time-consuming dynamic convolution and the additional sub-network used to generate dynamic kernels. Further, the need for high-res feature guidance of FADE and SAPA somehow limits their application scenarios. To address these concerns, we bypass dynamic convolution and formulate upsampling from the perspective of point sampling, which is more resource-efficient and can be easily implemented with the standard built-in function in PyTorch. We first showcase a naive design, and then demonstrate how to strengthen its upsampling behavior step by step towards our new upsampler, DySample. Compared with former kernel-based dynamic upsamplers, DySample requires no customized CUDA package and has much fewer parameters, FLOPs, GPU memory, and latency. Besides the light-weight characteristics, DySample outperforms other upsamplers across five dense prediction tasks, including semantic segmentation, object detection, instance segmentation, panoptic segmentation, and monocular depth estimation.

Highlights

Results

Object detection with Faster R-CNN on COCO

Faster R-CNNBackboneParams$AP$$AP_{50}$$AP_{75}$$AP_S$$AP_M$$AP_{L}$logckpt
NearestR5046.8M37.558.240.821.341.148.9
DySampleR50+32.7K38.659.942.022.942.150.2LinkLink
DySample+R50+65.5K38.760.042.222.542.450.2LinkLink
NearestR10165.8M39.460.143.122.443.751.1
DySample+R101+65.5K40.561.643.824.244.552.3LinkLink

Instance segmentation with Mask R-CNN on COCO

Bbox resultsBackboneParams$AP$$AP_{50}$$AP_{75}$$AP_S$$AP_M$$AP_{L}$
NearestR50-38.358.742.021.941.850.2
DySampleR50+32.7K39.260.343.023.542.551.0
DySample+R50+65.5K39.660.643.523.543.150.8
NearestR101-40.060.443.722.843.752.0
DySample+R101+65.5K41.061.944.924.345.053.5
Segm resultsBackboneParams$AP$$AP_{50}$$AP_{75}$$AP_S$$AP_M$$AP_{L}$logckpt
NearestR50-34.755.837.216.137.350.8
DySampleR50+32.7K35.456.937.817.137.751.1LinkLink
DySample+R50+65.5K35.757.438.117.638.551.5LinkLink
NearestR101-36.057.638.516.539.352.2
DySample+R101+65.5K36.858.739.517.540.053.8LinkLink

Panoptic segmentation with Panoptic FPN on COCO

Panoptic FPNBackboneParams$PQ$$PQ^{th}$$PQ^{st}$$SQ$$RQ$logckpt
NearestR5046.0M40.247.828.977.849.3
DySampleR50+24.6K41.448.530.778.650.7LinkLink
DySample+R50+49.2K41.548.530.878.350.7LinkLink
NearestR10165.0M42.250.130.378.351.4
DySample+R101+49.2K43.050.232.178.652.4LinkLink

Usage

For application instances, one can refer to detection-with-upsamplers and segmentation-with-upsamplers to try upsamplers with mmcv.

Citation

If you find DySample useful for your research, please cite:

@inproceedings{liu2023learning,
  title={Learning to Upsample by Learning to Sample},
  author={Liu, Wenze and Lu, Hao and Fu, Hongtao and Cao, Zhiguo},
  booktitle={Proc. IEEE/CVF International Conference on Computer Vision (ICCV)},
  year={2023}
}