Custom filter CodeGen / Skeleton code
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 4 Mar 2019 08:52:40 +0000 (17:52 +0900)
committerwooksong <wook16.song@samsung.com>
Thu, 7 Mar 2019 08:38:47 +0000 (17:38 +0900)
commit578157206a90679acab935a6c394aabb258afc70
tree4b603d2a8793c2eb8f40773ca40deebecb3ca108
parent89046767e60ae20288ecb629d5586e2849cd2b4a
Custom filter CodeGen / Skeleton code

Although the code is far from completion,
this adds a skeleton for the custom filter codegen.

Often, codegen can be more effective than examples.

It is going to provide both .C and .meson files.

This starts implementing for #764

Precondition: nnstreamer is installed:
```
$ meson build && ninja -C build && sudo ninja -C build install
```

Test:
```
$ cd tools/development
$ python nnstreamerCodeGenCustomFilter.py
Please enter the name of the nnstreamer custom filter: abc
Please enter the custom filter name registered to tensor_filter.
Or press enter without name if [abc] is ok: s
Are dimensions of input/output tensors fixed? (yes/no):y
Are you going to allocate output buffer in your code? (yes/no):y
$ meson build
$ ninja -C build
$ gst-launch-1.0 videotestsrc num-buffers=10 ! videoconvert ! videoscale ! video/x-raw,width=224,height=224 ! tensor_converter ! tensor_filter framework=custom model=build/libs.so ! fakesink

```

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
tools/development/nnstreamerCodeGenCustomFilter.py [new file with mode: 0644]