Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bilinear upsampling layer shift #44552

Closed
aledenza opened this issue Nov 3, 2020 · 6 comments
Closed

Bilinear upsampling layer shift #44552

aledenza opened this issue Nov 3, 2020 · 6 comments
Assignees
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author TF 2.3 Issues related to TF 2.3 type:bug Bug

Comments

@aledenza
Copy link

aledenza commented Nov 3, 2020

System information

  • OS Platform and Distribution: Windows 10 x64
  • TensorFlow installed from: pypy
  • TensorFlow version: 2.3.0
  • Python version: 3.8.5

Describe the current behavior
Inference with Opencv Dnn has Mask shift that apperas while tensorflow model inference, if model has Resize Bilinear Layer. There's no shift if ResizeBilinear layer replaced with ResizeNearest layer. Also tensorflow inference engine does not have this issue and works well with Bilinear and Nearest resize.
I agree, that this looks like Opencv issue, but i found this bug (#29856) that took place in TF 2.0 beta and it looks similar to this issue. Now tensorflow inference works fine, but, probably, only inference was fixed, but layer still works unproperly.

Here you can see results of inference:

Inference results

OpenCV DNN Bilinear
test_res_bilin

test_res_bilin_line

OpenCV DNN Nearest
test_res_nearest

Tensorflow Bilinear
tf_res_bilin

Tensorflow Nearest
tf_res_nearest

Steps to reproduce

reproduce.zip

@Saduf2019
Copy link
Contributor

@ZakharovDenis
I ran the code shared and face a different issue, please find the gist here.

@Saduf2019 Saduf2019 added stat:awaiting response Status - Awaiting response from author TF 2.3 Issues related to TF 2.3 labels Nov 4, 2020
@Saduf2019 Saduf2019 assigned Saduf2019 and unassigned ravikyram Nov 4, 2020
@aledenza
Copy link
Author

aledenza commented Nov 5, 2020

Hello @Saduf2019 . You have to upload model to colab storage to run the code. Download link provided in download_models.txt file. I can't put models to the zip file due to github file size limit.
I updated a reproduce.zip to run opencv segmentation from python, not from c++.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Nov 7, 2020
@Saduf2019
Copy link
Contributor

@ZakharovDenis
Apologies for the delayed response, i ran the code and face this error

@Saduf2019 Saduf2019 added the stat:awaiting response Status - Awaiting response from author label Nov 19, 2020
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler google-ml-butler bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Nov 26, 2020
@google-ml-butler
Copy link

Closing as stale. Please reopen if you'd like to work on this further.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author TF 2.3 Issues related to TF 2.3 type:bug Bug
Projects
None yet
Development

No branches or pull requests

4 participants