FastMaskRCNN
FastMaskRCNN copied to clipboard
pycocotools/make
I cloned your repo, and started to run how you describe in instructions. Whenever I run make command in pycocotools directory an error had been rised. That:
python setup.py build_ext --inplace Warning: Extension name '_mask' does not match fully qualified name 'libs.datasets.pycocotools._mask' of '_mask.pyx' running build_ext rm -rf build
What is wrong with my setup?
Thanks. Best.
Same probleme
I think this is just a warning. If _mask.so is being generated correctly, this should not be an issue.
You can remove _mask.so and then call python setup.py build_ext --inplace to regenerate _mask.so
LOGS: root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools# pwd /home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools# ls -lrth total 756K -rw-r--r-- 1 root root 21 Jun 19 20:08 init.py -rw-r--r-- 1 root root 199 Jun 19 20:08 Makefile -rw-r--r-- 1 root root 723 Jun 19 20:08 setup.py -rw-r--r-- 1 root root 4.5K Jun 19 20:08 mask.py drwxr-xr-x 2 root root 4.0K Jun 19 20:08 common -rw-r--r-- 1 root root 24K Jun 19 20:08 cocoeval.py -rw-r--r-- 1 root root 18K Jun 19 20:08 coco.py -rw-r--r-- 1 root root 12K Jun 19 20:08 _mask.pyx -rw-r--r-- 1 root root 675K Jun 19 20:08 _mask.c root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools# python setup.py build_ext --inplace Warning: Extension name '_mask' does not match fully qualified name 'libs.datasets.pycocotools._mask' of '_mask.pyx' running build_ext building '_mask' extension creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/common x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I./common -I/usr/include/python2.7 -c _mask.c -o build/temp.linux-x86_64-2.7/_mask.o -Wno-cpp -Wno-unused-function -std=c99 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I./common -I/usr/include/python2.7 -c ./common/maskApi.c -o build/temp.linux-x86_64-2.7/./common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99 x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_mask.o build/temp.linux-x86_64-2.7/./common/maskApi.o -o /home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools/_mask.so root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools# ls -lrth total 1.6M -rw-r--r-- 1 root root 21 Jun 19 20:08 init.py -rw-r--r-- 1 root root 199 Jun 19 20:08 Makefile -rw-r--r-- 1 root root 723 Jun 19 20:08 setup.py -rw-r--r-- 1 root root 4.5K Jun 19 20:08 mask.py drwxr-xr-x 2 root root 4.0K Jun 19 20:08 common -rw-r--r-- 1 root root 24K Jun 19 20:08 cocoeval.py -rw-r--r-- 1 root root 18K Jun 19 20:08 coco.py -rw-r--r-- 1 root root 12K Jun 19 20:08 _mask.pyx -rw-r--r-- 1 root root 675K Jun 19 20:08 _mask.c drwxr-xr-x 3 root root 4.0K Jun 19 20:09 build -rwxr-xr-x 1 root root 784K Jun 19 20:09 _mask.so root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools# python setup.py build_ext --inplace Warning: Extension name '_mask' does not match fully qualified name 'libs.datasets.pycocotools._mask' of '_mask.pyx' running build_ext root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools# rm _mask.so root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools# ls -lrth total 760K -rw-r--r-- 1 root root 21 Jun 19 20:08 init.py -rw-r--r-- 1 root root 199 Jun 19 20:08 Makefile -rw-r--r-- 1 root root 723 Jun 19 20:08 setup.py -rw-r--r-- 1 root root 4.5K Jun 19 20:08 mask.py drwxr-xr-x 2 root root 4.0K Jun 19 20:08 common -rw-r--r-- 1 root root 24K Jun 19 20:08 cocoeval.py -rw-r--r-- 1 root root 18K Jun 19 20:08 coco.py -rw-r--r-- 1 root root 12K Jun 19 20:08 _mask.pyx -rw-r--r-- 1 root root 675K Jun 19 20:08 _mask.c drwxr-xr-x 3 root root 4.0K Jun 19 20:09 build root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools# python setup.py build_ext --inplace Warning: Extension name '_mask' does not match fully qualified name 'libs.datasets.pycocotools._mask' of '_mask.pyx' running build_ext building '_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-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I./common -I/usr/include/python2.7 -c _mask.c -o build/temp.linux-x86_64-2.7/_mask.o -Wno-cpp -Wno-unused-function -std=c99 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I./common -I/usr/include/python2.7 -c ./common/maskApi.c -o build/temp.linux-x86_64-2.7/./common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99 x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_mask.o build/temp.linux-x86_64-2.7/./common/maskApi.o -o /home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools/_mask.so root@51409b27ddc7:/home/maskrcnn/FastMaskRCNN/libs/datasets/pycocotools#
I solved the problem.
- I deleted the _mask.so.
- I edited the file /libs/datasets/pycocotools/_mask.c lines "/home/shang/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h", "/home/shang/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/ufuncobject.h", for my computer. and run make. Best.
I ran the code in ubuntu16.04,anaconda3,python 3.5,tensorflow 1.0.1,so the problem solved.
The solution provided here didn't help solve my problem and so I'll provide a simple workaround in case others run into a similar problem. I simply used the pycocotools Python API from cocoapi to install pycocotools into my python 3.5 using the following commands inside cocoapi/PythonAPI
.
sudo make
sudo make install
sudo python3 setup.py install
I got the same problem, so I got an error when I ran: python download_and_convert_data.py
My solution was to rename the file as _mask.so