FastMaskRCNN icon indicating copy to clipboard operation
FastMaskRCNN copied to clipboard

pycocotools/make

Open blgnksy opened this issue 7 years ago • 6 comments

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.

blgnksy avatar May 20 '17 16:05 blgnksy

Same probleme

HuangBo-Terraloupe avatar Jun 19 '17 15:06 HuangBo-Terraloupe

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#

abhishekrana avatar Jun 19 '17 20:06 abhishekrana

I solved the problem.

  1. I deleted the _mask.so.
  2. 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.

blgnksy avatar Jun 22 '17 22:06 blgnksy

I ran the code in ubuntu16.04,anaconda3,python 3.5,tensorflow 1.0.1,so the problem solved.

persephone94 avatar Aug 27 '17 08:08 persephone94

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 

hanskrupakar avatar Oct 15 '17 15:10 hanskrupakar

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

cssed avatar Oct 24 '17 05:10 cssed