cgm-ml
cgm-ml copied to clipboard
Change preprocess shortcoming: interpolation when resizing
During training, we upscale the depthmaps from size (180, 135) to (240, 180).
Depthmaps contain pixels which have a values 0.
(zero), where they are invalid.
This is an important information for depthmaps.
When upscaling we use tf.image.resize()
the scaling algorithm will interpolate values. This works for RGB images.
Problem: This way of upscaling is not suited for depthmaps, because the interpolation between invalid pixels and valid pixels will yield some average, but actually should be invalid.
Without resizing:
With resizing:
Notice how the edges got blurry due to resizing
Ideas for solutions:
- don't upscale
- interpolate values: correctly
- Use scale method before, but than mask (like smoothing)
- interpolate pixel by pixel: if one of 4 pixels is
0
, then the output pixel is0
Details:
- Datasets used:
anon-depthmap-95k
,anon-depthmap-mini
All eye on #429 👀👀