Coder Social home page Coder Social logo

Comments (8)

hust-nj avatar hust-nj commented on July 17, 2024 8

Hi, please uninstall mmaction2, and run pip install -v -e . --user

from video-swin-transformer.

lyglxz avatar lyglxz commented on July 17, 2024 2

maybe you can try

pip uninstall mmaction2
cd Video-Swin-Transformer
python setup.py develop

works for me while building a docker image

from video-swin-transformer.

yugrocks avatar yugrocks commented on July 17, 2024

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?

from video-swin-transformer.

wangxiao5791509 avatar wangxiao5791509 commented on July 17, 2024

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

from video-swin-transformer.

clannadcl avatar clannadcl commented on July 17, 2024

@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.

from video-swin-transformer.

wangxiao5791509 avatar wangxiao5791509 commented on July 17, 2024

@clannadcl what error?

from video-swin-transformer.

hust-nj avatar hust-nj commented on July 17, 2024

@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

from video-swin-transformer.

TheEighthDay avatar TheEighthDay commented on July 17, 2024

I met the same problem: "KeyError: "Recognizer3D: 'SwinTransformer3D is not in the models registry'"", when i try tools/test.py.

from video-swin-transformer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.