TRI-ML / packnet-sfm

TRI-ML Monocular Depth Estimation Repository
https://tri-ml.github.io/packnet-sfm/
MIT License
1.24k stars 243 forks source link

Loading PackNetSAN, Supervised (densified GT) pretrained model fails #196

Open wbkit opened 2 years ago

wbkit commented 2 years ago

Hello, I am currently trying to load the pre-trained PackNetSAN model from the checkpoint file you provide. However, the process fails due to the _load.loadclass function failing to find the class "PackNetSlimEnc01". Could it be that this class definition is currently missing in the repo or was this checkpoint perhaps created with a previous version of the code that used a different class structure? I'd be glad if you could provide some instruction on how to get past this issue.

Thanks in advance.

jiaqixuac commented 2 years ago

Hi,

You can rename the depth net name from "PackNetSlimEnc01" to "PackNetSAN01"

# Parse arguments
config, state_dict = parse_test_file(ckpt_file, cfg_file)
if config.model.depth_net.name == 'PackNetSlimEnc01':
    config.model.depth_net.name = 'PackNetSAN01'

Refer to #163