Skip to content
Permalink
Browse files

fix(sliding window): fix the boundary

  • Loading branch information...
jemmyshin committed Aug 1, 2019
1 parent 5f1ba18 commit 14cdfabed5bb1ac8e75f1944f31323c69df6d9d8
Showing with 3 additions and 1 deletion.
  1. +3 −1 gnes/preprocessor/image/sliding_window.py
@@ -98,7 +98,7 @@ def _get_slid_offset_nd(self, all_subareas: List[List[int]], index: List[List[in
@staticmethod
def _get_location(all_subareas: List[List[int]], center_point: List[float]) -> List[bool]:
location_list = []
x_boundary = max([x[1] for x in all_subareas])
x_boundary = max([x[2] for x in all_subareas])
y_boundary = max([y[3] for y in all_subareas])
for area in all_subareas:
if center_point[0] in range(int(area[0]), int(area[2])) and center_point[1] in range(int(area[1]),
@@ -110,6 +110,8 @@ def _get_location(all_subareas: List[List[int]], center_point: List[float]) -> L
location_list.append(True)
else:
location_list.append(False)
if True not in location_list:
location_list[-1] = True
return location_list


0 comments on commit 14cdfab

Please sign in to comment.
You can’t perform that action at this time.