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

technical problem #13

Open
Tong-Gao-dream opened this issue May 11, 2022 · 6 comments
Open

technical problem #13

Tong-Gao-dream opened this issue May 11, 2022 · 6 comments

Comments

@Tong-Gao-dream
Copy link

Hello! I'm having some problems reproducing the thesis work:
Example: Motion retargeting


Traceback (most recent call last):
File "preprocess/img2lines.py", line 111, in
app.run(main)
File "/opt/anaconda3/envs/banmo/lib/python3.8/site-packages/absl/app.py", line 303, in run
_run_main(main, args)
File "/opt/anaconda3/envs/banmo/lib/python3.8/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "preprocess/img2lines.py", line 53, in main
data_info = trainer.init_dataset()
File "/tmp/pycharm_project_829/./nnutils/train_utils.py", line 129, in init_dataset
self.dataloader = frameloader.data_loader(opts_dict)
File "/tmp/pycharm_project_829/./dataloader/frameloader.py", line 38, in data_loader
data_inuse = config_to_dataloader(opts_dict)
File "/tmp/pycharm_project_829/./utils/io.py", line 311, in config_to_dataloader
dataset = torch.utils.data.ConcatDataset(datalist)
File "/opt/anaconda3/envs/banmo/lib/python3.8/site-packages/torch/utils/data/dataset.py", line 199, in init
assert len(datasets) > 0, 'datasets should not be an empty iterable' # type: ignore
AssertionError: datasets should not be an empty iterable


**opts_dict={} in "./nnutils/train_utils.py" seems to require adding paths manually

When I modify the path, the following error occurs**


Traceback (most recent call last):
File "preprocess/img2lines.py", line 111, in
app.run(main)
File "/opt/anaconda3/envs/banmo/lib/python3.8/site-packages/absl/app.py", line 303, in run
_run_main(main, args)
File "/opt/anaconda3/envs/banmo/lib/python3.8/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "preprocess/img2lines.py", line 53, in main
data_info = trainer.init_dataset()
File "/tmp/pycharm_project_829/./nnutils/train_utils.py", line 113, in init_dataset
opts_dict['n_data_workers'] = '1'
TypeError: 'str' object does not support item assignment


How should the path be modified?

@gengshan-y
Copy link
Contributor

Hi, you will need to download the data first (as here)

bash misc/processed/download.sh cat-pikachiu

@Tong-Gao-dream
Copy link
Author

Thank you very much for your reply. I have downloaded pre-processed data via script before. But still there will be "AssertionError: datasets should not be an empty iterable"

@gengshan-y
Copy link
Contributor

This error suggests the config file is not found:

banmo/utils/io.py

Lines 305 to 310 in b9dab80

numvid = len(config.sections())-1
datalist = []
for i in range(numvid):
dataset = get_config_info(opts, config, 'data_%d'%i, i, is_eval=is_eval)
datalist = datalist + dataset
dataset = torch.utils.data.ConcatDataset(datalist)

Can you make sure the following?

  1. running echo $seqname in the terminal returns cat-pikachiu-sub. If it does not, you can directly run python preprocess/img2lines.py --seqname cat-pikachiu-sub
  2. file configs/cat-pikachiu-sub.config exists

@Tong-Gao-dream
Copy link
Author

Thank you very much for your patience, I understand what the problem is. grateful!

@fansunqi
Copy link

fansunqi commented Sep 15, 2022

Hi,
I'm having the same problem reproducing the thesis work, but I can't figure out the problem. When I run python preprocess/img2lines.py --seqname $seqname, It will be AssertionError: datasets should not be an empty iterable . I have already downloaded pre-processed data via script before and it's in the database/DAVIS/... folder. The $seqname is also right.
Could you tell me how to solve it? Thank you very much!

@fansunqi
Copy link

Oh I figure out why.
Actually I download raw videos and pre-process raw videos into banmo format, following the instructions herehttps://github.com/facebookresearch/banmo/tree/main/preprocess. Then the dataset is like:
DAVIS/ JPEGImages/ Full-Resolution/ cat_pikachiu001/ {%05d}.jpg
However, my config/cat-pikachiu.config is like :
[data_1] ks = 1920 1920 540 960 datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-pikachiu01/

a zero is missed after cat-pikachiu TT

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

3 participants