def METHOD_NAME(self, pil_image, visualized=False):
    # pil_image = pil_image.resize((640, 480))
    img = np.asarray(pil_image) / 255.
    img = self.toTensor(img).unsqueeze(0).float().to(self.device)
    bin_centers, pred = self.predict(img)
    if visualized:
        viz = utils.colorize(torch.from_numpy(pred).unsqueeze(0), vmin=None, vmax=None, cmap='magma')
        # pred = np.asarray(pred*1000, dtype='uint16')
        viz = Image.fromarray(viz)
        return bin_centers, pred, viz
    return bin_centers, pred