maskrcnn训练coco数据1. ⾸先克隆mask r-cnn的代码仓库。
git clone :matterport/Mask_RCNN.git
2.
蜻蜓结
cd Mask_RCNN
pip3 install -
3.build
python3.5 tup.py install
出现错误:
running install
error: can't create or remove files in install directory幼儿园助教活动
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/test-easy-install-24961.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default tting) was:
/usr/local/lib/python3.5/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choo a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
Plea make the appropriate changes for your system and try again.
解决:加上sudo
sudo python3.5 tup.py install
5安装pycocotools
1.git /pdollar/coco
2.cd coco/PythonAPI
make -j8
出现错误:
python tup.py build_ext --inplace
running build_ext
building 'pycocotools._mask' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protecto ../common/maskApi.c: In function ‘rleToBbox’:
../common/maskApi.c:141:31: warning: ‘xp’ may be ud uninitialized in this function [-Wmaybe-uninitialized]
if(j%2==0) xp=x; el if(xp<x) { ys=0; ye=h-1; }
^
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protecto x86_64-linux-gnu-gcc: error: pycocotools/_mask.c: 没有那个⽂件或⽬录
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:3: recipe for target 'all' failed
make: *** [all] Error 1
解决:
sudo python3.5 tup.py build_ext
running build_ext
雅思考试时间skipping 'pycocotools/_mask.c' Cython extension (up-to-date)
running install
running bdist_egg
孕妇能喝红酒吗
running egg_info
-info
writing dependency_links -info/
writing requirements -
writing top-level names -info/
-info/PKG-INFO
writing manifest file '-'
reading manifest file '-'
writing manifest file '-'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying pycocotools/coco.py -> build/lib.linux-x86_64-3.5/pycocotools
copying pycocotools/mask.py -> build/lib.linux-x86_64-3.5/pycocotools验证英语
copying pycocotools/__init__.py -> build/lib.linux-x86_64-3.5/pycocotools
copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-3.5/pycocotools
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/pycocotools
copying build/lib.linux-x86_64-3.5/pycocotools/coco.py -> build/bdist.linux-x86_64/egg/pycocotools
copying build/lib.linux-x86_64-3.5/pycocotools/mask.py -> build/bdist.linux-x86_64/egg/pycocotools
copying build/lib.linux-x86_64-3.5/pycocotools/__init__.py -> build/bdist.linux-x86_64/egg/pycocotools
copying build/lib.linux-x86_64-3.5/pycocotools/_mask.cpython-35m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg/pycocotools
copying build/lib.linux-x86_64-3.5/pycocotools/cocoeval.py -> build/bdist.linux-x86_64/egg/pycocotools
byte-compiling build/bdist.linux-x86_64/egg/pycocotools/coco.py to coco.cpython-35.pyc
等腰三角形定义byte-compiling build/bdist.linux-x86_64/egg/pycocotools/mask.py to mask.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/pycocotools/__init__.py to __init__.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/pycocotools/cocoeval.py to cocoeval.cpython-35.pyc
creating stub loader for pycocotools/_mask.cpython-35m-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/pycocotools/_mask.py to _mask.cpython-35.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
- -> build/bdist.linux-x86_64/egg/EGG-INFO
-info/ -> build/bdist.linux-x86_64/egg/EGG-INFO
- -> build/bdist.linux-x86_64/egg/EGG-INFO
-info/ -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/
zip_safe flag not t; analyzing
pycocotools.__pycache__._mask.cpython-35: module references __file__
creating dist
creating 'dist/pycocotools-2.0-py3.' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pycocotools-2.0-py3.
小孩耳朵疼
creating /usr/local/lib/python3.5/dist-packages/pycocotools-2.0-py3. Extracting pycocotools-2.0-py3. to /usr/local/lib/python3.5/dist-packages Adding pycocotools 2.0 to easy-install.pth file
Installed /usr/local/lib/python3.5/dist-packages/pycocotools-2.0-py3. Processing dependencies for pycocotools==2.0
Searching for matplotlib==3.0.2
Best match: matplotlib 3.0.2
Adding matplotlib 3.0.2 to easy-install.pth file
Using /usr/local/lib/python3.5/dist-packages
Searching for Cython==0.29.1
蝶耳犬Best match: Cython 0.29.1
Adding Cython 0.29.1 to easy-install.pth file
Installing cygdb script to /usr/local/bin
Installing cython script to /usr/local/bin
Installing cythonize script to /usr/local/bin
Using /home/amax/.local/lib/python3.5/site-packages
Searching for tuptools==39.1.0
Best match: tuptools 39.1.0
Adding tuptools 39.1.0 to easy-install.pth file
Installing easy_install-3.6 script to /usr/local/bin
Installing easy_install script to /usr/local/bin
Using /usr/local/lib/python3.5/dist-packages
Searching for kiwisolver==1.0.1
Best match: kiwisolver 1.0.1
Adding kiwisolver 1.0.1 to easy-install.pth file
Using /usr/local/lib/python3.5/dist-packages
Searching for pyparsing==2.0.3
Best match: pyparsing 2.0.3
Adding pyparsing 2.0.3 to easy-install.pth file
Using /usr/lib/python3/dist-packages
Searching for cycler==0.10.0
Best match: cycler 0.10.0
Adding cycler 0.10.0 to easy-install.pth file
Using /usr/local/lib/python3.5/dist-packages
Searching for numpy==1.16.3
Best match: numpy 1.16.3
Adding numpy 1.16.3 to easy-install.pth file
Installing f2py script to /usr/local/bin
Installing f2py3 script to /usr/local/bin
Installing f2py3.5 script to /usr/local/bin
Using /usr/local/lib/python3.5/dist-packages
Searching for python-dateutil==2.8.0
Best match: python-dateutil 2.8.0
Adding python-dateutil 2.8.0 to easy-install.pth file
Using /usr/local/lib/python3.5/dist-packages
Searching for six==1.12.0
Best match: six 1.12.0
Adding six 1.12.0 to easy-install.pth file
Using /usr/local/lib/python3.5/dist-packages
Finished processing dependencies for pycocotools==2.0
Finished processing dependencies for pycocotools==2.0
编译完成后,在PythonAPI⽂件夹下⽣成了⼀个pycocotools⽂件夹,将此⽂件夹复制到Mask_RCNN/samples/coco/⽬录下。