slash-segmentation / CHM

Cascaded Hierarchical Model Automatic Segmentation Algorithm
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Try out smaller patch size for CHM tomography #25

Open coleslaw481 opened 7 years ago

coleslaw481 commented 7 years ago

This idea was pulled from Jira and is a suggestion from Mehran cause Alex was asking about it:

So in order to change the patch sizes you will have to make the following changes in the code(I am explaining on the chm-source-2.1.367.tar.gz version which is on http://sci.utah.edu/download/chm/) In the ConstructNeighborhoodsS function in lines 4 and 9, you have to make changes(This function extract patches from the predictions made from the lower levels in CHM as features for the current level's classifier). 7 here means you are extracting patches of size(27+1) by (27+1). if you want a patch of size 11 by 11 you have to set new_size to 5. (4) offset = StencilNeighborhood(7); ===> offset = StencilNeighborhood(new_size); (7) II = padReflect(I(:,:,i),7); ===> II = padReflect(I(:,:,i),new_size); In function Filterbank make the following changes in lines 7 and 9(This functions generates features from the original image for the classifier. 10 here means the patches extracted from the original image are (210+1) by (210+1)). (7) offset = StencilNeighborhood(10); ===> offset = StencilNeighborhood(new_size); (9) I = padReflect(I,10); ===> I = padReflect(I,new_size); Note that there is a ConstructNeighborhoods(NOT ConstructNeighborhoodsS) function. You don't have to make changes to that. Let me know if you have any questions or concerns. Best, Mehran

coderforlife commented 7 years ago

Was he asking about the size of the neighborhoods used around each pixel or the blocks the image is broken into? What was the goal here, to use a larger area from the preceding level to move forward with?

Jeff

On Tue, Dec 13, 2016 at 1:55 PM, Chris Churas notifications@github.com wrote:

This idea was pulled from Jira and is a suggestion from Mehran cause Alex was asking about it:

So in order to change the patch sizes you will have to make the following changes in the code(I am explaining on the chm-source-2.1.367.tar.gz version which is on http://sci.utah.edu/download/chm/) In the ConstructNeighborhoodsS function in lines 4 and 9, you have to make changes(This function extract patches from the predictions made from the lower levels in CHM as features for the current level's classifier). 7 here means you are extracting patches of size(27+1) by (27+1). if you want a patch of size 11 by 11 you have to set new_size to 5. (4) offset = StencilNeighborhood(7); ===> offset = StencilNeighborhood(new_size); (7) II = padReflect(I(:,:,i),7); ===> II = padReflect(I(:,:,i),new_size); In function Filterbank make the following changes in lines 7 and 9(This functions generates features from the original image for the classifier. 10 here means the patches extracted from the original image are (210+1) by (210+1)). (7) offset = StencilNeighborhood(10); ===> offset = StencilNeighborhood(new_size); (9) I = padReflect(I,10); ===> I = padReflect(I,new_size); Note that there is a ConstructNeighborhoods(NOT ConstructNeighborhoodsS) function. You don't have to make changes to that. Let me know if you have any questions or concerns. Best, Mehran

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/slash-segmentation/CHM/issues/25, or mute the thread https://github.com/notifications/unsubscribe-auth/ABd2mM0_PX0AtPg9pOcYi89qAeKK-iAHks5rHuo0gaJpZM4LMGG4 .

coleslaw481 commented 7 years ago

Not sure and he is no longer here to ask.