def predict_once(self, x1, x2): h = IMAGE_SIZE // 2 x = max(0, min(IMAGE_SIZE - 1, np.round(h * x1 + h))) y = max(0, min(IMAGE_SIZE - 1, np.round(h - h * x2))) return COLOR2ID(self.img.getpixel((x, y)))
def predict_once(self, x1, x2): h = self.image_size // 2 x = max(0, min(self.image_size - 1, np.round(h * x1 + h))) y = max(0, min(self.image_size - 1, np.round(h - h * x2))) return COLOR2ID(self.img.getpixel((x, y)))