hulianyuyy / CorrNet

Continuous Sign Language Recognition with Correlation Network (CVPR 2023)
84 stars 14 forks source link

Getting Diffrent Result When i test_one_video.py file #38

Closed ethio-artifical closed 3 months ago

ethio-artifical commented 5 months ago

I trained the model using VAC (ICCV 2021) Repositary. However, when I utilize your test_one_video.py file for testing, I observe wrong result. Is it possible that this file is not compatible with the VAC model ?

hulianyuyy commented 5 months ago

I roughly check the file. It should be compatible with the VAC repo. For VAC, you should load the weight from a trained VAC model.

ethio-artifical commented 5 months ago

Thanks for the quick replay, i check the test_one_video file on VAC repo but i get error when i try it

Traceback (most recent call last): File "/home/ict4d/Videos/Anteneh/data/dataset with_256x128/CESLR/test_one.py", line 67, in model.load_state_dict(state_dict, strict=True) File "/home/ict4d/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1667, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for SLRModel: Unexpected key(s) in state_dict: "conv1d.fc.bias", "classifier.bias". size mismatch for conv1d.fc.weight: copying a param with shape torch.Size([65, 1024]) from checkpoint, the shape in current model is torch.Size([1024, 65]). size mismatch for classifier.weight: copying a param with shape torch.Size([65, 1024]) from checkpoint, the shape in current model is torch.Size([1024, 65]).

hulianyuyy commented 5 months ago

It seems that the last classifier in your model and the classifier in the conv1d, have transposed the dimensions of their parameters. By the way, you don't use a same model for training and for the test_one_video.py?