autonomousvision / occupancy_networks

This repository contains the code for the paper "Occupancy Networks - Learning 3D Reconstruction in Function Space"
https://avg.is.tuebingen.mpg.de/publications/occupancy-networks
MIT License
1.49k stars 291 forks source link

How can I change input img_size from 224? #47

Open yyyokoy opened 4 years ago

yyyokoy commented 4 years ago

Hi.

When I changed input image size config from default 224 to 448, an error occurred below.

RuntimeError: size mismatch, m1: [32 x 131072], m2: [2048 x 256] at /opt/conda/conda-bld/pytorch_1544174967633/work/aten/src/THC/generic/THCTensorMathBlas.cu:266

How can I change my config from default? And, can I get some good 3D-reconstruction results because of changing input image size?

Thanks.

AlexsaseXie commented 4 years ago

The encoder is resnet18 which is specialized for input image of 224 * 224. You cannot change the input size to 448 unless you modify the encoder. Nevertheless, I think increase the size of input image can barely improve the reconstruction results. The structure of onet uses no local features. It only uses global features which should be consistent to image size.