Coder Social home page Coder Social logo

Comments (4)

PINTO0309 avatar PINTO0309 commented on July 21, 2024 1

The output layer structure of EfficientDet and MobileNetV2-SSD is different. Also, the model I committed to the coco folder is the version of the model I didn't deliberately add postprocess to.

VOC

Screenshot 2020-09-25 19:50:16

COCO

Screenshot 2020-09-25 19:50:52

Models that do not come with a postprocess in the final layer will have to write their own decoding process. For example, you may find my article below helpful.
Post-Porcess by Python - Qiita

The sample logic below performs faster post-processing.
https://github.com/PINTO0309/PINTO_model_zoo/blob/master/051_East_Text_Detection/text_detection_video_tflite.py

from pinto_model_zoo.

PINTO0309 avatar PINTO0309 commented on July 21, 2024

There seems to be a bug in the official tflite export logic and tf-nightly==2.4.0-dev20200923 from a month ago. It doesn't quantize correctly and doesn't seem to return the correct result. I may have to quantize it again using the latest automl repository program. I'll try again when I have time.

https://github.com/google/automl.git

from pinto_model_zoo.

PINTO0309 avatar PINTO0309 commented on July 21, 2024

When I clone the latest master and convert tflite it seems to return some value. But it doesn't seem to be a correct value.

  • tf-nightly==2.4.0-dev20200923
python3 model_inspect.py \
  --runmode=saved_model \
  --model_name=efficientdet-d0 \
  --ckpt_path=efficientdet-d0 \
  --saved_model_dir=savedmodeldir \
  --tflite_path=efficientdet-d0.tflite

test
Screenshot 2020-09-24 07:48:41

from pinto_model_zoo.

kevkid avatar kevkid commented on July 21, 2024

@PINTO0309 Thank you for looking into this. I was trying to figure out what everything meant, but had no idea. I have also looked at: https://github.com/PINTO0309/PINTO_model_zoo/blob/master/006_mobilenetv2-ssdlite/01_coco/mobilenetv2ssdlite.py. I see that you are using the post processing version. I also tried that but it seems like len(output_details) == 2. Its almost as if there was no postprocessing? This is what the output_details looks like:
[{'name': 'raw_outputs/box_encodings', 'index': 315, 'shape': array([ 1, 1917, 4]), 'shape_signature': array([ 1, 1917, 4]), 'dtype': <class 'numpy.float32'>, 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}, {'name': 'raw_outputs/class_predictions', 'index': 316, 'shape': array([ 1, 1917, 91]), 'shape_signature': array([ 1, 1917, 91]), 'dtype': <class 'numpy.float32'>, 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]

from pinto_model_zoo.

Related Issues (20)

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.