Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No object named 'Meccano' found in 'DATASET' registry #11

Open
aranciokov opened this issue Jun 27, 2023 · 1 comment
Open

No object named 'Meccano' found in 'DATASET' registry #11

aranciokov opened this issue Jun 27, 2023 · 1 comment

Comments

@aranciokov
Copy link

aranciokov commented Jun 27, 2023

Hi, thanks for releasing this interesting project. I'm trying to work on the action recognition task. So far, I have done the following:

  • installed PySlowFast following the official repo (PYTHONPATH contains the link to the slowfast folder)
  • slowfast/datasets contains init.py, meccano.py and sampling.py; whereas slowfast/models contains custom_video_model_builder_MECCANO_gaze.py and init.py
  • I downloaded videos, rgb frames, and temporal annotations into a folder called 'data', which is located on the same level of slowfast (i.e., from the slowfast folder I can list the contents of data by 'ls ../data'); the folder 'data' contains a folder Meccano, which contains the folders MECCANO_RGB_Videos and RGB_frames, and three files: MECCANO_train_actions.csv, MECCANO_test_actions.csv, MECCANO_val_actions.csv
  • in the config file located at ../configs/action_recognition/SLOWFAST_8x8_R50_MECCANO.yaml I set the PATH_TO_DATA_DIR to ../data

Now, to the problem. When I execute "python tools/run_net.py --cfg ../configs/action_recognition/SLOWFAST_8x8_R50_MECCANO.yaml" I get the following error:

Traceback (most recent call last):
File "/media/HDD/alexfalcon/MECCANO/env_meccano/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap
fn(i, *args)
File "/media/HDD/alexfalcon/MECCANO/slowfast/slowfast/utils/multiprocessing.py", line 60, in run
ret = func(cfg)
File "/media/HDD/alexfalcon/MECCANO/slowfast/tools/train_net.py", line 596, in train
train_loader = loader.construct_loader(cfg, "train")
File "/media/HDD/alexfalcon/MECCANO/slowfast/slowfast/datasets/loader.py", line 114, in construct_loader
dataset = build_dataset(dataset_name, cfg, split)
File "/media/HDD/alexfalcon/MECCANO/slowfast/slowfast/datasets/build.py", line 31, in build_dataset
return DATASET_REGISTRY.get(name)(cfg, split)
File "/media/HDD/alexfalcon/MECCANO/env_meccano/lib/python3.8/site-packages/fvcore/common/registry.py", line 71, in get
raise KeyError(
KeyError: "No object named 'Meccano' found in 'DATASET' registry!"

Unfortunately, I can't seem to figure out the cause of this issue. Any idea?
Thanks and cheers,
Alex

@francescoragusa
Copy link
Collaborator

francescoragusa commented Jun 29, 2023

Hi @aranciokov,
thank you for your interest about our work!

It seems strange that the error that you described occurs.
To avoid that error, it is fundamental to replace the __init__.py file in the "slowfast/datasets/" folder where the Meccano class is imported:

from .meccano import Meccano #added

Can you check that in your /slowfast/datasets/__init__.py file there is that "import"?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants