Open Radhika-Keni opened 3 years ago
Hey if you got the solution can you please share it? I'm also having a lot of issues in compatible version
Hi , Yes there is a temporary solution . Use tensor flow 1.15.3 and keras 2.2.4( acknowledgement for the fix to to Dr. Jason Brownlee). This will resolve all the issues mentioned in the error above.
However , I would still call this issue out as an open issue and request Matter port team to please fix it .MaskRCNN library built is not upward compatible , please look into this
Also in Google Colab, using the following:
!git clone --quiet https://github.com/matterport/Mask_RCNN.git
!pip install -r requirements.txt
!python setup.py install
and then
import mrcnn.model as modellib
I get the same exact AttributeError about "no Layer".
The setup/install (the GIT clone and requirements) uses keras and tensorflow 2.5.0. I don't know how to tell Colab to change the versions to something else, as the comment by @Radhika-Keni suggests.
There is a bug on Google colab due to a recent upgrade that happened at their end (maybe 2 weeks ago). The impact of the bug is that it does not allow us to downgrade keras version. Google colab has provided a temporary solution for this issue , here is the solution provided by google https://github.com/googlecolab/colabtools/issues/2068 I hope this helps you guys get unblocked
@Radhika-Keni Hey I trained my model and visualized the data. My training was held on June 3, 2021. I used:
pip uninstall keras-nightly pip uninstall -y tensorflow h5py==2.10.0 tensorflow==1.15 tensorflow-gpu==1.15.0 keras==2.1.6
Great !
!pip uninstall keras -y !pip uninstall keras-nightly -y !pip uninstall keras-Preprocessing -y !pip uninstall keras-vis -y !pip uninstall tensorflow -y !pip uninstall h5py -y
!pip install tensorflow==1.13.1 !pip install keras==2.0.8 !pip install h5py==2.10.0
2.0.8
ERROR: Could not find a version that satisfies the requirement tensorflow==1.13.1 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0) ERROR: No matching distribution found for tensorflow==1.13.1
Hi @Nouman945 look this
@Radhika-Keni Hey I trained my model and visualized the data. My training was held on June 3, 2021. I used:
pip uninstall keras-nightly pip uninstall -y tensorflow h5py==2.10.0 tensorflow==1.15 tensorflow-gpu==1.15.0 keras==2.1.6
@Radhika-Keni Hey I trained my model and visualized the data. My training was held on June 3, 2021. I used:
pip uninstall keras-nightly pip uninstall -y tensorflow h5py==2.10.0 tensorflow==1.15 tensorflow-gpu==1.15.0 keras==2.1.6
how did u train ur model? can u help me with ur script?
@Aisharjaa I did a custom model of the balloon.py example.
Find my answer here: https://github.com/matterport/Mask_RCNN/issues/2666#issuecomment-906773778
I'm having similar problems:
import mrcnn.model as modellib
class ProposalLayer(KE.Layer): AttributeError: module 'keras.engine' has no attribute 'Layer'
Having tried now the solutions posted above and at SO I can confirm that nothing works at the moment (using the "requirements.txt" in the distribution). Downgrading isn't even a solution as recommended before. Even if I can find a matching distribution I am running into other problems as for example spyder crashes after installing earlier tensorflow versions because spyder needs typing-extensions-4.0.1. and not typing-extensions 3.7.4. Please could the matterport team look into that issue? This error kills the whole approach.
Having tried now numerous solutions posted here and at SO I can confirm that nothing works at the moment when using the "requirements.txt" in the distribution.
Downgrading isn't even a solution as recommended before. Even if I can find a matching distribution I am running into other problems as for example spyder crashes after installing tensorflow 2.5.2 because spyder needs typing-extensions-4.0.1. and not typing-extensions 3.7.4.
Please could the matterport team look into that issue as this error kills the whole approach.
I can help you set up your environment.
million thanks - how to proceed? Should I set up a new environment or do you have a Docker container?
million thanks - how to proceed? Should I set up a new environment or do you have a Docker container?
Set up a fresh anaconda Environment using
conda create -n myenv python=3.6.13
Use tensorflow==1.15.0, Keras==2.2.4, h5py==2.8.0
These worked for me. Or you can reach out to me here directly. muhmmadnouman945@gmail.com
I'll be glad to help you.
my hero! just for posteriority
conda create --name myenv python=3.6.13 tensorflow==1.15.0 Keras==2.2.4 h5py==2.8.0 pip
conda activate myenv
git clone https://github.com/matterport/Mask_RCNN.git
cd ~/Mask_RCNN-master
pip install -r requirements.txt
git clone https://github.com/philferriere/cocoapi.git
pip install pycocotools
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
wget https://github.com/matterport/Mask_RCNN/releases/download/v2.1/mask_rcnn_balloon.h5 > Mask_RCNN/mask_rcnn_balloon.h5
conda deactivate
I'm glad this worked for You. let me know if you need help further.
On Tue, Dec 7, 2021 at 7:16 PM under-score @.***> wrote:
my hero! just for posteriority
conda create --name myenv python=3.6.13 tensorflow==1.15.0 Keras==2.2.4 h5py==2.8.0 pip conda activate myenv cd ~/Mask_RCNN-master pip install -r requirements.txt git clone https://github.com/matterport/Mask_RCNN.git git clone https://github.com/philferriere/cocoapi.git pip install pycocotools pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI wget "https://github.com/matterport/Mask_RCNN/releases/download/v2.1/mask_rcnn_balloon.h5" > Mask_RCNN/mask_rcnn_coco.h5 conda deactivate
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matterport/Mask_RCNN/issues/2587#issuecomment-987966023, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMB72JQEKEQZQZWSDZ7E25LUPYJL5ANCNFSM46A6DQXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
which python version did you use? I used 3.7.9 and followed your versions, but the same error still pops out.
scroll up -> 3.6.13
my hero! just for posteriority
conda create --name myenv python=3.6.13 tensorflow==1.15.0 Keras==2.2.4 h5py==2.8.0 pip conda activate myenv git clone https://github.com/matterport/Mask_RCNN.git cd ~/Mask_RCNN-master pip install -r requirements.txt git clone https://github.com/philferriere/cocoapi.git pip install pycocotools pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI wget https://github.com/matterport/Mask_RCNN/releases/download/v2.1/mask_rcnn_balloon.h5 > Mask_RCNN/mask_rcnn_balloon.h5 conda deactivate
I did this but still got the same error. Any other ideas?
@Radhika-Keni Hey I trained my model and visualized the data. My training was held on June 3, 2021. I used:
pip uninstall keras-nightly pip uninstall -y tensorflow h5py==2.10.0 tensorflow==1.15 tensorflow-gpu==1.15.0 keras==2.1.6
Hi @johannaengman look this
8.0
Can I see the error.?
@Radhika-Keni Hey I trained my model and visualized the data. My training was held on June 3, 2021. I used:
pip uninstall keras-nightly pip uninstall -y tensorflow h5py==2.10.0 tensorflow==1.15 tensorflow-gpu==1.15.0 keras==2.1.6
Hey @nataliameira I am using this method on 16 Feb 2023 and I am getting this error please help ERROR: No matching distribution found for tensorflow==1.15.0
ERROR: No matching distribution found for keras==2.16
@Radhika-Keni Hey I trained my model and visualized the data. My training was held on June 3, 2021. I used: pip uninstall keras-nightly pip uninstall -y tensorflow h5py==2.10.0 tensorflow==1.15 tensorflow-gpu==1.15.0 keras==2.1.6
Hey @nataliameira I am using this method on 16 Feb 2023 and I am getting this error please help ERROR: No matching distribution found for tensorflow==1.15.0
ERROR: No matching distribution found for keras==2.16
Have you found out about this? I have the same problem..
Google colab no longer supports tensor flow 1.X ,check this stackoverflow link on the same https://stackoverflow.com/questions/73215696/did-colab-suspend-tensorflow-1-x
On Tue, Feb 28, 2023 at 7:58 PM mathhauk @.***> wrote:
@Radhika-Keni https://github.com/Radhika-Keni Hey I trained my model and visualized the data. My training was held on June 3, 2021. I used: pip uninstall keras-nightly pip uninstall -y tensorflow h5py==2.10.0 tensorflow==1.15 tensorflow-gpu==1.15.0 keras==2.1.6
Hey @nataliameira https://github.com/nataliameira I am using this method on 16 Feb 2023 and I am getting this error please help ERROR: No matching distribution found for tensorflow==1.15.0
ERROR: No matching distribution found for keras==2.16
Have you found out about this? I have the same problem..
— Reply to this email directly, view it on GitHub https://github.com/matterport/Mask_RCNN/issues/2587#issuecomment-1448280597, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQJXEKK67YOGBPXGP4QGQ53WZYDQ3ANCNFSM46A6DQXA . You are receiving this because you were mentioned.Message ID: @.***>
hey, @rvbabera
I trained the model on my local machine. At the time, I remember that I managed to run on the colab, but it was very difficult. I don't remember how to resolve these errors. I am really sorry.
Hi , I am in the process of implementing this library . I am using the following(recommended by matterport) versions of keras & Tensor flow .Code is being executed on Google Colab.
Keras: 2.5.0 Tensor Flow :2.50
I am getting the following error
AttributeError Traceback (most recent call last)