def __call__(self, image, crop_region=False, return_result=False, output_path=None):
    '\n        Input: path to image\n        Output: boxes (coordinates of 4 points)\n        '
    if (output_path is None):
        assert crop_region, 'Please specify output_path'
    else:
        output_path = os.path.join(output_path, 'crops')
        if os.path.exists(output_path):
            shutil.rmtree(output_path)
            os.mkdir(output_path)
    (_, boxes_list, _) = self.model.predict(image, output_path, crop_region=crop_region)
    if return_result:
        img = detection.draw_bbox(image, boxes_list)
    if return_result:
        return (boxes_list, img)
    else:
        return boxes_list
Input: path to image
Output: boxes (coordinates of 4 points)
def __call__(self, image, crop_region=False, return_result=False, output_path=None):
    '\n        Input: path to image\n        Output: boxes (coordinates of 4 points)\n        '
    if (output_path is None):
        assert crop_region, 'Please specify output_path'
    else:
        output_path = os.path.join(output_path, 'crops')
        if os.path.exists(output_path):
            shutil.rmtree(output_path)
            os.mkdir(output_path)
    (_, boxes_list, _) = self.model.predict(image, output_path, crop_region=crop_region)
    if return_result:
        img = detection.draw_bbox(image, boxes_list)
    if return_result:
        return (boxes_list, img)
    else:
        return boxes_list