0

Hello i am trying to use ML techniques to identify cars in an image using opencv.

I have been following this tutorial : https://medium.com/@ageitgey/snagging-parking-spaces-with-mask-r-cnn-and-python-955f2231c400. Great article and work.

I am trying it myself on my Rpi but i have been struggling a bit with dependencies problems during the installation of the dependencies of the main git library Mask RCNN. I have an import error when importing mrcnn.utils, each is exactly the same when importing imgaug. Error bellow.

Any suggestion on how to proceed.

thanks alot

Error message:

import mrcnn.config
 import mrcnn.utils
/usr/local/lib/python3.5/dist-packages/skimage/external/tifffile/tifffile.py:298:

UserWarning: ImportError: No module named '_tifffile'. Loading of some compressed images will be very slow. Tifffile.c can be obtained at http://www.lfd.uci.edu/~gohlke/ "ImportError: No module named '_tifffile'. " Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/dist-packages/mrcnn/utils.py", line 17, in import skimage.color File "/usr/local/lib/python3.5/dist-packages/skimage/init.py", line 177, in from .data import data_dir File "/usr/local/lib/python3.5/dist-packages/skimage/data/init.py", line 18, in from ._binary_blobs import binary_blobs File "/usr/local/lib/python3.5/dist-packages/skimage/data/_binary_blobs.py", line 2, in from ..filters import gaussian File "/usr/local/lib/python3.5/dist-packages/skimage/filters/init.py", line 3, in from .edges import (sobel, sobel_h, sobel_v, File "/usr/local/lib/python3.5/dist-packages/skimage/filters/edges.py", line 17, in from ..restoration.uft import laplacian File "/usr/local/lib/python3.5/dist-packages/skimage/restoration/init.py", line 8, in from ._denoise import (denoise_tv_chambolle, denoise_tv_bregman, File "/usr/local/lib/python3.5/dist-packages/skimage/restoration/_denoise.py", line 6, in from ..restoration._denoise_cy import _denoise_bilateral, _denoise_tv_bregman File "init.pxd", line 872, in init skimage.restoration._denoise_cy ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 112, got 124

KeyboardInterrupt

import numpy import imgaug Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/dist-packages/imgaug/init.py", line 2, in from imgaug.imgaug import * File "/usr/local/lib/python3.5/dist-packages/imgaug/imgaug.py", line 18, in import skimage.draw File "/usr/local/lib/python3.5/dist-packages/skimage/init.py", line 177, in from .data import data_dir File "/usr/local/lib/python3.5/dist-packages/skimage/data/init.py", line 18, in from ._binary_blobs import binary_blobs File "/usr/local/lib/python3.5/dist-packages/skimage/data/_binary_blobs.py", line 2, in from ..filters import gaussian File "/usr/local/lib/python3.5/dist-packages/skimage/filters/init.py", line 11, in from .thresholding import (threshold_local, File "/usr/local/lib/python3.5/dist-packages/skimage/filters/thresholding.py", line 8, in from ..transform import integral_image File "/usr/local/lib/python3.5/dist-packages/skimage/transform/init.py", line 1, in from .hough_transform import (hough_line, hough_line_peaks, File "/usr/local/lib/python3.5/dist-packages/skimage/transform/hough_transform.py", line 2, in from ._hough_transform import (_hough_circle, File "init.pxd", line 872, in init skimage.transform._hough_transform ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 112, got 124 `

  • Please edit your question to properly format your code to make it readable. > is used for quotes, not code. You just need to paste in your code, highlight it and click the {} icon to format it. – ben_nuttall Mar 16 at 13:18
1

Here's a tutorial on how to work out the dependencies for a Python package:

https://blog.piwheels.org/how-to-work-out-the-missing-dependencies-for-a-python-package/

  • Thanks for the info however mrcnn does not seem to have a .so file inside /usr/local/lib/python3.5/dist-packages/mrcnn. Neither i have it on numpy : /usr/lib/python3/dist-packages/numpy – Miguel Bordalo Mar 18 at 12:47
  • Check the list of other Python modules it depends on – ben_nuttall Mar 18 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.