FCGF icon indicating copy to clipboard operation
FCGF copied to clipboard

AssertionError: Coordinate length 135925 != Feature length 0

Open mtli77 opened this issue 5 years ago • 1 comments
trafficstars

Hi @chrischoy @sjnarmstrong Thanks for sharing your wonderful projects! I comment the line252-255 https://github.com/chrischoy/FCGF/blob/1a4e35c8e11ccdd3fcc9cbe4aaed7a492b5584c5/lib/data_loaders.py#L252 and some errors in dataloader were caught:

feats0:(array([], shape=(0, 1), dtype=float64),)
Traceback (most recent call last):
  File "train.py", line 84, in <module>
    main(config)
  File "train.py", line 63, in main
    trainer.train()
  File "/disk/tia/FCGF/lib/trainer.py", line 124, in train
    val_dict = self._valid_epoch()
  File "/disk/tia/FCGF/lib/trainer.py", line 314, in _valid_epoch
    input_dict = data_loader_iter.next()
  File "/home/ubuntu/.conda/envs/py3-fcgf/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 363, in __next__
    data = self._next_data()
  File "/home/ubuntu/.conda/envs/py3-fcgf/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 989, in _next_data
    return self._process_data(data)
  File "/home/ubuntu/.conda/envs/py3-fcgf/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1014, in _process_data
    data.reraise()
  File "/home/ubuntu/.conda/envs/py3-fcgf/lib/python3.7/site-packages/torch/_utils.py", line 395, in reraise
    raise self.exc_type(msg)
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/ubuntu/.conda/envs/py3-fcgf/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/ubuntu/.conda/envs/py3-fcgf/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
    return self.collate_fn(data)
  File "/disk/tia/FCGF/lib/data_loaders.py", line 71, in collate_pair_fn
    coords_batch0, feats_batch0 = ME.utils.sparse_collate(coords0, feats0)
  File "/home/ubuntu/.conda/envs/py3-fcgf/lib/python3.7/site-packages/MinkowskiEngine/utils/collation.py", line 124, in sparse_collate
    assert N == Nf, f"Coordinate length {N} != Feature length {Nf}"
AssertionError: Coordinate length 135925 != Feature length 0

It seems that that data was failed to extract in https://github.com/chrischoy/FCGF/blob/1a4e35c8e11ccdd3fcc9cbe4aaed7a492b5584c5/lib/data_loaders.py#L27 Could you help me to fix these bugs?

By the way, I test the same 3dmatch dataset on Deep Global Registration, there is no error during training, it proves that the dataset is downloaded correctly.

Looking forward to your reply!

mtli77 avatar Sep 27 '20 06:09 mtli77

I cannot reproduce this error. Did you get this error while training was running for some time?

chrischoy avatar Jan 11 '21 07:01 chrischoy