Skip to content

Conversation

balvisio
Copy link
Contributor

@balvisio balvisio commented Dec 9, 2022

IIUC, when resizing the mask, the NEAREST NEIGHBOR interpolation method should be used to prevent the introduction of values of labels that are not present in the original mask.

Currently, if we print the values of sample mask we get:

>>> import numpy as np
>>> mask = iter(train_batches).next()[1]))
>>> print(np.unique(mask))

[0.0000000e+00 1.2207031e-04 3.6621094e-04 ... 1.9995728e+00 1.9999390e+00
 2.0000000e+00]

After the change:

>>> import numpy as np
>>> mask = iter(train_batches).next()[1]))
>>> print(np.unique(mask))

[0. 1. 2.]

@github-actions
Copy link

github-actions bot commented Dec 9, 2022

Preview

Preview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.

Format and style

Use the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:
$ python3 -m pip install -U --user git+https://github.com/tensorflow/docs

$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
If commits are added to the pull request, synchronize your local branch: git pull origin ba/fix-mask-resize-interpolation

@balvisio balvisio force-pushed the ba/fix-mask-resize-interpolation branch from 772ce15 to 2853d26 Compare December 9, 2022 16:10
@balvisio
Copy link
Contributor Author

Hello, @MarkDaoust @8bitmp3 would it be possible for someone to review this? Thank you!

@github-actions github-actions bot added the lgtm Community-added approval label Dec 16, 2022
@MarkDaoust
Copy link
Member

Thanks for the ping.

@8bitmp3 8bitmp3 added the ready to pull Start merge process label Dec 19, 2022
@balvisio
Copy link
Contributor Author

balvisio commented Dec 19, 2022

The CI check is failing due to formatting issues in another notebook site/en/tutorials/video/transfer_learning_with_movinet.ipynb.

@copybara-service copybara-service bot merged commit 633c7f0 into tensorflow:master Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Community-added approval ready to pull Start merge process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants