tensorflow-yolov4-tflite | tiny Implemented in Tensorflow | Computer Vision library

 by   hunglc007 Python Version: Current License: MIT

kandi X-RAY | tensorflow-yolov4-tflite Summary

kandi X-RAY | tensorflow-yolov4-tflite Summary

tensorflow-yolov4-tflite is a Python library typically used in Artificial Intelligence, Computer Vision, Tensorflow applications. tensorflow-yolov4-tflite has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.

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

            kandi-support Support

              tensorflow-yolov4-tflite has a medium active ecosystem.
              It has 2160 star(s) with 1231 fork(s). There are 47 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 300 open issues and 127 have been closed. On average issues are closed in 54 days. There are 20 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of tensorflow-yolov4-tflite is current.

            kandi-Quality Quality

              tensorflow-yolov4-tflite has 0 bugs and 0 code smells.

            kandi-Security Security

              tensorflow-yolov4-tflite has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              tensorflow-yolov4-tflite code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              tensorflow-yolov4-tflite is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              tensorflow-yolov4-tflite releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              tensorflow-yolov4-tflite saves you 2800 person hours of effort in developing the same functionality from scratch.
              It has 6059 lines of code, 275 functions and 59 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed tensorflow-yolov4-tflite and discovered the below as its top functions. This is intended to give you an instant insight into tensorflow-yolov4-tflite implemented functionality, and help decide if they suit your requirements.
            • 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
            Get all kandi verified functions for this library.

            tensorflow-yolov4-tflite Key Features

            No Key Features are available at this moment for tensorflow-yolov4-tflite.

            tensorflow-yolov4-tflite Examples and Code Snippets

            No Code Snippets are available at this moment for tensorflow-yolov4-tflite.

            Community Discussions

            QUESTION

            Tflite detext error: cv2.error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'rectangle'
            Asked 2021-Jun-10 at 13:39

            As I detect my tflite file, the problem happened.

            The command I wrote.

            ...

            ANSWER

            Answered 2021-Jun-10 at 12:41

            The problem is that you are passing tuples with floats into the function's parameters as the points. Here is the error reproduced:

            Source https://stackoverflow.com/questions/67921192

            QUESTION

            How to convert YOLOv4 Darknet Weights to Tensorflow format if you trained with custom anchors?
            Asked 2021-Mar-22 at 06:45

            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:45

            I 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

            Source https://stackoverflow.com/questions/66703796

            QUESTION

            How to convert YOLOv4-CSP darknet weight to Tensorflow format?
            Asked 2021-Mar-20 at 11:46

            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:46

            The 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.

            Source https://stackoverflow.com/questions/66705733

            QUESTION

            no kernel image is available for execution on the device Fatal Python error: Aborted
            Asked 2020-Dec-08 at 11:07

            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:13

            The 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.

            Source https://stackoverflow.com/questions/63715824

            QUESTION

            Using a saved model for inference multiple times without reloading the model each time
            Asked 2020-Dec-01 at 12:45

            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:45

            I managed to solve this problem by loading the model with keras:

            Source https://stackoverflow.com/questions/65088694

            QUESTION

            What's the output of YOLO?
            Asked 2020-Oct-06 at 14:34

            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:21

            I 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.

            Source https://stackoverflow.com/questions/64221354

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install tensorflow-yolov4-tflite

            You can download it from GitHub.
            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

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/hunglc007/tensorflow-yolov4-tflite.git

          • CLI

            gh repo clone hunglc007/tensorflow-yolov4-tflite

          • sshUrl

            git@github.com:hunglc007/tensorflow-yolov4-tflite.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link