matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.52k stars 11.68k forks source link

Maskrcnn import error #3027

Open xavierPen24 opened 5 months ago

xavierPen24 commented 5 months ago

I've been trying to import maskrcnn using the below code

!git clone https://github.com/matterport/Mask_RCNN.git !pip install -r /content/Mask_RCNN/requirements.txt !pip show mask-rcnn %cd /content/Mask_RCNN ! python setup.py install

However I get an error saying,

/content/Mask_RCNN/mrcnn/model.py:2359: SyntaxWarning: "is" with a literal. Did you mean "=="? if os.name is 'nt': ModuleNotFoundError Traceback (most recent call last) in <cell line: 7>() 5 from mrcnn.visualize import display_instances 6 from mrcnn.config import Config ----> 7 from mrcnn.model import MaskRCNN 8 import tensorflow as tf 9 from tensorflow import keras

/content/Mask_RCNN/mrcnn/model.py in 21 import keras.backend as K 22 import keras.layers as KL ---> 23 import keras.engine as KE 24 import keras.models as KM 25

ModuleNotFoundError: No module named 'keras.engine'

How can I fix this?

coderboyisongithub commented 4 months ago

of all the issue faced in this list....dockize the program .You resolve one other will come. Python libraries are unreliable

comus3 commented 4 months ago

Hi, I've been looking for an answer to this. I think what we need to do is find the right versions of tensor flow,keras and mrcnn to use together. perhaps go back in the issues tab, see when it wasn't an issue and try to correlate the date before the lates likewise issue with the release date of updates of each packages?

JanSkn commented 3 months ago

also running into this problem, I think keras.engine requires tensorflow 1.x which reached end of life in 2020 if I researched correctly.

Apparently, this is the solution: https://github.com/matterport/Mask_RCNN/issues/3024