Local Patch Shuffle Transform Initial Version Added#2757
Local Patch Shuffle Transform Initial Version Added#2757wyli merged 7 commits intoProject-MONAI:devfrom
Conversation
Signed-off-by: vnath <[email protected]>
|
/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 <[email protected]>
36b61a4 to
cdffc17
Compare
Signed-off-by: vnath <[email protected]>
Signed-off-by: vnath <[email protected]>
|
Does it work only for 3D? what happen if we use it on 2D? |
Signed-off-by: vnath <[email protected]>
b7e2936 to
e321e43
Compare
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
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.
* Local Patch Shuffle Transform Initial Version Added Signed-off-by: vnath <[email protected]>
Signed-off-by: vnath [email protected]
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.