Commit 22e34313 authored by Maria Kleppestø Mcculloch's avatar Maria Kleppestø Mcculloch
Browse files

Cleanup temp third party

parent 0c697268
......@@ -11,6 +11,7 @@ import matplotlib.pyplot as mpl
'''
Perform Quality Assesment
Calcualting the Baseline scores:
QualEval = QualityEvaluator("ArcFaceCasiaV2", projectpath, imgsdir, "subjectnr/samplenr")
QualEval.ArcFace_init()
......@@ -41,14 +42,23 @@ Plotting:
#params = [51, 5]
params = [106, 5]
#####################################################
## STEP 0: CHANGE projectpath TO LOCAL PROJECT PATH ##
#####################################################
projectpath = 'C:/Users/maria/Desktop/Skole/Semester2 - Master/Biometrics/TermPaper/imt4126-biometricqualitymetrics/'
imgsdir = 'img/CasiaV2/CasiaSelection/'
###############################
## STEP 1: COMPUTE BASELINES ##
###############################
'''
# Init Evaulator
print("--* Initing Evaulator")
QualEval = QualityEvaluator("ArcFaceCasia_CasiaV2", projectpath, imgsdir, "subjectnr/subjectnr_samplenr")
# "subjectnr/samplenr" = 000001/001.jpg
QualEval = QualityEvaluator("ArcFaceCasiaV2", projectpath, imgsdir, "subjectnr/samplenr")
......@@ -66,10 +76,17 @@ QualEval.ComputeBaselines()
print("--* Saving Baselines")
QualEval.SaveBaslines()
'''
######################################
## STEP 2: COMPUTE METRICS ##
######################################
## NB! REMEMBER TO UNCOMMOENT QualEval initiation ON LINE 63
'''
# Compute metrics
print("--* Detecting Init")
QualEval.Detection_Arcface_init()
......@@ -82,6 +99,16 @@ print("--* Save metric")
QualEval.SaveMetric("sharpness")
QualEval.SaveMetric("focus")
'''
##########################
## STEP 3: PLOT METRICS ##
##########################
## NB! REMEMBER TO UNCOMMOENT QualEval INIT ON LINE 64 AND QualEval.Detection_Arcface() ON LINE 92
'''
print("--* Plotting Metrics")
QualEval.PlotMetric("EDC", "focus",subnr=params[0], sampnr=params[1])
QualEval.PlotMetric("EDC", "sharpness",subnr=params[0], sampnr=params[1])
......@@ -94,4 +121,5 @@ print("DET; Brisque")
QualEval.PlotMetric("DET", "brisque",subnr=params[0], sampnr=params[1], metric_name="data/brisque/quality_values_aug")
QualEval.PlotDETCurve(params[0],params[1])
'''
......@@ -66,6 +66,7 @@ class QualityEvaluator:
return 0
else:
self.app_det = self.app
self.Arcface_detection_inited = True
return 0
'''
......@@ -131,6 +132,7 @@ class QualityEvaluator:
#print(j)
fullpath = projectpath + imgsdir + subjectdir
imgname = '00' + str(j)
imgob = reader.read(fullpath + imgname, imgname, True)
self.img_obs[i-c].append(imgob)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment