EfficientDet | EfficientDet | Computer Vision library

 by   xuannianz Python Version: Current License: Apache-2.0

kandi X-RAY | EfficientDet Summary

kandi X-RAY | EfficientDet Summary

EfficientDet is a Python library typically used in Artificial Intelligence, Computer Vision applications. EfficientDet 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.

Thanks for their hard work. This project is released under the Apache License. Please take their licenses into consideration too when use this project.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              EfficientDet has a medium active ecosystem.
              It has 1322 star(s) with 396 fork(s). There are 37 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 228 have been closed. On average issues are closed in 37 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of EfficientDet is current.

            kandi-Quality Quality

              EfficientDet has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              EfficientDet is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              EfficientDet 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 available. Examples and code snippets are not available.
              EfficientDet saves you 1806 person hours of effort in developing the same functionality from scratch.
              It has 3990 lines of code, 268 functions and 35 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed EfficientDet and discovered the below as its top functions. This is intended to give you an instant insight into EfficientDet implemented functionality, and help decide if they suit your requirements.
            • r Estimator .
            • Build BiFPN layer .
            • Builds WBiFPN layer .
            • Filter boxes based on classification .
            • Batch convolution block .
            • Create generator functions .
            • Compute the anchor targets for the given bboxes .
            • Create callbacks .
            • Runs the model on the given image .
            • Evaluate the model .
            Get all kandi verified functions for this library.

            EfficientDet Key Features

            No Key Features are available at this moment for EfficientDet.

            EfficientDet Examples and Code Snippets

            convert tvm
            Pythondot img1Lines of Code : 31dot img1License : Weak Copyleft (LGPL-3.0)
            copy iconCopy
            def _pad():
                def _impl(inputs, input_types):
                    data = inputs[0]
                    padding = inputs[1]
                    # pad_width = list(zip(padding, padding))
                    pad_v = padding.type_annotation.shape  # change here and next line
                    pad_width = [[0,  
            预测步骤,b、使用自己训练的权重
            Pythondot img2Lines of Code : 31dot img2License : Permissive (MIT)
            copy iconCopy
            _defaults = {
                #--------------------------------------------------------------------------#
                #   使用自己训练好的模型进行预测一定要修改model_path和classes_path!
                #   model_path指向logs文件夹下的权值文件,classes_path指向model_data下的txt
                #   如果出现shape不匹配,同时要注意训练时的model_pat  
            Models,Example usage - models training
            Pythondot img3Lines of Code : 18dot img3License : Permissive (MIT)
            copy iconCopy
            python3 train.py path_to_all_images \
            --ann_name ../annotations/binary_mixed --model tf_efficientdet_d2 \
            --batch-size 4 --decay-rate 0.95 --lr .001 --workers 4 --warmup-epochs 5 \
            --model-ema --dataset multi --pretrained --num-classes 1 --color-jitt  

            Community Discussions

            QUESTION

            Output tensor from tflite interpreter is squeezed
            Asked 2022-Feb-04 at 14:57

            I'm trying to get a YOLOv5s model to run on a Coral EdgeTPU. Ive followed the instructions in the YOLOv5 repository for conversion from the yolov5s.pt model to the yolov5s-int8_edgetpu.tflite model.

            After cloning the pycoral repository, they provide a detect_image.py script. When using their model, the script executes with no errors.

            If I run the same script with my yolov5s-int8_edgetpu.tflite model I get this error:

            ...

            ANSWER

            Answered 2022-Feb-04 at 14:57

            Since the Yolov5s model has a different input file than the EfficientDet, the output tensor will be different. The trick here is understanding how to process this output tensor.

            Fortunately, Ultralytics/Yolov5 held an export competition where the goal was to execute Yolov5 models on EdgeTPU devices.

            This guy Josh won the coral devboard section. He wrote python library to process these wonky tensor outputs from Yolov5s models. Here is the repo. The real processing of the output tensor is done in his non-max-suppression code.

            I've forked his repo and added the ability to execute/process these Yolov5s models on desktops.

            Thanks so much Josh!

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

            QUESTION

            finetuning EfficientDet-D0 from model zoo on PASCALVOC doesn't recognize class label 1 (TensorFlow Object Detection API)
            Asked 2021-Aug-04 at 10:21

            I've downloaded the EfficientDet D0 512x512 model from the object detection API model zoo, downloaded the PASCAL VOC dataset and preprocessed it with the create_pascal_tf_record.py file. Next I took one of the config files and adjusted it to fit the architecture and VOC dataset. When evaluating the resulting network with the pascal_voc_detection_metrics it gives me a near zero mAP for the first class (airplane), the other classes are performing fine. I'm assuming one of my settings in the config file is wrong (pasted down below), why does this happen and how do i fix this?

            ...

            ANSWER

            Answered 2021-Aug-04 at 10:21

            There is a bug in the way pascal_voc_detection_metrics calculates the metric, fix can be found here

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

            QUESTION

            How to read predict() result in Tensorflowjs using a SavedModel
            Asked 2021-Mar-25 at 02:29

            Code using tfjs-node:

            ...

            ANSWER

            Answered 2021-Mar-25 at 02:29

            When you download the tensor using dataSync() it just keeps the value. If you wanted the object with a description of each of the results without the tensors you would just have to console.log(result). Then you expand the result from your log in the browsers console it should return something like this:

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

            QUESTION

            How to train a TF model that is larger than GPU memory?
            Asked 2021-Mar-18 at 09:26

            I want to train a large object detection model using TF2, preferrably the EfficientDet D7 network. With my Tesla P100 card that has 16 GB of memory I am running into an "out of memory" exception, i.e. not enough memory on the graphics card can be allocated.

            So I am wondering what my options are in this case. Is it correct that if I would have multiple GPUs, then the TF model would be split so that it fills memory of both cards? So in my case, with a second Tesla card again with 16 GB I would have 32 GB in total during training? If that is the case would that also be true for a cloud provider, where I could utilize multiple GPUs?

            Moreover, if I am wrong and it would not work to split a model for multiple GPUs during training, what other approach would work in order to train a large network that does not fit into my GPU memory?

            PS: I know that I could reduce the batch_size to 1, but unfortunately that does still not solve my issue for the really large models ...

            ...

            ANSWER

            Answered 2021-Mar-18 at 09:26

            You can use multiple GPU's in GCP (Google Cloud Platform) atleast, not too sure about other cloud providers. And yes, once you do that, you can train with a larger batch size (exact number would depend on the GPU, it's memory and how may you GPU's you have running in your VM)

            You can check this link for the list of all GPU's available in GCP

            If you're using the object detection API, you can check this post regarding training using multiple GPU's.

            Alternatively, if you want to go with a single GPU, one clever trick would be to use the concept of gradient accumulation where you could virtually increase your batch size without using too much extra GPU memory, which is discussed in this post

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

            QUESTION

            Tensorflow Object Detection API GPU memory issue
            Asked 2021-Mar-11 at 07:39

            I'm currently trying to train a model based off the model detection zoo for object detection. Running the setup on the CPU works as expected but trying the same on my GPU results in the following error.

            ...

            ANSWER

            Answered 2021-Mar-11 at 07:39

            I've done a complete reinstallation of every involving component. I might have done something different this time but I cannot say what. Atleast I'm now able to utilize the GPU for training.

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

            QUESTION

            Why is training loss oscilating up and down?
            Asked 2021-Mar-08 at 09:03

            I am using the TF2 research object detection API with the pre-trained EfficientDet D3 model from the TF2 model zoo. During training on my own dataset I notice that the total loss is jumping up and down - for example from 0.5 to 2.0 a few steps later, and then back to 0.75:

            So all in all this training does not seem to be very stable. I thought the problem might be the learning rate, but as you can see in the charts above, I set the LR to decay during the training, it goes down to a really small value of 1e-15, so I don't see how this can be the problem (at least in the 2nd half of the training).

            Also when I smooth the curves in Tensorboard, as in the 2nd image above, one can see the total loss going down, so the direction is correct, even though it's still on quite a high value. I would be interested why I can't achieve better results with my training set, but I guess that is another question. First I would be really interested why the total loss is going up and down so much the whole training. Any ideas?

            PS: The pipeline.config file for my training can be found here.

            ...

            ANSWER

            Answered 2021-Mar-08 at 09:03

            In your config it states that your batch size is 2. This is tiny and will cause a very volatile loss.

            Try increasing your batch size substantially; try a value of 256 or 512. If you are constrained by memory, try increasing it via gradient accumulation.

            Gradient accumulation is the process of synthesising a larger batch by combining the backwards passes from smaller mini-batches. You would run multiple backwards passes before updating the model's parameters.

            Typically, a training loop would like this (I'm using pytorch-like syntax for illustrative purposes):

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

            QUESTION

            tflite models from tfhub.dev not working in Android
            Asked 2021-Feb-25 at 09:18

            I am trying to use custom model detection using TensorFlow in android and I am using pre-train models from the official TensorFlow site. 3 out of 4 models are not working getting this error in the log.

            ...

            ANSWER

            Answered 2021-Feb-25 at 09:18

            Seems you're using ML Kit's object detection API with custom model. It first identifies objects in the image, and run image classification on those objects to determine what the object is. Hence, the model's output is class probability.

            On the other hand, other models are actual object detection models, and outputs four tensors representing bounding box positions and classes.

            Please refer to following example for using those detection models.

            https://www.tensorflow.org/lite/examples/object_detection/overview

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

            QUESTION

            What Is Regularisation Loss in TensorFlow API? It Doesn't Align With Any Other Loss Function
            Asked 2021-Feb-23 at 11:04

            I'm training an EfficientDet V7 model using the V2 model zoo and have the following output in TensorBoard:

            This is great, you can see that my classification and localisation losses are dropping to low levels (I'll worry about overfitting later if this is a separate issue) - but regularisation loss is still high and this is keeping my total loss at quite high levels. I can't seem to a) find a clear explanation (for a newbie) on what I'm looking at with the regularisaton loss (what does it represent in this context) and b) suggestions as to why it might be so high.

            ...

            ANSWER

            Answered 2021-Feb-23 at 11:04

            Usually, regularization loss is something like a L2 loss computed on the weights of your neural net. Minimization of this loss tends to shrink the values of the weights. It is a regularization (hence the name) technique, which can help with such problems as over-fitting (maybe this article can help if you want to know more).

            Bottom line: You don't have to do anything about it.

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

            QUESTION

            Creating a dataset of images for object detection for extremely specific task
            Asked 2021-Jan-07 at 17:50

            Even though I am quite familiar with the concepts of Machine Learning & Deep Learning, I never needed to create my own dataset before.

            Now, for my thesis, I have to create my own dataset with images of an object that there are no datasets available on the internet(just assume that this is ground-truth).

            I have limited computational power so I want to use YOLO, SSD or efficientdet.

            Do I need to go over every single image I have in my dataset by my human eyes and create bounding box center coordinates and dimensions to log them with their labels?

            Thanks

            ...

            ANSWER

            Answered 2021-Jan-07 at 11:32

            Yes, you will need to do that.

            At the same time, though the task is niche, you could benefit from the concept of transfer learning. That is, you can use a pre-trained backbone in order to help your model to learn faster/achieve better results/need fewer annotations example, but you will still need to annotate the new dataset on your own.

            You can use software such as LabelBox, as a starting point, it is very good since it allows you to output the format in Pascal(VOC) format, YOLO and COCO format, so it is a matter of choice/what is more suitable for you.

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

            QUESTION

            Classes in Coco dataset
            Asked 2020-Dec-17 at 13:18

            I have been checking out this detr repository and the total number of classes are 100, but 10 of these are empty string as shown here.
            Is there any particular reason behind this?

            ...

            ANSWER

            Answered 2020-Dec-17 at 13:18

            Basically, the COCO dataset was described in a paper before its release (you can find it here). At this point, the authors gave a list of the 91 types of objects that would be in the dataset.

            But when the 2014 and 2017 datasets sere released, it turned out that you could find only 80 of these objects in the annotations.

            The list you have is the original list of objects (as described in the paper) but with every object that does not appear in the 2014 and 2017 replaced by the empty string "".

            My guess is that the sole purpose of keeping these "phantom" objects is to keep consistency with object ids that may have been fixed someday in the past.

            If you want to learn more about it, you can look at this blog entry.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install EfficientDet

            Pascal VOC Download VOC2007 and VOC2012, copy all image files from VOC2007 to VOC2012. Append VOC2007 train.txt to VOC2012 trainval.txt. Overwrite VOC2012 val.txt by VOC2007 val.txt.
            MSCOCO 2017 Download images and annotations of coco 2017 Copy all images into datasets/coco/images, all annotations into datasets/coco/annotations
            Other types please refer to fizyr/keras-retinanet)

            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/xuannianz/EfficientDet.git

          • CLI

            gh repo clone xuannianz/EfficientDet

          • sshUrl

            git@github.com:xuannianz/EfficientDet.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