使用最新版本的pytorch,(torch版本1.3.1,torchvision版本0.4.2。)
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
從 https://github.com/xingyizhou/CenterNet 運行 demo.py,
出現 “ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.” 的錯誤。
解決方法:
用 https://github.com/CharlesShang/DCNv2 替換 CenterNet/src/lib/models/networks/DCNv2 。