banmo icon indicating copy to clipboard operation
banmo copied to clipboard

technical problem

Open Tong-Gao-dream opened this issue 2 years ago • 6 comments

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?

Tong-Gao-dream avatar May 11 '22 15:05 Tong-Gao-dream

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

bash misc/processed/download.sh cat-pikachiu

gengshan-y avatar May 11 '22 15:05 gengshan-y

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"

Tong-Gao-dream avatar May 11 '22 16:05 Tong-Gao-dream

This error suggests the config file is not found: https://github.com/facebookresearch/banmo/blob/b9dab8084907197d7a7ede45f6fc7202736bf9be/utils/io.py#L305-L310

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

gengshan-y avatar May 11 '22 17:05 gengshan-y

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

Tong-Gao-dream avatar May 11 '22 17:05 Tong-Gao-dream

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 avatar Sep 15 '22 03:09 fansunqi

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

fansunqi avatar Sep 15 '22 07:09 fansunqi