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]

Комментарии • 134

  • @ryoungseobkwon9660
    @ryoungseobkwon9660 2 года назад +2

    I sincerely want to say Thank you for your periodic nice videos!

  • @ayxanxasmmmdov1438
    @ayxanxasmmmdov1438 Год назад

    hi teacher, although i install compatible cuda and cudnn versions, tensorflow return false when i test gpu support. Which of versions do you use?

  • @zanelu2636
    @zanelu2636 5 месяцев назад +1

    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?

  • @ivan2221
    @ivan2221 2 года назад +2

    That's was an amazing tutorial and I'm really excited with this series. Thank you so much!

  • @rajatvardam2787
    @rajatvardam2787 Год назад

    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.

    • @hamzahra5063
      @hamzahra5063 Год назад

      No matching distribution found for tensorflow==2.0.0 , it gives this error how can i work this around please?

  • @souravkumarkhan1031
    @souravkumarkhan1031 2 года назад +1

    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.

  • @MatheusHenrique-jz1dc
    @MatheusHenrique-jz1dc Год назад +2

    Another excellent video, well explained step by step!!! Congrats

  • @technews16
    @technews16 4 месяца назад +1

    How do u convert to .egg extension? I am not able to do that

  • @karishmathumu5257
    @karishmathumu5257 2 месяца назад

    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?

  • @TheInspiry
    @TheInspiry 11 месяцев назад +3

    Hello, Do we need to point out clearly tensorflow-gpu==2.2.0 in the requirement file, Sir? Thank you.

    • @thomaso8315
      @thomaso8315 Месяц назад

      and just add Spyder at top. Saves a press on 'install' when in Anaconda.

  • @vikashkumar-cr7ee
    @vikashkumar-cr7ee 2 года назад +1

    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

    • @TruDeinoz
      @TruDeinoz Год назад

      Same here, did you solve it?

    • @vikashkumar-cr7ee
      @vikashkumar-cr7ee Год назад

      @@TruDeinoz it's a common error, still don't able to solve it. Let me know if are able to

    • @TruDeinoz
      @TruDeinoz Год назад

      @@vikashkumar-cr7ee Has it given you any problems? I'm going to just ignore it for now

    • @rajatvardam2787
      @rajatvardam2787 Год назад

      check your python version

  • @muris1112
    @muris1112 4 месяца назад +2

    is this possible to do in google colab?

  • @chanchan6312
    @chanchan6312 Год назад +1

    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?

    • @DigitalSreeni
      @DigitalSreeni  Год назад +1

      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.

  • @user-ou4op5rt4r
    @user-ou4op5rt4r 11 месяцев назад +3

    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

    • @technews16
      @technews16 4 месяца назад

      Did u find the solution

    • @tanaymukadam9582
      @tanaymukadam9582 2 месяца назад

      @@technews16 i found the solution

  • @michaelfenelon1423
    @michaelfenelon1423 Год назад +4

    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 !

  • @mohammaddawood3209
    @mohammaddawood3209 11 месяцев назад

    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

  • @insanbaktiparipurna9362
    @insanbaktiparipurna9362 Год назад

    hallo mr, what version GPU for TensorFlow 2.2. ? Thank you so much!

  • @mehmetsar3112
    @mehmetsar3112 Год назад

    You are awsome. Thank you for your all perfect lessons.

  • @patis.IA-AI
    @patis.IA-AI 10 месяцев назад

    I realy thank you for this particular tuto. It was me more then greatfull. Merci beaucoup!!!!

  • @bryanmoreira1995
    @bryanmoreira1995 Год назад

    Thank you very much. This video is very useful. Congratulations!!!

  • @MaicoTriaca132
    @MaicoTriaca132 Год назад +2

    Professor, thank you for the video!
    Just one question: what version of CUDA and cuDNN are you using?

    • @TruDeinoz
      @TruDeinoz Год назад

      Yes, or anyone else. What CUDA versions are you guys using?

    • @shrud3011
      @shrud3011 Год назад +1

      @@TruDeinoz10.1, you have to make sure it’s compatible with tf 2.2.0

  • @AlvaroVR8
    @AlvaroVR8 Год назад

    Which are the requirements if I want to work with tensorflow and keras GPU? @DigitalSreeni

  • @Flyforward226
    @Flyforward226 2 года назад

    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?

    • @DigitalSreeni
      @DigitalSreeni  2 года назад

      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.

  • @captainofthewhitetower
    @captainofthewhitetower 2 месяца назад

    Can we do it newer versions of Python ? Also Why Keras is never found ? Why!? Please

  • @shubhamsongire6712
    @shubhamsongire6712 Год назад

    Hello sir for this project which cuda and cudnn you have used

  • @user-is3vh7cl1c
    @user-is3vh7cl1c Год назад

    @DigitalSreeni i tried this, but my spyder is stuck after epoch 1/1, showing no error message.

  • @halitcetiner4048
    @halitcetiner4048 Год назад +2

    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?

    • @shwetadabetwar7276
      @shwetadabetwar7276 Год назад

      did you find the solution?

    • @karana2014
      @karana2014 Год назад

      Hi, I am having this problem as well. If you find a solution please let us know. Thank you!

    • @shwetadabetwar7276
      @shwetadabetwar7276 Год назад

      @@karana2014 for me it was because the tensorflow wasn't setup correct. I reinstalled the cuda and cudnn libraries again and it worked.

    • @shrud3011
      @shrud3011 Год назад

      What version of CUDA are u using? Also. What kind of GPU u have?

    • @-arabsoccer1553
      @-arabsoccer1553 Год назад

      @@shwetadabetwar7276 i stuck in same problem ,my cuda is 10.1 ,cudann is 7.6.1 ,the loss is nan ? have you find solution

  • @rosaaulia4
    @rosaaulia4 9 месяцев назад

    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.

  • @dantec.dagandanan3732
    @dantec.dagandanan3732 Год назад

    thanks so much sir, but what if i will use the yolo3 weights instead of RCNN?

  • @vikashkumar-cr7ee
    @vikashkumar-cr7ee 2 года назад

    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]

  • @user-bq4gh6fd4t
    @user-bq4gh6fd4t Год назад

    very well-explained, thank you

  • @user-qe8ux7qo1q
    @user-qe8ux7qo1q Год назад +1

    Thank you for the tutorials
    how can I print mrcnn_class_loss, mrcnn_bbox_loss ,rpn_box_loss, rpn_class_loss ?

  • @NagulSrnurthy
    @NagulSrnurthy 11 месяцев назад

    How can we convert this model or similar version into onnx?

  • @user-kn7ob4pu7m
    @user-kn7ob4pu7m Год назад

    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'

  • @-arabsoccer1553
    @-arabsoccer1553 Год назад +1

    The loss is nan bro, i appreciate your response.

    • @asqarsankibaev1789
      @asqarsankibaev1789 Год назад

      did you manage to solve it?

    • @-arabsoccer1553
      @-arabsoccer1553 Год назад +1

      @@asqarsankibaev1789 actually ,it works when i change the environment ,uninstall every thing , and start on new machine

    • @chemistrytian3931
      @chemistrytian3931 6 месяцев назад

      Hi,Same problem as well,did you find a solution? Looking forward to your reply,thank you!

  • @vikashkumar-cr7ee
    @vikashkumar-cr7ee 2 года назад +1

    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.

  • @siaevolt2576
    @siaevolt2576 Год назад

    thank you for your helpful video! How can i plot training and validation accuracy and loss of Mask RCNN?

  • @travelneer
    @travelneer Год назад

    Thank you so much! It worked!

  • @nicholashasson357
    @nicholashasson357 11 месяцев назад

    Brilliant video! Thank you so much! Keep up the great work. Anyway I can donate to your page?

  • @vishnushankararunendu5060
    @vishnushankararunendu5060 Год назад +1

    can we perform it in jupyter

  • @adrianrs79
    @adrianrs79 Год назад

    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

    • @DigitalSreeni
      @DigitalSreeni  Год назад +1

      Just use Detectron2's version of Mask R-CNN.

  • @sariskiattithapanayong6502
    @sariskiattithapanayong6502 10 месяцев назад

    is it possible to use PyTorch?

  • @puranjitsingh1782
    @puranjitsingh1782 2 года назад

    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

    • @DigitalSreeni
      @DigitalSreeni  2 года назад

      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.

  • @inquisitiverakib5844
    @inquisitiverakib5844 Год назад

    how to run shell / bash command in anaconda prompt ?? plz help

  • @haohmarux
    @haohmarux Год назад +1

    no work instalation :(, good oob but no run now :(

  • @abhishekkumarpandey1862
    @abhishekkumarpandey1862 Год назад

    Thank you.. if same code we want to run for 100 epochs then what changes need to be done?

    • @DigitalSreeni
      @DigitalSreeni  Год назад

      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

  • @mdyounusahamed6668
    @mdyounusahamed6668 Год назад

    AttributeError: module 'keras.engine' has no attribute 'Layer'
    Can someone tell me why am I getting this error and how to fix this?

    • @rajatvardam2787
      @rajatvardam2787 Год назад +2

      check your keras version. it needs to be 2.2. yours is likely latest one. dowgrade it.

  • @inquisitiverakib5844
    @inquisitiverakib5844 2 года назад

    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..

    • @DigitalSreeni
      @DigitalSreeni  2 года назад +1

      If the error is about not finding psutil library, you can pip install it and see if that helps.
      pypi.org/project/psutil/

    • @johnatantorres6946
      @johnatantorres6946 Год назад

      @@DigitalSreeni Thank you it helps. I needed to install psutil==5.9.0

  • @kimiasadreddini3459
    @kimiasadreddini3459 Год назад

    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?

  • @jurgenschadtler7011
    @jurgenschadtler7011 Год назад +1

    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

    • @jurgenschadtler7011
      @jurgenschadtler7011 Год назад

      Update: now i have an issue with the profiler "ProfilerNotRunningError: Cannot stop profiling. No profiler is running."

    • @YiwannaXm
      @YiwannaXm Год назад

      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

    • @osherrefaeli6780
      @osherrefaeli6780 11 месяцев назад

      ​@@jurgenschadtler7011 Hi, do you solve the problems? I had similar issue

    • @xuchengtong2013
      @xuchengtong2013 10 месяцев назад

      I had the same problem, creating the folder `E:\logdir\train\train\plugins\profile` manually works for me.

    • @sanjay-zo7mr
      @sanjay-zo7mr 7 месяцев назад

      @@YiwannaXm Thanks , had same issue,but now worked for me

  • @ricardogarciapaz
    @ricardogarciapaz Год назад

    se podría reemplazar COCO por SAM?

  • @botirkarim9293
    @botirkarim9293 2 года назад

    nice job keep continue!

  • @shaileshvarade
    @shaileshvarade Год назад +1

    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.

    • @TruDeinoz
      @TruDeinoz Год назад

      I have the same issue. Did you find a way to solve it?

    • @shaileshvarade
      @shaileshvarade Год назад

      @@TruDeinoz No. I didn't. I moved onto Google colab.

    • @TruDeinoz
      @TruDeinoz Год назад +1

      @@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.

  • @jeremyjerez5811
    @jeremyjerez5811 Год назад

    awesome!!

  • @gaviezri
    @gaviezri Год назад +2

    anyone else experiencing "loss: nan" during training?

    • @asqarsankibaev1789
      @asqarsankibaev1789 Год назад

      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

    • @gaviezri
      @gaviezri Год назад

      @@asqarsankibaev1789 I wasn’t able to solve it. Ended up working on the CPU

    • @asqarsankibaev1789
      @asqarsankibaev1789 Год назад

      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

  • @Edu_Quest
    @Edu_Quest Год назад

    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.

  • @sanjanadhingra1121
    @sanjanadhingra1121 Год назад

    I am not able to convert back it to egg file with changing the extension to .egg.

    • @Programlama101
      @Programlama101 Год назад

      hi, did you solve the problem?

    • @manojm1597
      @manojm1597 6 месяцев назад

      yes, for the two folder while compressing ....go to winrar and there during naming put .egg instead of .zip

  • @StaMariaRock
    @StaMariaRock Год назад

    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

    • @rajatvardam2787
      @rajatvardam2787 Год назад +1

      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.

  • @xuchengtong2013
    @xuchengtong2013 10 месяцев назад +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.

    • @xuchengtong2013
      @xuchengtong2013 10 месяцев назад

      By the way, I downgraded protobuf to 3.20.0 in order to be capable with the Keras version.

    • @xuchengtong2013
      @xuchengtong2013 10 месяцев назад

      My Python=3.7.11 on Windows ;
      My Python=3.7.3 on Linux

  • @rehmanayounis8429
    @rehmanayounis8429 Год назад

    Hi Sreeni, Your tutorials are amazing. I ran into error after converting back to egg file could you please assist

  • @Zhexian-mq2lf
    @Zhexian-mq2lf Год назад

    It still doesn't work for me. The version compatibility is too annoying.

    • @Zhexian-mq2lf
      @Zhexian-mq2lf Год назад +1

      well I fixed the problem with stackoverflow.com/questions/72441758/typeerror-descriptors-cannot-not-be-created-directly and finally it works.

    • @tungdinh3664
      @tungdinh3664 Год назад

      @@Zhexian-mq2lf can you elaborate? I spent 2 days already just to get all the packages installed and now facing incompatibility issues :(

    • @Zhexian-mq2lf
      @Zhexian-mq2lf Год назад +1

      @@tungdinh3664 if it asks you to downgrade something, just follow the link I shared

  • @zanyprogramming
    @zanyprogramming 2 года назад

    Thanks a lot for these great videos. I run into an error after pasting the egg file back : ModuleNotFoundError: No module named 'mrcnn'

    • @rehmanayounis8429
      @rehmanayounis8429 Год назад

      Samer Error ...Any solution found?????????????

    • @michaelfenelon1423
      @michaelfenelon1423 Год назад

      Run setup from the repository root directory
      python3 setup.py install

    • @kevinliu8130
      @kevinliu8130 Год назад

      @@rehmanayounis8429 hello, have you solve the problem?

    • @manojm1597
      @manojm1597 6 месяцев назад

      @@michaelfenelon1423 no then it once again takes the old .egg file so there would be problem again

  • @ShaizeOn1
    @ShaizeOn1 2 года назад

    i cannot thank you enough, but thanks a lot!

  • @GopikaAK
    @GopikaAK Год назад

    mport mrcnn.utils
    ModuleNotFoundError: No module named 'mrcnn' This error is showing in spyder,how to solve?

    • @rajatvardam2787
      @rajatvardam2787 Год назад

      make sure your environment you have selected is correct. spyder needs to be opened in (mask-tutorial) environemt.

    • @Programlama101
      @Programlama101 Год назад +1

      I've same problem. Do you have a solution?

    • @kevinliu8130
      @kevinliu8130 Год назад

      @@Programlama101 hello, have you solved the problem?

  • @osherrefaeli6780
    @osherrefaeli6780 11 месяцев назад

    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

    • @rahuladams4178
      @rahuladams4178 9 месяцев назад

      Did you find a solution I have the same error

  • @geospatial90
    @geospatial90 11 месяцев назад

    Sir, how can I cxport roi, mask layer to my drive?