FastMaskRCNN icon indicating copy to clipboard operation
FastMaskRCNN copied to clipboard

cython_nms.so: failed to map segment from shared object

Open ToruHironaka opened this issue 6 years ago • 2 comments

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.

ToruHironaka avatar Oct 30 '17 16:10 ToruHironaka

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.

MartinPlantinga avatar Nov 03 '17 12:11 MartinPlantinga

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

ToruHironaka avatar Nov 03 '17 15:11 ToruHironaka