synorim
synorim copied to clipboard
How to create testing data
I've tried to retrain the network via my datasets. However, it was always killed. Therefore, I want to test the pretrained network on my data first.
How to create a suitable *.npz for test? I have read all the closed issues before. They cannot help me. It seems that if I zip 4 point clouds into one .npz (.npz only has [pcs]=4 point clouds without [flows] and [flow_mask]), I can do the test. But I got the error: (I had put the *.npz to mpc-dt4d folder, and add the name into meta.json )
Run: python evaluate.py configs/mpc-dt4d/test_pretrained.yaml
Checkpoint loaded from out_pretrained/dt4d/basis/best.pth.
Test: 0%| | 0/9 [00:00<?, ?it/s]
Traceback (most recent call last):
File "evaluate.py", line 87, in
/home/pm/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/_utils.py(425)reraise() -> raise self.exc_type(msg)
Could you help me? Thanks a lot!!!
In addition, the test on the datasets you provided works well. I don't know if I need to create flows and masks by myself. If I need to do it, how to do it? Thx!!
@Juliejulie111 in test_dataloader remove some part of spec, "DS.FULL_FLOW, DS.FULL_MASK".
@faeze-el Thank you for your suggestion. I changed the test_dataloader like:
def test_dataloader(self): test_set = FlowDataset(**self.hparams.test_kwargs, spec=[ DS.FILENAME, DS.QUANTIZED_COORDS, DS.PC], hparams=self.hparams) return DataLoader(test_set, batch_size=1, shuffle=False, num_workers=4, collate_fn=list_collate)
And got the error:
Checkpoint loaded from out_pretrained/dt4d/basis/best.pth.
Test: 0%| | 0/1 [00:01<?, ?it/s]
Traceback (most recent call last):
File "evaluate.py", line 87, in
/media/pm/Day2/hand_forarm/synorim/pytorch/models/full_sync.py(207)evaluate_flow_error() -> eval_pairs = list(batch[DS.FULL_FLOW].keys()) (Pdb)
Sorry for the late response! @Juliejulie111
You are getting this error because we compute the test error against the ground-truth flow during testing. If you don't have ground truth, you could safely comment this line (full_sync.py, line 184
):
error = self.evaluate_flow_error(batch, full_final_flows)
and instead use error = {}
.
Thanks!
@heiwang1997 Thanks!!! It works!!!