1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
Go to file
Guo, Yejun 8ce9d88f93 dnn/native: add native support for divide
it can be tested with model file generated with below python script:
import tensorflow as tf
import numpy as np
import imageio

in_img = imageio.imread('input.jpg')
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')
z1 = 2 / x
z2 = 1 / z1
z3 = z2 / 0.25 + 0.3
z4 = z3 - x * 1.5 - 0.3
y = tf.identity(z4, 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: Guo, Yejun <yejun.guo@intel.com>
2020-04-22 13:15:00 +08:00
compat compat/avisynth: remove avisynth headers 2020-04-05 01:17:55 +02:00
doc avformat/mpegtsenc: use standard pids for m2ts 2020-04-21 21:28:29 +02:00
ffbuild common.mak: Also clean Windows debug files. 2020-03-21 18:46:00 +01:00
fftools cmdutils: stop using deprecated av_codec_next() 2020-04-20 14:50:03 +00:00
libavcodec avcodec/pngdec: Pass ret from decode_iccp_chunk() 2020-04-20 20:38:41 +02:00
libavdevice avdevice/opengl: add support of wrapped avframe codec 2020-04-16 23:52:12 +02:00
libavfilter dnn/native: add native support for divide 2020-04-22 13:15:00 +08:00
libavformat lavf/tls_mbedtls: fix resource leak 2020-04-22 12:41:29 +08:00
libavresample avresample: remove deprecated attribute from the AVAudioResampleContext struct 2018-01-09 10:56:53 -03:00
libavutil hwcontext_vulkan: correctly download and upload flipped images 2020-04-21 19:00:51 +01:00
libpostproc libavcodec, libpostproc: Remove outcommented START/STOP_TIMER 2020-03-14 18:24:04 +01:00
libswresample Silence "string-plus-int" warning shown by clang. 2020-01-06 22:38:56 +01:00
libswscale swscale: aarch64: Don't clobber callee-saved registers v8-v15 2020-04-21 23:41:13 +03:00
presets
tests dnn-layer-mathbinary-test: add unit test for 'mul' 2020-04-22 13:14:55 +08:00
tools dnn/native: add native support for divide 2020-04-22 13:15:00 +08:00
.gitattributes fate: add SCC test 2017-01-27 17:06:42 +01:00
.gitignore tools/python: add script to convert TensorFlow model (.pb) to native model (.model) 2019-07-01 10:23:47 -03:00
.mailmap mailmap: fix 3-address entries 2020-03-31 04:14:14 -05:00
.travis.yml Merge commit '899ee03088d55152a48830df0899887f055da1de' 2019-03-14 15:53:16 -03:00
Changelog avformat/mpegtsenc: use the correct stream_types and write HDMV descriptors for m2ts 2020-04-21 21:28:42 +02:00
configure configure: add MLP parser as dependency to MLP and TrueHD demuxers 2020-04-19 15:58:45 -03:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
INSTALL.md INSTALL.md: Fix Markdown formatting 2019-01-31 10:29:16 -09:00
LICENSE.md avfilter/vf_geq: Relicense to LGPL 2019-12-28 11:20:48 +01:00
MAINTAINERS MAINTAINERS: add my gpg fingerprint 2020-03-23 23:37:19 +01:00
Makefile Makefile: Delete more created files when running "make distclean". 2020-03-11 11:43:01 +01:00
README.md Remove the ffserver program 2018-01-06 18:31:37 +00:00
RELEASE RELEASE: Update value for post 4.2 branch 2019-07-21 18:37:32 +02:00

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.