forked from foreverYoungGitHub/MTCNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_ROC_curve.py
47 lines (33 loc) · 1.07 KB
/
plot_ROC_curve.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import matplotlib.pyplot as plt
listX=[]
listY=[]
listLeg=[]
file = open("/Users/Young/projects/MTCNN/result/FDDB_evaluation/FDDB-folds/tempDiscROC.txt")
with plt.style.context('ggplot'):
plt.figure("DiscRoc")
plt.xlabel("False Positive Per Frame")
plt.ylabel("True Positive Rate")
for point in file:
xy = point.split()
if (float(xy[1]) < 8000):
listX.append(int(xy[1])) # / float(2844))
listY.append(xy[0])
plt.plot(listX,listY)
plt.legend(listLeg, prop={'size': 9})
listY=[]
listX=[]
listLeg=[]
#======================================
file = open("/Users/Young/projects/MTCNN/result/FDDB_evaluation/FDDB-folds/tempContROC.txt")
with plt.style.context('ggplot'):
plt.figure("ContRoc")
plt.xlabel("False Positive Per Frame")
plt.ylabel("True Positive Rate")
for point in file:
xy = point.split()
if (float(xy[1]) < 3000):
listX.append(int(xy[1])) # / float(2844))
listY.append(xy[0])
plt.plot(listX,listY)
plt.legend(listLeg, prop={'size': 10})
plt.show()