Centernet DCN编译error

I got pose estimation working for pytorch 1.1.0 and wrote some of my steps, See if this applies to your use case.

environment.txt

Conda env

The working conda env is in the environment.txt file. Rename it to .yml if you want to install it with conda.

Get the code

First you'll want to do

git clone https://github.com/xingyizhou/CenterNet

We'll call the resulting folder CNROOT.

Next, go to the $CNROOT/src/lib/models/networks dir and delete the DCNv2 directory.

Stay in the $CNROOT/src/lib/models/networks and do

git clone https://github.com/CharlesShang/DCNv2

Folow the set up for that repo (run make.sh, etc.)

Go into $CNROOT/src/lib/models/networks/pose_dla_dcn.py and comment out lines 313 and 314 - these won't be missed:

扫描二维码关注公众号,回复: 9601290 查看本文章

if pretrained:
model.load_pretrained_model(data='imagenet', name='dla34', hash='ba72cf86')

Go into $CNROOT/src/lib/opts.py and in line 323 set
opt.flip_idx = False

Go back to the CNROOT and download this model into the models dir (create it if it doesn't exist)

Try to run the demo as described.

发布了57 篇原创文章 · 获赞 121 · 访问量 46万+

猜你喜欢

转载自blog.csdn.net/baobei0112/article/details/102678602
今日推荐