From f8d343feaecbd633409fc74c0d4f44fbe0a5379f Mon Sep 17 00:00:00 2001 From: kinghuin Date: Fri, 15 May 2020 17:13:03 +0800 Subject: [PATCH] classification to classify --- .../modules/video/classification/videotag_tsn_lstm/README.md | 4 ++-- .../modules/video/classification/videotag_tsn_lstm/module.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hub_module/modules/video/classification/videotag_tsn_lstm/README.md b/hub_module/modules/video/classification/videotag_tsn_lstm/README.md index ff456db1..5b572de3 100644 --- a/hub_module/modules/video/classification/videotag_tsn_lstm/README.md +++ b/hub_module/modules/video/classification/videotag_tsn_lstm/README.md @@ -15,7 +15,7 @@ hub run videotag_tsn_lstm --input_path 1.mp4 --use_gpu False ## API ```python -def classification(paths, +def classify(paths, use_gpu=False, threshold=0.5, top_k=10) @@ -45,7 +45,7 @@ import paddlehub as hub videotag = hub.Module(name="videotag_tsn_lstm") # execute predict and print the result -results = videotag.classification(paths=["1.mp4","2.mp4"], use_gpu=True) +results = videotag.classify(paths=["1.mp4","2.mp4"], use_gpu=True) print(results) ``` diff --git a/hub_module/modules/video/classification/videotag_tsn_lstm/module.py b/hub_module/modules/video/classification/videotag_tsn_lstm/module.py index 5390e732..f0988172 100644 --- a/hub_module/modules/video/classification/videotag_tsn_lstm/module.py +++ b/hub_module/modules/video/classification/videotag_tsn_lstm/module.py @@ -126,11 +126,10 @@ class VideoTag(hub.Module): @runnable def run_cmd(self, argsv): args = self.parser.parse_args(argsv) - results = self.classification( - paths=[args.input_path], use_gpu=args.use_gpu) + results = self.classify(paths=[args.input_path], use_gpu=args.use_gpu) return results - def classification(self, paths, use_gpu=False, threshold=0.5, top_k=10): + def classify(self, paths, use_gpu=False, threshold=0.5, top_k=10): """ API of Classification. -- GitLab