Re: nnstreamer & openVINO


MyungJoo Ham
 

DetectedObject is a simple struct; thus you can keep using it in C.

std :: vector <DetectedObject> is a "dynamic array" of DetectedObject.

You may simply use
   DetectedObject *objects
instead of
   std::vector<DetectedObject> detected_objects
and do memory management yourself.

 

--------- Original Message ---------

Sender : Olda Šmíd <olda476@...>

Date : 2021-03-04 02:18 (GMT+9)

Title : Re: Re: [NNStreamer Technical Discuss] nnstreamer & openVINO

 

I would also like to ask if it is possible to get an example of detection in c?
If I understand correctly, the "error" between c and c ++ is:
   std :: vector <DetectedObject> detected_objects;
The rest I would generally understand how to convert :)

Thank you very much for your help

Olda 

 

út 2. 3. 2021 v 17:29 odesílatel Olda Šmíd <olda476@...> napsal:

Thanks again for the advice. Now nnstreamer reports another error - no myriad plugin is initiated. So I  badly installed the openvino plugin and that's no longer a problem :)

I would like to ask for an example in c. Thank you for the link, I don't really understand it, but hopefully it will be ok.

I'm thinking of trying to rework the image classification example. (https://github.com/nnstreamer/nnstreamer-example/tree/main/native/example_image_classification_tflite). After all, c ++ goes beyond me and as You said, there is no need to use just c++ just because object oriented behavior.

Olda 

 

út 2. 3. 2021 v 12:37 odesílatel MyungJoo Ham <myungjoo.ham@...> napsal:

> so in other words shouldn't I use installation packages other than those from nnstreamer ppa (sudo add-apt-repository ppa: nnstreamer / ppa)?

You may still use packages from other PPAs or locally built libraries; you may need to rebuild nnstreamer subplugins (/ext/nnstreamer/*) accordingly. This is often due to the changes in interfaces of headers or the behaviors of APIs of libraries (e.g., openvino), which implies that they do not keep binary-wise backward-compatibility.

 

You need to keep using all related packages from nnstreamer/ppa ONLY IF you do not want to (potentially) rebuild anything.

 

> I would like to ask more generally - I'm self-learning in programming and I work in c. Why in the examples is just "example_image_classification_tflite" in c and not "object detection"? Is it based on the fact that c is not primarily object-oriented and c ++ is? When I still had an amiga (around 1996 - 2000), I studied BASIC and I had it fixed that even though it is not object-oriented, it is possible to cheat and use objects :)

 

1. Not providing "object detection" example in C has NOTHING to do with C being non object-oriented. You can still write object detection example in C; you just need to slap in an object detection neural network model instead of an image classification model along with proper post processors of your choice. It has totally no relation.

 

2. There are C examples of object detection. Look at https://github.com/nnstreamer/nnstrreamer-example  / Tizen.native/ObjectDetection

 

  Besides, even in the C++ examples of /native directory, if you look closely, you can see that being object-oriented or not has no effect on object detection itself.

 

3. Although the characteristics of programming language has totally NOTHING to do with nerual network models (object detection), if you want object-oriented-like behavior, you may look at GLIB and GOBJECT. (not GLIBC)

 

Cheers,

MyungJoo 

--------- Original Message ---------

Sender : Olda Šmíd <olda476@...>

Date : 2021-03-02 18:05 (GMT+9)

Title : Re: [NNStreamer Technical Discuss] nnstreamer & openVINO

 

Thank you, so in other words shouldn't I use installation packages other than those from nnstreamer ppa (sudo add-apt-repository ppa: nnstreamer / ppa)?

I would like to ask more generally - I'm self-learning in programming and I work in c. Why in the examples is just "example_image_classification_tflite" in c and not "object detection"? Is it based on the fact that c is not primarily object-oriented and c ++ is? When I still had an amiga (around 1996 - 2000), I studied BASIC and I had it fixed that even though it is not object-oriented, it is possible to cheat and use objects :)

út 2. 3. 2021 v 9:26 odesílatel MyungJoo Ham via lists.lfaidata.foundation <myungjoo.ham=samsung.com@...> napsal:

Yes, nnstreamer-openvino in Ubuntu PPA is built against openvino - 2019R3 and to use this instance of nnstreamer-openvino, you are recommended to unstaill your openvino and install openvino from nnstreamer PPA.

If cmake cannot find an openvino installation (probably you are trying "Approach 1"?), you may install openvino.pc (pkgconfig) to help build tools (cmake, meson/ninja) find them. For example, we have added openvino.pc for debian and rpm packaging at https://git.tizen.org/cgit/platform/upstream/dldt/ (/packaging/openvino.pc.in file is processed and packaged). You may edit the .pc.in file and install directly to /usr/lib/pkgconfig/

 

 

 

 

 

 

Join nnstreamer-technical-discuss@lists.lfaidata.foundation to automatically receive all group messages.