How to construct my own mask, when evaluating the scores here
scores(any([-1 0 1 0 ; 0 -1 0 1] * boxes < 0)) = -inf ;
in your code you are using boxes with size 6464 -->[-1 0 1 0 ; 0 -1 0 1]
and i am using 50100 boxes --> [ ????]
how to reconstruct it ??