Local Patch Shuffle Transform Initial Version Added#2757
Merged
wyli merged 7 commits intoProject-MONAI:devfrom Aug 26, 2021
Merged
Local Patch Shuffle Transform Initial Version Added#2757wyli merged 7 commits intoProject-MONAI:devfrom
wyli merged 7 commits intoProject-MONAI:devfrom
Conversation
Signed-off-by: vnath <vnath@nvidia.com>
Contributor
|
/black |
Contributor
|
thanks Vish, this looks like a nice starting point. just a reminder that there is still a style error: https://github.com/Project-MONAI/MONAI/pull/2757/checks?check_run_id=3316962486#step:7:116. for the shuffling, looks like the following is efficient as well https://stackoverflow.com/questions/22426609/shuffle-a-numpy-array: >>> a = np.arange(9).reshape((3,3))
>>> a
array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
>>> np.random.shuffle(a.flat)
>>> a
array([[3, 5, 8],
[7, 6, 2],
[1, 4, 0]])Also, the implementation currently supports 3d, but I think we could extend to support N-d input in the future. |
Signed-off-by: vnath <vnath@nvidia.com>
36b61a4 to
cdffc17
Compare
Signed-off-by: vnath <vnath@nvidia.com>
Signed-off-by: vnath <vnath@nvidia.com>
Member
|
Does it work only for 3D? what happen if we use it on 2D? |
Signed-off-by: vnath <vnath@nvidia.com>
b7e2936 to
e321e43
Compare
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
wyli
approved these changes
Aug 26, 2021
Contributor
wyli
left a comment
There was a problem hiding this comment.
thanks, this is an initial patch shuffle, will need followups for the dictionary version and have ND support.
wyli
pushed a commit
to Borda/MONAI
that referenced
this pull request
Aug 27, 2021
* Local Patch Shuffle Transform Initial Version Added Signed-off-by: vnath <vnath@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: vnath vnath@nvidia.com
Description
This pull request for adding the Pixel Shuffle Transform. So far I've added the transform for local patch shuffling in the transform/spatial/array
It needs some testing and also simultaneous feedback as how to port it for the dictionary version of it
part of #2701
Also needs test cases.
Status
ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.make htmlcommand in thedocs/folder.