Skip to content
Discussion options

You must be logged in to vote

Hi @Mo-Junyang, you need to ensure the data is channel-first, try something like this:

a = np.array([[[1,2,3,4],[5,6,7,8],[8,7,6,5],[4,3,2,1]]])
print(a)
c= iter_patch(a,patch_size=[None,2,2],start_pos=(0,0),overlap=0,copy_back=False)
for i,b in c:
    print(i,"\n")

You can also try to use PatchDataset and GridPatchDataset

Hope it can help you, thanks!

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Mo-Junyang
Comment options

@KumoLiu
Comment options

@Mo-Junyang
Comment options

Answer selected by Mo-Junyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants