tensorflow / tensorflow/models

Batch norm and image normalization in struct2depth

Open
#7,604 0 comments 1 reaction 1 assignee View on GitHub

@aneliaangelova is already working on this.

Since Jun 21, 2020.

models:research type:support
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

  • What is the top-level directory of the model you are using: models/research/struct2depth
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): of course
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Fedora 30
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 1.11
  • Bazel version (if compiling from source): -
  • CUDA/cuDNN version: 9.2 / 7.2.1
  • GPU model and memory: 1080 TI
  • Exact command to reproduce: python inference.py ...

Hi there,
I noticed that there is a connection between image normalization and the way batch norm is used during inference.

The issue #7343 indeed describes a bug and the image is not normalized before being fed to a neural network. This causes the effect described in issue #6927.

If using batch norm in train mode, the features are normalized using current batch statistics, which allows to compensate for absent image normalization. On the other hand, in test mode batch normalization is done with fixed statistics, which causes degraded performance on not normalized images.

If image normalization is fixed (e.g. as in #7342) and batch norm mode is set to test, quantitative results improve compared to those without image normalization and train mode batch norm.

BR
Yevhen

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.