Commit 8b58ff92 authored by Maria Kleppestø Mcculloch's avatar Maria Kleppestø Mcculloch
Browse files

Update README.md

parent a4d0a006
......@@ -18,7 +18,7 @@ In theory all 3 operations can be run in the same instance, or in three sepearat
`` projectpath = "my/project/path/" ``
### 1. Computing the baseline.
One can use the code present in main.py to compute the baseline.
One can use the code present in main.py to compute the baseline. In order to compute, one have to first init a QualityEvaluator object. Then, one needs to init the ArcFace method, and read in the dataset. One can the run the ccomputeBaselines() methos, which makes sure the Baselines are read in in the object. If one wants to save the baselines to file, one needs to call the saveBasine() mehtod. To do this main, do the following:
#### i. Uncomment the following lines in main.py:
......@@ -40,6 +40,7 @@ One can use the code present in main.py to compute the baseline.
### 2. Compute quality metrics
This can be run as long as there are some baselines (.npy file) in ``data/`` . One does not need to have run computeBaselines() in the same run. In order to compute baselines, one needs to init a QualityEvaluator object, and run Detection_Arcface_init in order to init ArcFace. Then, one needs to call CompureMetric("name", subjectnr, samplenr). If the metric is suported, it will be computed. Then, one needs to call the SaveMetric() if one wants the metric to be read to file. This cane be done using main by doing the following:
#### i. Uncomment the following lines in main.py:
......@@ -68,13 +69,12 @@ One can use the code present in main.py to compute the baseline.
### 3. Plot quality metrics
NB! If the metrics have not been computet (aka there is no data/[name].npy files or data/brisque/[name].csv) this will fail. Make sure the metrics have been computed, either in this or a previous run.
This can be run as long as there are some baselines (.npy file in data/), and some quality scores for the specified metric (.npy file in data/ or .csv file in data/brisque/ ). In order to compute baselines, one needs to init a QualityEvaluator object. Then, one needs to call PlotMetric("Method", "Metric", subnr=[subnr], samnr=[sampnr]). If the metric is suported, it will be plotted. In order to do this in main, do the following:
#### i. Uncomment the following lines in main.py:
``QualEval = QualityEvaluator("ArcFaceCasiaV2", projectpath, imgsdir, "subjectnr/samplenr")``
``QualEval.PlotMetric("EDC", "focus",subnr=params[0], sampnr=params[1])``
......
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