diff --git a/gnes/preprocessor/image/sliding_window.py b/gnes/preprocessor/image/sliding_window.py index 40635531..63cadeaf 100644 --- a/gnes/preprocessor/image/sliding_window.py +++ b/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