Skip to content

Commit

Permalink
changing show plot
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelpadilla committed May 28, 2018
1 parent f751787 commit 583a533
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def GetPascalVOCMetrics(self, dictGroundTruth, dictDetected, IOUThreshold=0.5):
ret.append(r)
return ret

def PlotPrecisionRecallCurve(self, classId, dictGroundTruth, dictDetected, IOUThreshold=0.5, showAP=False, showInterpolatedPrecision=False, savePath=None):
def PlotPrecisionRecallCurve(self, classId, dictGroundTruth, dictDetected, IOUThreshold=0.5, showAP=False, showInterpolatedPrecision=False, savePath=None, showGraphic=True):
results = self.GetPascalVOCMetrics(dictGroundTruth, dictDetected, IOUThreshold)

result = None
Expand Down Expand Up @@ -128,8 +128,9 @@ def PlotPrecisionRecallCurve(self, classId, dictGroundTruth, dictDetected, IOUTh
plt.legend(shadow=True)
plt.grid()
if savePath != None:
plt.savefig(savePath)
plt.show()
plt.savefig(savePath)
if showGraphic == True:
plt.show()

ret ={}
ret['class'] = classId
Expand Down

0 comments on commit 583a533

Please sign in to comment.