|
@ -15,8 +15,8 @@ and maps vectors with labels provided by datasets used for pre-training. |
|
|
|
|
|
|
|
|
## Code Example |
|
|
## Code Example |
|
|
|
|
|
|
|
|
Use the pretrained Movinet model to classify and generate a vector for the given video path './archery.mp4' |
|
|
|
|
|
([download](https://dl.fbaipublicfiles.com/pytorchvideo/projects/archery.mp4)). |
|
|
|
|
|
|
|
|
Use the pretrained Movinet model to classify and generate a vector for the given video path './jumpingjack.gif' |
|
|
|
|
|
([download](https://github.com/tensorflow/models/raw/f8af2291cced43fc9f1d9b41ddbf772ae7b0d7d2/official/projects/movinet/files/jumpingjack.gif)). |
|
|
|
|
|
|
|
|
*Write the pipeline in simplified style*: |
|
|
*Write the pipeline in simplified style*: |
|
|
|
|
|
|
|
@ -25,7 +25,7 @@ Use the pretrained Movinet model to classify and generate a vector for the given |
|
|
import towhee |
|
|
import towhee |
|
|
|
|
|
|
|
|
( |
|
|
( |
|
|
towhee.glob('./archery.mp4') |
|
|
|
|
|
|
|
|
towhee.glob('./jumpingjack.gif') |
|
|
.video_decode.ffmpeg() |
|
|
.video_decode.ffmpeg() |
|
|
.action_classification.movinet( |
|
|
.action_classification.movinet( |
|
|
model_name='movineta0', topk=5) |
|
|
model_name='movineta0', topk=5) |
|
@ -40,7 +40,7 @@ import towhee |
|
|
import towhee |
|
|
import towhee |
|
|
|
|
|
|
|
|
( |
|
|
( |
|
|
towhee.glob['path']('./archery.mp4') |
|
|
|
|
|
|
|
|
towhee.glob['path']('./jumpingjack.gif') |
|
|
.video_decode.ffmpeg['path', 'frames']() |
|
|
.video_decode.ffmpeg['path', 'frames']() |
|
|
.action_classification.movinet['frames', ('labels', 'scores', 'features')]( |
|
|
.action_classification.movinet['frames', ('labels', 'scores', 'features')]( |
|
|
model_name='movineta0') |
|
|
model_name='movineta0') |
|
@ -57,14 +57,14 @@ import towhee |
|
|
|
|
|
|
|
|
Create the operator via the following factory method |
|
|
Create the operator via the following factory method |
|
|
|
|
|
|
|
|
***video_classification.omnivore( |
|
|
|
|
|
|
|
|
***video_classification.movinet( |
|
|
model_name='movineta0', skip_preprocess=False, classmap=None, topk=5)*** |
|
|
model_name='movineta0', skip_preprocess=False, classmap=None, topk=5)*** |
|
|
|
|
|
|
|
|
**Parameters:** |
|
|
**Parameters:** |
|
|
|
|
|
|
|
|
***model_name***: *str* |
|
|
***model_name***: *str* |
|
|
|
|
|
|
|
|
The name of pre-trained movinet model. |
|
|
|
|
|
|
|
|
The name of pre-trained MoViNet model. |
|
|
|
|
|
|
|
|
Supported model names: |
|
|
Supported model names: |
|
|
- movineta0 |
|
|
- movineta0 |
|
|