priya-dwivedi / Deep-Learning

MIT License
3.35k stars 2.49k forks source link

module 'keras.engine' has no attribute 'Layer' error #157

Open Ishan-10038 opened 3 years ago

Ishan-10038 commented 3 years ago

Dear Author, When I run this part of the code "# Import all the packages of Matterport Mask R-CNN import os import sys import itertools import math import logging import json import re import random from collections import OrderedDict import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.lines as lines from matplotlib.patches import Polygon from tensorflow import keras from mrcnn import utils from mrcnn import visualize from mrcnn.visualize import display_images from mrcnn import model import mrcnn.model as modellib from mrcnn.model import log import cv2 import custom,custom_1 import imgaug,h5py,IPython

%matplotlib inline"

I get this error AttributeError Traceback (most recent call last) in () 22 from mrcnn import visualize 23 from mrcnn.visualize import display_images ---> 24 from mrcnn import model 25 import mrcnn.model as modellib 26 from mrcnn.model import log

/content/Mask_RCNN/mrcnn/model.py in () 253 254 --> 255 class ProposalLayer(KE.Layer): 256 """Receives anchor scores and selects a subset to pass as proposals 257 to the second stage. Filtering is done based on anchor scores and

AttributeError: module 'keras.engine' has no attribute 'Layer' Please reply

afghani-iitkgp commented 2 years ago

git clone --quiet https://github.com/matterport/Mask_RCNN.git pip install -r requirements.txt python setup.py install