NVIDIA / flownet2-pytorch

Pytorch implementation of FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
Other
3.08k stars 738 forks source link

I cannot load the pretrained FlowNetS #275

Open Jayleelwj opened 1 year ago

Jayleelwj commented 1 year ago

I tried to load the pretrained FlowNetS model (https://drive.google.com/drive/folders/16eo3p9dO_vmssxRoZCmWkTpNjKRzJzn5), but I have the following issues:

Model_dict of the pretrained model:

odict_keys(['conv1.0.weight', 'conv1.0.bias', 'conv2.0.weight', 'conv2.0.bias', 'conv3.0.weight', 'conv3.0.bias', 'conv3_1.0.weight', 'conv3_1.0.bias', 'conv4.0.weight', 'conv4.0.bias', 'conv4_1.0.weight', 'conv4_1.0.bias', 'conv5.0.weight', 'conv5.0.bias', 'conv5_1.0.weight', 'conv5_1.0.bias', 'conv6.0.weight', 'conv6.0.bias', 'conv6_1.0.weight', 'conv6_1.0.bias', 'deconv5.0.weight', 'deconv4.0.weight', 'deconv3.0.weight', 'deconv2.0.weight', 'predict_flow6.weight', 'predict_flow5.weight', 'predict_flow4.weight', 'predict_flow3.weight', 'predict_flow2.weight', 'upsampled_flow6_to_5.weight', 'upsampled_flow5_to_4.weight', 'upsampled_flow4_to_3.weight', 'upsampled_flow3_to_2.weight'])

Model_dict of the original convolutional layers:

odict_keys(['conv1.0.weight', 'conv1.1.weight', 'conv1.1.bias', 'conv1.1.running_mean', 'conv1.1.running_var', 'conv1.1.num_batches_tracked', 'conv2.0.weight', 'conv2.1.weight', 'conv2.1.bias', 'conv2.1.running_mean', 'conv2.1.running_var', 'conv2.1.num_batches_tracked', 'conv3.0.weight', 'conv3.1.weight', 'conv3.1.bias', 'conv3.1.running_mean', 'conv3.1.running_var', 'conv3.1.num_batches_tracked', 'conv3_1.0.weight', 'conv3_1.1.weight', 'conv3_1.1.bias', 'conv3_1.1.running_mean', 'conv3_1.1.running_var', 'conv3_1.1.num_batches_tracked', 'conv4.0.weight', 'conv4.1.weight', 'conv4.1.bias', 'conv4.1.running_mean', 'conv4.1.running_var', 'conv4.1.num_batches_tracked', 'conv4_1.0.weight', 'conv4_1.1.weight', 'conv4_1.1.bias', 'conv4_1.1.running_mean', 'conv4_1.1.running_var', 'conv4_1.1.num_batches_tracked', 'conv5.0.weight', 'conv5.1.weight', 'conv5.1.bias', 'conv5.1.running_mean', 'conv5.1.running_var', 'conv5.1.num_batches_tracked', 'conv5_1.0.weight', 'conv5_1.1.weight', 'conv5_1.1.bias', 'conv5_1.1.running_mean', 'conv5_1.1.running_var', 'conv5_1.1.num_batches_tracked', 'conv6.0.weight', 'conv6.1.weight', 'conv6.1.bias', 'conv6.1.running_mean', 'conv6.1.running_var', 'conv6.1.num_batches_tracked']

As a result, I cannot reload the weights of the convolutional layers from pretrained model FlowNetS. Can anyone tell me what's wrong with this matter?