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

About test problem: without sqa #7

Open
FUIGUIMURONG opened this issue Aug 5, 2023 · 1 comment
Open

About test problem: without sqa #7

FUIGUIMURONG opened this issue Aug 5, 2023 · 1 comment

Comments

@FUIGUIMURONG
Copy link

FUIGUIMURONG commented Aug 5, 2023

1.Thanks for the greate work for 3D scene QA understading and releasing the code.

2.I have a problem when I run the test. I directly use your trained parameters and use "python scripts/test.py --ckpt "path_to_model" --split 'test' ", But it raise a problem showing like this:

Traceback (most recent call last):
  File "/home/sdp/SQA3D-master/ScanQA/scripts/test.py", line 441, in <module>
    save_list = test(args, SQA_TRAIN, SQA_VAL, SQA_TEST, path, answer_counter_list)
  File "/home/sdp/SQA3D-master/ScanQA/scripts/test.py", line 375, in test
    val_dataset, val_dataloader = get_dataloader(args, sqa, all_scene_list, args.split, DC, False, answer_counter_list, test=True)
  File "/home/sdp/SQA3D-master/ScanQA/scripts/test.py", line 136, in get_dataloader
    dataset = ScannetQADataset(
  File "/home/sdp/SQA3D-master/ScanQA/lib/sepdataset.py", line 138, in __init__
    scene_ids = sorted(set(record['scene_id'] for record in self.sqa))
AttributeError: 'ScannetQADataset' object has no attribute 'sq'

3.I read the correspoding code in epdataset.py:

   if split == 'train':
            # remove unanswerble qa samples for training
            self.all_data_size = len(sqa)
            if use_unanswerable: 
                self.sqa = sqa
            else:
                self.sqa = [data for data in sqa if len(set(data['answers']) & set(answer_cands)) > 0]
            self.answerable_data_size = len(self.sqa)
            print('all train:', self.all_data_size)
            print('answerable train', self.answerable_data_size)
        elif split == 'val':
            self.all_data_size = len(sqa)
            if use_unanswerable:
                self.sqa = sqa
            else:
                self.sqa = [data for data in sqa if len(set(data['answers']) & set(answer_cands)) > 0]                
            self.answerable_data_size = len(self.sqa)
            print('all val:', self.all_data_size)
            print('answerable val', self.answerable_data_size)

4.It seems like that there is no the split for "test" jugement, and the self.sqa is not assigned. I am appreciate if you give me some instruction about that.

@Liyukee
Copy link

Liyukee commented Mar 23, 2024

Same question, have you solved it?

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