Skip to content

Try out smaller patch size for CHM tomography #25

@coleslaw481

Description

@coleslaw481

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions