運行CenterNet的demo.py,出現錯誤 “torch.utils.ffi is deprecated”

使用最新版本的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 。

發佈了53 篇原創文章 · 獲贊 12 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章