Closed wlsdzyzl closed 2 years ago
bcp_lh
is the local index as it is computed based on the current local patch as shown in https://github.com/HuXiaoling/TopoLoss/blob/5cb98177de50a3694f5886137ff7c6f55fd51493/topoloss.py#L150
Ok, I see. Then in boundary check:
https://github.com/HuXiaoling/TopoLoss/blob/5cb98177de50a3694f5886137ff7c6f55fd51493/topoloss.py#L159,
should it be compared with topo_size
if the patch is square?
Perhaps the boundary check is not necessary.
Yes, you are right.
Thanks for your quick reply.
In https://github.com/HuXiaoling/TopoLoss/blob/5cb98177de50a3694f5886137ff7c6f55fd51493/topoloss.py#L161, I wonder why the index is
y + int(bcp_lh[hole_indx][0]), x + int(bcp_lh[hole_indx][1])
? It seems that thetopo_cp_weight_map
has the same shape aslikehood
, andbcp_lh
is the list of the global indices instead of local indices in current patch.x
andy
is the starting global index of current patch. Will this (x + int(bcp_lh[hole_indx][1]
) lead to some "segmentation fault" problem?