Open yugrocks opened 3 years ago
Hi, please uninstall mmaction2, and run pip install -v -e . --user
Hi @hust-nj thanks for the help. I tried what you suggested and the error was gone. But another error has occurred when running the training command.
Prediction is not allowed in AAC-LC.
decode_pce: Input buffer exhausted before END element found
decode_pce: Input buffer exhausted before END element found
Number of bands (17) exceeds limit (16).
Reserved bit set.
Number of bands (31) exceeds limit (1).
Traceback (most recent call last):
File "tools/train.py", line 196, in <module>
main()
File "tools/train.py", line 192, in main
meta=meta)
File "/home/jupyter/Video-Swin-Transformer/mmaction/apis/train.py", line 195, in train_model
runner.run(data_loaders, cfg.workflow, cfg.total_epochs, **runner_kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 47, in train
for i, data_batch in enumerate(self.data_loader):
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
return self._process_data(data)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data
data.reraise()
File "/opt/conda/lib/python3.7/site-packages/torch/_utils.py", line 428, in reraise
raise self.exc_type(msg)
decord._ffi.base.DECORDError: Caught DECORDError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/jupyter/Video-Swin-Transformer/mmaction/datasets/base.py", line 287, in __getitem__
return self.prepare_train_frames(idx)
File "/home/jupyter/Video-Swin-Transformer/mmaction/datasets/base.py", line 261, in prepare_train_frames
return self.pipeline(results)
File "/home/jupyter/Video-Swin-Transformer/mmaction/datasets/pipelines/compose.py", line 41, in __call__
data = t(data)
File "/home/jupyter/Video-Swin-Transformer/mmaction/datasets/pipelines/loading.py", line 965, in __call__
container = decord.VideoReader(file_obj, num_threads=self.num_threads)
File "/opt/conda/lib/python3.7/site-packages/decord/video_reader.py", line 52, in __init__
ba, ctx.device_type, ctx.device_id, width, height, num_threads, 2, fault_tol)
File "/opt/conda/lib/python3.7/site-packages/decord/_ffi/_ctypes/function.py", line 175, in __call__
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File "/opt/conda/lib/python3.7/site-packages/decord/_ffi/base.py", line 78, in check_call
raise DECORDError(err_str)
decord._ffi.base.DECORDError: [05:20:10] /github/workspace/src/video/video_reader.cc:151: Check failed: st_nb >= 0 (-1381258232 vs. 0) ERROR cannot find video stream with wanted index: -1
Can you please guide me how to solve this one?
pip uninstall mmaction2 cd /home/wangxiao/Documents/projects/Video-Swin-Transformer-master/mmaction2 && pip install -v -e . --user
then, add the path of mmaction into the train.py:
import sys sys.path.insert(0, "/home/wangxiao/Documents/projects/Video-Swin-Transformer-master/")
from mmaction import version from mmaction.apis import train_model from mmaction.datasets import build_dataset from mmaction.models import build_model from mmaction.utils import collect_env, get_root_logger, register_module_hooks
@wangxiao5791509 @hust-nj I also met the error, and I have downloaded the https://github.com/open-mmlab/mmaction2.git, && pip install -v -e . --user. But it didn't work.
@clannadcl what error?
@wangxiao5791509 @hust-nj I also met the error, and I have downloaded the https://github.com/open-mmlab/mmaction2.git, && pip install -v -e . --user. But it didn't work.
You don't need to download and install mmaction2 repo, please uninstall it and run pip install -v -e . --user
in Video-Swin-Transformer repo dir to install current project. @clannadcl
I met the same problem: "KeyError: "Recognizer3D: 'SwinTransformer3D is not in the models registry'"", when i try tools/test.py.
maybe you can try
pip uninstall mmaction2
cd Video-Swin-Transformer
python setup.py develop
works for me while building a docker image
Describe the bug
While running the training script "tools/train.py" this error occurs.
Reproduction Run the command:
Environment
PYTHONPATH=${PWD}:$PYTHONPATH python mmaction/utils/collect_env.py
to collect necessary environment information and paste it here.$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.) - NoneError traceback
Other packages versions
mmcv-full == 1.3.12 pytorch==1.7.0 mmaction2==0.18.0 mmdet == 2.16.0 scipy==1.6.3 numpy==1.19.5