root@imx8mpevk:~# gst-inspect-1.0 tensor_converter Factory Details: Rank none (0) Long-name TensorConverter Klass Converter/Tensor Description Converts an audio, video, text, or arbitrary stream to a tensor stream of C-Array for neural network framework filters Author MyungJoo Ham <myungjoo.ham@samsung.com></myungjoo.ham@samsung.com>
root@imx8mpevk:~# gst-inspect-1.0 tensor_transform Factory Details: Rank none (0) Long-name TensorTransform Klass Filter/Tensor Description Transforms other/tensor dimensions for different models or frameworks Author MyungJoo Ham <myungjoo.ham@samsung.com>
apply : Select tensors to apply, separated with ',' in case of multiple tensors. Default to apply all tensors. flags: readable, writable String. Default: ""
mode : Mode used for transforming tensor flags: readable, writable Enum "gtt_mode_type" Default: -1, "unknown" (0): dimchg - Mode for changing tensor dimensions, option=FROM_DIM:TO_DIM (with a regex, ^([0-9]|1[0-5]):([0-9]|1[0-5])$, where NNS_TENSOR_RANK_LIMIT is 16) (1): typecast - Mode for casting type of tensor, option=(^[u]?int(8|16|32|64)$|^float(16|32|64)$) (2): arithmetic - Mode for arithmetic operations with tensor, option=[typecast:TYPE,][per-channel:(false|true@DIM),]add|mul|div:NUMBER[@CH_IDX], ... (3): transpose - Mode for transposing shape of tensor, option=D1':D2':D3':D4 (fixed to 3) (4): stand - Mode for statistical standardization of tensor, option=(default|dc-average)[:TYPE][,per-channel:(false|true)] (5): clamp - Mode for clamping all elements of tensor into the range, option=CLAMP_MIN:CLAMP_MAX (-1): unknown - Unknown or not-implemented-yet mode
name : The name of the object flags: readable, writable String. Default: "tensortransform0"
option : Option for the tensor transform mode ? flags: readable, writable String. Default: null
parent : The parent of the object flags: readable, writable Object of type "GstObject"
transpose-rank-limit: The rank limit of transpose, which varies per version of nnstreamer and may be lower than the global rank limit if it is over 4. flags: readable Unsigned Integer. Range: 0 - 16 Default: 4
root@imx8mpevk:~# gst-inspect-1.0 tensor_filter Factory Details: Rank none (0) Long-name TensorFilter Klass Filter/Tensor Description Handles NN Frameworks (e.g., tensorflow) as Media Filters with other/tensor type stream Author MyungJoo Ham <myungjoo.ham@samsung.com>
Element has no clocking capabilities. Element has no URI handling capabilities.
Pads: SINK: 'sink' Pad Template: 'sink' SRC: 'src' Pad Template: 'src'
Element Properties:
accelerator : Set accelerator for the subplugin with format (true/false):(comma separated ACCELERATOR(s)). true/false determines if accelerator is to be used. list of accelerators determines the backend (ignored with false). Example, if GPU, NPU can be used but not CPU - true:npu,gpu,!cpu. The full list of accelerators can be found in nnstreamer_plugin_api_filter.h. Note that only a few subplugins support this property. flags: readable, writable String. Default: ""
input : Input tensor dimension from inner array, up to 4 dimensions ? flags: readable, writable String. Default: ""
input-combination : Select the input tensor(s) to invoke the models flags: readable, writable String. Default: ""
inputlayout : Set channel first (NCHW) or channel last layout (NHWC) or None for input data. Layout of the data can be any or NHWC or NCHW or none for now. flags: readable, writable String. Default: ""
inputname : The Name of Input Tensor flags: readable, writable String. Default: ""
inputranks : The Rank of the Input Tensor, which is separated with ',' in case of multiple Tensors flags: readable String. Default: ""
inputtype : Type of each element of the input tensor ? flags: readable, writable String. Default: ""
invoke-dynamic : Flexible tensors whose memory size changes can be used asinput and output of the tensor filter. With this option, the output caps is always in the format of flexible tensors. flags: readable, writable Boolean. Default: false
is-updatable : Indicate whether a given model to this tensor filter is updatable in runtime. (e.g., with on-device training) flags: readable, writable Boolean. Default: false
latency : Turn on performance profiling for the average latency over the recent 10 inferences in microseconds. Currently, this accepts either 0 (OFF) or 1 (ON). flags: readable, writable Integer. Range: 0 - 1 Default: -1
latency-report : Report to the pipeline the estimated tensor-filter element latency. flags: readable, writable Boolean. Default: false
model : File path to the model file. Separated with ',' in case of multiple model files(like caffe2) flags: readable, writable String. Default: ""
name : The name of the object flags: readable, writable String. Default: "tensorfilter0"
output : Output tensor dimension from inner array, up to 4 dimensions ? flags: readable, writable String. Default: ""
output-combination : Select the output tensor(s) from the input tensor(s) and/or model output flags: readable, writable String. Default: ""
outputlayout : Set channel first (NCHW) or channel last layout (NHWC) or None for output data. Layout of the data can be any or NHWC or NCHW or none for now. flags: readable, writable String. Default: ""
outputname : The Name of Output Tensor flags: readable, writable String. Default: ""
outputranks : The Rank of the Out Tensor, which is separated with ',' in case of multiple Tensors flags: readable String. Default: ""
outputtype : Type of each element of the output tensor ? flags: readable, writable String. Default: ""
parent : The parent of the object flags: readable, writable Object of type "GstObject"
shared-tensor-filter-key: Multiple element instances of tensor-filter in a pipeline may share a single resource instance if they share the same framework (subplugin) and neural network model. Designate "shared-tensor-filter-key" to declare and share such instances. If it is NULL, it means the model representations is not shared. flags: readable, writable String. Default: ""
sub-plugins : Registrable sub-plugins list flags: readable String. Default: "custom,custom-easy,cpp,python3,tvm,tensorflow2-lite"
throughput : Turn on performance profiling for the average throughput in the number of outputs per seconds (i.e., FPS), multiplied by 1000 to represent a floating point using an integer. Currently, this accepts either 0 (OFF) or 1 (ON). flags: readable, writable Integer. Range: 0 - 1 Default: -1
last-sample : The last sample received in the sink flags: readable Boxed pointer of type "GstSample"
max-bitrate : The maximum bits per second to render (0 = disabled) flags: readable, writable Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0
max-lateness : Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited) flags: readable, writable Integer64. Range: -1 - 9223372036854775807 Default: -1
name : The name of the object flags: readable, writable String. Default: "tensorsink0"
parent : The parent of the object flags: readable, writable Object of type "GstObject"
processing-deadline : Maximum processing time for a buffer in nanoseconds flags: readable, writable Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 20000000
$ xsetwacom --list devices Wacom Intuos Pro M Pen stylus id: 9 type: STYLUS Wacom Intuos Pro M Pad pad id: 10 type: PAD Wacom Intuos Pro M Finger touch id: 11 type: TOUCH Wacom Intuos Pro M Pen eraser id: 24 type: ERASER Wacom Intuos Pro M Pen cursor id: 25 type: CURSOR
$ xsetwacom --get 9 Rotate none
$ xsetwacom --get 10 Rotate Property 'Wacom Rotation' does not exist on device.
$ xsetwacom --get 11 Rotate none
$ xsetwacom --get 24 Rotate none
$ xsetwacom --get 25 Rotate none
이름을 쳐도 되고 id를 쳐도 되는데
stylus의 방향을 바꾸어야 하는데.. 모니터 별로 설정되는게 아니다 보니
모니터 하나가 90도 돌려져 있으면 해당 모니터 갈때만 명령어로 stylus의 방향을 돌려주어야 한다. 드럽게 귀찮네 -_-
def get_similarity(self, face_a, face_b): """Finds the similarity between two masks This is done by taking the vectors in the face mask and finding the cosine similarity between them. The formula to find this is:
where: - a[] and b[] both represent the array of values of a single face mask - f(n) is the sum of values where n is 0 through the length of a[] minus 1 - a[] and b[] have equal lengths and equal indexes map to the same points on the face mask
The idea behind this method is that vectors that have smaller vectors between them (independent of magnitude) should in theory be similar. """ dot = 0 a_sum = 0 b_sum = 0 for count in range(128): dot = dot + (face_a[count] * face_b[count]) a_sum = a_sum + (face_a[count] * face_a[count]) b_sum = b_sum + (face_b[count] * face_b[count]) sim = dot / (np.sqrt(a_sum) * np.sqrt(b_sum)) return sim
Portable, Power-efficient Vision Processing OpenVX™ is an open, royalty-free standard for cross platform acceleration of computer vision applications. OpenVX enables performance and power-optimized computer vision processing, especially important in embedded and real-time use cases such as face, body and gesture tracking, smart video surveillance, advanced driver assistance systems (ADAS), object and scene reconstruction, augmented reality, visual inspection, robotics and more.