Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

. #4

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

. #4

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
81264d5
my running script
liormagram Jan 1, 2020
4352fa1
adding get_config_file function
liormagram Jan 1, 2020
67cce73
fix undeclared variable bug
liormagram Jan 1, 2020
46556f9
change back to gpu
liormagram Jan 2, 2020
9eec0c5
adding the data
liormagram Jan 2, 2020
5789820
adding the data
liormagram Jan 2, 2020
09082f3
Uploading original bus pictures
yuval141 Jan 3, 2020
7becb55
improving training
liormagram Jan 3, 2020
b8eba45
Merge remote-tracking branch 'origin/master'
liormagram Jan 3, 2020
72880ff
magram's computer
liormagram Jan 3, 2020
3656ecf
new composed photos for validation
liormagram Jan 4, 2020
f5595f3
deleting file
liormagram Jan 4, 2020
0dd5068
adding new file of annotations
liormagram Jan 4, 2020
a17c6ec
adding the data
liormagram Jan 6, 2020
62e561c
Merge remote-tracking branch 'origin/master'
liormagram Jan 6, 2020
fe0d80a
add new files
liormagram Jan 6, 2020
b9a54fe
elegant coding fix
liormagram Jan 11, 2020
a353c1e
adding the data
liormagram Jan 11, 2020
132b0b5
modification to bus project test file
liormagram Jan 11, 2020
b2cbc96
original pictures added
liormagram Jan 11, 2020
4fceb02
adding the data
liormagram Jan 11, 2020
ee62e6c
adding the data
liormagram Jan 11, 2020
7ee9a79
Merge remote-tracking branch 'origin/master'
liormagram Jan 11, 2020
565268d
running on GPU
liormagram Jan 11, 2020
889f6be
adding max_iter and lr
liormagram Jan 11, 2020
25ab2e7
adding max_iter and lr
liormagram Jan 11, 2020
f089d3c
adding max_iter and lr
liormagram Jan 11, 2020
885b915
fixing runMe to work on a single weights file
liormagram Jan 12, 2020
0aaca9e
fixing runMe to work on a single weights file (the chosen one)
liormagram Jan 12, 2020
695d96f
adding main_output folder
liormagram Jan 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions Main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import time
from runMe import *
from busProjectTest import runTest
import sys
import os

class my_time:

def tic(self):
self.t = time.time()

def toc(self):
self.elapsed = float(time.time()) - float(self.t)
s = "elapsed time is %0.3f seconds" % self.elapsed
print(s)
return self.elapsed

i = 0
saveDir = None
while(i < len(sys.argv)):
arg = sys.argv[i]
print(arg)
if('-myAnns' in arg):
myAnnFileName = sys.argv[i + 1]
myAnnFileName = os.path.join(os.getcwd(), myAnnFileName)
if ('-anns' in arg):
annFileNameGT = sys.argv[i + 1]
annFileNameGT = os.path.join(os.getcwd(), annFileNameGT)
if('-buses' in arg):
busDir = sys.argv[i + 1]
busDir = os.path.join(os.getcwd(), busDir)
if ('-saveDir' in arg):
saveDir = sys.argv[i + 1]
saveDir = os.path.join(os.getcwd(), saveDir)
if(not os.path.exists(saveDir)):
os.mkdir(saveDir)
if('-h' in arg):
print('This script compares the ground truth (GT) and the estimated detections\nUsage: \n-myAnns <estimated annotations file>')
print('-anns <real annotations file> \n-buses <directory of the training images>')
print('-saveDir <output directory> use this option if you want to save the images with the annotations')
print('example:\npython busProjectTest.py -myAnns myannotations.txt -anns anotationsTrain.txt -buses busesDir -saveDir Figures')
print('-h - show this message and exit')
sys.exit()
i += 1

if(i == 0):
print('This script compares the ground truth (GT) and the estimated detections\nUsage: \n-myAnns <estimated annotations file>')
print('-anns <real annotations file> \n-buses <directory of the training images>')
print('-saveDir <output directory> use this option if you want to save the images with the annotations')
print('example:\npython busProjectTest.py -myAnns myannotations.txt -anns anotationsTrain.txt -buses busesDir -saveDir Figures')
print('-h - show this message and exit')
sys.exit()

t = my_time()

t.tic()

run(myAnnFileName, busDir)

elapsed = t.toc()

runTest(annFileNameGT, myAnnFileName, busDir , saveDir, elapsed)

Binary file added Original Pictures/DSCF1013.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1015.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1016.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1017.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1021.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1023.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1025.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1029.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1032.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1037.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1038.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1040.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1042.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1044.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1048.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1049.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1050.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1053.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1056.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1059.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1061.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1064.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1065.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1066.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1068.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Original Pictures/DSCF1070.JPG
Binary file added Original Pictures/DSCF1072.JPG
Binary file added Original Pictures/DSCF1074.JPG
Binary file added Original Pictures/DSCF1077.JPG
Binary file added Original Pictures/DSCF1081.JPG
Binary file added Original Pictures/DSCF1082.JPG
Binary file added Original Pictures/DSCF1086.JPG
Binary file added Original Pictures/DSCF1088.JPG
Binary file added Original Pictures/DSCF1090.JPG
Binary file added Original Pictures/DSCF1092.JPG
Binary file added Original Pictures/DSCF1094.JPG
Binary file added Original Pictures/DSCF1097.JPG
Binary file added Original Pictures/DSCF1099.JPG
Binary file added Original Pictures/DSCF1101.JPG
Binary file added Original Pictures/DSCF1103.JPG
Binary file added Original Pictures/DSCF1104.JPG
Binary file added Original Pictures/DSCF1105.JPG
Binary file added Original Pictures/DSCF1106.JPG
Binary file added Original Pictures/DSCF1109.JPG
Binary file added Original Pictures/DSCF1110.JPG
Binary file added Original Pictures/DSCF1111.JPG
Binary file added Original Pictures/DSCF1114.JPG
Binary file added Original Pictures/DSCF1116.JPG
Binary file added Original Pictures/DSCF1120.JPG
Binary file added Original Pictures/DSCF1122.JPG
Binary file added Original Pictures/DSCF1125.JPG
Binary file added Original Pictures/DSCF1129.JPG
Binary file added Original Pictures/DSCF1130.JPG
Binary file added Original Pictures/DSCF1132.JPG
Binary file added Original Pictures/DSCF1133.JPG
Binary file added Original Pictures/DSCF1135.JPG
Binary file added Original Pictures/DSCF1137.JPG
Binary file added Original Pictures/DSCF1140.JPG
Binary file added Original Pictures/DSCF1141.JPG
Binary file added Original Pictures/DSCF1142.JPG
60 changes: 60 additions & 0 deletions Original Pictures/originalAnnotationsTrain.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
DSCF1013.JPG:[1217,1690,489,201,1],[1774,1619,475,224,2],[2313,1566,460,228,3],[1284,1832,497,231,4],[1879,1798,486,228,5],[2429,1742,475,228,6]
DSCF1015.JPG:[641,1342,1181,892,3],[2053,1022,1122,735,6]
DSCF1016.JPG:[1067,1843,1114,613,4],[1954,1278,1021,561,6],[2392,717,964,635,3]
DSCF1017.JPG:[1834,698,789,422,4]
DSCF1021.JPG:[1991,755,923,546,5]
DSCF1023.JPG:[1909,1166,785,452,2]
DSCF1025.JPG:[985,1570,1252,710,6]
DSCF1029.JPG:[129,1648,1271,733,6],[1456,1076,1122,834,2],[2552,826,1058,804,1]
DSCF1032.JPG:[144,1200,983,467,5],[2339,1125,916,456,6]
DSCF1037.JPG:[1210,1712,1469,643,1]
DSCF1038.JPG:[1210,1764,1754,796,2]
DSCF1040.JPG:[462,1813,976,546,2],[1445,1791,871,482,1],[2305,1779,785,463,4]
DSCF1042.JPG:[2021,1682,1013,504,5]
DSCF1044.JPG:[1460,1200,946,523,6]
DSCF1048.JPG:[443,1230,665,314,4],[1498,1181,665,295,5],[2511,1099,703,310,3]
DSCF1049.JPG:[480,998,789,388,4],[1718,1192,740,396,5],[2758,1364,706,347,3]
DSCF1050.JPG:[454,766,804,366,5],[1767,807,792,366,3]
DSCF1053.JPG:[925,1536,1006,516,1],[2010,1510,1013,523,6]
DSCF1056.JPG:[469,957,1234,632,2],[1700,953,1219,662,6]
DSCF1059.JPG:[1221,994,1103,706,2]
DSCF1061.JPG:[488,1648,1361,792,6],[1191,1203,1144,632,2]
DSCF1064.JPG:[2399,358,811,519,3],[585,740,927,579,2]
DSCF1065.JPG:[705,1031,811,306,5],[2193,908,766,306,1]
DSCF1066.JPG:[1019,1121,718,332,1],[2025,1121,695,321,5]
DSCF1068.JPG:[750,343,1316,501,5],[2459,1533,957,527,1]
DSCF1070.JPG:[1617,1413,1028,583,2],[1528,990,878,523,6]
DSCF1072.JPG:[746,1211,916,549,3],[1905,1465,968,534,2]
DSCF1074.JPG:[1127,1319,1742,964,2]
DSCF1077.JPG:[308,1282,1110,620,6],[1700,1342,1133,624,1]
DSCF1081.JPG:[1475,1282,714,396,4]
DSCF1082.JPG:[996,579,957,534,5],[2118,601,946,542,4]
DSCF1086.JPG:[716,975,609,332,4],[1471,971,602,336,2],[2175,1005,594,344,1],[2878,990,602,359,3]
DSCF1088.JPG:[1232,440,789,422,5],[1326,1525,654,370,2]
DSCF1090.JPG:[1920,784,673,370,1]
DSCF1092.JPG:[424,1293,867,538,4],[1636,1521,890,516,5],[2481,1028,751,504,3]
DSCF1094.JPG:[1378,1035,991,583,4]
DSCF1097.JPG:[1326,642,1155,635,5]
DSCF1099.JPG:[1112,556,1114,564,6]
DSCF1101.JPG:[1015,1072,916,504,2]
DSCF1103.JPG:[1475,541,691,359,6],[1168,1880,849,516,5]
DSCF1104.JPG:[1715,493,684,329,5],[1632,1783,774,426,1]
DSCF1105.JPG:[1090,1016,1312,755,2]
DSCF1106.JPG:[1202,1076,1155,624,2]
DSCF1109.JPG:[1053,878,1178,650,3]
DSCF1110.JPG:[686,743,1159,654,3],[1920,792,1174,643,1]
DSCF1111.JPG:[1890,867,1024,576,6],[671,874,1043,583,2]
DSCF1114.JPG:[1535,1177,994,508,6]
DSCF1116.JPG:[1539,1458,998,523,5]
DSCF1120.JPG:[1236,1274,1324,706,3]
DSCF1122.JPG:[1479,949,1009,542,5]
DSCF1125.JPG:[978,930,654,415,1],[1198,1394,815,482,6],[2406,1252,792,460,2]
DSCF1129.JPG:[1408,1772,792,501,6]
DSCF1130.JPG:[1516,1708,755,471,1]
DSCF1132.JPG:[2751,1005,489,250,1],[2283,1278,893,523,4],[174,1663,1406,740,5]
DSCF1133.JPG:[1352,1192,1140,841,1]
DSCF1135.JPG:[1801,1233,605,359,6]
DSCF1137.JPG:[1879,1136,849,478,2]
DSCF1140.JPG:[1722,594,789,284,6]
DSCF1141.JPG:[1793,665,781,276,2]
DSCF1142.JPG:[914,1200,886,388,2],[2010,1211,878,388,1]
194 changes: 194 additions & 0 deletions busProjectModifiedTest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
import os
import sys
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import numpy as np
import ast

import imageio


#fontdict = {'fontsize':15, 'weight':'bold'}
#plt.switch_backend('Qt5Agg')

class IMAGE:

def __init__(self):
self.ROIS = []

def set_image(self, im):
self.I = imageio.imread(im)
self.imShape = self.I.shape

def clear_ROIS(self):
self.ROIS = []

def add_ROI(self, pos):
self.ROIS.append(pos)

def show_ROI(self, title, edgecolor, numGT, text, saveDir = None):
fig, ax = plt.subplots(1)
ax.imshow(self.I)
if(not isinstance(edgecolor,list) and len(self.ROIS) > 0):
edgecolor = [edgecolor] * len(self.ROIS)
for i in range(0,numGT):
ROI = self.ROIS[i]
rect = patches.Rectangle((ROI[0], ROI[1]), ROI[2], ROI[3], linewidth = 1, edgecolor = edgecolor[i], facecolor='none')
ax.add_patch(rect)
for i in range(numGT,len(self.ROIS)):
ROI = self.ROIS[i]
rect = patches.Rectangle((ROI[0], ROI[1]), ROI[2], ROI[3], linewidth = 1, edgecolor = edgecolor[i], facecolor='none', linestyle = '--')
ax.add_patch(rect)
if(saveDir is None):
ax.text(15,160,text, fontdict = fontdict, bbox={'facecolor':'yellow', 'edgecolor':'yellow','alpha':0.5, 'pad':2})
else:
ax.text(15, 300, text, fontdict=fontdict,bbox={'facecolor': 'yellow', 'edgecolor': 'yellow', 'alpha': 0.5, 'pad': 2})
plt.title(title)
if(not saveDir is None):
plt.savefig(os.path.join(saveDir, title), dpi = 500)
plt.close()

def close(self):
plt.close()

def IOU(boxAList, boxBList):
Th = 0.69
iou = []
matches = {}
tp = 0
fp = len(boxBList)
missed = len(boxAList)
for i in range(len(boxAList)):
boxA = boxAList[i][:4]
iou_ = []
for j in range(len(boxBList)):
boxB = boxBList[j][:4]
if(not ((boxB[0] <= boxA[0] <= boxB[0] + boxB[2]) or (boxA[0] <= boxB[0] <= boxA[0] + boxA[2]))):
iou_.append(0.0)
continue
xA = max(boxA[0], boxB[0])
yA = max(boxA[1], boxB[1])
xB = min(boxA[0] + boxA[2], boxB[0] + boxB[2])
yB = min(boxA[1] + boxA[3], boxB[1] + boxB[3])
interArea = (xB - xA + 1) * (yB - yA + 1)
boxAArea = (boxA[2] + 1)*(boxA[3] + 1)
boxBArea = (boxB[2] + 1)*(boxB[3] + 1)
iou_.append(interArea / float(boxAArea + boxBArea - interArea))
maxIou = max(iou_)
maxIouIndex = iou_.index(max(iou_))
iou.append(maxIou)
if (maxIouIndex in matches and maxIou > iou[matches[maxIouIndex]]):
if (iou[matches[maxIouIndex]] > Th and boxAList[matches[maxIouIndex]][4] == boxBList[maxIouIndex][4]):
pass
elif(maxIou > Th and boxAList[i][4] == boxBList[maxIouIndex][4]):
tp += 1
missed -= 1
fp -= 1
matches[maxIouIndex] = i
if(not maxIouIndex in matches):
matches[maxIouIndex] = i
if(maxIou > Th and boxAList[i][4] == boxBList[maxIouIndex][4]):
tp += 1
missed -= 1
fp -= 1
return tp, fp, missed, iou

def runTest(annFileNameGT, myAnnFileName, busDir , saveDir = None, elapsed = None, toPlt = False):

image = IMAGE()
objectsColors = {'g':'1', 'y':'2', 'w':'3', 's':'4', 'b':'5', 'r':'6'}
objectsColorsInv = {v: k for k, v in objectsColors.items()}
objectsColorsForShow = {'g':'g', 'y':'y', 'w':'w', 's':'tab:gray', 'b':'b', 'r':'r'}

writtenAnnsLines = {}
annFileEstimations = open(myAnnFileName, 'r')
annFileGT = open(annFileNameGT, 'r')
writtenAnnsLines['Ground_Truth'] = (annFileGT.readlines())
writtenAnnsLines['Estimation'] = (annFileEstimations.readlines())

TP = 0
FP = 0
MISS = 0

for i in range(len(writtenAnnsLines['Ground_Truth'])):

lineGT = writtenAnnsLines['Ground_Truth'][i].replace(' ','')
colors = []
imName = lineGT.split(':')[0]
lineE = [x for x in writtenAnnsLines['Estimation'] if imName == x.split(':')[0]]
if(len(lineE) == 0):
lineE = imName + ':'
else:
lineE = lineE[0]
bus = os.path.join(busDir, imName)
image.set_image(bus)
image.clear_ROIS()
annsGT = lineGT[lineGT.index(':') + 1:].replace('\n', '')
annsE = lineE[lineE.index(':') + 1:].replace('\n', '')
annsGT = ast.literal_eval(annsGT)
if (not isinstance(annsGT, tuple)):
annsGT = [annsGT]
for ann in annsGT:
image.add_ROI(ann[:4])
colorTag = objectsColorsInv[str(ann[4])]
colors.append(objectsColorsForShow[colorTag])
numGT = len(annsGT)
if('[' in lineE):
annsE = ast.literal_eval(annsE)
if (not isinstance(annsE, tuple)):
annsE = [annsE]
for ann in annsE:
image.add_ROI(ann[:4])
colorTag = objectsColorsInv[str(ann[4])]
colors.append(objectsColorsForShow[colorTag])
tp, fp, missed, iou = IOU(annsGT, annsE)
else:
tp = 0
fp = 0
numGT = 0
missed = len(annsGT)
iou = []
TP += tp
FP += fp
MISS += missed
print('Image : {}, TP: {} FP: {} MISSED : {}'.format(imName, tp, fp, missed))
iouStr = ','.join(['{0:.2f}'.format(x) for x in iou])
text = 'IOU Scores : ' + iouStr + '\nTP = {}, FP = {}, Missed = {} '.format(tp, fp, missed)
if toPlt:
image.show_ROI(edgecolor = colors, title = imName, numGT = numGT , text = text, saveDir = saveDir)

if(TP == 0):
F1Score = 0
else:
precision = TP/(TP + FP)
recall = TP/(TP + MISS)
F1Score = 2*(precision * recall)/(precision + recall)
strToWrite = 'Total detections = {}/{}\nTotal False Positives = {}\nTotal missed = {}'.format(TP, TP+MISS, FP, MISS)
strToWrite += '\nF1 SCORE : {0:.3f}'.format(F1Score)
if(not elapsed is None):
strToWrite += '\nTime elapsed : {0:.2f} seconds'.format(elapsed)
print(strToWrite)
if toPlt:
fig, ax = plt.subplots(1)
plt.title('Results', fontdict = {'fontsize':20})
im = np.zeros((10,26,3), dtype=np.uint8)
im[:,:,2] = 221
im[:,:,1] = 114
im[:,:,0] = 102
ax.imshow(im)
ax.text(4,7, strToWrite, style='italic', fontdict = {'fontsize':50, 'weight':'bold'})
mng = plt.get_current_fig_manager()
mng.window.showMaximized()
plt.show()
plt.close()
FIG, ax = plt.subplots(1)
plt.title('Results', fontdict = {'fontsize':20})
ax.imshow(im)
ax.text(2,8, strToWrite, style='italic', fontdict = {'fontsize':20, 'weight':'bold'})
if(saveDir is None):
saveDir = os.path.join(os.getcwd(), 'Output')
if(not os.path.exists(saveDir)):
os.mkdir(saveDir)
plt.savefig(os.path.join(saveDir,'Results.png'), dpi = 600)
return F1Score, precision, recall, TP, FP, MISS
Loading