def test(model, image):
    score = {'results': []}
    for i in image:
        img = cv2.imread(image.get(i))
        img = Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
        r = model.predict_from_pil_image(img)
        '\n        r = model.predict_from_file(image.get(i))\n        '
        score['results'].append({'name': i, 'score': r['mean_score'], 'b': 0, 'c': 0})
    score['results'] = sorted(score['results'], key=(lambda x: x['score']), reverse=True)
    return score
def test(model, image):
    score = {'results': []}
    for i in image:
        img = cv2.imread(image.get(i))
        img = Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
        r = model.predict_from_pil_image(img)
        '\n        r = model.predict_from_file(image.get(i))\n        '
        score['results'].append({'name': i, 'score': r['mean_score'], 'b': 0, 'c': 0})
    score['results'] = sorted(score['results'], key=(lambda x: x['score']), reverse=True)
    return score