Hi and thank you for sharing your code! I just followed the installation guide, but run into an issue trying to load the pretrained model:
(structurenet367) D:\Projects\StructureNet>python inference.py --input_path input --output_path output --saved_params_path model\model_e8.pth
D:\Projects\StructureNet\src\dataset\rendering\transformations.py:1926: UserWarning: No module named 'src.dataset.rendering._transformations'
warnings.warn(str(err))
Loading previously saved model from model\model_e8.pth
Traceback (most recent call last):
File "inference.py", line 175, in <module>
inference(args, device)
File "inference.py", line 104, in inference
model = models.get_UNet_model(model_name, model_params)
File "D:\Projects\StructureNet\src\models\__init__.py", line 15, in get_UNet_model
return UNet_max(params['width'], params['height'], params['ndf'], params['upsample_type'], params['nclasses'])
NameError: name 'UNet_max' is not defined
Upon closer inspection, the model name stored in model_e8.pth is 'full_max', which corresponds to the UNet_max
function inside models/init.py However, only UNet_mask_max.py
is provided. I can force model name to 'full_mask_max' and the code will execute, but I suspect this is not the right way (and I do not have any data yet to test it any further). Could you confirm this is the right combination of pretrained model and code? Thanks!