Real Time Face Mask Detection with Tensorflow and Python | Custom Object Detection w/ MobileNet SSD

Поділитися
Вставка
  • Опубліковано 20 сер 2024
  • Ever wanted to build your very own custom object detector?
    Got lost with all the tutorials and installation?
    Well…I hear you…I went through the
    EXACT. SAME. THING.
    So, let’s flip it up. In this video we’re going to go through how to build a custom object detection model that can be used to make detections in real time. Now whilst we’re using it for detecting face masks this can be easily repurposed to perform real-time detection for a whole range of use cases simply by updating the annotations and the label map.
    In this video you’ll learn how to:
    1. Install labelImg and label images from scratch for object detection
    2. Train and run a custom object detector for face mask detection
    3. Use transfer learning to train on top of existing SOTA models
    4. Setup a proper workflow and directory structure for training
    5. Make detections in real time using the trained model
    Get the training template here: github.com/nic...
    Other Links Mentioned in the Video
    LabelImg: github.com/tzu...
    Kaggle Repo: www.kaggle.com...
    Installing the Tensorflow Object Detection API: tensorflow-obj...
    Tensorflow Models: github.com/ten...
    Tensorflow 2 Detection Model Zoo (for alternate pre-trained models): github.com/ten...
    Oh, and don't forget to connect with me!
    LinkedIn: / nicholasrenotte
    Facebook: / nickrenotte
    GitHub: github.com/nic...
    Happy coding!
    Nick
    P.s. Let me know how you go and drop a comment if you need a hand!

КОМЕНТАРІ • 1,8 тис.

  • @reybato4788
    @reybato4788 3 роки тому +15

    Thank you Nicholas you help my project in school.. Im so glad i finally found your videos.. I learn so much....❤❤

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +2

      Heya @Rey, thanks so much. Glad you learned a ton 🤗

    • @vishnukeerthi5024
      @vishnukeerthi5024 3 роки тому

      @@NicholasRenotte bro I have a small doubt if u train the model with u r photos is it possible for the model to detect all the other people whether they were a mask or nott??

    • @vishnukeerthi5024
      @vishnukeerthi5024 3 роки тому

      Is in possible with that same model than how to use the same model to recognise other people tooo ex: like it may be installed in public places where It can alert to wear a mask

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      @@vishnukeerthi5024 definitely, ideally you would want to provide additional examples with other people when training!

  • @vrishabvishnu5520
    @vrishabvishnu5520 3 роки тому +8

    Hey!!! hope you are doing good?!Glad to see this video! was eagerly waiting for it since last month!!

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      YESSS! It took a little while but got it out at last. Tried to make it as streamlined as possible so the code is reusable. Let me know how you go with it @anonymous three!

  • @pavinlimpotong9141
    @pavinlimpotong9141 2 роки тому +5

    Thank you so much Nick, I can tell that you put so much effort into your youtube channel and you really care about what you are doing. Nice editing, detail explaination, and you even answer some of the comments. Again thank you so much for the video and I'm looking forward for the next video!!!

  • @jeromevandenbossche1632
    @jeromevandenbossche1632 3 роки тому +4

    Just here to thank you, after weeks trying to install and run Tensorflow in windows it finally works thanks to you !!!! and please continue with the good tutorials, i'm subbing =)

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +2

      I feel that pain in my soul (went through it as well). Glad you got it up and running! What's next on your project list!?

    • @saisharaneruventi2180
      @saisharaneruventi2180 3 роки тому +1

      Can I have the code

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      @@saisharaneruventi2180 link in the description!

    • @prajwalkumar5074
      @prajwalkumar5074 3 роки тому

      Hello,
      Can I know the version of python and tensorflow you have installed,
      I have installed tensorflow 2.1.3 and python 3.8 and error regarding gfile is popping up.
      Please help!!!

  • @samtech26
    @samtech26 2 роки тому +6

    excellent explanation. Turkish resources on these subjects are limited. Thank you very much. I am grateful to you. Allah you bless you.

  • @NicholasRenotte
    @NicholasRenotte  3 роки тому +7

    Hey y'all! Wrote up a couple of steps to setup your environment. I'm planning on doing a video on this but until then, here's a crash course post:
    1. First up install Python 3.7.4. Download and install the package for your OS that has the words 2019.10 in it from here repo.anaconda.com/archive/. This should give you 3.7.4 to work with.
    2. Then install Visual Studio C++ 2015 from here: go.microsoft.com/fwlink/?LinkId=691126. Tensorflow needs this in order to compile
    3. OPTIONAL IF YOU HAVE A GPU - Install Cuda and Cudnn. Install Cuda first, then install Cudnn.
    - Cuda: 10.1 - developer.nvidia.com/cuda-10.1-download-archive-base
    - Cudnn: 7.6.5 - developer.nvidia.com/rdp/cudnn-download
    Once Cudnn is installed you need to copy the Cudnn files into their respective folders inside the Cuda directory. I used this as a guide: towardsdatascience.com/installing-tensorflow-with-cuda-cudnn-and-gpu-support-on-windows-10-60693e46e781
    4. Then install Protoc 3.13 from here: github.com/protocolbuffers/protobuf/releases. For windows, download the repository and then add it to your PATH file.
    5. Then install python packages using the pip command:
    Tensorflow: 2.3.1 - pip install tensorflow==2.3.1
    OpenCV: 4.4.0 - pip install tensorflow==4.4.0
    6. Install the object detection API. To do this, run these commands from a command prompt or terminal:
    git clone github.com/tensorflow/models
    cd tensorflow/models/research
    protoc object_detection/protos/*.proto --python_out=.
    cp object_detection/packages/tf2/setup.py .
    python -m pip install .

    • @scythe548
      @scythe548 3 роки тому

      Hey, I couldn't fix the problem "ModuleNotFoundError: No module named 'object_detection", even after running the 6th step successfully. Any help?

    • @DhruvPatel-mg6ou
      @DhruvPatel-mg6ou 3 роки тому +1

      Hey I am enjoying your videos :) :) and I hope can you make video about these couples of steps...Waiting from past 3 Weeks... Make video if it possible please SIR...
      I appreciate You...

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Heya @@scythe548, can you try running through all the install steps? ua-cam.com/video/dZh_ps8gKgs/v-deo.html it goes through how to install from scratch!

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      @@DhruvPatel-mg6ou right on time, install video is out and alive, it goes through each install step from scratch: ua-cam.com/video/dZh_ps8gKgs/v-deo.html

  • @user-fl7vs4ed6l
    @user-fl7vs4ed6l 3 роки тому +85

    01:43 Let's do this
    04:20 Building up Imaglabling
    05:29 PyQt & XML
    07:50 Image ready for deployment
    12:36 Get and read Xml file
    18:01 00-Setup paths
    19:57 Creating label map(dictionary)
    21:52 Creating label map(labeling complete)
    23:25 Creating TF records
    26:19 TF model zoo(downloading pretrained models)
    27:50 TF model zoo choosing
    30:03 Copy model config to training model
    32:21 Update Config for transfer learning
    40:27 Train the model
    44:51 Load train model from check point
    49:00 Detect in real time
    56:11 error

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +4

      Thanks so much!

    • @user-fl7vs4ed6l
      @user-fl7vs4ed6l 3 роки тому +6

      Zero to hero , I want to finish my final project.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +3

      @@user-fl7vs4ed6l awesome, how's it going so far?

    • @sravani3059
      @sravani3059 2 роки тому

      A subdirectory or file Tensorflow\workspace\models\my_ssd_mobnet already exists.
      'cp' is not recognized as an internal or external command,
      operable program or batch file. what is the solution of this error plz help me to solve this

    • @nabils4738
      @nabils4738 2 роки тому +1

      @@sravani3059 Need to use gitbash maybe

  • @thiagosoares5052
    @thiagosoares5052 2 роки тому

    Good Morning! within this area of facial recognition in Python, I didn't find a channel as rich as yours, Congratulations!!! Levi. of Brazil...

  • @aniket1015
    @aniket1015 3 роки тому +3

    Thank you very much Nicholas for all these videos, they are really helpful for all of us. Love the efforts you put in , and also the funny stuff u integrate in the beginning.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      Oh I haven't done an intro skit for a while, definitely need to do a new one this week! Thanks so much for checking it out!

    • @aniket1015
      @aniket1015 3 роки тому

      @@NicholasRenotte hey man i am getting few errors while creating TF records.
      1. tensorflow has no module gfile.(after scrapping the net i was able to fix it, we are supposed to replace tf.gfile with tf.io.gfile.......tensorflow has moved gfile to tensorflow.io)
      2.
      Traceback (most recent call last):
      File "Tensorflow/scripts/generate_tfrecord.py", line 63, in
      label_map_dict = label_map_util.get_label_map_dict(label_map)
      File "C:\Users\ANIKET\anaconda3\envs\ObjectDetection\lib\site-packages\object_detection\utils\label_map_util.py", line 164, in get_label_map_dict
      label_map = load_labelmap(label_map_path)
      File "C:\Users\ANIKET\anaconda3\envs\ObjectDetection\lib\site-packages\object_detection\utils\label_map_util.py", line 133, in load_labelmap
      label_map_string = fid.read()
      File "C:\Users\ANIKET\anaconda3\envs\ObjectDetection\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 117, in read
      self._preread_check()
      File "C:\Users\ANIKET\anaconda3\envs\ObjectDetection\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 79, in _preread_check
      self._read_buf = _pywrap_file_io.BufferedInputStream(
      TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
      1. tensorflow.python._pywrap_file_io.BufferedInputStream(filename: str, buffer_size: int, token: tensorflow.python._pywrap_file_io.TransactionToken = None)
      Invoked with: item {
      name: "with_mask"
      id: 1
      }
      item {
      name: "without_mask"
      id: 2
      }
      , 524288
      i am really stuck at this from yesterday, if you have any idea please help me out.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      No problemo @@aniket1015, can you double check your images are all valid and the labels map exactly to what you've got in your label map i.e. with_mask and without_mask (it's case sensitive).

    • @aniket1015
      @aniket1015 3 роки тому

      @@NicholasRenotte Yes Nicholas , I have double checked it all. That dose not seems to be the issue. The label map is same as yours, just the labels are 'with_mask' and 'without_mask' and the annotations have the same name.

    • @Hdx64
      @Hdx64 2 роки тому

      @@aniket1015 Hi. Did you ever found how to solve this? i also got stuck here and also found the solution to problem 1, but i had no luck with problem 2

  • @darshpatel3491
    @darshpatel3491 2 роки тому +1

    Nicholas, you are the best when it comes to Objection detection, you have helped me a lot, thank you

  • @akshayd211
    @akshayd211 2 роки тому

    Jeezus, this is the best one out here! THANK YOU FOR MAKING EVERYTHING AVAILABLE

  • @gabesz9530
    @gabesz9530 3 роки тому +13

    Hi Nicholas, im trying to do this project but i think i have problem with what programs do i need to use(like which tf version, python, opencv, protobuf etc). Could you tell me what you used while making this video and how to get them? Best wishes

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +20

      Yup! Alrighty, I think I'm going to make a video on this as there's a little involved:
      This is what you need to do to setup your env. This my full env btw for this tutorial I used Windows 10.
      1. First up install Python 3.7.4. Download and install the package for your OS that has the words 2019.10 in it from here repo.anaconda.com/archive/. This should give you 3.7.4 to work with.
      2. Then install Visual Studio C++ 2015 from here: go.microsoft.com/fwlink/?LinkId=691126. Tensorflow needs this in order to compile
      3. OPTIONAL IF YOU HAVE A GPU - Install Cuda and Cudnn. Install Cuda first, then install Cudnn.
      - Cuda: 10.1 (GPU only - developer.nvidia.com/cuda-10.1-download-archive-base)
      - Cudnn: 7.6.5 (GPU only - developer.nvidia.com/rdp/cudnn-download)
      Once Cudnn is installed you need to copy the Cudnn files into their respective folders inside the Cuda directory. I used this as a guide: towardsdatascience.com/installing-tensorflow-with-cuda-cudnn-and-gpu-support-on-windows-10-60693e46e781
      4. Then install Protoc 3.13 from here: github.com/protocolbuffers/protobuf/releases. For windows, download the repository and then add it to your PATH file.
      5. Then install python packages using the pip command:
      Tensorflow: 2.3.1 - pip install tensorflow==2.3.1
      OpenCV: 4.4.0 - pip install tensorflow==4.4.0
      6. Install the object detection API. To do this, run these commands from a command prompt or terminal:
      git clone github.com/tensorflow/models
      cd tensorflow/models/research
      protoc object_detection/protos/*.proto --python_out=.
      cp object_detection/packages/tf2/setup.py .
      python -m pip install .

    • @mohamedouazze9414
      @mohamedouazze9414 3 місяці тому

      @@NicholasRenotte hi nicholas that is load in mac os or not supported

  • @deeprajsingh2465
    @deeprajsingh2465 Рік тому +4

    That line 1114 is not there

  • @brentsimpson3791
    @brentsimpson3791 21 день тому

    Awesome video Nick! Thanks! Will try it out shortly....

  • @purplelinechannel833
    @purplelinechannel833 2 місяці тому +1

    If you want to follow this tutorial, you need to follow these steps:
    1. `pip uninstall tensorflow` (I'm assuming that you are using the latest version of TensorFlow, which is not compatible with this tutorial)
    2. `pip install tensorflow

  • @manavsheth4446
    @manavsheth4446 3 роки тому +5

    Hello sir, thank you for the tutorial. I keep running into this error. What variable value is needed to be changed for number of classes = 9
    ValueError: Cannot assign to variable WeightSharedConvolutionalBoxPredictor/WeightSharedConvolutionalClassHead/ClassPredictor/bias:0 due to variable shape (546,) and value shape (12,) are incompatible

    • @shreyase9541
      @shreyase9541 3 роки тому +1

      Facing the same issue.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Heya @manav, just change the labels in the labelmap and it will be picked up. If you're doing this after pre-training then you need to start again or freeze your model.

  • @steelpanther88
    @steelpanther88 3 роки тому +7

    PRO TIP here: actually make the dataset of images as described in the tutorial. the notebook by Nicholas wont work without exactly correctly labeled dataset of your own. Dont make typos on labelImg when labelling and use the same case sensitive labels in the notebook part where the labelmap is created. And for default behavior of script is that you put both the jpg and corresponding xml files into train and test folders.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Awesome tip @Lauri, correct as this will break your detections when you generate the tfrecords!

    • @anniezaidi7607
      @anniezaidi7607 2 роки тому

      plz plz plz also help to how to check my model for test images in my folder not in real time.
      This is my code plz let me know what is wrong with this. it is not giving me any output.
      configs = config_util.get_configs_from_pipeline_file(Config_path)
      detection_model = model_builder.build(model_config=configs['model'], is_training=False)
      # Restore checkpoint
      ckpt = tf.compat.v2.train.Checkpoint(model=detection_model)
      ckpt.restore(os.path.join(Checkpoint_Path, 'ckpt-2')).expect_partial()
      def detect_fn(image):
      image, shapes = detection_model.preprocess(image)
      prediction_dict = detection_model.predict(image, shapes)
      detections = detection_model.postprocess(prediction_dict, shapes)
      return detections
      window_name='image'
      for image_path in TEST_IMAGE_PATHS:
      image=cv2.imread(detect_fn(image_path))
      cv2.imshow(window_name,image)

      cv2.waitKey(0)
      cv2.destroyAllWindows()

  • @khairulazhar7593
    @khairulazhar7593 3 роки тому +2

    So amazing, really worth it to watch. Best explanation and easy to follow. Keep up doing video sir. You just got 1 new subscriber 😁

  • @enchantedchim9489
    @enchantedchim9489 3 роки тому +2

    This was so incredibly helpful! Actual lifesaver

  • @SirajummuneerParvez
    @SirajummuneerParvez 3 роки тому +7

    Great Tutorial. Done with the training and detection finally after a whole day of dealing with errors. Could you guide me to generate a training vs testing loss graph?

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +4

      Heya @Sirajum, check this out: tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html#monitor-training-job-progress-using-tensorboard

    • @SirajummuneerParvez
      @SirajummuneerParvez 3 роки тому +1

      @@NicholasRenotte thanks a lot

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      @@SirajummuneerParvez anytime!!

    • @nickylyy5957
      @nickylyy5957 3 роки тому

      @@NicholasRenotte hi, may i know which file we should cd into to run the command?

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      @@nickylyy5957 top level folder, you should be able to see the Tensorflow folder and the Jupyter Notebooks from within it

  • @XavierDC
    @XavierDC 2 роки тому +4

    When I open labelImg.py and I try to change save directory I get: "Python39\lib
    tpath.py", line 204, in splitext
    p = os.fspath(p)
    TypeError: expected str, bytes or os.PathLike object, not NoneType"
    I have tried searching everywhere and can't find a solution

    • @XavierDC
      @XavierDC Рік тому +3

      I found a solution and posted it to a github page where people had the same issue. I resolved this problem by changing line 1309 to "self.show_bounding_box_from_annotation_file(str(self.file_path))" to force it to a string.

    • @ahmedsanaullah4924
      @ahmedsanaullah4924 Рік тому +1

      @@XavierDC Thank you it worked for me as well.

    • @uyenng.7795
      @uyenng.7795 Рік тому

      @@XavierDC thanks a million

    • @larissasmith6509
      @larissasmith6509 Рік тому

      Thank you!!!!

    • @johnjerielgalicia1827
      @johnjerielgalicia1827 Рік тому

      @@XavierDC bro thank you so much it worked ....

  • @akbaraliotakhanov1221
    @akbaraliotakhanov1221 2 роки тому +5

    Great tutorial! I have completed until training part with a bit difficulties. But when I run Load Train Model from checkpoint initial cell, there was an error about tf_slim. Then I tried to fix it via ''!pip install tf_slim''. Then again error about tensorflow.io and I tried with ''!pip install tensorflow.io''. Now it is saying ''AlreadyExistsError: File system for az already registered''. How it can be fixed? Why this error is happening?

    • @akbaraliotakhanov1221
      @akbaraliotakhanov1221 2 роки тому +2

      now it is running without errors. In the beginning, I had tried with an old tensorflow version 2.4.1. I solved the problem with upgrading it into 2.7.

    • @anniezaidi7607
      @anniezaidi7607 2 роки тому

      plz plz plz also help to how to check my model for test images in my folder not in real time.
      This is my code plz let me know what is wrong with this. it is not giving me any output.
      configs = config_util.get_configs_from_pipeline_file(Config_path)
      detection_model = model_builder.build(model_config=configs['model'], is_training=False)
      # Restore checkpoint
      ckpt = tf.compat.v2.train.Checkpoint(model=detection_model)
      ckpt.restore(os.path.join(Checkpoint_Path, 'ckpt-2')).expect_partial()
      def detect_fn(image):
      image, shapes = detection_model.preprocess(image)
      prediction_dict = detection_model.predict(image, shapes)
      detections = detection_model.postprocess(prediction_dict, shapes)
      return detections
      window_name='image'
      for image_path in TEST_IMAGE_PATHS:
      image=cv2.imread(detect_fn(image_path))
      cv2.imshow(window_name,image)

      cv2.waitKey(0)
      cv2.destroyAllWindows()

  • @abeermalkawi9812
    @abeermalkawi9812 2 роки тому

    Thanks very much for the clear tutorial you provided. This is the best I found in this field.

  • @v0rtex-
    @v0rtex- 3 роки тому +7

    Bonjour, I'm finding your content very nice. Could you maybe create a discord channel where the people interested in AI would interact and share some project ideas.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +4

      Heya @Amir, I've been tossing up some ideas on getting this up and running. Still working on it!

    • @v0rtex-
      @v0rtex- 3 роки тому +3

      @@NicholasRenotte Cool :) if you need a hand or any kind of help setting up or managing, I will be happy to offer you my help.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +3

      @@v0rtex- definitely, I might actually take you up on that!

  • @nirmalamahajan1228
    @nirmalamahajan1228 3 роки тому +3

    Hey, in Jupiter in create tf records ,, there import error in both train and test
    Import error: cannot import name 'string_int_label_mp_pb2'
    Plz help me to solve it .

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Hmmm, is that the only error @Nirmala? Did you run through the install steps ua-cam.com/video/KvLG1uTC-KU/v-deo.html

  • @kamransaif1631
    @kamransaif1631 Рік тому +2

    Can you remake this video with up to date TensorFlow 2.x. Because right now alot of errors are occuring while performing these exact same steps.

  • @avishayelihay2968
    @avishayelihay2968 2 роки тому

    i have tons of errors in this process, but after all its actually work! thank yo very match!

  • @schouketta1980
    @schouketta1980 3 роки тому +4

    Hey ! Thank you for this tutorial. Im looking to export this into a TFlite. Do you have any tutorial for that ?

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +4

      Stay tuned should be out in the next few weeks!

  • @ghostplays5291
    @ghostplays5291 Рік тому +4

    I can't find that line in 1114 th line 😭😭😭

    • @anonomations
      @anonomations 9 місяців тому

      Me too 😢😢

    • @alijafri2906
      @alijafri2906 5 місяців тому

      Go to 1180

    • @wardah_asad788
      @wardah_asad788 4 місяці тому

      Check below and find the function containing that line.... Also if you are using newer versions of labelimg then you don't need to do that modification in line 1114, bcz it's already done

  • @m.matoori343
    @m.matoori343 2 роки тому +2

    this code doesn`t work with tensorflow v2.x
    i am tired of converting one by one to the newer format
    if you help me then thank you
    if not then good day

  • @albana.rodriguez7814
    @albana.rodriguez7814 2 роки тому

    Your content is amazing .
    Thanks a lot for all the content, you motivate me a lot to keep learning.
    Blessings.

  • @vidhivsingh
    @vidhivsingh 3 роки тому +3

    Hello sir, thank you for the tutorial. I keep getting into errors . I have encountered an error at step 4: Copy Model Config to Training Folder . The error is : 'cp' is not recognized as an internal or external command,
    operable program or batch file. I have tried many methods like changing cp to copy but nothing worked. Plz help us out with this error.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      Heya @Vidhi, if it's easier, just copy the config from the pre-trained model folder to your my_ssd_mobnet folder.

    • @vidhivsingh
      @vidhivsingh 3 роки тому +2

      @@NicholasRenotte Thank you so much

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      @@vidhivsingh anytime!

    • @vidhivsingh
      @vidhivsingh 3 роки тому +2

      @@NicholasRenotte Sir i am almost done with the project but it is not detecting my face. The last step keeps on running but still no detection. i am not understanding what's the issue. Plz help me out sir.

  • @faiquejatu8649
    @faiquejatu8649 3 роки тому +2

    Can you share this notebook so as to train on colab, i have train/test.record , labelmap.pbtxt

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      This was written by a colleague and it's based on Cloud Annotations not LabelImg but might help: colab.research.google.com/github/cloud-annotations/google-colab-training/blob/master/object_detection.ipynb

  • @erwincarlogonzales
    @erwincarlogonzales 3 роки тому +1

    Sir you are Godsent, thank you so much Nicholas! Liked, subbed, and shared!

  • @user-vg3jl7ye1p
    @user-vg3jl7ye1p 2 роки тому +2

    thanks so much! i have a question!! " How can I use ".mp4" files not use webcam? " Actually, I used before this Code: cv2.VideoCaptur("~.mp4"). but,
    ValueError: 'images' must have either 3 or 4 dimensions.

  • @venkatasreeram
    @venkatasreeram 3 роки тому +3

    🔥🔥Great Project!!!
    Bro, IMAGE CAPTION GENERATOR project🎃

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      YEAHHHYAA @venkata sreeram, captioning coming soon!

  • @boozebag2000
    @boozebag2000 3 роки тому +3

    Hi Nicholas, tutorial working perfect right up until last block of code where real time detection should be done and I get the following error:
    ---> 30 cv2.imshow('object detection', cv2.resize(image_np_with_detections, (800, 600)))
    error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-memyuvq3\opencv\modules\highgui\src\window.cpp:651: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
    Help would be greatly appreciated!

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      Definitely, this is normally an OpenCV error, try reinstalling:
      !pip install opencv-python
      !pip install opencv-contrib-python

    • @boozebag2000
      @boozebag2000 3 роки тому +1

      @@NicholasRenotte Wow thanks for getting back so quickly. The issue seemed to be that I didn't have the second package there 'opencv-contrib-python' installed. Pip installed that and it was working brilliantly.
      Thanks again for such a great tutorial. This will be so useful for my university project where I have to build a ground marker detector for an aircraft. Really appreciate all your hard work!

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      @@boozebag2000 that's awesome. Anytime, glad you got it working!! Would love to see some images from your final model!

    • @majd643ma
      @majd643ma 3 роки тому

      @@boozebag2000 in which file shall I install it in when im opening the comand line

    • @bellemarravelo6002
      @bellemarravelo6002 3 роки тому

      @@majd643ma in a c:\>

  • @lelebalap99
    @lelebalap99 Рік тому +1

    Anyone please help, I can't install pycocotools, I have seen in stack overflow and github for solving this, but is doesn't work 😢

  • @bestless8895
    @bestless8895 2 роки тому

    "There's a whole heap" 🤣🤣🤣 Im going to start using that

  • @pragunsharma8681
    @pragunsharma8681 2 роки тому +3

    Hey Nick,
    Thank you for the awesome tutorial! I understand you cannot cover all the minute details and dependency injection-related errors in the video. However, I am having a hard time solving a dependency error I am getting in Step 7. Specifically at the line "from object_detection_builders import model_builder" which recursively ends up in object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor.py
    And says "No module named 'nets' on line 28 where it says "from nets import inception_resnet_v2"
    Any help would be appreciated. Thanks.

    • @swastikpoojari2810
      @swastikpoojari2810 2 роки тому

      try this
      pip install tensorflow-object-detection-api

    • @azimuth809
      @azimuth809 2 роки тому

      hey, did you solve your issue, having the same problem here

  • @vikashchand.
    @vikashchand. 3 роки тому +3

    🤘🔥

  • @ahmedbadra9237
    @ahmedbadra9237 3 роки тому +1

    thank you very much, really it was so helpful for me and your explanation is awesome

  • @anshumaanphukan4388
    @anshumaanphukan4388 2 роки тому +1

    whenever I try to run the labelImg python file it says no module named 'sip'. I also did a pip install for the same but the problem still persists. can you plz help me?

  • @shubhamjaiswal2954
    @shubhamjaiswal2954 2 роки тому +1

    at 7:37 i don't see that "file dir" line of code in line 1114. I'm on windows i installed vs code too it is showing me this
    def show_bounding_box_from_annotation_file(self, file_path):
    if self.default_save_dir is not None:
    basename = os.path.basename(os.path.splitext(file_path)[0])
    xml_path = os.path.join(self.default_save_dir, basename + XML_EXT)
    txt_path = os.path.join(self.default_save_dir, basename + TXT_EXT)
    json_path = os.path.join(self.default_save_dir, basename + JSON_EXT)

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому

      Skip it, the labelimg team fixed it in the repository!

  • @ebgamezone4576
    @ebgamezone4576 Рік тому +1

    How to get the Template.jpynb file to jupyter notebook (16:08)

  • @sravani3059
    @sravani3059 2 роки тому +1

    A subdirectory or file Tensorflow\workspace\models\my_ssd_mobnet already exists.
    'cp' is not recognized as an internal or external command,
    operable program or batch file. what is the solution of this error plz help me to solve this

    • @elekteszt2486
      @elekteszt2486 2 роки тому

      if you are on windows, use command 'copy'

  • @yosaikan
    @yosaikan 3 роки тому +1

    Well done, that was really clear.
    Thank you :)

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +2

      Thanks so much @Mohamed, let me know how you go! More custom object detection stuff coming this week!

    • @yosaikan
      @yosaikan 3 роки тому +1

      @@NicholasRenotte WOW! Can't wait

  • @gabriellopesdealmeida9115
    @gabriellopesdealmeida9115 2 місяці тому +1

    I had this error in the 6 step...
    Traceback (most recent call last):
    File "C:\Users\Usuario\OneDrive\Área de Trabalho\RealTimeObjectDetection\Tensorflow\models
    esearch\object
    _detection\model_main_tf2.py", line 31, in
    from object_detection import model_lib_v2
    File "C:\Users\Usuario\anaconda3\Lib\site-packages\object_detection\model_lib_v2.py", line 29, in
    from object_detection import eval_util
    File "C:\Users\Usuario\anaconda3\Lib\site-packages\object_detection\eval_util.py", line 35, in
    slim = tf.contrib.slim
    how do i fix this ?

  • @rizairsyad5775
    @rizairsyad5775 2 роки тому +1

    hay nicholas, i have question, how to labelling img if i have many img. i have 1700 img...because doing so much labeling is very wasting time..

  • @SwatiSharma-d1m
    @SwatiSharma-d1m Місяць тому

    cv2.VideoCapture(0), cv2.VideoCapture(1), cv2.VideoCapture(2), cv2.VideoCapture(-1) are not working. What can be the reason. I have tried other numbers too with cv2.VideoCapture(). Please help me out

  • @hazemnada798
    @hazemnada798 2 роки тому +2

    im having a problem in the line with open(ANNOTATION_PATH + '\label_map.pbtxt', 'w') as f:
    it says No such file or directory. does anyone have a fix for this?
    edit: am an idiot. i was running my jupyter notebook in the wring directory. you need to go to cmd and cd to where your notebook is and run it using the jupyter notebook command

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому

      Got it working?

    • @hazemnada798
      @hazemnada798 2 роки тому

      @@NicholasRenotte yes its working and the model is pretty good. But I have a question. If I wanted to display an alert whenever the app detected that I'm not wearing a mask how would I go about coding that?

  • @usamamateen5658
    @usamamateen5658 2 роки тому +1

    Hey Nick I am trying to do this project but in the video at 07:44 you do some changes at line 1114, but i open the code file and there is no such line to do changes. can you please help me with that.

  • @karuneshpalekar5212
    @karuneshpalekar5212 3 роки тому +2

    This is so amazing , please further update the post/video displaying how to convert the obtained model into tflite format , that would be really great .Thank-You for this amazing content.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      Thanks so much @Karunesh! Awesome suggestion, I'm planning on doing a bunch more in the series on custom object detectors including exporting and sharing the models for deployment (inc. tflite).

    • @husamjalamneh4392
      @husamjalamneh4392 3 роки тому

      Did you do a video for convert it to tflite ? i need it for raspberry pi

    • @alpertemizel9892
      @alpertemizel9892 3 роки тому

      @@NicholasRenotte for example boosting up the project with jetson nano

    • @alpertemizel9892
      @alpertemizel9892 3 роки тому

      @@NicholasRenotte There are very few videos on the internet about converting tensorflow format to tensorrt format which is used by awesome jetson nano

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      @@husamjalamneh4392 oh man, I'm so late to replying to you. Check this out ua-cam.com/video/yqkISICHH-U/v-deo.html

  • @andrzejgierlak5078
    @andrzejgierlak5078 3 роки тому +1

    thank you very much ! i was close to crying with this maze of tutorials, wrong configurations, errors, repairing errors only to lose by stanger one. I will sub untill my death xD. (my poor, student ass can pass through next course)

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      I know this pain 🤣, so glad you smashed it!

  • @elizabethsox1351
    @elizabethsox1351 2 роки тому

    Hi, in the while true loop I am facing an error. I'll post the error here pls can you tell me how to resolve it.
    TypeError: 'NoneType' object is not callable

  • @venkatesh2788
    @venkatesh2788 2 роки тому +1

    Can we Deploy this in Watson machine learning cloud and connect with nodejs
    Please tell sir

  • @leujim1
    @leujim1 3 роки тому +1

    Great tutorial! Thanks for sharing!

  • @User-ri1jz
    @User-ri1jz 3 роки тому +1

    I just wanna say I love u bro 🥺😭💜

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      Awwww, right back at ya, much love from Sydney 🤗!

  • @emailais1488
    @emailais1488 2 роки тому +2

    hello sir! may I ask a question? I seem that I'm stuck at step Training the Model (2. Step TF records). I got the error when I tried to run it >>Traceback (most recent call last):
    File "Tensorflow/scripts/generate_tfrecord.py", line 29, in
    from object_detection.utils import dataset_util, label_map_util
    ModuleNotFoundError: No module named 'object_detection'

    • @biancaar8032
      @biancaar8032 6 місяців тому

      you dont have the object detection tf api- install it with pip

  • @datapro007
    @datapro007 3 роки тому +1

    Hi, Nick, I went through this video and the prerequisite video over three days. You cover a lot. What strikes me though is the difficulty of getting things running, given differences in your machine's setup and mine, in terms of what is and isn't already installed etc. Wouldn't a better approach be to leverage Docker to eliminate a lot of these problems? Thanks again. You are a natural-born teacher.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      Thanks so much @datapro007, in hindsight it would've been a ton easier to package it all up. I'm planning on Dockerizing it all up to simplify the tutorial when I'm back from holidays!

  • @numforfrank9205
    @numforfrank9205 Рік тому +1

    7:28 Hello Nick, please that line of code (line 1114) looks different from what I'm seeing. Did you make any changes to the code? Thanks.

  • @aguilarhernandezcarlosalej3829
    @aguilarhernandezcarlosalej3829 3 роки тому +2

    hi Nich i have been a little lost
    in this week trying to make a model detection because i chose this particular topic for my thesis and i don't have any idea how begin but you save my life and i want say u thank a lot! i could be writing you for some possible future issues ? and i wonder if u could share the right path to order to learning

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Awesome stuff @Alejandro, definitely hit me up whenever you need! Check out this playlist for an end-to-end walkthrough: ua-cam.com/play/PLgNJO2hghbmhUeJuv7PyVYgzhlgt2TcSr.html

  • @hasanaltay1370
    @hasanaltay1370 2 роки тому +2

    42:36 "module 'tensorflow' has no attribute 'contrib' "?

  • @BoedaChees
    @BoedaChees 3 роки тому +1

    Thank you very much for this helpful video!

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Thanks so much @Joey, glad you enjoyed it!

    • @BoedaChees
      @BoedaChees 3 роки тому +1

      @@NicholasRenotte I have a question though, every 100 steps it shows the loss at that moment. Is it somehow possible to check what the accuracy and variance is at a certain step or even checkpoint? Thanks!

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      @@BoedaChees check this out: ua-cam.com/video/-HbCA0WGbBg/v-deo.html

  • @istillplay271
    @istillplay271 6 місяців тому +1

    Hey nick thanks for this video. But when im trying to execute the tfrecord part of the program im executing an error like
    Traceback (most recent call last):
    File "C:\Users
    ohit\Desktop\All Language programs\CUstom_object_det_ssd\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 27, in
    import tensorflow.compat.v1 as tf
    ModuleNotFoundError: No module named 'tensorflow.compat'
    Please help me with this

    • @istillplay271
      @istillplay271 6 місяців тому

      The line which i executed was
      !python {SCRIPTS_PATH + '/generate_tfrecord.py'} -x {IMAGE_PATH + '/train'} -l {ANNOTATION_PATH + '/label_map.pbtxt'} -o {ANNOTATION_PATH + '/train.record'}

  • @tejaslotlikar3573
    @tejaslotlikar3573 Рік тому +1

    Thanks for a end-to-end tutorial. I treid to execute the commands, detection is performed bu when i try to store the model using the SavedModel format, i get an error. Here is the command i used
    python ..\models
    esearch\object_detection\export_inference_graph.py --input_type image_tensor --pipeline_config_path Tensorflow\workspace\models\my_ssd_mobnet\pipeline.config --trained_checkpoint_prefix ckpt-7 --output_directory ssdmodel_01
    error message: RuntimeError: tf.placeholder() is not compatible with eager execution.
    Please help if possible

  • @ronaktawde
    @ronaktawde 3 роки тому +1

    Absolutely superrrr tutorial video👍😎

  • @nithishkumar2561
    @nithishkumar2561 7 місяців тому

    C:\Users\RealTimeObjectDetection\Tensorflow\labelImg>pyrcc5 -o resources.py resou
    rces.qrc
    'pyrcc5' is not recognized as an internal or external command,
    operable program or batch file. i was getting the error

  • @divyeshparekh4158
    @divyeshparekh4158 2 роки тому +1

    Hey Nick, i am trying to train a custom object and while creating a TF record, i am running into this error
    AttributeError: module 'tensorflow' has no attribute 'gfile'
    i have really tried to solve it but no success, if I can get your help would be great.
    Thank you.!!

  • @kinjalmehta5074
    @kinjalmehta5074 3 роки тому +2

    What is the dataset and model used in this tutotrial?

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      It's a custom dataset, collected using your own webcam @Kinjal

  • @priyankashilevant6178
    @priyankashilevant6178 2 роки тому +2

    Hi, I am using latest anaconda3 and while converting into tfrecords it keeps saying that the module 'tensorflow' has no attribute 'gfile' for the line 61 . label_map = label_map_util.load_labelmap(args.labels_path)
    Can you let me know the configuration on which this was done?

  • @assemjameel1038
    @assemjameel1038 2 роки тому +2

    Thank you for the very well explained tutorial Nick.
    I went through everything smoothly except for at 56:34, whenever I run the "while true" loop, it takes forever to run it. Last time I tried, I waited for 3 hours and nothing happened 😪.
    Even though my webcam started to run but without detection boxes

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому +1

      Got errors for me?

    • @assemjameel1038
      @assemjameel1038 2 роки тому

      @@NicholasRenotteNot really, I had resolved all errors up to that point. But as I said, the "while true" loop keeps running forever

  • @gihanna
    @gihanna 3 роки тому +1

    You saved my life thank you!

  • @Nekroz00
    @Nekroz00 3 місяці тому

    Is there a recent tutorial, because there is an error when installing the object detection API.

  • @gustavolemos4665
    @gustavolemos4665 2 роки тому +2

    Thanks for the video, your tutorials are excellent for my learning. I can't find the line you edited on line 1114 of the labelimg.py file in the vscode. Has the original file been modified?

  • @ismartboy5087
    @ismartboy5087 2 роки тому +1

    there is an error while running the labelimg.py file . "import error libs.resources not found" please help me

  • @cramer26
    @cramer26 3 роки тому +2

    Excellent tutorial! Please keep them coming! I would really love to learn your recommendations on image transformation to improve accuracy, especially from a limited image library.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      You got it @Ryan, will do something on augmentation!

  • @sanketannamwar9423
    @sanketannamwar9423 6 місяців тому

    I could not find the resource python extension file in labelImg please help me find that file

  • @ishmmetahuja6720
    @ishmmetahuja6720 3 роки тому +2

    I am getting error in tf record
    python: can't open file '{SCRIPTS_PATH': [Errno 2] No such file or directory
    Can u help

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Heya @Ishmmet, might be easier to try out the new code: github.com/nicknochnack/TFODCourse/blob/main/2.%20Training%20and%20Detection.ipynb

    • @ishmmetahuja6720
      @ishmmetahuja6720 3 роки тому +1

      @@NicholasRenotte That worked Thanks man

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      @@ishmmetahuja6720 anytime!

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      @Phúc Huy Võ is there any error? You might need to create the virtual enrivonment. I show it in the full tutorial: ua-cam.com/video/yqkISICHH-U/v-deo.html

  • @kenzilamberto1981
    @kenzilamberto1981 3 роки тому +1

    I'm stuck in my tutorial for object detection, I got this error when I execute my command: ValueError: Checkpoint version should be V2
    I removed my fine_tune_checkpoint_version: V2 using the answer of this question after an error ParseError: 172:3 : Message type "object_detection.protos.TrainConfig" has no field named "fine_tune_checkpoint_version" and now I have an other error when I execute my command ValueError: Checkpoint version should be V2.
    So if I put it back in my config file like suggested in this answer: TensorFlow - ValueError: Checkpoint version should be V2 I will again my first error.
    Any fixes?

  • @rishikeshsalunke1090
    @rishikeshsalunke1090 3 роки тому +1

    why is there no pbtxt file in my annotations folder..somebody help me :(

  • @210_yuktasawant3
    @210_yuktasawant3 3 роки тому +2

    Hello sir, thank you for the tutorial. i ran into an error in step 6 Train the model . The error is :
    W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
    numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
    I have numpy-1.19.0 . Please help us out with the query we are all most on the verge of completing the tutorial.
    we are looking forward for your help.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Heya @Yukta, this is normally a pycocotools error, try uninstalling it and reinstalling:
      pip uninstall pycocotools
      pip install pycocotools

  • @binayakpanda5749
    @binayakpanda5749 3 роки тому +1

    A problem happens is that during the live camera starts in a new window, I'm not able to close it properly until it goes to "Not Responding". I tried by long pressing 1 and q, only q, only 1. Still It goes to not responding and I've to close it in a terrible way. Why can't I close the new window properly?

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому +1

      Heya @Binayak, kill the cell then try running cap.release(). I don't think the cell is intended to be run inside of Jupyter that's why it hangs at times!

  • @ahmedjumaah9727
    @ahmedjumaah9727 2 роки тому

    Great content man, thanks

  • @faizabenatmane5485
    @faizabenatmane5485 Рік тому +1

    in the step :"creat TF records " it's telling me that there is an error :👇
    Traceback (most recent call last):
    File "D:\RealTimeObjectDetection\Tensorflow\scripts\generate_tfrecord.py", line 29, in
    from object_detection.utils import dataset_util, label_map_util
    ModuleNotFoundError: No module named 'object_detection'
    plz plz plz help me plz

    • @ABDESSAMADHAIDA806
      @ABDESSAMADHAIDA806 Рік тому

      hello, did you find a solution for this problem please i m also getting the same error i fyou can help 🙏

    • @roalejandroid
      @roalejandroid 2 місяці тому

      @@ABDESSAMADHAIDA806 Hi! Did you find a solution??? pls !!!

  • @jeevanandannr616
    @jeevanandannr616 3 роки тому

    error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-memyuvq3\opencv\modules\highgui\src\window.cpp:651: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
    hi nicholas kindly give me the sollution above error while running the step 8

  • @rakshitshetty8624
    @rakshitshetty8624 2 роки тому +2

    25:45 AttributeError: module 'tensorflow' has no attribute 'gfile'

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому

      Swap all references to tf.gfile for tf.io.gfile.

  • @thewatersavior
    @thewatersavior 3 роки тому +2

    Thanks so much for this, learning so much from these series! Is it possible to include the versions of Python and TF that you are using?

  • @jahnavimyneni497
    @jahnavimyneni497 9 місяців тому

    when I am creating TF records no output or file is generated how to solve it

  • @johnmangilit2995
    @johnmangilit2995 3 роки тому

    Can you help me sir
    Error:
    opencv(4.5.1) c:\users\appveyor\appdata\local\temp\1\pip-req-build-memyuvq3\opencv\modules\highgui\src\window.cpp:651: error: (-2:unspecified error) the function is not implemented. rebuild the library with windows, gtk+ 2.x or cocoa support. if you are on ubuntu or debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvshowimage'

  • @4cloverforyou
    @4cloverforyou Рік тому

    Files are not appropriate under working condition, please give path of files updated version

  • @BMEMDSALMANSHAMS
    @BMEMDSALMANSHAMS 7 місяців тому

    ImportError: cannot import name 'string_int_label_map_pb2' from 'object_detection.protos'

  • @Lemonard0
    @Lemonard0 2 роки тому +1

    Hello, would you mind sharing if there's a way to compile everything written on jupyter and all the assets to create an android app that does object detection?

  • @yilberrojas8306
    @yilberrojas8306 2 роки тому

    the best tutorial ever

  • @fakheralbouchi1802
    @fakheralbouchi1802 2 роки тому

    thank you so much it was really helpful

  • @karthikshetty3851
    @karthikshetty3851 2 роки тому +1

    after running this command:
    $ pyrcc5 -o resources.py resources.qrc
    I am getting like this: bash: pyrc5: command not found
    but I installed the two conda packages as shown. please help me

  • @CrazyFanaticMan
    @CrazyFanaticMan Рік тому +1

    If you guys run into any troubles step 2 Create TF records, these two stack overflow links will help:
    - stackoverflow.com/questions/55591437/attributeerror-module-tensorflow-has-no-attribute-gfile
    - stackoverflow.com/questions/63763809/error-when-converting-xml-files-to-tfrecord-files

  • @varunsingh8076
    @varunsingh8076 3 роки тому +1

    Hello sir I am getting and error like this :A subdirectory or file Tensorflow\workspace\models\my_ssd_mobnet already exists.
    'cp' is not recognized as an internal or external command,
    operable program or batch file. and second thing is Sir i am almost done with the project but it is not detecting my face. The last step keeps on running but still no detection. i am not understanding what's the issue. Plz help me out sir

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Try changing cp to copy and changing all the / to \\

  • @namith1984
    @namith1984 3 роки тому +2

    Thank you for your informative video. While executing generate_tfrecord.py file, it's throwing below mentioned error. My Tensorflow version is 2.4.
    Traceback (most recent call last):
    File "Tensorflow/scripts/generate_tfrecord.py", line 61, in
    label_map = label_map_util.load_labelmap(args.labels_path)
    File "C:\Users\HP\anaconda3\lib\site-packages\object_detection\utils\label_map_util.py", line 132, in load_labelmap
    with tf.gfile.GFile(path, 'r') as fid:
    AttributeError: module 'tensorflow' has no attribute 'gfile'

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Heya @Roger, try substituting out all references to tf.gfile for tf.io.gfile. Should solve the error!

    • @namith1984
      @namith1984 3 роки тому

      Thanks...@@NicholasRenotte.The error got rectified after installing Tensorflow object detection by following your tutorial 'Installing the Tensorflow Object Detection API'(ua-cam.com/video/dZh_ps8gKgs/v-deo.html).

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      @@namith1984 ah, brilliant!

  • @rashmitiwari7788
    @rashmitiwari7788 3 роки тому +1

    Thank you Nicholas, it was such a nice tutorial. However, I wanted to know how we can calculate the mAP metrics for custom object detection, and how can we check the logs in tensorboard.

    • @NicholasRenotte
      @NicholasRenotte  3 роки тому

      Heya @Rashmi, check this out: ua-cam.com/video/-HbCA0WGbBg/v-deo.html