-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Local Patch Shuffle Transform Initial Version Added #2757
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
Conversation
Signed-off-by: vnath <vnath@nvidia.com>
|
/black |
|
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>
|
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this is an initial patch shuffle, will need followups for the dictionary version and have ND support.
* Local Patch Shuffle Transform Initial Version Added Signed-off-by: vnath <vnath@nvidia.com>
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.