YOLOv4 Object Detection with TensorFlow, TensorFlow Lite and TensorRT Models (images, video, webcam)

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024

ความคิดเห็น • 327

  • @TheAIGuy
    @TheAIGuy  4 ปีที่แล้ว +16

    Let me know here in the comments if you run into any issues! Hope you enjoy :)

    • @dieweltentdecker5878
      @dieweltentdecker5878 4 ปีที่แล้ว +3

      Why do you choose TensorFlow to run the detection? You can also run it with darknet?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +6

      The reason for TensorFlow is that it easier to create working APIs with as well as TensorFlow Lite model allows you to run YOLO detections on mobile or edge devices easier! Hope this clears it up. Thanks for the comment.

    • @snehitvaddi
      @snehitvaddi 4 ปีที่แล้ว +2

      @@UCrydcKaojc44XnuXrfhlV8Q Excited to hear you are going to implement object detection with an android application. My suggestion is to please make a detailed tutorial of that application just like these. It could be fine even it is multiple parts.
      Program to an Application is a full-length project and that would bring great traction to your channel as well.🙌🙌💖

    • @rushirajparmar9602
      @rushirajparmar9602 4 ปีที่แล้ว +1

      @@TheAIGuy Can we use 618 X 618 as input_size rather than 416 in save_model.py file??

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +3

      Rushiraj Parmar No 618 will not work. The size has to be a multiple of 32, so 608 X 608 would work!

  • @peteroyekola4755
    @peteroyekola4755 4 ปีที่แล้ว +4

    Hi bro, thank you so much for your tutorials. I am a complete novice in programming but I was able to follow your tutorials. Now I have a trained model to detect industrial cracks and corrosion and it is working quite well. the only issue I have was during training. the maximum I was able to get was 1200 iterations. when I tried retraining severally, it did not even save to the backup folder in google drive. anyways, it's working. all that is left is to convert to tflite and save on my raspberry pi for my robot. you are a lifesaver... CHEERS.

    • @kasparsrozenfelds1602
      @kasparsrozenfelds1602 3 ปีที่แล้ว

      How do you setup so the conda or pip version works for Raspberry pi?

  • @akashsatamkar
    @akashsatamkar 4 ปีที่แล้ว +2

    I am literally addicted to your videos ! I started watching your videos a week back and now I have already seen them all. Keep up the good work. Your way of explanation is truly amazing and you cover most of the doubt which we would get in while running on our own machine. Hope to see a lot of great and informative videos ahead ;) Really a bless to Computer Vision society.

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +2

      Akash Satamkar thanks for the kind words! Much appreciated.

  • @NorbertoPadin
    @NorbertoPadin 4 ปีที่แล้ว +8

    Hi! Keep making these videos, they are the best and you are always willing to help others. Thank you very much!!

  • @andrewh5640
    @andrewh5640 3 ปีที่แล้ว

    had a little problem with missing modules but once i installed them it was ok. Thanks for a great tutorial. Ran it on my cpu and found the video sample ran at 0.50 FPS lol

  • @namantyagi3033
    @namantyagi3033 4 ปีที่แล้ว +7

    Keep up the great work. I appreciate your energy in making these videos happen and replying to queries in the comments. I must say the latter is very impressive. You responded to a very silly mistake in Yolov3 colab video and I have been turned from a subscriber to a fan since then. For this video my query is that how does one work with the cropped images within the bounding boxes of the detection made? Like, I wanted to pass the cropped image through an OCR to get the characters in the cropped image in a list or a string format. A small video or a written tutorial in colab or tensorflow implementation of yolo would be really appreciated. And I cannot say this enough, you are the coolest channel I have ever subscribed to.
    Sending a lot of love and wishes from India.

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +6

      Thanks for the kind words it means a lot. I will definitely be having a video soon showing how to work with the cropped image or bounding boxes. I'll make sure that it works for Colab so stay posted!

  • @Mvobrito
    @Mvobrito 4 ปีที่แล้ว +3

    Always with great videos!
    I'm working on an API similar to the one you showed in another video. I'm also using OpenCV, running on CPU, and I'm getting processing times similar to yours(1300ms for Yolov3 and 15ms for Yolov3-tiny).
    At the Yolo github, it is said that the fastest option for running yolo on CPU is with OpenCV built with OpenVINO(optimized backend).
    I think a tutorial on how to use Yolov4 with OpenVino would be great!

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +3

      Thanks for this suggestion. I will definitely look into this for a future videos!

  • @Luetchy10
    @Luetchy10 2 ปีที่แล้ว

    Got it up and running in an hour. Thanks AI Guy!

  • @rushirajparmar9602
    @rushirajparmar9602 4 ปีที่แล้ว +2

    This is perfect!!! ❤️❤️ just waiting for this! Thank you! Keep going!

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      Thanks! Hope you enjoy it!

    • @samarpratapsingh9788
      @samarpratapsingh9788 4 ปีที่แล้ว

      can you please help me with an issue?

  • @teetanrobotics5363
    @teetanrobotics5363 4 ปีที่แล้ว +3

    I love your practical demonstration of yolo v4, but i would appreciate if you explain the code as it would benefit most ML and AI engineers out there .

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +2

      Thanks for the suggestion. Will look into doing a code walk-through video.

  • @shamikbhattacharya5184
    @shamikbhattacharya5184 3 ปีที่แล้ว +3

    Great Content Sir! Pl if you can kind enough to let us know if YOLO4 was doing good what value Tensor Flow bring in the table...this should be clarified first that what business problem it is existing which brings in the need for Tensor Flow..

  • @umarmuhammadi429
    @umarmuhammadi429 2 ปีที่แล้ว

    Thanks for the video
    I have a task which is pedestrian detection and congestion measurement
    I need to build a model that can detect pedestrian and also be able to say if the frame is congested
    For example let's say in a frame greater than 20 people means congested

  • @keerthireddy8367
    @keerthireddy8367 3 ปีที่แล้ว +1

    Can anyone please tell me what python version and tensorflow version should be used here. Following requirements.txt for CPU gives too many errors while importing tensorflow

  • @donaldkimpoua2853
    @donaldkimpoua2853 4 ปีที่แล้ว +2

    hi thank you , lets share this channels and make it big our brother need more subscribers he's doing good job

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      Thanks so much Donald! Appreciate your support since the early days :)

  • @DACS_PranavP
    @DACS_PranavP 2 ปีที่แล้ว +2

    The URL to pre-trained yolo4.weights file is not opening(404 error), can anyone please help!

  • @dompower500
    @dompower500 4 ปีที่แล้ว

    Excellent video tutorials. The teaching style is superb. Keep up the great work.

  • @daviddsiagiands
    @daviddsiagiands 4 ปีที่แล้ว +4

    Nice video, but when I try to train my custom detection model and I write this command:
    python save_model.py --weights ./data/mycustom.weights --output ./checkpoints/yolov4-mine --input_size 416 --model yolov4
    I got an error message like this:
    File "E:\tensorflow-yolov4-tflite-master\core\utils.py", line 63, in load_weights
    conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0])
    ValueError: cannot reshape array of size 4717722 into shape (1024,512,3,3)
    How to solve this problem?

    • @navonewrose
      @navonewrose 4 ปีที่แล้ว

      Inside data folder edit coco.names with only the class names you have trained the model

    • @daviddsiagiands
      @daviddsiagiands 4 ปีที่แล้ว

      @@navonewrose still error

    • @DavidSusic
      @DavidSusic 3 ปีที่แล้ว

      Hello, I have the same problem. Have you figured out the solution maybe?

    • @DavidSusic
      @DavidSusic 3 ปีที่แล้ว +1

      SOLUTION (worked for me): change the .names file in the config to your custom classes

  • @yamingwang7841
    @yamingwang7841 4 ปีที่แล้ว +3

    Thanks for the great video. Followed your steps and successfully got things run both in colab and local machine. However, in aws sagemaker, the model is able to predict with image as input, but with video I got output 'Video-stream stopped! '. My first guess was I made mistake in path name, but I double checked it. Had been googling around, but didn't find much. Would be appreciated if you could provide any though on it. Again, thanks for the great video.

  • @hk2780
    @hk2780 3 ปีที่แล้ว

    I dig your code for environment in python 3.8. Here is the good one sentence " conda install tensorflow-gpu=2.3 tensorflow=2.3=mkl_py38h1fcfbd6_0 "

  • @turtlepedia5149
    @turtlepedia5149 2 ปีที่แล้ว +1

    Thanks !! for such simplified explanation, I had a doubt, do everyone make this model like this only like copy and pasting from github or should i also try to make this whole code myself from scratch ?
    Edit: You were getting 15 fps and saying its less whereas am getting 1.3 FPS..xd

  • @kameshwarans2200
    @kameshwarans2200 3 ปีที่แล้ว +1

    Hi AI guy....first of all good video yaar....I tried this everything went fine but while inferencing in GPU it gives output for first frames only and no bounding box output coming for other frames please help me with this....CPU though it is working fine.

  • @inhliem6683
    @inhliem6683 2 ปีที่แล้ว

    Thank you so much AI Guy!!!

  • @NA-cw4pj
    @NA-cw4pj 2 ปีที่แล้ว +1

    Hi, tysm for the time you take to explain all of this to us. But is here someone who can explain why in the last step of detect_video.py, the terminal returns me that it can´t find the model.pb, what should i do, im going crazyyy

  • @linkmaster959
    @linkmaster959 2 ปีที่แล้ว +1

    the yolo pretrained weights are no longer available on the google drive.

  • @dmitrydementyev8421
    @dmitrydementyev8421 3 ปีที่แล้ว

    Best Tutorial YOLOv4 ever!

  • @ahmedalmindelawy3821
    @ahmedalmindelawy3821 3 ปีที่แล้ว +1

    You are the best ... it the best tutorial video about YOLOv4 I ever seen ... thank you very much
    if I want it to run a real time like the web cam of my laptop ... can you give me some hints!!!

    • @TheAIGuy
      @TheAIGuy  3 ปีที่แล้ว +1

      To run webcam all you have to do is run the video command with the video paramter set to “0” and it will run off webcam. Try it out and let me know how it goes!

  • @karthik-pillai
    @karthik-pillai 4 ปีที่แล้ว +1

    PLEASE CREATE AN APPLICATION VIDEO LIKE SOCIAL DISTANCE MEASURING, HUMAN COUNTING ETC SO THAT WE UNDERSTAND HOW TO EDIT THE CODE. LOVING YOUR VIDEOS! THANKYOUUUUUUUU!

  • @mikilmku1554
    @mikilmku1554 3 ปีที่แล้ว +1

    When I try to execute this order: python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./checkpoints/yolov4-416.tflite
    I receive this error: tensorflow.lite.python.convert.ConverterError: :0: error: loc("batch_normalization/moving_mean"): is not immutable, try removing mutable variables in your model since mutable variables a
    re currently not supported through this converter
    Can you help me please?

  • @Yohanes_Danu
    @Yohanes_Danu 2 ปีที่แล้ว

    hi i got some error cannot reshape array of size 770091 into shape (256,384,3,3) using yolov4 tiny

  • @tiemoko.s
    @tiemoko.s 3 ปีที่แล้ว +1

    I am trying to convert yolov3 to a full int8 tflite model and I get this error :
    RuntimeError: Max and min for dynamic tensors should be recorded during calibration: Failed for tensor input_1
    Empty min/max for tensor input_1

  • @voxboxc
    @voxboxc 3 ปีที่แล้ว +4

    Great work! but im having a problem for the detect_video.py algorithm.
    apparently when i try to run it, it only gives the output of the detected object for the first frame. the remaining frame only run with the fps counter. no bounding box or object classification were shown in the output video.
    help?

    • @kameshwarans2200
      @kameshwarans2200 3 ปีที่แล้ว

      Did you find any solution for the above issue.

    • @ellenadw118
      @ellenadw118 3 ปีที่แล้ว

      I've been stucked with the same issue for awhile too..

    • @venkilfc
      @venkilfc 2 ปีที่แล้ว

      I'm facing the same issue. Did you manage to find it mate?

    • @user-kr3tr4iw8b
      @user-kr3tr4iw8b 2 ปีที่แล้ว

      Did anyone solve this issue?

  • @swatijagtap623
    @swatijagtap623 2 ปีที่แล้ว

    Thanks alot for the excellent explanation !! I want to find mAP for the Yolov4 model. How to use evaluate ?

  • @tanmaypathak3122
    @tanmaypathak3122 3 ปีที่แล้ว +1

    I am getting this error on windows while creating the environment
    ERROR conda.core.link:_execute(698): An error occurred while installing package 'defaults::qt-5.9.7-vc14h73c81de_0'
    LinkError: post-link script failed for package defaults::qt-5.9.7-vc14h73c81de_0
    location of failed script: D:\anaconda3\envs\yolov4-cpu\Scripts\.qt-post-link.bat
    ==> script messages script output

  • @shahidmirza7476
    @shahidmirza7476 ปีที่แล้ว

    I am stuck with the error 'Could not find a version that satisfies the requirement tensorflow-gpu==2.3.0rc0' while am trying to install the dependencies by command 'conda env create -f conda-gpu.yml'. Please help

  • @marioashraf426
    @marioashraf426 2 ปีที่แล้ว

    Thank you for your great content and simple explanation. Keep going :)

  • @Fogaca135
    @Fogaca135 15 วันที่ผ่านมา

    Hi newbie here, Could you tell me if it is applicable for yolov4 tiny following this tutorial?
    Thank you.

  • @suhail5688
    @suhail5688 4 ปีที่แล้ว +1

    bro your videos are vey helpful..can you make a video on yolo theory part it will be very beneficial..thanks

  • @mysterious6057
    @mysterious6057 4 ปีที่แล้ว +2

    i got this error ..help plz
    F .\tensorflow/core/kernels/random_op_gpu.h:232] Non-OK-status: GpuLaunchKernel(FillPhiloxRandomKernelLaunch, num_blocks, block_size, 0, d.stream(), gen, data, size, dist) status: Internal: no kernel image is available for execution on the device
    Fatal Python error: Aborted

  • @harshays2873
    @harshays2873 3 ปีที่แล้ว

    inference time of tflite is very high, means taking more time for prediction, can you PLEASE confirm me one thing tflite uses NVIDIA GPU in not?

  • @maritaeques
    @maritaeques 3 ปีที่แล้ว

    Thank you for sharing! Excellent work :)

  • @siddhikhanvilkar9890
    @siddhikhanvilkar9890 3 ปีที่แล้ว

    Hello Sir, I have learnt use of YOLO by watching your videos. Thank you for providing such videos. Sir can you please provide us video on how to distinguish between static and moving object using YOLO in google colab?

  • @prithilaangkan2100
    @prithilaangkan2100 4 ปีที่แล้ว +1

    A big thumbs up for the amazing contents! I'm eagerly waiting for the object tracker video with yolov4 and deepsort. Any idea when that will be available?

  • @saad-hyder
    @saad-hyder 4 ปีที่แล้ว +1

    This is extremely helpful! Thanks! Will u be making any tutorial of a counter for multiple objects used in applications such as traffic counting?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +2

      Yes I will be showing how to customize the code for counting, cropping images etc. soon. Stay tuned!

  • @mwaikul
    @mwaikul 3 ปีที่แล้ว

    For some reason when I use my own videos the program exits the video after exactly 19 frames the vid.read() is returning false. I tried different size videos ranging from 100Mbs to 4GB
    Does anyone know how to resolve this?

  • @phuongnguyenquang8147
    @phuongnguyenquang8147 2 ปีที่แล้ว

    I start to dig into the machine learning field. And this tutorial is great but i have a problem, after i execute the last code to run object detection on webcam :python detect_video.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --video 0 --output ./detections/results.avi"
    It's stuck at adding visible gpu ... something. Some gg search, and i was told it's because of the old tensorflow-gpu version. So i change the conda-gpu.yml file to
    tensorflow-gpu>=2.4.0rc0
    opencv-python>=4.1.2
    And i got the error Cant parse pt1. Sequence ....
    Thank you very much

  • @manivarma6583
    @manivarma6583 2 ปีที่แล้ว

    Can you please tell what xmin, xmax, ymin, ymax mean ? Are they top-left and bottom-right coordinates or height, width and centroid of bounding box ?

  • @diogoferreira9814
    @diogoferreira9814 2 ปีที่แล้ว

    I wanted to use tensorFlow Lite, but with my own YOLOv4 custom object detector. How could i do that?

  • @DavidSusic
    @DavidSusic 3 ปีที่แล้ว +2

    Hello, thanks for the video. When I try to Save custom yolov4 tf model for tflite converting I get this error:
    ValueError: cannot reshape array of size 4613787 into shape (1024,512,3,3)
    How can I solve this, what is causing the problem?

    • @TheAIGuy
      @TheAIGuy  3 ปีที่แล้ว +2

      sdavid did you change the .names file in the config to your custom classes?

    • @DavidSusic
      @DavidSusic 3 ปีที่แล้ว

      @@TheAIGuy Dude. Thank you very much, it works.

  • @andyadejoh7203
    @andyadejoh7203 2 ปีที่แล้ว

    Hello,
    When i tried running this on my mac terminal: conda env create -f conda-gpu.yml
    I got this error : Solving environment: failed
    ResolvePackageNotFound:
    - cudnn
    - cudatoolkit==10.1.243
    Can you profer a solution? Thank you

  • @sonasondarasaesaria1941
    @sonasondarasaesaria1941 3 ปีที่แล้ว

    Thanks for the tutorial! you helped me a lot with your great videos.

  • @arnoldchristianloaizafabia4657
    @arnoldchristianloaizafabia4657 3 ปีที่แล้ว +1

    excellent tutorial. Is there a tutorial where you explain the yolo model with tensorflorw from scratch?

  • @swapnilprakashlader1456
    @swapnilprakashlader1456 3 ปีที่แล้ว

    I am getting this error can you please help
    ValueError: Dimension 1 in both shapes must be equal, but are 256 and 512. Shapes are [?,256,26] and [?,512,26]. for '{{node concat_6}} = ConcatV2[N=2, T=DT_FLOAT, Tidx=DT_INT32](LeakyRelu_7, ResizeBilinear, concat_6/axis)' with input shapes: [?,256,26,2], [?,512,26,8], [] and with computed input tensors: input[2] = .

  • @prateekgupta3932
    @prateekgupta3932 4 ปีที่แล้ว +1

    Please add 'Test Time Augmentation' approach with YOLOv4 in your future video.

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      prateek gupta will look into this! Thanks for the suggestion.

  • @Shahzebnaeemminhas
    @Shahzebnaeemminhas 3 ปีที่แล้ว

    Not being able to see the detections in the video, even though the video is playing.

  • @vynguyenhung9424
    @vynguyenhung9424 3 หลายเดือนก่อน

    What about object detection on Videos using tflite? Please help me

  • @barny1174
    @barny1174 2 ปีที่แล้ว

    Hi can anyone tell me where can I find the .pbtxt file to know what labels are available in the saved_mode.pb?

  • @poweichen3564
    @poweichen3564 3 ปีที่แล้ว +1

    Hi , thank you so much for your tutorials.here is a question ,if i just want to detect some classes like "car" and "person",how should i do ? i mean in donot want to detect like "cat" ,"dog " any thing else.

  • @abdullahhani672
    @abdullahhani672 3 ปีที่แล้ว

    I am using GPU GeForce GTX 1050 ComputeCapability: 6.1... but i am getting only 3.7 FPS.
    you said even cpu will get 4 to 8 FPS?? can someone help??

  • @alastrareymart6394
    @alastrareymart6394 10 หลายเดือนก่อน

    good afternoon sir @The AI Guy.. sir I would like to ask if you have complete tutorial from the start to end using google collab about yolov4.. Thank you

  • @khadijapirzada7781
    @khadijapirzada7781 3 ปีที่แล้ว

    is there not a way to use this repo with cuda 10.2 sir ? im using jetson nano with pre installed cuda 10.2

  • @ImranAli-zo8bi
    @ImranAli-zo8bi 4 ปีที่แล้ว +2

    Great work👍. Can you tell how to calculate mAP of your model?

  • @drewgibson980
    @drewgibson980 4 ปีที่แล้ว +2

    this is amazing and I could not be more grateful as I have been trying to find a good tutorial for this so thank you, I am very new to python so is there a way I could start the webcam detection through an application and also get the coordinates of a specific type of box (dog) I would like to use these to control a servo so it points the servo at the dog?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +2

      Captain Lynk I have a video coming out tomorrow that will show you how to output the coordinates!

    • @drewgibson980
      @drewgibson980 4 ปีที่แล้ว +1

      @@TheAIGuy No way thank you so much!!

  • @jackpa9247
    @jackpa9247 3 ปีที่แล้ว

    for a beginner, i don’t understand where to start with cmd. even with anaconda environment, i still have problems with file directory.

  • @TheNydeon1
    @TheNydeon1 4 ปีที่แล้ว +1

    Hey thanks a lot for the video. It helped a lot and it was very instructive !
    I was wondering if it's possible to generate a json file (for example) with a timestamp, the detected object and maybe the coordinates. I need a way to know what is going on in the video without looking at it. I want to have a text file with all the information in it.
    I want to build an application where you can send a video and it returns a text file with the detection informations.
    Would it be easy to implement in the current state of your code ?
    Thanks :)

  • @mustafagoksu7661
    @mustafagoksu7661 3 ปีที่แล้ว

    a very good education. I created tflite as you explained in the video. How can I use it on Raspberry 4 4GB with web cam?

  • @robertolobianco7764
    @robertolobianco7764 2 ปีที่แล้ว

    Hi man, Great video as usual! Do you know if I can use the weights from yolov3 training to this yolov4 usage?

  • @samarpratapsingh9788
    @samarpratapsingh9788 4 ปีที่แล้ว +2

    I tried the following code in colab.
    !python /content/tensorflow-yolov4-tflite/detect_video.py --weights /content/yolov4.weights --size 416 --model yolov4 --video ./data/video/video.mp4 --output ./detections/results.avi
    But I got this error
    File "/content/tensorflow-yolov4-tflite/core/utils.py", line 77, in read_class_names
    with open(class_file_name, 'r') as data:
    FileNotFoundError: [Errno 2] No such file or directory: './data/classes/coco.names'

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +3

      I have not optimized this tutorial for Colab so it will most likely have errors. I will look into optimizing it for Colab for a future video on the channel.

    • @samarpratapsingh9788
      @samarpratapsingh9788 4 ปีที่แล้ว

      @@TheAIGuy Thanks a lot!

  • @yigitcanarin4156
    @yigitcanarin4156 4 ปีที่แล้ว

    Super useful video once again. I have a question: do you have any pointers in how to further retrain YOLOv4 models to reduce false positives? Silly example: Say I am getting a puddle of water in the floor detected as "person" with 79% probability. I want to make use of that frame with false positive to teach the model that the puddle is not a person. Appreciate your support.

  • @RushianKiller
    @RushianKiller 2 ปีที่แล้ว

    Crack! Genio, máquina, really nice work mate!

  • @johainasanday6562
    @johainasanday6562 2 ปีที่แล้ว

    This is really helpful. I have subscribed to your channel.
    Can you make a video on how to deploy it on raspberry pi?

  • @venkilfc
    @venkilfc 2 ปีที่แล้ว

    Thank you so much for this video! Is it possible for me to train this YOLOv4 model using the tensorflow framework? In the video, you have downloaded the weights from the training that was based on the Darknet framework. I was wondering if I could do everything on TF.
    Thanks!

  • @ginamaranan4001
    @ginamaranan4001 ปีที่แล้ว

    Hi we have a small project but we do not have the PC to do it, where can we contact or email? We already have the datasets. Thank you!!!!

  • @kennychen7606
    @kennychen7606 2 ปีที่แล้ว

    Hello Sir,I learned a lot of things beacuse your nice video! But I don't know how to use yolov4 to detect on webcam, I hope you can put on the github or new video please!

  • @McBobX
    @McBobX 2 ปีที่แล้ว

    Hey TheAIGuy, this is very interesting! I went through all steps, from training with Darknet, to testing with it, converting to TF model. Strangely though, Darknet gives me detected bounding boxes, but with DeepSORT script, I get no bounding boxes. I verified everything regarding the model's config, inputs and outputs, and even no errors when converting to TF model. Any thoughts why can this happen? I appreciate any provided help!

  • @loki1234509876007
    @loki1234509876007 3 ปีที่แล้ว +1

    Hello thanks for the video, is very helpful, but I have a issue, I run the code to detect objects in images and it works pretty well, but when I do the same for video or my web cam just doesn't detects anything, and I'm confused... Can you help me please? Thanks!

    • @luiscao7241
      @luiscao7241 3 ปีที่แล้ว +1

      same issues!

    • @loki1234509876007
      @loki1234509876007 3 ปีที่แล้ว

      ​@@luiscao7241 Check your CUDA's library and drivers, and TensorFlow version that have to be exactly the same than the one that is showed in the video, start from there and then you can experimentize with others versions of everything. I guess I've solved my issue in that way

    • @luiscao7241
      @luiscao7241 3 ปีที่แล้ว +1

      @@loki1234509876007 Problem is resolved. But speeds is not as my expectation. It is much slower than running with darknet.exe. I got 12 FPS with TF2 (.H5) but 32FPS with darknet.exe.

    • @loki1234509876007
      @loki1234509876007 3 ปีที่แล้ว

      ​@@luiscao7241 Fine, I'm glad for you, but is normal, python is soooo much slower than C, the original languaje of darknet... And it depends on your hardware, drivers an so much more too...
      Are you sure than your python environment is really using your graphics card? -your issue looks like something like that

    • @luiscao7241
      @luiscao7241 3 ปีที่แล้ว +1

      @@loki1234509876007 :)) If graphics card and others packages (opencv, cudnn, cuda,...) were not installed, how could I successfully train YOLO on a customized dataset?

  • @amquangphuoc5377
    @amquangphuoc5377 3 ปีที่แล้ว

    I can't use command: conda env create -f conda-gpu.yml

  • @dennisasamoah2213
    @dennisasamoah2213 3 ปีที่แล้ว +1

    really helpful thank you

    • @TheAIGuy
      @TheAIGuy  3 ปีที่แล้ว +2

      Glad you enjoyed! Thanks for the nice comment.

  • @NisarAhmad-ch3kc
    @NisarAhmad-ch3kc 2 ปีที่แล้ว

    Thank you for such nice tutorial, but
    save_model.py: import "tensorflow" could not be resolved,
    import "absl" could not be resolved,
    import "absl.flags" could not be resolved.
    [Possible Problem]: tensorflow-gpu==2.3.0rc0 not available. I am using pip version 21.2.4,
    To run code I installed TF 2.8.0 & 2.3.0. still same errors.
    Plz guide. Thank you

  • @satishchhatpar
    @satishchhatpar 3 ปีที่แล้ว

    Can I run this above example on Google Colab ?

  • @shadowslayerhero
    @shadowslayerhero 2 ปีที่แล้ว

    Hello I tried using the custom yolov4 weights to tensorflow _pb but I get ValueError: cannot reshape array of size 4400986 into shape (1024,512,3,3) , im pretty sure I followed the yolov4 collab tutorial but when I tried using --model yolov3 args it successfuly converts into _pb but when I tried using the detect_video_py it doesnt detect anything can anyone help

    • @shadowslayerhero
      @shadowslayerhero 2 ปีที่แล้ว

      I checked the checkpoints folder and the ones where I used --model yolov3 doesnt have the keras_metadata pb file

  • @abhikalyan432
    @abhikalyan432 3 ปีที่แล้ว

    hey may I know which shell you are using in this video

  • @sergenerbay2876
    @sergenerbay2876 3 ปีที่แล้ว

    I get the following error when converting from tr to trt with their own weights. What is the solution to this problem?
    FileNotFoundError: [Errno 2] No such file or directory: '/media/user/Source/Data/coco_dataset/coco/5k.txt'

  • @paulwolff6405
    @paulwolff6405 3 ปีที่แล้ว

    So you always must initially train the model using darknet and convert it to tensorflow afterwards?

  • @abishafatima3298
    @abishafatima3298 ปีที่แล้ว

    yolov4 weight file is not working 404 error on drive ...

  • @zaizifatmazahra4698
    @zaizifatmazahra4698 3 ปีที่แล้ว

    Thanks for this useful video, Can you HELP me, I created a GUI and when I call your function main(_argv) it gives me this error "main() takes 1 positional argument but 2 were given". any idea why ?????????????

  • @FameCMT
    @FameCMT 3 ปีที่แล้ว

    Hi. I have on question? DeepSort(tensorflow) + libdarknet.so vs DeepSort(tensorflow) + tensorflow Yolov4......... which one is faster?

  • @chowdhurysalehahmedrony5391
    @chowdhurysalehahmedrony5391 4 ปีที่แล้ว +2

    Humble request to do video for YOLOv4 Object Detector in colab using webcam

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +3

      Thanks for the request. I've taken note of it and will look into it for future video!

    • @snehitvaddi
      @snehitvaddi 4 ปีที่แล้ว

      @@TheAIGuy Yup, try implementing object detection through the webcam on colab. I have faced a ton of issues for doing it. It would be great if you can do it.

  • @surajsawant2355
    @surajsawant2355 3 ปีที่แล้ว +1

    if i am using the google colab what are the steps?

  • @user-ic7tn7fx1d
    @user-ic7tn7fx1d 4 ปีที่แล้ว

    If you run python convert_trt.py, an error occurs as shown below.
    I installed windows 10 TensorRT and also proceeded with environment variables.
    I'm not sure what's the problem.
    Please tell me how to install and configure windows 10 TensorRT.
    File "convert_trt.py", line 9, in
    from tensorflow.python.compiler.tensorrt import trt_convert as trt
    ImportError: cannot import name'trt_convert' from'tensorflow.python.compiler.tensorrt' (C:\anaconda3\envs\yolov4-gpu\lib\site-packages\tensorflow\python\compiler\tensorrt\__init__.py)

  • @waytae1
    @waytae1 4 ปีที่แล้ว +1

    Hello,
    Please can you add the gpu memory and gpu utilization of theses different models in you comparaison?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +2

      Will look into adding this for you soon!

  • @AmitYadav-ig8yt
    @AmitYadav-ig8yt 3 ปีที่แล้ว

    Hello sir... Please help me.
    I want to train a object detection model on image. But As output I want object name, Object size and Objects information (If I give something).
    Let's say want to train on a wind turbine blade image. I want defect type in blade(there are 4 types of defects),which blade this defect belongs to.
    How to label image for YOLO in this situation?

  • @lorenzoleongutierrez7927
    @lorenzoleongutierrez7927 3 ปีที่แล้ว

    Great! thanks for this post!!.

  • @ahmadadib51
    @ahmadadib51 3 ปีที่แล้ว

    hi thanks. this tutorial worked very well on me. but there is a little error, I can not apply it on android, can you post specifically for the application of TFLite on android?

  • @mohammaddehghan8762
    @mohammaddehghan8762 4 ปีที่แล้ว +1

    tankyou for this tutorial
    Why I run the TensorFlow Lite command is slower than normal TensorFlow

    • @rblansxx3444
      @rblansxx3444 4 ปีที่แล้ว

      It's the same for me. It's 3 times slower than using CPU

    • @mohammaddehghan8762
      @mohammaddehghan8762 3 ปีที่แล้ว

      @@rblansxx3444 when i run in raspberry pi 3 increase speed but cpu descent speed I think Tensorflow Lite is used for embedded systems

  • @markschang9460
    @markschang9460 3 ปีที่แล้ว

    Great video! New to this but learning a lot from your videos! Hopefully easy question - I'm trying to create an int8 quantized tflite model using the command 'python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./checkpoints/yolov4-416-int8.tflite --quantize_mode int8 --dataset ./coco_dataset/coco/val207.txt' and am getting errors because I don't have the '/coco_dataset/coco/val207.txt' file for the representative data gen. What is this file? How do I create it, or where do I find it? Looked all over the coco documentation. Thanks.

  • @houston3414
    @houston3414 4 ปีที่แล้ว

    I’m impressed with this tutorial, do you know if this will run any fast on macbook pro 2017, i7 without a GPU?

  • @nandhininallamuthu4060
    @nandhininallamuthu4060 3 ปีที่แล้ว

    Great work on the conversion part. is there any workaround for using convert_tflite.py for yolov4tiny, specifically for int8? I am trying to use it, but it is throwing errors related to '/dequantize.cc:61 op_context.input->type == kTfLiteUInt8 || op_co'. I also noticed, you've mentioned that for yolov4 & yolov4tiny, it needs to be fixed. Any thoughts on why that error?

  • @luiscao7241
    @luiscao7241 3 ปีที่แล้ว

    Hi, Thank you for the great video. But the detect_video.py has problem. it does not show any boxes.

  • @yashmistry61
    @yashmistry61 4 ปีที่แล้ว +1

    Great work, Appreciate that
    But i have one doubt regarding custom model
    I have custom object detection weight and cfg file of YOLOv4
    now can I follow your same step for that?
    Will it work ?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      Yash Mistry i have another video on showing how to run a custom model through this repository! Give it a check! Hope that helps.

  • @superray1462
    @superray1462 3 ปีที่แล้ว

    Thanks for the sharing. Anyone know how to reduce the classes? I tried to delete the classes in coco.names and then modify the filter and class number in yolov4.cfg. However it doesn't work.