tensorflow-yolov4-tflite | tiny Implemented in Tensorflow | Computer Vision library
kandi X-RAY | tensorflow-yolov4-tflite Summary
kandi X-RAY | tensorflow-yolov4-tflite Summary
YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Save the trained model
- Return a yolov version of a given model
- YolOv3 test
- YolOv4
- Convert training set to images
- Convert an annotation file
- Load configuration
- Get anchors
- Function to draw a plot of a function
- Adjust axes limits
- Calculate nms using nms
- Compute the intersection of two bounding boxes
- YOLOv3
- Return a YOLO version of the input layer
- Draw text at pos
- Parse image
- YOLOv4
- Load weights from a file
- Saves TrtensorFlow model
- Convert annotation files to images
- Save TFLite model
- Example example
- Make the names of the annotation files
- Rename a class
- Convert a vocab annotation file to images
- Compute the precision of the matrices
- Compute loss
- YolOv3
tensorflow-yolov4-tflite Key Features
tensorflow-yolov4-tflite Examples and Code Snippets
Community Discussions
Trending Discussions on tensorflow-yolov4-tflite
QUESTION
As I detect my tflite file, the problem happened.
The command I wrote.
...ANSWER
Answered 2021-Jun-10 at 12:41The problem is that you are passing tuples with floats into the function's parameters as the points. Here is the error reproduced:
QUESTION
Main Question:
What changes should I do to the repo's source code to successfully convert my YOLOv4 darknet weight (with custom anchors) to Tensorflow format?
Background:
I used this repo to convert my YOLOv4 darknet weights to Tensorflow format.
I have trained YOLOv4 on a custom dataset using custom anchors (9 anchors) but the number of anchors I used per [yolo] layer is 4, 3, 2, respectively. By default, YOLOv4 uses 3 anchors each [yolo] layer.
Main Problem:
The repo I used is coded in a way that only considers the default anchors, where there are 3 anchors each [yolo] layer.
What I tried to do to solve the main problem:
- I have tried to do some changes to the source code, which are summarized in this link.
- I used the code below to attempt converting the darknet weight to tf format. Here is the log of the conversion process.
python save_model.py --weights data/yolov4-512.weights --output ./checkpoints/yolov4-512 --input_size 512 --model yolov4
- I tested the resulting tf model using the code:
python detect.py --weights checkpoints/yolov4-512 --size 512 --model yolov4 --image data/pear.jpg
. The process failed and the error can be seen below. I have seen possible problems here but I don't know how to solve them.
ANSWER
Answered 2021-Mar-22 at 06:45I posted an answer to one of your earlier question about YoloV4 (CSP) conversion. Did you try and see if that worked?
If that worked, you can try to use your own config file and weights in the convert.py
command in the notebook and see if it works
QUESTION
How to convert YOLOv4-CSP darknet weights to Tensorflow (tf) format?
I have tried using this repo but it didn't work.
I had this error message:
...ANSWER
Answered 2021-Mar-20 at 11:46The repository that you are using doesn't support conversion of Scaled YoloV4 or Yolov4-csp yet. It's still a feature request according to this issue
There's luckily a workaround. I found this repository that does the same thing, only difference being it converts the model to .h5
(keras format) before converting into tensorflow format. This also supports yolov4-csp
.
I made a Google Colab notebook that does the conversion, which can be found here.
QUESTION
I want to run yolov4 code in this repo: https://github.com/hunglc007/tensorflow-yolov4-tflite And I installed python 3.7 and all requirements and cuda and cudnn. By the log, the cudnn and cuda is installed well, but there is error of "no kernel image is available for execution on the device" what is this error? is it related in cuda or cudnn version error?
Python: 3.7.9, CUDA: 10.1, Tensorflow:2.3.0rc0, Tensorflow-GPU:not installed, CUDNN:7.5.0, OS: Windows10(x64)
...ANSWER
Answered 2020-Sep-03 at 05:13The error indicates that the pre-built binary used in tensorflow, does not support the SM version (compute capability) supported by your actual hardware.
You can refer to below link for supported combinations:
https://www.tensorflow.org/install/source_windows#gpu
Based on this, both 2.1.0 and 2.3.0 require CUDNN 7.4 and CUDA 10.1. You should try with these supported combinations.
[2.3.0 release/rc2/rc0 specific] from https://github.com/tensorflow/tensorflow/releases/tag/v2.3.0 - TF 2.3 includes PTX kernels only for compute capability 7.0 to reduce the TF pip binary size. Earlier releases included PTX for a variety of older compute capabilities.
QUESTION
My goal is to load a saved model once and use it for inference multiple times on different images to save time between each prediction. In my case, after loading the model, the first prediction is fine. However, if I try to use the model a second time, the result is empty. Is there a way to use the loaded model for inference multiple times or am I doing something terribly wrong?
I am using a trained YoloV4-tiny model that has been converted from a .wheights file to a .pb file using this repository. The tensorflow version I am using is tf-nightly 2.5.0.
Code sample:
...ANSWER
Answered 2020-Dec-01 at 12:45I managed to solve this problem by loading the model with keras:
QUESTION
I'm trying to use YOLO to detect license plate in an Android application.
So I train a YOLOv3 and a YOLOv4 model in Google Colab. I converted these 2 models to TensorFlow Lite, using the wonderfull project of Hunglc007 and I also verified that they are working and got the following result :
But when I try to understand the output of the model to adapt it in my app I got this using netron:
Why do I have 2 outputs when the model have been trained to detect only one single object?
And why the format of the output is like that, what does this [1,1,4]
represents?
EDIT
The code for the bboxes can be found here
...ANSWER
Answered 2020-Oct-06 at 14:21I am not an expert in Netron, but from inspecting the problem and its expected outputs, I see that it should produce two outputs for each detection; the detection rectangle and the detection confidence. Hence, the two outputs you ask about are probably, the rectangle which is defined by 4 float numbers - two coordinates of upper left corner, width and height - and the confidence which is one float number.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tensorflow-yolov4-tflite
You can use tensorflow-yolov4-tflite like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page