shunsukesaito / PIFu

This repository contains the code for the paper "PIFu: Pixel-Aligned Implicit Function for High-Resolution Clothed Human Digitization"
https://shunsukesaito.github.io/PIFu/
Other
1.76k stars 341 forks source link

issue when eval with color net #61

Closed lu-jincheng closed 4 years ago

lu-jincheng commented 4 years ago

Thank you for your great work. I trained the model with my own data. When I eval with only shape net, there is no problem. But when I eval with both net_G and net_C, errors occurred: RuntimeError: Error(s) in loading state_dict for ResBlkPIFuNet: Missing key(s) in state_dict: "image_filter.model.2.weight", "image_filter.model.2.bias", "image_filter.model.5.weight", "image_filter.model.5.bias", "image_filter.model.8.weight", "image_filter.model.8.bias", "image_filter.model.10.conv_block.2.weight", "image_filter.model.10.conv_block.2.bias", "image_filter.model.10.conv_block.6.weight", "image_filter.model.10.conv_block.6.bias", "image_filter.model.11.conv_block.2.weight", "image_filter.model.11.conv_block.2.bias", "image_filter.model.11.conv_block.6.weight", "image_filter.model.11.conv_block.6.bias", "image_filter.model.12.conv_block.2.weight", "image_filter.model.12.conv_block.2.bias", "image_filter.model.12.conv_block.6.weight", "image_filter.model.12.conv_block.6.bias", "image_filter.model.13.conv_block.2.weight", "image_filter.model.13.conv_block.2.bias", "image_filter.model.13.conv_block.6.weight", "image_filter.model.13.conv_block.6.bias", "image_filter.model.14.conv_block.2.weight", "image_filter.model.14.conv_block.2.bias", "image_filter.model.14.conv_block.6.weight", "image_filter.model.14.conv_block.6.bias", "image_filter.model.15.conv_block.2.weight", "image_filter.model.15.conv_block.2.bias". Unexpected key(s) in state_dict: "image_filter.model.1.bias", "image_filter.model.4.bias", "image_filter.model.7.bias", "image_filter.model.10.conv_block.1.bias", "image_filter.model.10.conv_block.5.bias", "image_filter.model.11.conv_block.1.bias", "image_filter.model.11.conv_block.5.bias", "image_filter.model.12.conv_block.1.bias", "image_filter.model.12.conv_block.5.bias", "image_filter.model.13.conv_block.1.bias", "image_filter.model.13.conv_block.5.bias", "image_filter.model.14.conv_block.1.bias", "image_filter.model.14.conv_block.5.bias", "image_filter.model.15.conv_block.1.bias", "image_filter.model.15.conv_block.5.bias".

lu-jincheng commented 4 years ago

I figured it out. It is caused by the torch version differences between training and evaluating time.

jiandandian2 commented 4 years ago

I figured it out. It is caused by the torch version differences between training and evaluating time.

I have the same problem, both my train and test are under the same environment.

jiandandian2 commented 4 years ago

it works! but the output seems not good

屏幕快照 2020-08-09 上午10 20 04
shunsukesaito commented 4 years ago

Did you train with the single scan file as the example? I wouldn't expect it to be generalized well. For better generalization, please consider using larger scale dataset.

jiandandian2 commented 4 years ago

Did you train with the single scan file as the example? I wouldn't expect it to be generalized well. For better generalization, please consider using larger scale dataset.

yes, I'll try

lu-jincheng commented 4 years ago

it works! but the output seems not good

屏幕快照 2020-08-09 上午10 20 04

If you trained the color net following the Readme guidence without adding norm_color option, it will use batch normalization rather than group normalization. So when you test it, you need to delete '--norm_color group' in test.sh, or your test network will be not compatible with the trained model (Error(s) in loading state_dict). Simply adding strict=False may lead to a bad output!