logo
Browse Source

modify

Signed-off-by: gexy5 <xinyu.ge@zilliz.com>
main
gexy5 3 years ago
parent
commit
058e63feb7
  1. BIN
      archery.mp4
  2. 10
      movinet.py
  3. 9
      test.py

BIN
archery.mp4

Binary file not shown.

10
movinet.py

@ -66,12 +66,12 @@ class Movinet(NNOperator):
self.classmap = classmap
self.device = 'cuda' if torch.cuda.is_available() else 'cpu'
self.model = create_model(model_name=model_name, pretrained=True, causal=self.causal, device=self.device)
self.input_mean=[0.485, 0.456, 0.406]
self.input_std=[0.229, 0.224, 0.225]
self.input_mean=[0.43216, 0.394666, 0.37645]
self.input_std=[0.22803, 0.22145, 0.216989]
self.transform_cfgs = get_configs(
side_size=176,
crop_size=176,
num_frames=50,
side_size=172,
crop_size=172,
num_frames=30,
mean=self.input_mean,
std=self.input_std,
)

9
test.py

@ -1,9 +0,0 @@
import towhee
(
towhee.glob('./archery.mp4')
.video_decode.ffmpeg()
.action_classification.movinet(
model_name='movineta0', topk=5)
.show()
)
Loading…
Cancel
Save