Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

On the Environmental Issues of Experimental Operation #8

Open
feifancoco opened this issue Apr 10, 2023 · 4 comments
Open

On the Environmental Issues of Experimental Operation #8

feifancoco opened this issue Apr 10, 2023 · 4 comments

Comments

@feifancoco
Copy link

Hello, how can I run your code after I download it again? Do you need to fully install the installation prompts provided by the "MMClassification" and "PaddleClas" tool boxes? Do you need to install the folder 'mm2'? When I run 'Python - m torch. distributed. launch -- nproc_per_node=2 train. py configs/apvit/RAF. py -- launcher pytorch', there are errors: ModuleNotFoundError: No module named 'mmcv' and 'torch. distributed. final. multiprocessing. errors. ChildFailedError:' I would like to do some research based on your research and cite your paper. I hope to receive your reply.

@feifancoco
Copy link
Author

And display: "cannot import name 'Config' from 'mmcv' (unknown location)", how to handle it.

@feifancoco
Copy link
Author

May I ask what caused the following error


Traceback (most recent call last):

File "/opt/home/hut/miniconda3/envs/pytorch18/lib/python3.9/site-packages/mmcv/utils/registry.py", line 52, in build_ from_ cfg

return obj_ cls(**args)

File "/opt/home/wk/APViT-main/mmcls/datasets/base_dataset.py", line 42, in __ init__

self.data_ infos = self.load_ annotations()

File "/opt/home/wk/APViT-main/mmcls/datasets/raf.py", line 128, in load_ annotations

samples = [[i[0].replace('_aligned', ''), i[1]] for i in samples]

File "/opt/home/wk/APViT-main/mmcls/datasets/raf.py", line 128, in

samples = [[i[0].replace('_aligned', ''), i[1]] for i in samples]

IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/opt/home/wk/APViT-main/train.py", line 160, in

main()

File "/opt/home/wk/APViT-main/train.py", line 135, in main

datasets = [build_dataset(cfg.data.train)]

File "/opt/home/wk/APViT-main/mmcls/datasets/builder.py", line 35, in build_ dataset

ds = build_ dataset(cfg['dataset'], default_args)

File "/opt/home/wk/APViT-main/mmcls/datasets/builder.py", line 39, in build_ dataset

dataset = build_ from_ cfg(cfg, DATASETS, default_args)

File "/opt/home/hut/miniconda3/envs/pytorch18/lib/python3.9/site-packages/mmcv/utils/registry.py", line 55, in build_ from_ cfg

raise type(e)(f'{obj_cls.name}: {e}')

IndexError: RAF: list index out of range

Traceback (most recent call last):

File "/opt/home/hut/miniconda3/envs/pytorch18/lib/python3.9/site-packages/mmcv/utils/registry.py", line 52, in build_ from_ cfg

return obj_ cls(**args)

File "/opt/home/wk/APViT-main/mmcls/datasets/base_dataset.py", line 42, in __ init__

self.data_ infos = self.load_ annotations()

File "/opt/home/wk/APViT-main/mmcls/datasets/raf.py", line 128, in load_ annotations

samples = [[i[0].replace('_aligned', ''), i[1]] for i in samples]

File "/opt/home/wk/APViT-main/mmcls/datasets/raf.py", line 128, in

samples = [[i[0].replace('_aligned', ''), i[1]] for i in samples]

IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/opt/home/wk/APViT-main/train.py", line 160, in

main()

File "/opt/home/wk/APViT-main/train.py", line 135, in main

datasets = [build_dataset(cfg.data.train)]

File "/opt/home/wk/APViT-main/mmcls/datasets/builder.py", line 35, in build_ dataset

ds = build_ dataset(cfg['dataset'], default_args)

File "/opt/home/wk/APViT-main/mmcls/datasets/builder.py", line 39, in build_ dataset

dataset = build_ from_ cfg(cfg, DATASETS, default_args)

File "/opt/home/hut/miniconda3/envs/pytorch18/lib/python3.9/site-packages/mmcv/utils/registry.py", line 55, in build_ from_ cfg

raise type(e)(f'{obj_cls.name}: {e}')

IndexError: RAF: list index out of range

ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1)


Is it because of a dataset preparation error?
I hope to receive your reply,and I would greatly appreciate it!

@feifancoco
Copy link
Author

May I ask if the RAF-DB dataset you tested has been processed? In the dataset I obtained, the images of trian and test are in the same folder.

@youqingxiaozhua
Copy link
Owner

Yes, the images are aligned with MTCNN first. And the file structure should be organized to satisfy the dataloader. I will update the Readme file for better understand.

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

No branches or pull requests

2 participants