From patchwork Mon Apr 26 10:48:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 27425 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6109:0:0:0:0:0 with SMTP id v9csp2918iob; Mon, 26 Apr 2021 04:15:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1rtTn48YAawSuY/iCw2tM8ZYGR1Xrb9PJk/cZvL1Dn1VJlPU7fCI/X4uVyBAvdShPx7lL X-Received: by 2002:a17:906:fa18:: with SMTP id lo24mr17872446ejb.125.1619435729119; Mon, 26 Apr 2021 04:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619435729; cv=none; d=google.com; s=arc-20160816; b=GZHRhEafNI3fyQIAZctVfeslJmFiTiNQ/P5ZU56hSVNCSUVcihN1MMrMCI6BqnK1/T WnuGlGoWeqpU+2ByM6OOpK45IJ9ulYeYz1cBxius9LOfLlkeMHLatEtH3AxOE9UazY0F soaiQv5624PCA39kFuW+fUMFzoSnIdI/YeMtWunjZSXEU2Kkxt5snLkRGO9Da4yR3m8p jgR1MTod6mD5OlEmd6rmNqSW+m2COnwrzLPfHM0cXYbUZEH1Fn1dLQ649S6ouz2uz7u0 j//phoPwKDzKzlZzfnttz8rGUzOr3HgCOxLEMGsAnEGVTnyofWz5C8VoUifmljL4gytD gzGw== 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=WowZUPklr6v2qHNXsMW9hZ/1Vpig5JKHLqgmPcoYiXM=; b=bE2nwO1lREnHe2rfV7Ph+n3eBKPdK8U5Y5+aKICR2nBVCI7I73md5qH4iH8KnQGCbR XwsnPpHCAHxIze4+y7vDBkRKlYpRn+VI6j2k9ZYunX6ZMUS7dcxFVCH9CLG3K/yRI9cv FErgyJv55OrT10uLb6Lhn8hmCKoM/EX60+METUmv8jRNp487uvt+vSZfT29PPjiOtu3M hp0ROuceytZAcrWOteBTa2WonkpO60Li5HzERQC7FooNuu8a/QqRBVnHIbUy6aVSYPuu tfyCwL+QEzNYkPosiakMz0ywQB6y9LqQOcml9ljLznmMZEmbw6seTL/VJIyjGkowTrl3 W7nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=gvQMq801; 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 k9si15780902eje.366.2021.04.26.04.15.28; Mon, 26 Apr 2021 04:15:29 -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=gvQMq801; 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 66AD1689966; Mon, 26 Apr 2021 14:15:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D15A689966 for ; Mon, 26 Apr 2021 14:15:20 +0300 (EEST) Received: by mail-io1-f42.google.com with SMTP id s16so50298533iog.9 for ; Mon, 26 Apr 2021 04:15: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=Nbgw4/6NSjztgpVmd/wb4nW1VlvUvpYVXbc12JNL5FA=; b=gvQMq801SfrcDNM7X6ls0UWWDb5VgNnsn3SelFEBGH6DRaFKKtGgi0Q/KGVcUNuo9T FQtUeU4ZuTdBgyKhuAszK4dIr45aWiMgqr8AiTFL5LTqRw95hQtV4xr3lFzkMny15Iok jpQ2+7JtKGvzF6Ulfvv3h1JDRlmYS5rbhyqKndiOBAbNKXlanVYCG1JWUYeKyF/LIgmr YGGFxnmFZrw7JIXzUdLSeb88vFeE758rBykvwZZNQ42hpU4fuuxAlvO4aY41uG/BvRMx OVDRa7Geo3IA+NQvJdwpqpi6e6kQJWG2u8W9MziTj861LkfFxxpT64/SWsP/Nt6Obi6v joWA== 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=Nbgw4/6NSjztgpVmd/wb4nW1VlvUvpYVXbc12JNL5FA=; b=cz/2b8WvzO/q8eQERf0FeREhnazqf1Io7bg26ASzZPnEElSHY/bEbLRmGQBMn99jbQ vNip//t7PdXKfP99IWgAL1936oWG2zWiH4BaYzXYOYs/NMvFRkF1aSCLmiiuUMA7cIRa 7KVNGTbe/SCqWgNDHmWRP1RctRWZ03FNFNqMbSa8vd1gENlTQd6MYDqQVM8vYwUZ9kul tjNVOxUuo14hnV0ycpNraVp79/80Wz8ZhUWlgyOTQAbyCZz7Ba8eir4m08w+EVNzJuN/ 6CBGNv71Tw40PRxZmEDPPUO8qj2asT8q2dl4manzupr4uO6fwlzDQ5kpzNveBsD8v+9b 8VYQ== X-Gm-Message-State: AOAM530UFjACLnULbPWFc9CnXnEINtCeWU5U0t13BFXJbZq0P1DgbMzy ylS6zNZ2m61Vmd2tBUuaMaXt/lQau1o= X-Received: by 2002:a63:5c19:: with SMTP id q25mr16782396pgb.402.1619434154159; Mon, 26 Apr 2021 03:49:14 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id u14sm1275592pjy.6.2021.04.26.03.49.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Apr 2021 03:49:13 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Apr 2021 18:48:56 +0800 Message-Id: <1619434136-17760-6-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1619434136-17760-1-git-send-email-lance.lmwang@gmail.com> References: <1619434136-17760-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 6/6] 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: ehDdM9ug7zJz 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 a959127..1ee4354 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10162,6 +10162,9 @@ The label id is considered as name if the label file is not provided. @item options 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. @@ -10219,6 +10222,9 @@ Set the output name of the dnn network. @item options 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. @@ -10247,9 +10253,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:options=sess_config=0x10022805320e09cdccccccccccec3f20012a01303801 -y tmp.espcn.jpg @end example @end itemize @@ -18914,6 +18921,9 @@ its format. @item options 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 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