PINTO0309 / openvino2tensorflow

This script converts the ONNX/OpenVINO IR model to Tensorflow's saved_model, tflite, h5, tfjs, tftrt(TensorRT), CoreML, EdgeTPU, ONNX and pb. PyTorch (NCHW) -> ONNX (NCHW) -> OpenVINO (NCHW) -> openvino2tensorflow -> Tensorflow/Keras (NHWC/NCHW) -> TFLite (NHWC/NCHW). And the conversion from .pb to saved_model and from saved_model to .pb and from .pb to .tflite and saved_model to .tflite and saved_model to onnx. Support for building environments with Docker. It is possible to directly access the host PC GUI and the camera to verify the operation. NVIDIA GPU (dGPU) support. Intel iHD GPU (iGPU) support.
MIT License
338 stars 40 forks source link

Face detection models OpenVino pretrained #89

Closed ozyilmaz closed 2 years ago

ozyilmaz commented 2 years ago

Issue Type

Feature Request

OS

Ubuntu

OS architecture

x86_64

Programming Language

Other

Framework

OpenVINO

Download URL for ONNX / OpenVINO IR

https://download.01.org/opencv/2020/openvinotoolkit/2020.4/open_model_zoo/models_bin/3/face-detection-adas-0001/FP16/

Convert Script

openvino2tensorflow --model_path /home/user/workdir/openvino_models/face-detection-adas-0001.xml --output_float16_quant_tflite

Description

Hello,

First of all thanks for sharing the library. We are trying to convert the pretrained face detection model from Intel's repo. And having an error: "The DetectionOutput layer is not yet implemented." It would be great of you added this layer to the library.

Best

Relevant Log Output

The DetectionOutput layer is not yet implemented.

Source code for simple inference testing code

No response

PINTO0309 commented 2 years ago

[WIP] commit: https://github.com/PINTO0309/openvino2tensorflow/commit/36cfe3bf350a097854bfa59b1a1e6f90cc6b1804

PINTO0309 commented 2 years ago

duplicate issues https://github.com/PINTO0309/openvino2tensorflow/issues/31 https://github.com/PINTO0309/openvino2tensorflow/issues/52 https://github.com/PINTO0309/openvino2tensorflow/issues/79

PINTO0309 commented 2 years ago

commit: https://github.com/PINTO0309/openvino2tensorflow/commit/e488721e6468ab2a0f009021fefd714994b37382 commit: https://github.com/PINTO0309/openvino2tensorflow/commit/1ce214fe104a8f63f82f4829632393aaa439251a

PINTO0309 commented 2 years ago

DetectionOutput is programmatic and requires looping, so there are no plans to implement it at this time.

Incidentally, this model, which can also detect backward-facing objects, is easier to handle. Since facial object detection and face orientation estimation are separated into separate models, only the face detection model can be changed to a lighter model. https://github.com/PINTO0309/HeadPoseEstimation-WHENet-yolov4-onnx-openvino https://github.com/PINTO0309/PINTO_model_zoo/tree/main/106_WHENet 141761520-28038c2a-e89a-4887-a9de-0fdaa972005b

ozyilmaz commented 2 years ago

Hello Katsuya,

First of all thanks much for your response. This helps a lot. One question: When we transform the model without DetectionOutput, how can we read the face detection outputs?

Regards, Ozgur

On 12 Jan 2022, at 03:09, Katsuya Hyodo @.***> wrote:

DetectionOutput is programmatic and requires looping, so there are no plans to implement it at this time.

Bug fixes https://github.com/PINTO0309/openvino2tensorflow/releases/tag/v1.27.4 https://github.com/PINTO0309/openvino2tensorflow/releases/tag/v1.27.4 Committed the transformed model without DetectionOutput. https://github.com/PINTO0309/PINTO_model_zoo/tree/main/227_face-detection-adas-0001 https://github.com/PINTO0309/PINTO_model_zoo/tree/main/227_face-detection-adas-0001 Reference demonstration program for post-processing https://github.com/PINTO0309/PINTO_model_zoo/tree/ce8421f2e8720d636d5f00e817debdc6720f235a/179_person-detection-0202/demo https://github.com/PINTO0309/PINTO_model_zoo/tree/ce8421f2e8720d636d5f00e817debdc6720f235a/179_person-detection-0202/demo Incidentally, this model, which can also detect backward-facing objects, is easier to handle. Since facial object detection and face orientation estimation are separated into separate models, only the face detection model can be changed to a lighter model. https://github.com/PINTO0309/HeadPoseEstimation-WHENet-yolov4-onnx-openvino https://github.com/PINTO0309/HeadPoseEstimation-WHENet-yolov4-onnx-openvino https://github.com/PINTO0309/PINTO_model_zoo/tree/main/106_WHENet https://github.com/PINTO0309/PINTO_model_zoo/tree/main/106_WHENet https://user-images.githubusercontent.com/33194443/149040755-2c064912-7d9e-40a2-bd2e-d1d2592c6aa3.gif — Reply to this email directly, view it on GitHub https://github.com/PINTO0309/openvino2tensorflow/issues/89#issuecomment-1010491478, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIMMM4LDD7XCSXEY44SP2OTUVTBDHANCNFSM5LWANJMA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

PINTO0309 commented 2 years ago

As I told you in my comment above, you can see it in the demo code. https://github.com/PINTO0309/PINTO_model_zoo/blob/main/179_person-detection-0202/demo/demo_person-detection-0202_onnx.py https://github.com/PINTO0309/PINTO_model_zoo/blob/main/179_person-detection-0202/demo/demo_person-detection-0202_tflite.py