From 538398ab2407b12afb13cdb556a4a13eb1bb4da4 Mon Sep 17 00:00:00 2001
From: gospodnetic <petra.gospodnetic@gmail.com>
Date: Sun, 20 Sep 2020 18:24:45 +0200
Subject: [PATCH] Extend readme

---
 Benchmark.py                                  |  2 +-
 Vis.py                                        |  2 +-
 ...pace_exploration_per_approach_methods.json |  5 +-
 readme.md                                     | 85 ++++++++++++++++++-
 vob.py                                        |  1 -
 5 files changed, 90 insertions(+), 5 deletions(-)

diff --git a/Benchmark.py b/Benchmark.py
index 58fd182..efcd025 100644
--- a/Benchmark.py
+++ b/Benchmark.py
@@ -251,7 +251,7 @@ class Benchmark:
                 tex_file.write("\\multirow{{{}}}{{*}}{{\\makecell{{{}}}}}".format(method_count, approach))
 
                 for method in self.methods_per_approach[approach]:
-                    tex_file.write("\n& \makecell{{{}}}".format(method))
+                    tex_file.write("\n& \\makecell{{{}}}".format(method))
 
                     for model in models:
                         try:
diff --git a/Vis.py b/Vis.py
index b352f6a..6b3f2ae 100644
--- a/Vis.py
+++ b/Vis.py
@@ -24,7 +24,7 @@ class Vis:
                 x = np.array(range(len(y)))
                 ax.plot(x, y, c="0.4", alpha=0.2)
 
-            ax.set_xlim(0,45)
+            ax.set_xlim(0,110)
             ax.set_ylim(0,100)
 
             ax.set_xlabel("Number of viewpoints")
diff --git a/object_space_exploration_per_approach_methods.json b/object_space_exploration_per_approach_methods.json
index 322de77..1dc96a8 100644
--- a/object_space_exploration_per_approach_methods.json
+++ b/object_space_exploration_per_approach_methods.json
@@ -19,7 +19,10 @@
         "ExactCurv",
         "ThinPlate",
         "NormalDev",
-        "NoSubdivision"]
+        "NoSubdivision"],
+    "Generate_and_use": [
+        "Generate-and-Use"
+    ]
 }
 
 
diff --git a/readme.md b/readme.md
index d6fa25d..915ba13 100644
--- a/readme.md
+++ b/readme.md
@@ -1,4 +1,87 @@
 #ViewpointOptimizationBenchmark
+Comparison of optimization viewpoint data written in format
+```
+{
+    "Log": {
+        "Camera": {
+            "DistanceMM": float,
+            "FocalLength": float,
+            "Model": string,
+            "PixSizeMM": float,
+            "ResHeight": uint,
+            "ResWidth": uint
+        },
+        "Coverage": {
+            "InTriangles": uint,
+            "Percentage": float
+        },
+        "CoveragePerVP": [float, ..., float],
+        "Duration": {
+            "OptimizationSec": float,
+            "RayTracingSec": float
+        },
+        "Model": {
+            "FaceCount": uint,
+            "Name": string,
+            "VertexCount": uint
+        },
+        "OptimizationType": string,
+        "TimeStamp": string,
+        "TriangleCoveragePerVP": [uint, ..., uint],
+        "VPC": {
+            "Count": uint,
+            "DiscardedCount": uint,
+            "Functional": string,
+            "ListName": string,
+            "Threshold": string
+        },
+        "VPSelectionOrder": [uint, ..., uint]
+    },
+    "OVP": {
+        "Count": uint,
+        "List": [array of viewpoint objects]
+    }
+}
+```
+## Ourputs
+Outputs in `/data` directory:
+* coverage convergence graphs
+* best performance table in LaTex (`performance_table.tex`)
+* best performance table with information about the number of discarded viewpoints in LaTex (`performance_table_discarded.tex`)
+* complete performance table containing all the optimal viewpoint sets
+* average discarded statistic per approach
+* average discarded statistic per method
 
-Example call:
+## Test data available at:
+https://owncloud.fraunhofer.de/index.php/s/H8jV9rwGN84knzP
+
+## Example call
 `python3 vob.py object_space_exploration_per_approach_methods.json ovp_paths.json 2020-08-15`
+
+## Args
+[1] `object_space_exploration_per_approach_methods.json` - list of methods names assigned to corresponding approach
+[2] `ovp_paths.json` - an array of paths to the directory containing the ovp files (not recursive)
+[3] optional string - optional string which will be prepended to the coverage graphs
+
+### `object_space_exploration_per_approach_methods.json` example:
+```
+{
+    "SpaceSampling": [
+        "MixedRepositionedNormal",
+        "NoDisplacement"],
+    "VertexSampling": [
+        "VertexBBoxCenter",
+        "VertexGronle"],
+    "PatchSampling": [
+        "Area",
+        "NoSubdivision"]
+    ]
+}
+```
+
+### `ovp_paths.json` example:
+```
+[
+    "path/to/OVP/directory/"
+]
+```
diff --git a/vob.py b/vob.py
index 52eaf08..7312354 100644
--- a/vob.py
+++ b/vob.py
@@ -67,7 +67,6 @@ def main():
             log = Log(filename)
             logs.append(log)
         except Exception as e:
-            # TODO add verbose
             # print("Error: {}\nSkipping file".format(e))
             continue
 
-- 
GitLab