CharlesShang / FastMaskRCNN

Mask RCNN in TensorFlow
Apache License 2.0
3.1k stars 1.1k forks source link

cython_nms.so: failed to map segment from shared object #167

Open ToruHironaka opened 6 years ago

ToruHironaka commented 6 years ago

I always got below error when I ran python train/train.py

Traceback (most recent call last): File "train/train.py", line 21, in import libs.nets.pyramid_network as pyramid_network File "train/../libs/nets/pyramid_network.py", line 9, in from libs.boxes.roi import roi_cropping File "train/../libs/boxes/init.py", line 7, in from . import cython_nms ImportError: train/../libs/boxes/cython_nms.so: failed to map segment from shared object

I have completed how-to step 1-4 but I install coco API to my system instead of local because I always got below error message and I could not run download_and_convert_data.py

Traceback (most recent call last): File "download_and_convert_data.py", line 10, in from libs.datasets import download_and_convert_coco File "/media/Data4TB01/RCNN_Mask/FastMaskRCNN_TensorFlow/FastMaskRCNN-master/libs/datasets/download_and_convert_coco.py", line 17, in from libs.datasets.pycocotools.coco import COCO File "/media/Data4TB01/RCNN_Mask/FastMaskRCNN_TensorFlow/FastMaskRCNN-master/libs/datasets/pycocotools/coco.py", line 55, in from libs.datasets.pycocotools import mask as maskUtils # change importing File "/media/Data4TB01/RCNN_Mask/FastMaskRCNN_TensorFlow/FastMaskRCNN-master/libs/datasets/pycocotools/mask.py", line 3, in import libs.datasets.pycocotools._mask as _mask ImportError: /media/Data4TB01/RCNN_Mask/FastMaskRCNN_TensorFlow/FastMaskRCNN-master/libs/datasets/pycocotools/_mask.so: failed to map segment from shared object

So, I install coco API to my system after then I could convert the data and complete step 3, 4. Then, I ran python train/train.py

I got the above error: ImportError: train/../libs/boxes/cython_nms.so: failed to map segment from shared object.

MartinPlantinga commented 6 years ago

The reason you are getting that message is probably that the drive you have mounted, i.e. /media/Data4TB01/ does not have executable permission. Remount the partition with executable permission as explained in: https://askubuntu.com/questions/311438/how-to-make-tmp-executable.

If you mount the drive with fstab, see: https://askubuntu.com/questions/678857/fstab-doesnt-mount-with-exec.

ToruHironaka commented 6 years ago

@MartinPlantinga Thank! it was my bad. I could not find it out by myself.