def METHOD_NAME(self):
    # 计算宫格横纵向格数
    imgSize = np.array(self.detimg.shape[:2])
    grid_count = np.ceil((imgSize + self.overlap) / self.gridSize)
    self.grid_count = grid_count = grid_count.astype("uint16")
    # ul = self.overlap - self.gridSize
    # for row in range(grid_count[0]):
    #     ul[0] = ul[0] + self.gridSize[0] - self.overlap[0]
    #     for col in range(grid_count[1]):
    #         ul[1] = ul[1] + self.gridSize[1] - self.overlap[1]
    #         lr = ul + self.gridSize
    #         # print("ul, lr", ul, lr)
    #         # 扩充
    #         det_tmp = self.detimg[ul[0]: lr[0], ul[1]: lr[1]]
    #         tmp = np.zeros((self.gridSize[0], self.gridSize[1], self.detimg.shape[-1]))
    #         tmp[:det_tmp.shape[0], :det_tmp.shape[1], :] = det_tmp
    #         self.imagesGrid.append(tmp)
    # self.mask_grids = [[np.zeros(self.gridSize)] * grid_count[1]] * grid_count[0]  # 不能用浅拷贝
    self.mask_grids = [
        [np.zeros(self.gridSize) for _ in range(grid_count[1])]
        for _ in range(grid_count[0])
    ]
    # print(len(self.mask_grids), len(self.mask_grids[0]))
    self.grid_init = True
    return list(grid_count)