我尝试从github导入Matterport的Mask-RCNN模型,但出现错误。我怎么了?
# Import Mask RCNN
sys.path.append(os.path.join(ROOT_DIR, 'Mask_RCNN')) # To find local version of the library
from mrcnn.config import Config
from mrcnn import utils
import mrcnn.model as modellib
from mrcnn import visualize
from mrcnn.model import log
输出:
---------------------------------------------------------------------------
ZipImportError Traceback (most recent call last)
<ipython-input-17-19fc18cf001a> in <module>
4 from mrcnn import utils
5 import mrcnn.model as modellib
----> 6 from mrcnn import visualize
7 from mrcnn.model import log
ZipImportError: bad local file header: '/home/wojtek/anaconda3/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg'
答案 0 :(得分:0)
1)您必须克隆
$ git clone https://github.com/matterport/Mask_RCNN.git
2)安装依赖项
$ pip install -r requirements.txt
3)从存储库根目录运行安装程序
$ python3 setup.py install