Custom Object Detection with TensorFlow YOLOv4, and TFLite | Windows, Linux | Image, Video

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

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

  • @Alpha-hj2ss
    @Alpha-hj2ss 3 ปีที่แล้ว

    Great Tutorial,Thank you very much

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

    Thank you so much❤, can we get full version of yolov4

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

    Good video but I got the following error when converting to tflite:
    error: loc("batch_normalization/moving_mean"): is not immutable, try removing mutable variables in your model since mutable variables are currently not supported through this converter
    Any advice?

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

      Check TF version. It should be 2.3.1

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

      @@TheCodingBug Okay thanks. I am able to convert my YOLOv4-tiny weights to tflite. However, I encountered this error when I'm trying to test my model on images and videos:
      cv2.error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'rectangle'
      > Overload resolution failed:
      > - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
      > - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
      > - Can't parse 'rec'. Expected sequence length 4, got 2
      > - Can't parse 'rec'. Expected sequence length 4, got 2
      Any advice?

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

    hi coding bug i have some probleem "SavedModel file does not exist at: ./checkpoints/yolov4-416\{saved_model.pbtxt|saved_model.pb}" ,do you have solution ?

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

      This only works for tensorflow 2.3.1

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

    hello, your tutorial is so much helpful for my final project. but i'm confused to how i produce the metrics when testing from test dataset. How can i do that, could you give me some documentation. Thanks in advance !!

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

    Is there any chance you could demonstrate how to also convert the model to an int8 quantized one? I think it required a representative dataset to be passed as well.

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

    Hi TheCodinBug! Thank you so much for your tutorials! I love them! Can you please tell that how can I speed up the detection process? Currently I'm getting around 1 FPS on my CPU. I tried training on only one class, i.e person to reduce the size of weights, but there isn't any significant change in FPS. Please suggest some changes that will work on my CPU. I already tried using Google Colab but want to do the detection locally. Thanks again for your awesome tutorials! I share them with my colleagues :-)

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

      Thank you for your appreciation. It is very difficult to get a higher FPS on the CPU using YOLOv4. Maybe I can make a video on how can we get real-time object detection using some other model.

    • @karthik-pillai
      @karthik-pillai 3 ปีที่แล้ว

      It would be really great if you do so, many people are waiting for it xD

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

    amazing!

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

    An Android App would be great!

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

      That tutorial is a work in progress. Hopefully I'll upload that next week.

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

      @@TheCodingBug We will wait for it bro !!

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

    I have the same problem even in the original repo. On GPU the detection is only on the first frame while CPU runs fine but extremely low fps (1 fps)..

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

    I meet the problem when I convert yolov4-tiny into tflite, is there any suggestion that I can solve it?
    conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0])
    ValueError: cannot reshape array of size 374698 into shape (256,256,3,3)

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

      Your weight file is not correct or you're using command of yolov4 on yolov4-tiny....

  • @RandomGuy-df1oy
    @RandomGuy-df1oy 3 ปีที่แล้ว

    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 are currently not supported through this converter Error

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

    What's inside your assets folder? Mine is empty

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

      If you are talking about android app, there should be yolo tiny tflite model in it. Make sure you are in main >> assets and not in androidTest>>assets.

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

      @@TheCodingBug I'm talking about the conversion, in the checkpoints folder

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

      @@zM4l0yOh! My bad. That folder is empty. You should have on .pb file and variables folder with the data. Assets folder does not contain anything.

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

      @@TheCodingBug Thanks!! 😉

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

    Can this be run on raspberry pi

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

    HI man, I really appreciate your work. I've tried it with my custom weights and classes but a problem occur while converting ".weights" in tflite in order to use it in the android application..
    File "C:\Users\fstro\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\util\serialization.py", line 69, in get_json_type
    raise TypeError('Not JSON Serializable:', obj)
    TypeError: ('Not JSON Serializable:', b'
    \x08Softplus\x12\x08Softplus\x1a"batch_normalization/FusedBatchNorm*\x07
    \x01T\x12\x020\x01')
    Did you have some idea on how to fix it??

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

    File "E:\tensorflow-yolov4-tflite-master\core\utils.py", line 151, in draw_bbox
    f = int(out_classes[i])
    TypeError: only size-1 arrays can be converted to Python scalars