284 - Installing Mask RCNN and troubleshooting errors
HTML-код
- Опубликовано: 10 сен 2024
- Installing Mask RCNN for Windows on Python 3.7 and TensorFlow 2.2.
Link to the original repo from matterport that works on TF1.x:
github.com/mat...
Link to the repo that works on TF2.x :
github.com/ahm...
requirements.txt from the file used in the video:
numpy==1.20.3
scipy==1.4.1
Pillow==8.4.0
cython==0.29.24
matplotlib
scikit-image==0.16.2
tensorflow==2.2.0
keras==2.3.1
opencv-python==4.5.4.60
h5py==2.10.0
imgaug==0.4.0
IPython[all]
I sincerely want to say Thank you for your periodic nice videos!
Glad you like them!
hi teacher, although i install compatible cuda and cudnn versions, tensorflow return false when i test gpu support. Which of versions do you use?
I used model.keras_model.save(model_path) and got a TypeError: Unable to extract _thread.RLock object, could someone tell me how to fix it?
That's was an amazing tutorial and I'm really excited with this series. Thank you so much!
Glad to hear it!
Even after 9 months this video is very much accurate. Very detailed and on point. It worked for me so well. Thankyou @DigitalSreeni for this yet another amazing tutorial.
No matching distribution found for tensorflow==2.0.0 , it gives this error how can i work this around please?
I really want to thank you to make such videos. It's very helpful.I have learnt a lot from your videos, the way you explain is really appreciable.
Glad to hear that
Another excellent video, well explained step by step!!! Congrats
How do u convert to .egg extension? I am not able to do that
Thank you very much for the informative videos.
I would like to ask if we can convert yolov4-darknet bounding boxes to the Mask RCNN format?
Also,
why is it 131?
Hello, Do we need to point out clearly tensorflow-gpu==2.2.0 in the requirement file, Sir? Thank you.
and just add Spyder at top. Saves a press on 'install' when in Anaconda.
hi Sreeni, which version of nbconvert you are using for this tutorial. I am getting an error (nbconvert >=4.0: None (NOK)) while opening spyder
Same here, did you solve it?
@@TruDeinoz it's a common error, still don't able to solve it. Let me know if are able to
@@vikashkumar-cr7ee Has it given you any problems? I'm going to just ignore it for now
check your python version
is this possible to do in google colab?
thanks for your effort!
But I hv a question
can the code completed using TF1.X migrate directly to TF2.X? Does it have any difference on the development part?
TF1.x code cannot used directly in TF2.x as many sub-libraries are moved to different locations. You need to put in some effort in modifying the code to be TF2.x compatible.
i am not able to convert zip to egg simply by changing the extension and couldn't copy the same in site packages can u tell me the solution please
Did u find the solution
@@technews16 i found the solution
Hi Sreeni, many thanks for this. Can you please share the version of CUDA and cuDNN, Nvidia driver, device...etc please. I'm trying to use a Geforce 2080 with CUDA 11.4, cuDNN 8.2, Py 3.8 and it runs into loads of issues :D.
thanks in advance !
Hello, is there a way to run mask r-cnn on google colab? As of now, you can’t downgrade tensorflow to something older than 2.8.0 and it’s not working on the current tensorflow version and I’m not sure even sure if there are any compatibility issues
hallo mr, what version GPU for TensorFlow 2.2. ? Thank you so much!
You are awsome. Thank you for your all perfect lessons.
I realy thank you for this particular tuto. It was me more then greatfull. Merci beaucoup!!!!
Glad it was helpful!
Thank you very much. This video is very useful. Congratulations!!!
Professor, thank you for the video!
Just one question: what version of CUDA and cuDNN are you using?
Yes, or anyone else. What CUDA versions are you guys using?
@@TruDeinoz10.1, you have to make sure it’s compatible with tf 2.2.0
Which are the requirements if I want to work with tensorflow and keras GPU? @DigitalSreeni
Thank you very much for this informative tutorial! Quick question, if I were to use colab GPU to run mask RCNN, is there a way that I can change the files in the site packages?
Yes. Look for the location of the installed library.
!pip show
Navigate to that location. You should be able to navigate up and down directories in the Files tab and also select files to edit.
Can we do it newer versions of Python ? Also Why Keras is never found ? Why!? Please
Hello sir for this project which cuda and cudnn you have used
@DigitalSreeni i tried this, but my spyder is stuck after epoch 1/1, showing no error message.
The result is loss: nan - val_loss: nan. Considering that there may be a zero division problem, the code has been edited, but no solution has been found. Has anyone encountered a problem like this?
did you find the solution?
Hi, I am having this problem as well. If you find a solution please let us know. Thank you!
@@karana2014 for me it was because the tensorflow wasn't setup correct. I reinstalled the cuda and cudnn libraries again and it worked.
What version of CUDA are u using? Also. What kind of GPU u have?
@@shwetadabetwar7276 i stuck in same problem ,my cuda is 10.1 ,cudann is 7.6.1 ,the loss is nan ? have you find solution
Thank you so much for this tutorial but I faced an issue while installing the requirements.txt, it says ERROR: Failed building wheel for h5py. Please help me to solve this problem.
thanks so much sir, but what if i will use the yolo3 weights instead of RCNN?
Dear Sreeni
while running the code (python -m pip install -r requirements.txt) in virtual env , I got the error
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
I am using
numpy ==1.22.3
scipy ==1.8.0
Pillow ==8.4.0
cython == 0.29.28
matplotlib
scikit-image==0.16.2
tensorflow==2.2.0
keras==2.3.1
opencv-python==4.6.0
h5py==2.10.0
imgaug ==0.4.0
IPython[all]
very well-explained, thank you
Thank you for the tutorials
how can I print mrcnn_class_loss, mrcnn_bbox_loss ,rpn_box_loss, rpn_class_loss ?
How can we convert this model or similar version into onnx?
Some one please help me
when I want to know tf installed or not as import tensorflow as tf
i am getting the following error
ImportError: cannot import name 'pywrap_tensorflow' from 'tensorflow_core.python'
The loss is nan bro, i appreciate your response.
did you manage to solve it?
@@asqarsankibaev1789 actually ,it works when i change the environment ,uninstall every thing , and start on new machine
Hi,Same problem as well,did you find a solution? Looking forward to your reply,thank you!
Dear Sreeni, KIndly look into my query (subprocess-exited-with-error) commented below and suggest me to solve the issue for this tutorial. Additionally, compatibility issues of the OS and different python module while running in local PC. I am requesting you to make a video in google colab so that we can utilise GPU as well as get rid of compatibility issues.
thank you for your helpful video! How can i plot training and validation accuracy and loss of Mask RCNN?
Thank you so much! It worked!
Brilliant video! Thank you so much! Keep up the great work. Anyway I can donate to your page?
can we perform it in jupyter
I have the same issues but in Linux, even I removed one slash for the login issue, it still continues? any idea? best and thanks
Just use Detectron2's version of Mask R-CNN.
is it possible to use PyTorch?
I am not able to create an environment for python version 3.7.11, and the code is not running in different versions of python like 3.8
Not sure why you're not able to create 3.7.11 environment. It can be frustrating to get these type of libraries to work on the latest python versions.
how to run shell / bash command in anaconda prompt ?? plz help
no work instalation :(, good oob but no run now :(
Thank you.. if same code we want to run for 100 epochs then what changes need to be done?
Check out this video to learn about training your own Mask RCNN model. You can change the number of epochs among other parameters. ruclips.net/video/MF2AYo0SO6s/видео.html
AttributeError: module 'keras.engine' has no attribute 'Layer'
Can someone tell me why am I getting this error and how to fix this?
check your keras version. it needs to be 2.2. yours is likely latest one. dowgrade it.
thanks a lot for this video. but i got stuck at 9:51. anaconda navigator pop up this message "application may have produces error".in that message it's something called psutil problem . How to fix it?
thanks in advance..
If the error is about not finding psutil library, you can pip install it and see if that helps.
pypi.org/project/psutil/
@@DigitalSreeni Thank you it helps. I needed to install psutil==5.9.0
thank you for this awesome tutorials. i was trying to run the code but i keep getting numpy error that there is no module. which i made sure that i have numpy correctly. can anyone help?
Amazing tutorial! The only thing im struggling is when i try to train the kanagaroo proyect like the one in the video, after epoch 1 it throws the following error
"NotFoundError: Failed to create a directory: /logdir/train\train\plugins\profile\2023-06-03_12-26-16; No such file or directory"
If someone encounter this problem and could help me it will be great, thanks
Update: now i have an issue with the profiler "ProfilerNotRunningError: Cannot stop profiling. No profiler is running."
I had the same problem , and what worked for me is in the .egg file uncomment lines 2277 and 2278 and comment out 2279 , so basically choose the non hard coded self.log_dir assignment
@@jurgenschadtler7011 Hi, do you solve the problems? I had similar issue
I had the same problem, creating the folder `E:\logdir\train\train\plugins\profile` manually works for me.
@@YiwannaXm Thanks , had same issue,but now worked for me
se podría reemplazar COCO por SAM?
nice job keep continue!
Hey Sreeni, your videos have been great and have learned a lot. While following the above mask rcnn example, I had encountered two issue, please have a look and let me know how to resolve it. After starting the "Spyder" from "Anaconda Navigator" I am getting error two error messages 1. An error ocurred while starting the kernel, Unable to load extension: pydevd_plugins.extensions.types.pydevd_plugin_pandas_types and 2. You have missing dependencies! #Mandatory >=4.0 : None (NOK) Please install them to avoid messages.
I have the same issue. Did you find a way to solve it?
@@TruDeinoz No. I didn't. I moved onto Google colab.
@@shaileshvarade Hey, sorry for the late reply. I simply deleted pydevd_plugins.extensions.types.pydevd_plugin_pandas_types. It's been working fine up until now.
awesome!!
anyone else experiencing "loss: nan" during training?
Yes, did you manage to solve it? when I used gtx 1060 it worked, but when I changed the video card to rtx 4070, loss nan appeared
@@asqarsankibaev1789 I wasn’t able to solve it. Ended up working on the CPU
Finally, I install mask r-cnn from other fork(leekunhee).
python 3.8, tf 2.4.1, cuda 11.1, cudnn 8.0.5. In process fix some package incompatibilities and rename cusolver64_11.dll to cusolver64_10.dll
Now I can use gpu
While running the prediction python code I ma getting this issue. pls help me -> "Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/lib/python3.7/dist-packages/cv2/../../lib64:/usr/lib64-nvidia" thanks in advance.
I am not able to convert back it to egg file with changing the extension to .egg.
hi, did you solve the problem?
yes, for the two folder while compressing ....go to winrar and there during naming put .egg instead of .zip
Very good video, I tried all the steps (and fixed maaaaany dependencies) but the code is "running", the problem I'm facing is that the code runs (sloooooow) but is not showing any result, the kangaroo image comes with no mask on it, and I do not know why is that.
I tried with the Python 3.8 version, and there are some other problems.
In general terms, amazing video, but the repository is fuuuuuuull of issues
python 3.8 has issues. I tried as well. Just downgrade to python 3.7 and do as he explains. Everything goes back to normal.
As for your slow running code, Please make sure you have a *dedicated* GPU in your machine. if its not there, the code will; by default, go into CPU mode which very likely is the cause of your slow machine. as for no result, increase the epochs. That will help. make it 10 instead of 1.
I changed my requirements.txt as following on my Windows computer:
numpy==1.20.3
scipy==1.4.1
Pillow==8.4.0
cython==0.29.24
matplotlib
protobuf==3.20.0
scikit-image==0.16.2
tensorflow==2.0.0
keras==2.3.1
opencv-python==4.5.4.60
h5py==2.10.0
imgaug==0.4.0
IPython[all]
But this way I can only run CPU as my Windows has no GPU support.
While I changed requirements.txt as following on a Linux Sever with GPU:
numpy
scipy
Pillow
cython
matplotlib
protobuf==3.20.0
scikit-image==0.16.2
tensorflow-gpu==2.0.0
keras==2.3.1
opencv-python
h5py==2.10.0
imgaug
IPython[all]
and conda installed cudnn=7.6.0 cuda=10.0
All the kangaroo training and predicting worked fine.
By the way, I downgraded protobuf to 3.20.0 in order to be capable with the Keras version.
My Python=3.7.11 on Windows ;
My Python=3.7.3 on Linux
Hi Sreeni, Your tutorials are amazing. I ran into error after converting back to egg file could you please assist
It still doesn't work for me. The version compatibility is too annoying.
well I fixed the problem with stackoverflow.com/questions/72441758/typeerror-descriptors-cannot-not-be-created-directly and finally it works.
@@Zhexian-mq2lf can you elaborate? I spent 2 days already just to get all the packages installed and now facing incompatibility issues :(
@@tungdinh3664 if it asks you to downgrade something, just follow the link I shared
Thanks a lot for these great videos. I run into an error after pasting the egg file back : ModuleNotFoundError: No module named 'mrcnn'
Samer Error ...Any solution found?????????????
Run setup from the repository root directory
python3 setup.py install
@@rehmanayounis8429 hello, have you solve the problem?
@@michaelfenelon1423 no then it once again takes the old .egg file so there would be problem again
i cannot thank you enough, but thanks a lot!
You're welcome!
mport mrcnn.utils
ModuleNotFoundError: No module named 'mrcnn' This error is showing in spyder,how to solve?
make sure your environment you have selected is correct. spyder needs to be opened in (mask-tutorial) environemt.
I've same problem. Do you have a solution?
@@Programlama101 hello, have you solved the problem?
Thanks
notfounderror: failed to create a directory: ./kangaroo_cfg20230927t0739\train\plugins\profile\2023-09-27_07-40-24; no such file or directory
Its an issue with permission? Because its create only the cfg And train folder while running
Did you find a solution I have the same error
Sir, how can I cxport roi, mask layer to my drive?