Tested txt The format is as follows :
img: ./save/test_101.jpg score: 0.853516
img: ./save/test_106.jpg score: 0.852539
img: ./save/test_11.jpg score: 0.850586
img: ./save/test_111.jpg score: 0.867676
img: ./save/test_116.jpg score: 0.875488
img: ./save/test_121.jpg score: 0.879395
img: ./save/test_126.jpg score: 0.870605
img: ./save/test_131.jpg score: 0.855957
img: ./save/test_136.jpg score: 0.870117
img: ./save/test_141.jpg score: 0.866699
img: ./save/test_146.jpg score: 0.868164
img: ./save/test_156.jpg score: 0.869141
img: ./save/test_161.jpg score: 0.851562
img: ./save/test_176.jpg score: 0.856934
img: ./save/test_181.jpg score: 0.865723
img: ./save/test_186.jpg score: 0.875488
img: ./save/test_191.jpg score: 0.866211
img: ./save/test_196.jpg score: 0.858398
img: ./save/test_21.jpg score: 0.853027
img: ./save/test_241.jpg score: 0.856934
img: ./save/test_246.jpg score: 0.864746
img: ./save/test_251.jpg score: 0.865723
img: ./save/test_256.jpg score: 0.864258
img: ./save/test_26.jpg score: 0.865234
img: ./save/test_261.jpg score: 0.850098
img: ./save/test_266.jpg score: 0.856445
img: ./save/test_271.jpg score: 0.870117
img: ./save/test_276.jpg score: 0.86084
img: ./save/test_281.jpg score: 0.85791
img: ./save/test_286.jpg score: 0.865723
img: ./save/test_291.jpg score: 0.86377
img: ./save/test_296.jpg score: 0.858887
img: ./save/test_301.jpg score: 0.862793
img: ./save/test_31.jpg score: 0.868652
img: ./save/test_311.jpg score: 0.873047
img: ./save/test_316.jpg score: 0.860352
img: ./save/test_321.jpg score: 0.871582
img: ./save/test_326.jpg score: 0.854004
img: ./save/test_331.jpg score: 0.85498
img: ./save/test_336.jpg score: 0.855957
img: ./save/test_341.jpg score: 0.85791
img: ./save/test_346.jpg score: 0.869141
img: ./save/test_356.jpg score: 0.85498
img: ./save/test_36.jpg score: 0.858398
img: ./save/test_361.jpg score: 0.858887
img: ./save/test_366.jpg score: 0.855957
img: ./save/test_371.jpg score: 0.851074
img: ./save/test_376.jpg score: 0.855469
img: ./save/test_381.jpg score: 0.852539
img: ./save/test_386.jpg score: 0.851562
img: ./save/test_391.jpg score: 0.870605
img: ./save/test_401.jpg score: 0.874023
img: ./save/test_406.jpg score: 0.866211
img: ./save/test_41.jpg score: 0.855957
img: ./save/test_411.jpg score: 0.877441
img: ./save/test_416.jpg score: 0.886719
img: ./save/test_421.jpg score: 0.885254
img: ./save/test_426.jpg score: 0.861816
img: ./save/test_431.jpg score: 0.863281
img: ./save/test_436.jpg score: 0.867188
img: ./save/test_441.jpg score: 0.861816
img: ./save/test_446.jpg score: 0.853027
img: ./save/test_451.jpg score: 0.852051
img: ./save/test_46.jpg score: 0.866699
img: ./save/test_461.jpg score: 0.862305
img: ./save/test_466.jpg score: 0.862305
img: ./save/test_471.jpg score: 0.862305
img: ./save/test_476.jpg score: 0.872559
img: ./save/test_481.jpg score: 0.855957
img: ./save/test_486.jpg score: 0.853027
img: ./save/test_491.jpg score: 0.850586
img: ./save/test_51.jpg score: 0.87207
img: ./save/test_56.jpg score: 0.881348
img: ./save/test_61.jpg score: 0.870117
img: ./save/test_66.jpg score: 0.878418
img: ./save/test_71.jpg score: 0.879395
img: ./save/test_76.jpg score: 0.871094
from nis import match
from numpy import *
import operator
from os import listdir
import os
import re
fr = open("output.txt",'r')
res = []
cnt = 0
total = 0
lines = fr.readlines()
for line in lines:
print(line)
splitLine = line.split('score: ')
res.append(splitLine[1])
print("\nTotal Error detection: {}".format(len(lines)))
print("The max score: {}".format(max(res)))
print("The min score: {}".format(min(res)))
for i in res:
total += float(res[cnt].replace("\n",""))
cnt += 1
average = total /cnt
print("The average score: {}".format(average))
path = "./save"
count = 0
for num in os.listdir(path):
count += 1
print("Total file: {}".format(count))
print("avg_num: {}".format(len(lines)/count))