Giter Club home page Giter Club logo

openvino_efficientdet's Introduction

EfficientDet with Intel OpenVINO

This repository demonstrates how to convert AutoML EfficientDet to OpenVINO IR.

Follow the steps from .github/workflows/main.yml to convert your model. For public models, download IRs from GitHub Actions

CI

How to convert model

  1. Freeze graph

    cd automl/efficientdet
    python3 model_inspect.py --runmode=saved_model --model_name=efficientdet-d4 --ckpt_path=efficientdet-d4 --saved_model_dir=savedmodeldir
  2. Create IR

    git clone https://github.com/openvinotoolkit/openvino --depth 1
    
    python3 openvino/model-optimizer/mo.py \
      --input_model efficientdet-d4.pb \
      --transformations_config openvino/model-optimizer/extensions/front/tf/automl_efficientdet.json \
      --input_shape "[1, 1024, 1024, 3]"

    find resolution of your model at https://github.com/google/automl/blob/master/efficientdet/hparams_config.py

    automl_efficientdet.json contains topology hyper-parameters

  3. Validate model comparing accuracy with an original frozen TensorFlow graph

    python3 scripts/validate.py --version d4 --width 1024 --height 1024

openvino_efficientdet's People

Contributors

dkurt avatar ngaloppo avatar yousseb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

openvino_efficientdet's Issues

License

Would you mind adding license information to the repo?

Error Model Optimizer

Hi, i have an issue when i launch mo.py, this is the error

mo.utils.error.Error: Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "TensorArrayV2" node.
For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38.

This is the run code.

python mo.py --input_model /Users/antoniosambataro/Desktop/frozen/d4/efficientdet-d4_frozen.pb --transformations_config /Users/antoniosambataro/Desktop/automl_efficientdet.json --input_shape "[1, 1024, 1024, 3]" -o /Users/antoniosambataro/Desktop/ --log_level=DEBUG

Im using ubuntu 18.04 and python3.7 and i try 3.6 too.
Can you help me plz? Also i tested the d6 version but same error

Thanks

Wrong classifications and additional bounding boxes on EfficientDet D0 Optimized

First of all i would like to thanks about this Repository which is being really helpful to be able run the EfficientDet optimized with Openvino. Following the CI file of the repo made possible the easy conversion to MO format. But when testing with custom dataset i got a really lower results comparing to the other models like the one from Yet-Another-EfficientDet-Pytorch even using the same confidence threshold as 0.2.
I thought i was using the wrong label map but realized that is the coco minus 1:
labels = {0:"person",2:"car",3:"motorcycle",5:"bus",7:"truck"}
Also the detections are really great just with a few additional bounding boxes, but the classification shows really wrong results , see the images below generated with EfficientDet D0:

Yet-Another-EfficientDet-Pytorch
img_inferred_d0_this_repo_0

automl EfficientDet
0

And this is the detection following the label set above with the MO model:
imgout

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.