faster-rcnn.pytorch
faster-rcnn.pytorch copied to clipboard
ImportError: cannot import name '_mask'
I use pytorch-1.0 and python3.6.7,and build under conda.the process of building did't show error.but,when start to train trainval.net,it shows the following error:
File "trainval_net.py", line 27, in
it seems the building problem of coco API
make sure the branch is pytorch-1.0
and
cd lib && python setup.py build develop
then retry?
make sure the branch is pytorch-1.0 and
cd lib && python setup.py build develop
then retry? make sure. I clone it with --b
make sure the branch is pytorch-1.0 and
cd lib && python setup.py build develop
then retry?
Having the same problem as well. I am using the pytorch-1.0 branch and has run "python setup.py build develop".
Just find out that you have to install the CoCO API.
cd data
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI
make
cd ../../..
Just find out that you have to install the CoCO API.
cd data
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI
make
cd ../../..
thx a lot
I am using pytorch 1.0 and python 3.6.7
Traceback (most recent call last):
File "demo.py", line 27, in
Just a side note. If which python
does not refer to the python version that you use, you might want to modify the MakeFile
. In my case, I need to change python
to python3.6
in the MakeFile
.
I tried and failed to get things working...
CoCO API is now at https://github.com/cocodataset/cocoapi
I am seeing the following error even after @JojoFisherman 's suggestions
(pytorch1_py36) myPC:/git/jwyang/faster-rcnn.pytorch$ CUDA_VISIBLE_DEVICES=$GPU_ID python trainval_net.py --dataset pascal_voc --net res101 --bs 1 --nw 1 --lr $LEARNING_RATE --lr_decay_step $DECAY_STEP --cuda
Traceback (most recent call last):
File "trainval_net.py", line 27, in <module>
from roi_data_layer.roidb import combined_roidb
File "/git/jwyang/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py", line 9, in <module>
from datasets.factory import get_imdb
File "/git/jwyang/faster-rcnn.pytorch/lib/datasets/factory.py", line 15, in <module>
from datasets.coco import coco
File "/git/jwyang/faster-rcnn.pytorch/lib/datasets/coco.py", line 23, in <module>
from pycocotools.coco import COCO
File "/git/jwyang/faster-rcnn.pytorch/lib/pycocotools/coco.py", line 60, in <module>
from . import mask
File "/git/jwyang/faster-rcnn.pytorch/lib/pycocotools/mask.py", line 3, in <module>
from . import _mask
ImportError: cannot import name '_mask'
I am using Anaconda with Python 3.6
(pytorch1_py36) myPC:/git/jwyang/faster-rcnn.pytorch$ python --version
Python 3.6.8 :: Anaconda, Inc.
progress, I fixed the stale COCO pytools
see: https://github.com/cocodataset/cocoapi/issues/59#issuecomment-469859646
Just find out that you have to install the CoCO API.
cd data
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI
make
cd ../../..
Please @jwyang add into the readme for easy install.
我使用pytorch-1.0和python3.6.7,并在conda下进行构建。构建过程未显示错误。但是,当开始训练trainval.net时,它显示以下错误:
文件“trainval_net.py”,第27行,在 从roi_data_layer.roidb进口combined_roidb 文件“/home/ccyoung/workspace/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py”,9号线,在 从datasets.factory进口get_imdb 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/datasets/factory.py”,第15行, 来自datasets.coco import coco 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/ pycocotools.coco中的“ lib / datasets / coco.py”行23, 从中导入COCO 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/coco.py”,行60 。 从中导入遮罩文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/mask.py”,第3行 。 ImportError:无法导入名称“ _mask”
似乎可可API的构建问题
请问您是怎么解决这个问题的
你好,我那时是COCO的安装包没安装好。
------------------ 原始邮件 ------------------ 发件人: "WUT-xiaoming"<[email protected]>; 发送时间: 2019年11月15日(星期五) 中午11:31 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "洪荣宣"<[email protected]>;"Author"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
我使用pytorch-1.0和python3.6.7,并在conda下进行构建。构建过程未显示错误。但是,当开始训练trainval.net时,它显示以下错误:
文件“trainval_net.py”,第27行,在 从roi_data_layer.roidb进口combined_roidb 文件“/home/ccyoung/workspace/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py”,9号线,在 从datasets.factory进口get_imdb 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/datasets/factory.py”,第15行, 来自datasets.coco import coco 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/ pycocotools.coco中的“ lib / datasets / coco.py”行23, 从中导入COCO 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/coco.py”,行60 。 从中导入遮罩文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/mask.py”,第3行 。 ImportError:无法导入名称“ _mask”
似乎可可API的构建问题
请问您是怎么解决这个问题的
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
请问这个COCO要怎么安装呢? 作者在README中写用python2.7编译ROI等模块,是不是跟这个有关系
------------------ 原始邮件 ------------------ 发件人: "rongxuanHong"<[email protected]>; 发送时间: 2019年11月15日(星期五) 中午11:33 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "1254305549"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
你好,我那时是COCO的安装包没安装好。
------------------ 原始邮件 ------------------ 发件人: "WUT-xiaoming"<[email protected]>; 发送时间: 2019年11月15日(星期五) 中午11:31 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "洪荣宣"<[email protected]>;"Author"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
我使用pytorch-1.0和python3.6.7,并在conda下进行构建。构建过程未显示错误。但是,当开始训练trainval.net时,它显示以下错误:
文件“trainval_net.py”,第27行,在 从roi_data_layer.roidb进口combined_roidb 文件“/home/ccyoung/workspace/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py”,9号线,在 从datasets.factory进口get_imdb 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/datasets/factory.py”,第15行, 来自datasets.coco import coco 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/ pycocotools.coco中的“ lib / datasets / coco.py”行23, 从中导入COCO 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/coco.py”,行60 。 从中导入遮罩文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/mask.py”,第3行 。 ImportError:无法导入名称“ _mask”
似乎可可API的构建问题
请问您是怎么解决这个问题的
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
https://github.com/cocodataset/cocoapi
------------------ 原始邮件 ------------------ 发件人: "WUT-xiaoming"<[email protected]>; 发送时间: 2019年11月15日(星期五) 中午11:36 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "洪荣宣"<[email protected]>;"Author"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
请问这个COCO要怎么安装呢? 作者在README中写用python2.7编译ROI等模块,是不是跟这个有关系
------------------ 原始邮件 ------------------
发件人: "rongxuanHong"<[email protected]>;
发送时间: 2019年11月15日(星期五) 中午11:33
收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>;
抄送: "1254305549"<[email protected]>; "Comment"<[email protected]>;
主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
你好,我那时是COCO的安装包没安装好。
------------------&nbsp;原始邮件&nbsp;------------------
发件人:&nbsp;"WUT-xiaoming"<[email protected]&gt;;
发送时间:&nbsp;2019年11月15日(星期五) 中午11:31
收件人:&nbsp;"jwyang/faster-rcnn.pytorch"<[email protected]&gt;;
抄送:&nbsp;"洪荣宣"<[email protected]&gt;;"Author"<[email protected]&gt;;
主题:&nbsp;Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
我使用pytorch-1.0和python3.6.7,并在conda下进行构建。构建过程未显示错误。但是,当开始训练trainval.net时,它显示以下错误:
文件“trainval_net.py”,第27行,在
从roi_data_layer.roidb进口combined_roidb
文件“/home/ccyoung/workspace/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py”,9号线,在
从datasets.factory进口get_imdb
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/datasets/factory.py”,第15行,
来自datasets.coco import coco
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/ pycocotools.coco中的“ lib / datasets / coco.py”行23,
从中导入COCO
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/coco.py”,行60
。
从中导入遮罩文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/mask.py”,第3行
。
ImportError:无法导入名称“ _mask”
似乎可可API的构建问题
请问您是怎么解决这个问题的
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
非常感谢您的回答!!这个COCO的安装目录有要求吗?
------------------ 原始邮件 ------------------ 发件人: "rongxuanHong"<[email protected]>; 发送时间: 2019年11月15日(星期五) 下午2:46 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "1254305549"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
https://github.com/cocodataset/cocoapi
------------------ 原始邮件 ------------------ 发件人: "WUT-xiaoming"<[email protected]>; 发送时间: 2019年11月15日(星期五) 中午11:36 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "洪荣宣"<[email protected]>;"Author"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
请问这个COCO要怎么安装呢?
作者在README中写用python2.7编译ROI等模块,是不是跟这个有关系
------------------&nbsp;原始邮件&nbsp;------------------
发件人: "rongxuanHong"<[email protected]&gt;;
发送时间: 2019年11月15日(星期五) 中午11:33
收件人: "jwyang/faster-rcnn.pytorch"<[email protected]&gt;;
抄送: "1254305549"<[email protected]&gt;; "Comment"<[email protected]&gt;;
主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name &#39;_mask&#39; (#410)
你好,我那时是COCO的安装包没安装好。
------------------&amp;nbsp;原始邮件&amp;nbsp;------------------
发件人:&amp;nbsp;"WUT-xiaoming"<[email protected]&amp;gt;;
发送时间:&amp;nbsp;2019年11月15日(星期五) 中午11:31
收件人:&amp;nbsp;"jwyang/faster-rcnn.pytorch"<[email protected]&amp;gt;;
抄送:&amp;nbsp;"洪荣宣"<[email protected]&amp;gt;;"Author"<[email protected]&amp;gt;;
主题:&amp;nbsp;Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
我使用pytorch-1.0和python3.6.7,并在conda下进行构建。构建过程未显示错误。但是,当开始训练trainval.net时,它显示以下错误:
文件“trainval_net.py”,第27行,在
从roi_data_layer.roidb进口combined_roidb
文件“/home/ccyoung/workspace/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py”,9号线,在
从datasets.factory进口get_imdb
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/datasets/factory.py”,第15行,
来自datasets.coco import coco
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/ pycocotools.coco中的“ lib / datasets / coco.py”行23,
从中导入COCO
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/coco.py”,行60
。
从中导入遮罩文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/mask.py”,第3行
。
ImportError:无法导入名称“ _mask”
似乎可可API的构建问题
请问您是怎么解决这个问题的
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
请google搜索,都有详细的解答。
------------------ 原始邮件 ------------------ 发件人: "WUT-xiaoming"<[email protected]>; 发送时间: 2019年11月15日(星期五) 下午2:56 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "洪荣宣"<[email protected]>;"Author"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
非常感谢您的回答!!这个COCO的安装目录有要求吗?
------------------ 原始邮件 ------------------
发件人: "rongxuanHong"<[email protected]>;
发送时间: 2019年11月15日(星期五) 下午2:46
收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>;
抄送: "1254305549"<[email protected]>; "Comment"<[email protected]>;
主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
https://github.com/cocodataset/cocoapi
------------------&nbsp;原始邮件&nbsp;------------------
发件人:&nbsp;"WUT-xiaoming"<[email protected]&gt;;
发送时间:&nbsp;2019年11月15日(星期五) 中午11:36
收件人:&nbsp;"jwyang/faster-rcnn.pytorch"<[email protected]&gt;;
抄送:&nbsp;"洪荣宣"<[email protected]&gt;;"Author"<[email protected]&gt;;
主题:&nbsp;Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
请问这个COCO要怎么安装呢?
作者在README中写用python2.7编译ROI等模块,是不是跟这个有关系
------------------&amp;nbsp;原始邮件&amp;nbsp;------------------
发件人: "rongxuanHong"<[email protected]&amp;gt;;
发送时间: 2019年11月15日(星期五) 中午11:33
收件人: "jwyang/faster-rcnn.pytorch"<[email protected]&amp;gt;;
抄送: "1254305549"<[email protected]&amp;gt;; "Comment"<[email protected]&amp;gt;;
主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name &amp;#39;_mask&amp;#39; (#410)
你好,我那时是COCO的安装包没安装好。
------------------&amp;amp;amp;nbsp;原始邮件&amp;amp;amp;nbsp;------------------
发件人:&amp;amp;amp;nbsp;"WUT-xiaoming"<[email protected]&amp;amp;amp;gt;;
发送时间:&amp;amp;amp;nbsp;2019年11月15日(星期五) 中午11:31
收件人:&amp;amp;amp;nbsp;"jwyang/faster-rcnn.pytorch"<[email protected]&amp;amp;amp;gt;;
抄送:&amp;amp;amp;nbsp;"洪荣宣"<[email protected]&amp;amp;amp;gt;;"Author"<[email protected]&amp;amp;amp;gt;;
主题:&amp;amp;amp;nbsp;Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410)
我使用pytorch-1.0和python3.6.7,并在conda下进行构建。构建过程未显示错误。但是,当开始训练trainval.net时,它显示以下错误:
文件“trainval_net.py”,第27行,在
从roi_data_layer.roidb进口combined_roidb
文件“/home/ccyoung/workspace/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py”,9号线,在
从datasets.factory进口get_imdb
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/datasets/factory.py”,第15行,
来自datasets.coco import coco
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/ pycocotools.coco中的“ lib / datasets / coco.py”行23,
从中导入COCO
文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/coco.py”,行60
。
从中导入遮罩文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/mask.py”,第3行
。
ImportError:无法导入名称“ _mask”
似乎可可API的构建问题
请问您是怎么解决这个问题的
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
非常感谢您的回答!!这个COCO的安装目录有要求吗? … ------------------ 原始邮件 ------------------ 发件人: "rongxuanHong"<[email protected]>; 发送时间: 2019年11月15日(星期五) 下午2:46 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "1254305549"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410) https://github.com/cocodataset/cocoapi ------------------ 原始邮件 ------------------ 发件人: "WUT-xiaoming"<[email protected]>; 发送时间: 2019年11月15日(星期五) 中午11:36 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "洪荣宣"<[email protected]>;"Author"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410) 请问这个COCO要怎么安装呢? 作者在README中写用python2.7编译ROI等模块,是不是跟这个有关系 ------------------&nbsp;原始邮件&nbsp;------------------ 发件人: "rongxuanHong"<[email protected]&gt;; 发送时间: 2019年11月15日(星期五) 中午11:33 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]&gt;; 抄送: "1254305549"<[email protected]&gt;; "Comment"<[email protected]&gt;; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name &#39;_mask&#39; (#410) 你好,我那时是COCO的安装包没安装好。 ------------------&amp;nbsp;原始邮件&amp;nbsp;------------------ 发件人:&amp;nbsp;"WUT-xiaoming"<[email protected]&amp;gt;; 发送时间:&amp;nbsp;2019年11月15日(星期五) 中午11:31 收件人:&amp;nbsp;"jwyang/faster-rcnn.pytorch"<[email protected]&amp;gt;; 抄送:&amp;nbsp;"洪荣宣"<[email protected]&amp;gt;;"Author"<[email protected]&amp;gt;; 主题:&amp;nbsp;Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410) 我使用pytorch-1.0和python3.6.7,并在conda下进行构建。构建过程未显示错误。但是,当开始训练trainval.net时,它显示以下错误: 文件“trainval_net.py”,第27行,在 从roi_data_layer.roidb进口combined_roidb 文件“/home/ccyoung/workspace/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py”,9号线,在 从datasets.factory进口get_imdb 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/datasets/factory.py”,第15行, 来自datasets.coco import coco 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/ pycocotools.coco中的“ lib / datasets / coco.py”行23, 从中导入COCO 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/coco.py”,行60 。 从中导入遮罩文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/mask.py”,第3行 。 ImportError:无法导入名称“ _mask” 似乎可可API的构建问题 请问您是怎么解决这个问题的 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. https://blog.csdn.net/weixin_42279610/article/details/103086379
非常感谢您的回答!!这个COCO的安装目录有要求吗? … ------------------ 原始邮件 ------------------ 发件人: "rongxuanHong"<[email protected]>; 发送时间: 2019年11月15日(星期五) 下午2:46 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "1254305549"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410) https://github.com/cocodataset/cocoapi ------------------ 原始邮件 ------------------ 发件人: "WUT-xiaoming"<[email protected]>; 发送时间: 2019年11月15日(星期五) 中午11:36 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]>; 抄送: "洪荣宣"<[email protected]>;"Author"<[email protected]>; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410) 请问这个COCO要怎么安装呢? 作者在README中写用python2.7编译ROI等模块,是不是跟这个有关系 ------------------&nbsp;原始邮件&nbsp;------------------ 发件人: "rongxuanHong"<[email protected]&gt;; 发送时间: 2019年11月15日(星期五) 中午11:33 收件人: "jwyang/faster-rcnn.pytorch"<[email protected]&gt;; 抄送: "1254305549"<[email protected]&gt;; "Comment"<[email protected]&gt;; 主题: Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name &#39;_mask&#39; (#410) 你好,我那时是COCO的安装包没安装好。 ------------------&amp;nbsp;原始邮件&amp;nbsp;------------------ 发件人:&amp;nbsp;"WUT-xiaoming"<[email protected]&amp;gt;; 发送时间:&amp;nbsp;2019年11月15日(星期五) 中午11:31 收件人:&amp;nbsp;"jwyang/faster-rcnn.pytorch"<[email protected]&amp;gt;; 抄送:&amp;nbsp;"洪荣宣"<[email protected]&amp;gt;;"Author"<[email protected]&amp;gt;; 主题:&amp;nbsp;Re: [jwyang/faster-rcnn.pytorch] ImportError: cannot import name '_mask' (#410) 我使用pytorch-1.0和python3.6.7,并在conda下进行构建。构建过程未显示错误。但是,当开始训练trainval.net时,它显示以下错误: 文件“trainval_net.py”,第27行,在 从roi_data_layer.roidb进口combined_roidb 文件“/home/ccyoung/workspace/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py”,9号线,在 从datasets.factory进口get_imdb 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/datasets/factory.py”,第15行, 来自datasets.coco import coco 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/ pycocotools.coco中的“ lib / datasets / coco.py”行23, 从中导入COCO 文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/coco.py”,行60 。 从中导入遮罩文件“ /home/ccyoung/workspace/faster-rcnn.pytorch/lib/pycocotools/mask.py”,第3行 。 ImportError:无法导入名称“ _mask” 似乎可可API的构建问题 请问您是怎么解决这个问题的 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. 没有要求,在随意一个空的目录下,下载最新的并编译就好。你可以参考下我的,我刚解决这个问题,运行成功fasterrcnn https://blog.csdn.net/weixin_42279610/article/details/103086379
Just find out that you have to install the CoCO API.
cd data
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI
make
cd ../../..
I am using Windows 10, how do i solve the problem ( from . import _mask ImportError: cannot import name '_mask' from 'pycocotools' ())
Please help.
Just find out that you have to install the CoCO API.
cd data
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI
make
cd ../../..
I am using Windows 10, how do i solve the problem ( from . import _mask ImportError: cannot import name '_mask' from 'pycocotools' ())
Please help.
Just find out that you have to install the CoCO API.
cd data
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI
make
cd ../../..
it works. thank you!!!
Just find out that you have to install the CoCO API.
cd data
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI
make
cd ../../..
I am sorry,i cannot understand "make" and"cd../../",Can you explain it in more detail?
I tried pip install pycocotools. And it worked
make sure the branch is pytorch-1.0 and
cd lib && python setup.py build develop
then retry?Having the same problem as well. I am using the pytorch-1.0 branch and has run "python setup.py build develop".
Same issue here and I tried "pip install pycocotools" or "conda install". It worked
make sure the branch is pytorch-1.0 and
cd lib && python setup.py build develop
then retry?Having the same problem as well. I am using the pytorch-1.0 branch and has run "python setup.py build develop".
Same issue here and I tried "pip install pycocotools" or "conda install". It worked
thank you , it worked well!
Just find out that you have to install the CoCO API.
cd data
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI
make
cd ../../..
When I tried to make
, got
error: command 'D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe' failed with exit status 2 make: *** [Makefile:3: all] Error 1
Dose anyone know what this means ?
Just find out that you have to install the CoCO API. cd data git clone https://github.com/pdollar/coco.git cd coco/PythonAPI make cd ../../..
When I tried to
make
, goterror: command 'D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe' failed with exit status 2 make: *** [Makefile:3: all] Error 1
Dose anyone know what this means ?
After generating pycocotools directory('xxx/xxx/data/coco/PythonAPI/pycocotools'), replace the original pycocotools with this new one. The new pycocotools should include file.so like '_mask.cpython-36m-x86_64-linux-gnu.so'.