You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can reproduce it seems like a bug indeed. Quickly trying out different values, it only seems to happen one of the patch size value is equal to one of the img.shape values. For example patch_size = (64, 128) works fine but not patch_size = (128, 128).
Hi @lesteve. I figured out this problem... I made a few test on my machine. The basic idea is create a overlap count map, which is a combination of many min functions (actually it is combination of some piece-wise functions). The reasoning behind should be right, but I am not should there will be some plus one and minus one index issue. I tested some cases, it should work fine.
@GeekMe93 You need to fork the repo, create a branch to hold your work, and submit a PR to the master branch (Please refer to the contributing guide or Google for more details).
Activity
lesteve commentedon Apr 3, 2018
I can reproduce it seems like a bug indeed. Quickly trying out different values, it only seems to happen one of the patch size value is equal to one of the
img.shapevalues. For examplepatch_size = (64, 128)works fine but notpatch_size = (128, 128).Pull request more than welcome!
jiadongdan commentedon Apr 3, 2018
Hi, I also tried patch size (128, 128) with image shape (130 , 256), I cannot get expected result.
Fixing scikit-learn#10910 function `reconstruct_from_patches_2d ` bug
jiadongdan commentedon Apr 4, 2018
Hi @lesteve. I figured out this problem... I made a few test on my machine. The basic idea is create a overlap count map, which is a combination of many min functions (actually it is combination of some piece-wise functions). The reasoning behind should be right, but I am not should there will be some plus one and minus one index issue. I tested some cases, it should work fine.
jiadongdan commentedon Apr 4, 2018
Hi @lesteve , I think now this function can work now, please kindly check...
lesteve commentedon Apr 4, 2018
Can you open a PR on the scikit-learn/scikit-learn repo? Unless I missed something you open a PR against your fork.
You will need to add a non-regression test, have a look at our contribution guidelines.
jiadongdan commentedon Apr 4, 2018
I am a bit confused, I don't know which branches I should put this into...
qinhanmin2014 commentedon Apr 4, 2018
@GeekMe93 You need to fork the repo, create a branch to hold your work, and submit a PR to the master branch (Please refer to the contributing guide or Google for more details).
cmarmo commentedon Nov 23, 2020
Hi @jiadong93 this bug is still in master. Are you still interested in fixing this? If yes, you can open a pull request from your branch to scikit-learn master branch. It would be even better if you synchronise with scikit-learn master branch before.
jiadongdan commentedon Feb 10, 2021
Hi, @cmarmo , sorry for very late reply. Is the issue solved for latest version of sklearn? If not, I am glad to help.
cmarmo commentedon Feb 10, 2021
Hi @jiadong93 , the bug is still there. Would you be able to open a pull request from your branch to scikit-learn main branch? It would be even better if you synchronise with scikit-learn main branch before.
FIX reconstruct_from_patches_2d when patch size equals image size