Skip to content

Can we implement parser for YOLOv4 output #311

Open
@tpmccallum

Description

@tpmccallum

Whilst "running" a model can be done via TensorFlow APIs, there are a series of steps involved in the post-processing phase. For example the outputs from YOLOv4 are just byte arrays and therefore require quite a lot of processing in order to create useful information which can be used to create an output image with labels, bounding boxes and so forth.

Here is an example of where we can run TensorFlow Lite using YOLOv4 Model [1]. As you can see from the end of this Medium article [2] the outputs are Identity and Identity_1 which contain data like the following

Identity

[3.1309958, 3.7360609, 7.5596023, 8.140947 ... snip ... 401.64178, 400.8591, 267.096, 256.04437]

Identity_1

[0.0000864767, 0.0000008141958, 0.000010776263 ... snip ... 0.0000000000043190325, 0.0000000000006169203, 0.0000000000014217605]

I can see places where custom code is written to parse the tensor i.e. this Microsoft .NET / C# code [3].

As far as I am aware, there is nothing like this written in Rust yet. Is this something we could create in this repo as a feature add?

Thanks so much
Tim

[1] https://github.com/second-state/wasm-learning/tree/master/faas/yolo-tflite#option-1
[2] https://medium.com/wasm/ai-on-a-cloud-native-webassembly-runtime-wasmedge-part-i-3bf3714a64ea
[3] https://docs.microsoft.com/en-us/dotnet/machine-learning/tutorials/object-detection-onnx#create-the-parser

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions