Commit graph

10 commits

Author SHA1 Message Date
Olivier Crête
3325a10f57 onnx: Port SSD detector to C
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6001>
2024-02-02 18:47:52 -05:00
Olivier Crête
b1ac114ca5 onnxinference: Return caps based on model preference when possible
This should enable zero-copy when the model has the right type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5885>
2024-01-13 22:29:41 +00:00
Olivier Crête
83c2d30438 onnx: Use the element pointer for debug message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5885>
2024-01-13 22:29:41 +00:00
Olivier Crête
54b361c554 onnx: Extract data type from the model itself
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5885>
2024-01-13 22:29:41 +00:00
Daniel Morin
15e5866e51 onnx: add offset and scale properties
- Offset each datapoint by the value set on offset property.
- Scale each datapoint by the value set on scale property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Daniel Morin
48e3836482 onnx: Add support for float datatype
This is a bit of a hack solution has I think the correct solution is to
expose model caps on sinkpad (eventually sinkpads). Till then I think
this is reasonable.

- Add a property to onnxinference to set datatype.
- Fix internal buffer allocation size based on datatype.
- Extract method to remove alphe channel and convert to planar image
  when requested. Also template the method to support writing to buffers
  of different datatype.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Olivier Crête
d0b587eb15 onnx: Remove enums file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Aaron Boxer
1ff585233a onnx: add gstonnxinference element
This element refactors functionality from gstonnxinference element,
namely separating out the ONNX inference from the subsequent analysis.

The new element runs an ONNX model on each video frame, and then
attaches a TensorMeta meta with the output tensor data. This tensor data
will then be consumed by downstream elements such as gstobjectdetector.

At the moment, a provisional TensorMeta is used just in the ONNX
plugin, but in future this will upgraded to a GStreamer API for other
plugins to consume.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Daniel Morin
855f84c558 onnx: Update to OnnxRT >= 1.13.1 API
- Replace deprecated methods
- Add a check on ORT version we are compatible with.
- Add clarification to the example given.
- Add the url to retrieve the model mentioned in the example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3388>
2022-11-22 22:36:34 +00:00
Thibault Saunier
019971a3c7 Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
Renamed from ext/onnx/gstonnxclient.h (Browse further)