VITA-Group / CADTransformer

[CVPR 2022]"CADTransformer: Panoptic Symbol Spotting Transformer for CAD Drawings", Zhiwen Fan, Tianlong Chen, Peihao Wang, Zhangyang Wang
MIT License
68 stars 20 forks source link

KeyError: 'rgbs' when training #5

Closed A971RM closed 1 year ago

A971RM commented 1 year ago

Thanks for your excellent work. When I train the datasets following Usage in Readme, A bug occurs:

=> logs/ Epoch 1 (1/300)

Learning rate: 1e-05 Epoch 1 (1/300) BN momentum updated to: 0.1 Learning rate: 1e-05 BN momentum updated to: 0.1 0%| | 0/3481 [00:00<?, ?it/s]Exception in thread Thread-2: Traceback (most recent call last): File "/share/home/yjs001/miniconda3/envs/gputest_py3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/share/home/yjs001/names/zyx/code62/VITACADTransformer/utils/utils_model.py", line 267, in run for item in self.generator: File "/share/home/yjs001/miniconda3/envs/gputest_py3.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/share/home/yjs001/miniconda3/envs/gputest_py3.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 561, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/share/home/yjs001/miniconda3/envs/gputest_py3.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/share/home/yjs001/miniconda3/envs/gputest_py3.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/share/home/yjs001/names/zyx/code62/VITACADTransformer/dataset.py", line 132, in getitem return self._get_item(index) File "/share/home/yjs001/names/zyx/code62/VITACADTransformer/dataset.py", line 112, in _get_item rgb_info = np.load(rgb_npy_path, allow_pickle=True).item()['rgbs'] KeyError: 'rgbs'

I have searched the rgbs in code: dataset.py:112: rgb_info = np.load(rgb_npy_path, allow_pickle=True).item()['rgbs']

Is the code in CADTransformer completed?

A971RM commented 1 year ago

change config to skip

pangchunhei commented 1 year ago

Hi what did you change on the config file?

sztepen commented 6 months ago

@pangchunhei in default.py I've set rgb_dim to 0