Victoria Oberascher commited on
Commit
f3b0d73
1 Parent(s): 2662822

remove default values for height and fov

Browse files
Files changed (2) hide show
  1. README.md +7 -1
  2. horizon-metrics.py +5 -4
README.md CHANGED
@@ -33,6 +33,12 @@ To get started with horizon-metrics, make sure you have the necessary dependenci
33
 
34
  This is how you can quickly evaluate your horizon prediction models using SEA-AI/horizon-metrics:
35
 
 
 
 
 
 
 
36
  ##### Use artifical data for testing
37
 
38
  ```python
@@ -78,7 +84,7 @@ prediction_points = [
78
  ```python
79
  import evaluate
80
 
81
- module = evaluate.load("SEA-AI/horizon-metrics", roll_threshold=0.5, pitch_threshold=0.1, vertical_fov_degrees=25.6, height=512)
82
  module.add(predictions=prediction_points, references=ground_truth_points)
83
  module.compute()
84
 
 
33
 
34
  This is how you can quickly evaluate your horizon prediction models using SEA-AI/horizon-metrics:
35
 
36
+ > [!IMPORTANT]
37
+ > The vertical_fov_degrees and heigt parameters are required. The default value for roll_rehsold is 0.5 and for pitch_threshold it is 0.1.
38
+
39
+ > [!IMPORTANT]
40
+ > The horizon metric should be calculated per sequence. Make sure that the vertical_fov and height are consistent across the inputs and do not change.
41
+
42
  ##### Use artifical data for testing
43
 
44
  ```python
 
84
  ```python
85
  import evaluate
86
 
87
+ module = evaluate.load("SEA-AI/horizon-metrics", vertical_fov_degrees=25.6, height=512, roll_threshold=0.5, pitch_threshold=0.1)
88
  module.add(predictions=prediction_points, references=ground_truth_points)
89
  module.compute()
90
 
horizon-metrics.py CHANGED
@@ -66,7 +66,7 @@ Examples:
66
  [[0.0, 0.523573113510805], [1.0, 0.47642688648919496]]]
67
 
68
 
69
- >>> module = evaluate.load("SEA-AI/horizon-metrics", roll_threshold=0.5, pitch_threshold=0.1, vertical_fov_degrees=25.6, height=512)
70
  >>> module.add(predictions=ground_truth_points, references=prediction_points)
71
  >>> module.compute()
72
  >>> {'average_slope_error': 0.014823194839790999,
@@ -87,9 +87,10 @@ class HorizonMetrics(evaluate.Metric):
87
  HorizonMetrics is a metric class that calculates horizon prediction metrics.
88
 
89
  Args:
 
 
90
  roll_threshold (float, optional): Threshold for roll angle. Defaults to 0.5.
91
  pitch_threshold (float, optional): Threshold for pitch angle. Defaults to 0.1.
92
- vertical_fov_degrees (float, optional): Vertical field of view in degrees. Defaults to 25.6.
93
  **kwargs: Additional keyword arguments.
94
 
95
  Attributes:
@@ -109,10 +110,10 @@ class HorizonMetrics(evaluate.Metric):
109
  """
110
 
111
  def __init__(self,
 
 
112
  roll_threshold=0.5,
113
  pitch_threshold=0.1,
114
- vertical_fov_degrees=25.6,
115
- height=512,
116
  **kwargs):
117
 
118
  super().__init__(**kwargs)
 
66
  [[0.0, 0.523573113510805], [1.0, 0.47642688648919496]]]
67
 
68
 
69
+ >>> module = evaluate.load("SEA-AI/horizon-metrics", vertical_fov_degrees=25.6, height=512, roll_threshold=0.5, pitch_threshold=0.1)
70
  >>> module.add(predictions=ground_truth_points, references=prediction_points)
71
  >>> module.compute()
72
  >>> {'average_slope_error': 0.014823194839790999,
 
87
  HorizonMetrics is a metric class that calculates horizon prediction metrics.
88
 
89
  Args:
90
+ vertical_fov_degrees (float): Vertical field of view in degrees.
91
+ height (int): Height of the image.
92
  roll_threshold (float, optional): Threshold for roll angle. Defaults to 0.5.
93
  pitch_threshold (float, optional): Threshold for pitch angle. Defaults to 0.1.
 
94
  **kwargs: Additional keyword arguments.
95
 
96
  Attributes:
 
110
  """
111
 
112
  def __init__(self,
113
+ vertical_fov_degrees,
114
+ height,
115
  roll_threshold=0.5,
116
  pitch_threshold=0.1,
 
 
117
  **kwargs):
118
 
119
  super().__init__(**kwargs)