def start(mode, model, image):
    if (mode == 'test'):
        score = test(model, image)
        "\n        print(str(len(image))+' pictures found!')\n        print('=======================')\n        print('test_json')\n        print(score)\n        print('=======================')\n        "
    elif (mode == 'adjust'):
        if (len(image) > 1):
            print('error adjust more than 1 image')
            sys.exit(0)
        score = test(model, image)
        "\n        print('=======================')\n        print('test_json')\n        print(score)\n        print('=======================')\n        "
        for i in image:
            results = opt.starts(image.get(i))
            (filepath, ext) = os.path.splitext(image.get(i))
            img_dir = ((filepath + '_') + ext)
            results[2].save(img_dir)
            score['results'].append({'name': ((i.split('.')[(- 2)] + '_.') + i.split('.')[(- 1)]), 'score': results[1], 'b': results[0][0], 'c': results[0][1], 'img_dir': img_dir})
        "\n        print('adjsut_json')\n        print(score)\n        print('=======================')\n        "
    else:
        print('error select mode')
        sys.exit(0)
    return score
def start(mode, model, image):
    if (mode == 'test'):
        score = test(model, image)
        "\n        print(str(len(image))+' pictures found!')\n        print('=======================')\n        print('test_json')\n        print(score)\n        print('=======================')\n        "
    elif (mode == 'adjust'):
        if (len(image) > 1):
            print('error adjust more than 1 image')
            sys.exit(0)
        score = test(model, image)
        "\n        print('=======================')\n        print('test_json')\n        print(score)\n        print('=======================')\n        "
        for i in image:
            results = opt.starts(image.get(i))
            (filepath, ext) = os.path.splitext(image.get(i))
            img_dir = ((filepath + '_') + ext)
            results[2].save(img_dir)
            score['results'].append({'name': ((i.split('.')[(- 2)] + '_.') + i.split('.')[(- 1)]), 'score': results[1], 'b': results[0][0], 'c': results[0][1], 'img_dir': img_dir})
        "\n        print('adjsut_json')\n        print(score)\n        print('=======================')\n        "
    else:
        print('error select mode')
        sys.exit(0)
    return score