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?
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."
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.
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?
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'
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
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.
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 🙏🏻
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?
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.
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.
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] = .
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
I was succesfull convert it too tflite but the size still big right?..
Do u have github for drploy it to android?
Yes. The GitHub link shared in the description has Android app as well. But it's not fully tested by me as of yet.
I want deploy the detect. Tflite to andorid
@@TheCodingBug yeah i dont know how to deploy it to android haha 😃
@@TheCodingBug if just local that honna be easy
I have made a video on deployment of tflite model on android. Check out my latest upload.
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?
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."
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.
The conversion script works only for TF version 2.3.1.... latest versions of TF are not supported.
hi sir is it the same for all yolo versions ? i want to convert my yolov7 model to TensorRt and thank you
No it doesn't work for other versions. Yolov8 and v7 hae it's own method of converting to tensorRT
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?
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'
This code is only compatible with tensorflow version 2.3.1
Thank you for the good tutorial! can we use this code in CUDA 11.2 or higher versions??
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
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.
Awesome Video
Maybe a video on converting models to tflite where tflite usually generates a 1kb file
It depends on the original model size. If you quantize yolov4 model, it's going to be roughly 120MB in size.
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 🙏🏻
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.
Thank you for your appreciation. Yes you can use tflite on Jetson. Unfortunately I do not have a tutorial for this.
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?
There's different weights file for tiny version. Make sure you're using correct weight file and correct command for tiny version.
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.
experimental_enable_resource_variables, how can I set this to True?
Can i run these in google collabs?
Yes you can, with mentioned TF version. So you'll have to install TF 2.3.1 on colan (if it's still available)
I am getting Internal: failed to get device attribute 13 for device 0
Sir, why do I have no prediction frame when I detect video? My computer is 3060 graphics card
This only works with TF versions
Me pude servir lo de convertir a TF hub
The detect.py do not work for multiple file. and the detect_video.py does not work. Please help to double check
at 7:11 it give no module name easydict
can you help me
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.
@@TheCodingBug same problem
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] = .
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
@@TheCodingBug can i run it in other TF version? because now I cant download it via pip
where is tensorRT?
how about yolo5 case ? is it possible?
No not for the current version of this repository.
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
Install matching versions of cuda and cudnn for your tensorflow version.
I have already installed latest version cuda 11 & cudnn