File size: 453 Bytes
681cbb8
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os

from segment_key import final_features

image_dir = '../augmentation/testing/3'

for filename in os.listdir(image_dir):
    if filename.endswith('.jpg'):
        image_path = os.path.join(image_dir, filename)
        features = final_features(image_path)
        with open('./prediction/database.txt', 'a+') as f:
            f.write(filename + ';' + str(features) + '\n')
            print('successfully predicted ' + filename)