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

  Рет қаралды 13,336

TheCodingBug

TheCodingBug

Күн бұрын

Пікірлер: 54
@vynguyenhung9424
@vynguyenhung9424 5 ай бұрын
I have a problem, please help me "Traceback (most recent call last): File "save_model.py", line 4, in from core.yolov4 import YOLO, decode, filter_boxes File "C:\Users\VyNguyenHung\tensorflow-yolov4-tflite\core\yolov4.py", line 6, in import core.utils as utils File "C:\Users\VyNguyenHung\tensorflow-yolov4-tflite\core\utils.py", line 1, in import cv2 ImportError: DLL load failed: The specified module could not be found."
@joyboy1930
@joyboy1930 2 жыл бұрын
Sir I have problem tf.__internal__.register_load_context_function(in_load_context) AttributeError: module 'tensorflow.compat.v2.__internal__' has no attribute 'register_load_context_function'
@TheCodingBug
@TheCodingBug 2 жыл бұрын
This code is only compatible with tensorflow version 2.3.1
@ChaimaLimayem
@ChaimaLimayem Жыл бұрын
hi sir is it the same for all yolo versions ? i want to convert my yolov7 model to TensorRt and thank you
@TheCodingBug
@TheCodingBug Жыл бұрын
No it doesn't work for other versions. Yolov8 and v7 hae it's own method of converting to tensorRT
@malikbilal6061
@malikbilal6061 3 жыл бұрын
Sir, You have given an awesome introduction about object detection using tensor flow and android devices. Can we use the same tflite model file for Arduino and Resperry pi ? How can we run these file on these low power devices specially arduino.
@abbosabdullayev2248
@abbosabdullayev2248 2 жыл бұрын
Thank you for the good tutorial! can we use this code in CUDA 11.2 or higher versions??
@TheCodingBug
@TheCodingBug 2 жыл бұрын
It is not dependant on CUDA versions. It only depends on TF. It's tested on TF 2.3.1.... but it doesn't work with higher versions. So that means you can use only those versions of CUDA which support TF 2.3.1
@harshdevmurari007
@harshdevmurari007 2 жыл бұрын
ive used custom yolo model and converted it to tf. The center point of prediction is correct but the bounding box isnt proper. Box being made is half the size of object. Any suggestions on that?
@hesron-sam
@hesron-sam 2 жыл бұрын
hello Sir, may i ask how to change the bonding box color in tflite. ie i want to specify different color for different target object.. such as green for human...white for animals.. if possible may i request a video for this question 🙏🏻
@abeermalkawi9812
@abeermalkawi9812 2 жыл бұрын
Thanks for good tutorials. I trained YOLOv4 tiny using its config and weights. The conversion didn't work with the following error: File "/content/tensorflow-yolov4-tflite/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 774711 into shape (256,384,3,3) Can you help please.
@TheCodingBug
@TheCodingBug 2 жыл бұрын
The conversion script works only for TF version 2.3.1.... latest versions of TF are not supported.
@vamsisiddharthalella6832
@vamsisiddharthalella6832 3 жыл бұрын
Sir, You have given a awesome introduction about object detection using tensor flow and android devices. Can we use the same for Jetson Nano also.
@TheCodingBug
@TheCodingBug 3 жыл бұрын
Thank you for your appreciation. Yes you can use tflite on Jetson. Unfortunately I do not have a tutorial for this.
@jothegamechanger
@jothegamechanger 3 жыл бұрын
I was succesfull convert it too tflite but the size still big right?.. Do u have github for drploy it to android?
@TheCodingBug
@TheCodingBug 3 жыл бұрын
Yes. The GitHub link shared in the description has Android app as well. But it's not fully tested by me as of yet.
@jothegamechanger
@jothegamechanger 3 жыл бұрын
I want deploy the detect. Tflite to andorid
@jothegamechanger
@jothegamechanger 3 жыл бұрын
@@TheCodingBug yeah i dont know how to deploy it to android haha 😃
@jothegamechanger
@jothegamechanger 3 жыл бұрын
@@TheCodingBug if just local that honna be easy
@TheCodingBug
@TheCodingBug 3 жыл бұрын
I have made a video on deployment of tflite model on android. Check out my latest upload.
@Husein-cl5vh
@Husein-cl5vh Жыл бұрын
hello sir, I'm getting an error like this : Traceback (most recently last call): File "save_model.py", line 4, in from core. yolov4 import YOLO, decode, filter_boxes File "D:\project\convertyolo\tensorflow-yolov4-tflite\core\yolov4.py", line 6, in import core. utils as utils File "D:\project\convertyolo\tensorflow-yolov4-tflite\core\utils.py", line 128, in def draw_bbox(image, bboxes, classes=read_class_names(cfg.YOLO.CLASSES), show_label=True): AttributeError: 'str' object has no attribute 'YOLO' do you have a solution?
@Herin0923
@Herin0923 3 жыл бұрын
Thank you for the amazing video sir. i was able to make a tflite from yolov4.weights but whenever i try to make with Yolov4-Tiny version, i got an error like this conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0]) ValueError: cannot reshape array of size 372388 into shape (256,256,3,3) Could you tell me how can i solve this problem?
@TheCodingBug
@TheCodingBug 3 жыл бұрын
There's different weights file for tiny version. Make sure you're using correct weight file and correct command for tiny version.
@vladimirardyshev2889
@vladimirardyshev2889 3 жыл бұрын
Hi! When I tried to make with Yolov4-Tiny version I got an error too. I took the file with the weights by reference from the repository, but received a similar error. However, I did manage to run without error. I used input_size parameter with value 256 instead of 416.
@ilmanrahmanhasibuan4113
@ilmanrahmanhasibuan4113 2 жыл бұрын
Can i run these in google collabs?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Yes you can, with mentioned TF version. So you'll have to install TF 2.3.1 on colan (if it's still available)
@mallarivincenti.678
@mallarivincenti.678 2 жыл бұрын
experimental_enable_resource_variables, how can I set this to True?
@mildchia
@mildchia 2 жыл бұрын
Sir, why do I have no prediction frame when I detect video? My computer is 3060 graphics card
@TheCodingBug
@TheCodingBug 2 жыл бұрын
This only works with TF versions
@pranavmoundekar663
@pranavmoundekar663 2 жыл бұрын
I am getting Internal: failed to get device attribute 13 for device 0
@swapnilprakashlader1456
@swapnilprakashlader1456 3 жыл бұрын
I am getting this error can someone tell me what is wrong in this 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] = .
@TheCodingBug
@TheCodingBug 3 жыл бұрын
You are using different resolutions for the original model than what you're passing to the command. Or You are not using TF version 2.3.1
@raffelravionaldo-9874
@raffelravionaldo-9874 2 жыл бұрын
@@TheCodingBug can i run it in other TF version? because now I cant download it via pip
@markgicharu
@markgicharu 3 жыл бұрын
Awesome Video Maybe a video on converting models to tflite where tflite usually generates a 1kb file
@TheCodingBug
@TheCodingBug 3 жыл бұрын
It depends on the original model size. If you quantize yolov4 model, it's going to be roughly 120MB in size.
@luiscao7241
@luiscao7241 3 жыл бұрын
The detect.py do not work for multiple file. and the detect_video.py does not work. Please help to double check
@gianpieryupanqui3613
@gianpieryupanqui3613 Жыл бұрын
Me pude servir lo de convertir a TF hub
@verydeeplines7398
@verydeeplines7398 3 жыл бұрын
at 7:11 it give no module name easydict can you help me
@TheCodingBug
@TheCodingBug 3 жыл бұрын
If you are using Anaconda, install easydict using command: conda install -c conda.binstar.org/auto easydict You will have to issue above command inside Anaconda prompt. Make sure you are running Anaconda prompt as administrator.
@pranavmoundekar663
@pranavmoundekar663 2 жыл бұрын
@@TheCodingBug same problem
@landscaper1433
@landscaper1433 Жыл бұрын
where is tensorRT?
@oclis711
@oclis711 3 жыл бұрын
how about yolo5 case ? is it possible?
@TheCodingBug
@TheCodingBug 3 жыл бұрын
No not for the current version of this repository.
@jojogaming6339
@jojogaming6339 2 жыл бұрын
HELP PLISS SIR! W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Install matching versions of cuda and cudnn for your tensorflow version.
@jojogaming6339
@jojogaming6339 2 жыл бұрын
I have already installed latest version cuda 11 & cudnn
YOLOv4 and YOLOv3 Object Detection  Using OpenCV | Windows Linux
9:37
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 19 МЛН
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
20 Installing and using Tenssorrt For Nvidia users
18:40
SmileMe
Рет қаралды 15 М.
The Tragedy of systemd
47:18
linux.conf.au
Рет қаралды 1,1 МЛН
Valve CONFIRMS New Hardware
18:35
NerdNest
Рет қаралды 9 М.
Compare YOLOv4 and YOLOv4-tiny
4:49
Stephane Charette
Рет қаралды 6 М.