chrischoy / FCGF

Fully Convolutional Geometric Features: Fast and accurate 3D features for registration and correspondence.
MIT License
647 stars 112 forks source link

AssertionError: Coordinate length 135925 != Feature length 0 #39

Open mtli77 opened 4 years ago

mtli77 commented 4 years ago

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!

chrischoy commented 3 years ago

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