Skip to content

Is there an easy way to convert ONNX or PB from (NCHW) to (NHWC)? #15

@AlexeyAB

Description

@AlexeyAB

@PINTO0309 Hi,
Nice work with YOLOv4 / tiny!

As I see you use:

  • NCHW for: OpenVINO (xml / bin), Darknet (cfg / weights)

  • NHWC for: TFLite, Keras (yolov4_tiny_voc.json / yolov4_tiny_voc.h5), TF1 (pb), TF2 (saved_models.json / saved_models.pb)

I have several questions:

  • Is there an easy way to convert ONNX or PB from (NCHW) to (NHWC)?
    I've seen converters that add transpose before and after each layer, but this seems to slow things down a lot. Is it possible to do this transformation without slowing down the inference?

  • Is there an easy way to convert TF1-pb to TF2-saved_models.pb ?

  • Is NHWC slowing down execution on the GPU?

  • How many FPS do you get on Google Coral TPU-Edge and RaspberryPi4 for yolov4-tiny (int8)?

  • What script did you use to get yolov4_tiny_voc.json ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions