Commit Graph

8 Commits

Author SHA1 Message Date
Mark Thompson bb96824510 dnn: Add ff_ prefix to unnamespaced globals
Reviewed-By: Guo, Yejun <yejun.guo@intel.com>
2021-01-22 15:03:09 +08:00
Andreas Rheinhardt 2c6f532e0a Mark some pointers as const
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-01 15:25:48 +01:00
Mingyu Yin ad2546e3b3 dnn/native: add native support for dense
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
2020-09-29 14:19:55 +08:00
Ting Fu 91efc41a69 dnn/native: add native support for avg_pool
Not support pooling strides in channel dimension yet.

Signed-off-by: Ting Fu <ting.fu@intel.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-10 16:37:39 +08:00
Ting Fu f73cc61bf5 dnn_backend_native_layer_mathunary: add abs support
more math unary operations will be added here

It can be tested with the model file generated with below python scripy:

import tensorflow as tf
import numpy as np
import imageio

in_img = imageio.imread('input.jpeg')
in_img = in_img.astype(np.float32)/255.0
in_data = in_img[np.newaxis, :]

x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
x1 = tf.subtract(x, 0.5)
x2 = tf.abs(x1)
y = tf.identity(x2, name='dnn_out')

sess=tf.Session()
sess.run(tf.global_variables_initializer())

graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False)

print("image_process.pb generated, please use \
path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n")

output = sess.run(y, feed_dict={x: in_data})
imageio.imsave("out.jpg", np.squeeze(output))

Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-05-28 11:04:21 +08:00
Guo, Yejun ffa1561608 dnn_backend_native_layer_mathbinary: add sub support
more math binary operations will be added here

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-04-07 11:04:34 +08:00
Guo, Yejun 2558e62713 avfilter/dnn: unify the layer load function in native mode
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-15 18:56:54 -03:00
Guo, Yejun 3fd5ac7e92 avfilter/dnn: unify the layer execution function in native mode
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-15 18:56:25 -03:00