aimbrain / vqa-project

Code for our paper: Learning Conditioned Graph Structures for Interpretable Visual Question Answering
Apache License 2.0
148 stars 35 forks source link

ValueError: cannot reshape array of size 73824 into shape #9

Closed jungjun9150 closed 5 years ago

jungjun9150 commented 5 years ago

I got this error in the process of python preprocess_image.py --data trainval; python preprocess_text.py --data train

Converting features tsv to zarr file... Converting raw/trainval_36/trainval_resnet101_faster_rcnn_genome_36.tsv to zarr... 19886it [03:12, 140.86it/s]Traceback (most recent call last): File "preprocess_image.py", line 111, in features_to_zarr(phase) File "preprocess_image.py", line 67, in features_to_zarr dtype=np.float32).reshape((item['num_boxes'], -1)) ValueError: cannot reshape array of size 73824 into shape (36,newaxis)

processing train data Combining question and answer... 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 443757/443757 [00:03<00:00, 130842.70it/s] Tokenizing... 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 443757/443757 [00:55<00:00, 8034.04it/s] Building dictionary... top words and their counts: (322827, 'the') (277460, 'is') (184288, 'what') (104030, 'are') (87760, 'this') (68848, 'in') (63082, 'on') (58806, 'of') (57807, 'a') (53753, 'how') total words: 2753147 number of bad words: 0/15185 = 0.00% number of words in vocab would be 15185 number of UNKs: 0/2753147 = 0.00% Done

so I got the another error in the process of python run.py --train Loading data Traceback (most recent call last): File "run.py", line 491, in train(args) File "run.py", line 129, in train dataset = VQA_Dataset(args.data_dir, args.emb) File "/media/jungjunkim/Dataset_SSD_500GB/MyProject/torch_dataset.py", line 67, in init data_dir, 'trainval_image_size.csv')) File "/home/jungjunkim/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 702, in parser_f return _read(filepath_or_buffer, kwds) File "/home/jungjunkim/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 429, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/home/jungjunkim/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 895, in init self._make_engine(self.engine) File "/home/jungjunkim/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 1122, in _make_engine self._engine = CParserWrapper(self.f, self.options) File "/home/jungjunkim/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 1853, in init self._reader = parsers.TextReader(src, **kwds) File "pandas/_libs/parsers.pyx", line 387, in pandas._libs.parsers.TextReader.cinit File "pandas/_libs/parsers.pyx", line 705, in pandas._libs.parsers.TextReader._setup_parser_source FileNotFoundError: [Errno 2] File b'./data/trainval_image_size.csv' does not exist: b'./data/trainval_image_size.csv'

could you provide the trainval_image_size.csv? and How to solve this problem?

jungjun9150 commented 5 years ago

solved it. by redownloading image.