Open damienzh opened 1 year ago
The bug is due to the shift of default scope when calling detection_inference
and pose_inference
, and the incorrect scope would fail to build a module in mmaction2 registry, e.g. UniformSampleFrames in your case.
A walkaround solution is to put init_recognizer
and inference_recognizer
together:
model = init_recognizer(config, args.checkpoint, args.device)
results = inference_recognizer(model, fake_anno)
or call init_scope before inference recognizer:
from mmengine.registry import init_default_scope
init_default_scope('mmaction')
we will fix it asap.
What's more, the webcam demo would call detection_inference
and pose_inference
many times, due to we build models in the inference API, which would rebuild the model repeatedly, which would slow down the inference speed.
We will improve the code asap.
Branch
main branch (1.x version, such as
v1.0.0
, ordev-1.x
branch)Prerequisite
Environment
installed mmaction2 following the installation instruction using mim inside a new virtual environment
Describe the bug
got this error when adopting demo_skeleton to a webcam inference, the test_pipeline as follow
I tried the demo_skeleton.py in readme, there's no error.
Reproduces the problem - code sample
imports
inference part