From patchwork Tue Apr 27 22:21:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 27444 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:4023:0:0:0:0 with SMTP id ky35csp3571609pxb; Tue, 27 Apr 2021 15:22:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2I8rENCVt3ngYdvFUakUL3D+OEu/bJ6T0NNJ70/NDu6SV+wUo/JzatYIl020J7kmhpcLB X-Received: by 2002:aa7:d917:: with SMTP id a23mr6841795edr.260.1619562132583; Tue, 27 Apr 2021 15:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619562132; cv=none; d=google.com; s=arc-20160816; b=UxV07A/8EWUQxzum/aK47JlfKQJvvKOHfGwUvtL0kt4KT9osV2vPVz3CLKUJdXlBEP PetvwOMVAFKVRvDLOwibbsfjDuuvK2TbHA7p6o6yxVFh7xfFPblT/OZcTUIARGjV0k5A GhYpy9MDHVoHZ+83GP21rmNsl9HepapjBslR4s2IL+2uQucmlqpoZt4193EqFNPTmFBn Wisb2bRZtJdrItaHr9zariTDeyAQJ9pJ+EHlzjeUDVbcgFACYe9y66xpAzUOMdqPrDXf 6NUShL1ksNYkpjNHh1Z0LhPcwyMhloVSn5RrSJ9ADlKHLRgYOchCcED8fLBBunu4J0/0 8blQ== 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=xje0eNWK+9JBwd/WsHAKN5mwGXRGPqKYaIL5tF3I2Gs=; b=V7kUQE5MQ+9IipI5NT6ngr6JOaGJv2LKcmhrQb7n03kCO/M8CGWDpG5VGAVcEf6bff Ww4WVze8IJ1OrCqy4UUFcOIEzsp5wGSIJOhsl6CvPsWn16V6YCCfNYc3ZajcbVIcoEfo oZjeKW6VuWws15deRfJ3KeNPwtOXcrL1yeqaAM5YYxCvEhJLs61q3Bkt7RzVxrjoaJAK NaDAKrd2e9EpdED6vhSnhnxabd5uTql9LvVJECgaw9jGvzjtBurQY5AHPpNuYQy8bcfP Kk05DCzLTMr94Xvc8GvqPUy+r7CXmwZ6Nq9HmNu0TnXVZ97+/5rvSxUrsi2Dcv3LczwY C6CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="m/NMVB8S"; 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 bi22si3939623edb.191.2021.04.27.15.22.12; Tue, 27 Apr 2021 15:22:12 -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="m/NMVB8S"; 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 9381C689AB4; Wed, 28 Apr 2021 01:22:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB6D3689AB4 for ; Wed, 28 Apr 2021 01:21:53 +0300 (EEST) Received: by mail-pj1-f47.google.com with SMTP id s14so24846515pjl.5 for ; Tue, 27 Apr 2021 15:21:53 -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=XKDaeElFc9dMunljShIqb+FpzwUFFfM92oPaonwn1JE=; b=m/NMVB8SHxPasIUDmCfrpHuO4h7i8+fj6Zb2DIaLCf6/ceHHdFVK7Rsf0Ll2gxCQDW F7gEpudYWHfo3W5H93Vaka6rLKlCTvfewmRXge9EKqubabWD2ly9qI1JuxCB+tpkbZ1I E5CajYLC4RZ83tRGHtFUuK49fAV4go+YIR4WYefk8XLNwbp97Z8H16tY7vcN1kLFjE3U teNALHcqav0c9sMIH5kFB3TOjFOGnNjJLj/MjoNWL26h6pdDhXa28w9KJY5QMLp+YM37 oCTFJWIqSz8E6xt1zKgJ/bWppwPnuFW5nvCHrNor6Vb1F7Uwx6KRZhHC+q8VXoVmc0iR 49YQ== 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=XKDaeElFc9dMunljShIqb+FpzwUFFfM92oPaonwn1JE=; b=uOtiIUHn+UwnBE6AwhBoIfwsSDIcb6G0wJ/yzFa6MUOoZvsijoAe+pzMx1R2Zy1T6I 8ABGPMIrJH6Gc40WnY1VZpdmNB7WYjnkqlkWF4Ys0L7SoZLM8FgRMNc6UMjcR7VPbFqQ KjAq3F8lFe2xnOH2+qM4MnckNU/mNoDj97pypICRKPMIEPm9gPc3U7TeIBwQrpSGTB/P peNPFCutpvwDMDDOXCSI5mtcTryKZCZflJqks4ylq1t0HjT5FeDvm9HZgP44wztdfwNh 9yv4qIyZ250TXUdsJ5ej1C/FWVtuMjiqCrbrAPGqAP6qtzbTTSchVNzS/ebpiiUJgvGm JKeg== X-Gm-Message-State: AOAM5326rlWhyiSqmUp8mHZkikWtgbLbPat6gRWTU8AyloeJ/qwIOH4W V+4kngubcKKe6zcUFd4EWTwV9L5KjYc= X-Received: by 2002:a17:902:ed85:b029:ed:6ed2:d0da with SMTP id e5-20020a170902ed85b02900ed6ed2d0damr1370064plj.53.1619562112155; Tue, 27 Apr 2021 15:21:52 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id w2sm3275935pfi.104.2021.04.27.15.21.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Apr 2021 15:21:51 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 28 Apr 2021 06:21:37 +0800 Message-Id: <1619562097-15063-2-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1619562097-15063-1-git-send-email-lance.lmwang@gmail.com> References: <1619434136-17760-1-git-send-email-lance.lmwang@gmail.com> <1619562097-15063-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH v2 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: BdvGdfOHEsuR 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..27b4f3c 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:options=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