dwofk / fast-depth

ICRA 2019 "FastDepth: Fast Monocular Depth Estimation on Embedded Systems"
MIT License
930 stars 188 forks source link

Weird image output from trained model #27

Open hsinpa opened 4 years ago

hsinpa commented 4 years ago

Hi Diana After loading mobilenet-nnconv5-skipadd-pruned The last layer "decode_conv6" output numbers between 1 to 5, whether I normalized my input image or not.

Its clearly not a normalized image and too bright for image between [0-255]. Not sure where I do wrong, or the output is not means for gray image?

dwofk commented 4 years ago

Hi @hsinpa

The output from the model contains values that should correspond to depth measurements in meters -- in this case, numbers between 1 and 5 should correspond to estimated depth of 1 to 5 meters. To properly visualize this output, depth values need to be shifted to zero (by subtracting minimum depth) and then normalized by the depth range. A colormap can then be applied, as in https://github.com/dwofk/fast-depth/blob/master/deploy/data/visualize.py#L9.

The input RGB image fed into the model should indeed be divided by 255 so that input values are in the [0-1] range.

sunmengnan commented 3 years ago

could you share the training script? Thx