当前位置:网站首页>Problems encountered in configuring the historical version of detectron

Problems encountered in configuring the historical version of detectron

2022-07-23 12:36:00 cg101202

background

   Recently, I want to test a target detection model CBNet, The model is based on Detectron Rewritten , But it's not the latest Detectron, It belongs to the historical version .
   as everyone knows ,Detectron be based on caffe2, So first you have to install caffe2. Official website There are many ways to install , Commonly used Source installation or conda Pre build package installation .

Problems encountered

   Because the source code has been compiled before , I want to steal this time conda Direct installation caffe2( It's actually installation pytorch, Later, it was integrated ), Then press Detectron The official installation tutorial of Detectron It's also set up , Finally, I got stuck in the test , Always report the following error :

AssertionError: Detectron ops lib not found; make sure that your Caffe2 version includes Detectron module

analysis

   Mistakes make me wonder , They are all configured step by step according to the official tutorial. How can something go wrong , I have always suspected that I made a mistake , And I did it again , There are still problems . Later, I reacted and checked for mistakes , It was found that it was small bug, Latest version Detectron There will be no such problem ( I also foolishly tested !).
   The root cause is conda Directly installed pytorch Bag libcaffe2_detectron_ops_gpu.so stay torch/lib Under the table of contents , The old version Detectron Only retrieved lib Catalog , So I can't find , But source code construction caffe2 It won't happen .

Solution

   Replace the old version with the new version , Reference resources Link.

summary

   Some code based on the old framework , There will be version problems more or less . When encountering errors , When you are a little confused , Hurry to the relevant repo Of issues Look for it below , Generally, solutions can be found , Save time !!!

原网站

版权声明
本文为[cg101202]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207230539378914.html