提交 f8d343fe 编写于 作者: K kinghuin

classification to classify

上级 c288d10b
......@@ -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)
```
......
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册