From patchwork Wed Apr 28 10:47:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 27457 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:4023:0:0:0:0 with SMTP id ky35csp273405pxb; Wed, 28 Apr 2021 03:47:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbBgn1Sn05bg9Ms2VBqQbchMzL8GVcV7LnQorrAxYcTsXDnwO3w9H3LFUJoGshWwFBHtdH X-Received: by 2002:a17:906:e096:: with SMTP id gh22mr6327271ejb.101.1619606859928; Wed, 28 Apr 2021 03:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619606859; cv=none; d=google.com; s=arc-20160816; b=ZjVGMaToahOSnSg9BRZFekt8e58UHbMbAOM/lEkNMLV9UqcXdmR8FGWwHtEJF75ebd zCI8Q/YkRbozLosh0J8miJC3/5+ftjUkrKq+HUqX0OR2JzX9qs9mxYvJGaV/7nULjotb MlR2XAb3TNF6ZPHRqDhESsZzHg8G/T5tdjdsaj0lutjn9ADPFvnv2UT58sv4C1kxant9 LTjQmKZ84n4kxFgmnLn/CvZ6VhNHxyYkuSYF8WvGo8SDGWRsUt1O/O2xf9r3CkpUMuzz FiP2FNszLXGYjdCfSe7WuYiyfn71AC4wiJI50nkDhlRIrSX3FcjqEyh/cmP7jZCypI51 503g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=2BaFkvrtlK1Z2t2jeQds89g+Ym9wCdO2i5ZC0iEBkV8=; b=QzKVDbArafmgZsGH5WSbtmJYr6cONx/p2SLZiBiTaI4XTrebCMW1NIFECWOui/EDYm OfDTQVTOmUa0SGNbHX5yCJuLC4MRgwEMEbMLKsy33em+xT2zBsjyrSTj7wwvQbNFVfNp y2/xyTUio3eXBySA3aJmQHXINSXK7gQ80/xDP/AWyTHQflYC8rxG9e06WaNQyQFHZ/HR ZYegNajJeHzhM1N02A6gxuFQEWO3Cm9T31KxdxhYT5sL0+t+ydi6xbviUZPucBO8O5fV HOUDab+0yKinFEElWmmVZnQWUw9jGJs/3KfCVeIfnbvSrHloHhz0jW5TVKgCLkFt+Laq p7FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ONadpADu; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o12si1369722eja.647.2021.04.28.03.47.39; Wed, 28 Apr 2021 03:47:39 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ONadpADu; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 57A2C68A24C; Wed, 28 Apr 2021 13:47:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E54F668A1F0 for ; Wed, 28 Apr 2021 13:47:20 +0300 (EEST) Received: by mail-pf1-f175.google.com with SMTP id q2so11507373pfk.9 for ; Wed, 28 Apr 2021 03:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fQMCocWqkiwtkIR2LILP43Gpzuwk/vieIQpCTOTi1+0=; b=ONadpADutI1eyFuY9/yzapRnfzR8zY0vNeGrz2E3H+ARrInxCqXY7/dFCoaYEF+k0W J+k4c15txgjczkeh4j7rQptU7jcX/fuKTWbE1iBVKlcMxrZvh+alXTYLYUP4io4+2KlC bhvD+ue6/KVXyYxw0E/0QDLWPs3Tvx4UvvIZWCgGWnuQFJMMP0ITboioohTgDaOXI2gu WYHVaBjQEv3AYv8cLDDTLE4Fla1mUxuZYZcTp6lbc8laEg4lYoP0l7/e/Yjq1AsM1a9K CN+3p9xXtBnVKQQCv6COUpTPtfhKga0lnHB+H446HJrGwXVXmxXtdBAwccxkhbe0m4W4 mX3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fQMCocWqkiwtkIR2LILP43Gpzuwk/vieIQpCTOTi1+0=; b=BlJ84r5XODpcUkAOUGcKV4Tly7/1vFoxvO3d4cmdDi62/aCd3UH3jpxc/ObynJcq5y YGY0Y6RB8NT8X49BEz7Zd+AwGbSAE6NLAlzYXVDll42IFbY/jxQgWEP/YC86Og90D+XM ZjnYG2YCFtE+IwQbe9QRahfOZqjQlkPlHbSMyH6jpzH1keRMw+jO7s2WHdrqSvZIPr17 s+QeSq4GaJwjfkR5SNl/EED1bciWak48RerjYa4zrd8jcQ58rmHocf3UJfExi6fbI6X1 YKkUMyKXWlvkRgzBeKg2Xm4VkYBIlhfzKrPDbEPE/N57pz/ub7KPJPolQviRc4dK/TKT /dUA== X-Gm-Message-State: AOAM532GOLYNgigARgANoFmGRopiiASRTao+vjIL2sm727Df9oSrYXyV 1QW9z2WOMdB8w3eH/dM7YpyOMe0krcU= X-Received: by 2002:a65:4106:: with SMTP id w6mr26463244pgp.420.1619606839166; Wed, 28 Apr 2021 03:47:19 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id k20sm4851465pfa.34.2021.04.28.03.47.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Apr 2021 03:47:18 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 28 Apr 2021 18:47:09 +0800 Message-Id: <1619606829-25051-2-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1619606829-25051-1-git-send-email-lance.lmwang@gmail.com> References: <1619434136-17760-1-git-send-email-lance.lmwang@gmail.com> <1619606829-25051-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH v3 2/2] doc/filters: Documentation to add sess_config option for tensorflow backend X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: n1N67vhRA33n From: Limin Wang Signed-off-by: Limin Wang --- doc/filters.texi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index e99d70a..24f2335 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10161,6 +10161,9 @@ The label id is considered as name if the label file is not provided. @item backend_configs Set the configs to be passed into backend +For tensorflow backend, you can set its configs with @option{sess_config} options, +please use tools/python/tf_sess_config.py to get the configs + @item async use DNN async execution if set (default: set), roll back to sync execution if the backend does not support async. @@ -10214,6 +10217,9 @@ Set the input name of the dnn network. @item output Set the output name of the dnn network. +For tensorflow backend, you can set its configs with @option{sess_config} options, +please use tools/python/tf_sess_config.py to get the configs + @item async use DNN async execution if set (default: set), roll back to sync execution if the backend does not support async. @@ -10242,9 +10248,10 @@ Handle the Y channel with srcnn.pb (see @ref{sr} filter) for frame with yuv420p @end example @item -Handle the Y channel with espcn.pb (see @ref{sr} filter), which changes frame size, for format yuv420p (planar YUV formats supported): +Handle the Y channel with espcn.pb (see @ref{sr} filter), which changes frame size, for format yuv420p (planar YUV formats supported), please +use tools/python/tf_sess_config.py to get the configs for your system. @example -./ffmpeg -i 480p.jpg -vf format=yuv420p,dnn_processing=dnn_backend=tensorflow:model=espcn.pb:input=x:output=y -y tmp.espcn.jpg +./ffmpeg -i 480p.jpg -vf format=yuv420p,dnn_processing=dnn_backend=tensorflow:model=espcn.pb:input=x:output=y:backend_configs=sess_config=0x10022805320e09cdccccccccccec3f20012a01303801 -y tmp.espcn.jpg @end example @end itemize @@ -18905,6 +18912,9 @@ Note that different backends use different file formats. TensorFlow backend can load files for both formats, while native backend can load files for only its format. +For tensorflow backend, you can set its configs with @option{sess_config} options, +please use tools/python/tf_sess_config.py to get the configs. + @item scale_factor Set scale factor for SRCNN model. Allowed values are @code{2}, @code{3} and @code{4}. Default value is @code{2}. Scale factor is necessary for SRCNN model, because it accepts