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 ff456db178c6370b8e524ef19e658cdba29e6a4b..5b572de32fe6bf22c592d0b022081f212bf2ac61 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 5390e73264d7be5c8b3173ef3ef4b35c8bc85769..f0988172e81d1594e10c5373637daa5493f3906b 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.