kevinconka commited on
Commit
d705d80
·
1 Parent(s): 12aa779

fixed documentation

Browse files
Files changed (1) hide show
  1. det-metrics.py +26 -25
det-metrics.py CHANGED
@@ -44,13 +44,15 @@ year={2014}
44
  """
45
 
46
  _DESCRIPTION = """\
47
- This evaluation metric is designed to give provide object detection metrics at different object size levels.
48
- It is based on a modified version of the commonly used COCO-evaluation metrics.
 
49
  """
50
 
51
 
52
  _KWARGS_DESCRIPTION = """
53
- Calculates object detection metrics given predicted and ground truth bounding boxes for a single image.
 
54
  Args:
55
  predictions: list of predictions for each image. Each prediction should
56
  be a dict containing the following
@@ -86,29 +88,28 @@ Returns:
86
  'nImgs': number of images considered in evaluation
87
  Examples:
88
  >>> import evaluate
89
- >>> from seametrics.payload import PayloadProcessor
90
- >>> payload = PayloadProcessor(...).payload
91
- >>> for model in payload.models:
92
- >>> module = evaluate.load("SEA-AI/det-metrics", ...)
93
- >>> module.add_from_payload(payload)
94
- >>> result = module.compute()
95
- >>> print(result)
96
- {'all': {
97
- 'range': [0, 10000000000.0],
98
- 'iouThr': '0.00',
99
- 'maxDets': 100,
100
- 'tp': 1,
101
- 'fp': 3,
102
- 'fn': 1,
103
- 'duplicates': 0,
104
- 'precision': 0.25,
105
- 'recall': 0.5,
106
- 'f1': 0.3333333333333333,
107
- 'support': 2,
108
- 'fpi': 0,
109
- 'nImgs': 2
110
- }
111
  }
 
112
  """
113
 
114
 
 
44
  """
45
 
46
  _DESCRIPTION = """\
47
+ This evaluation metric is designed to give provide object detection metrics at
48
+ different object size levels. It is based on a modified version of the commonly used
49
+ COCO-evaluation metrics.
50
  """
51
 
52
 
53
  _KWARGS_DESCRIPTION = """
54
+ Calculates object detection metrics given predicted and ground truth bounding boxes for
55
+ a single image.
56
  Args:
57
  predictions: list of predictions for each image. Each prediction should
58
  be a dict containing the following
 
88
  'nImgs': number of images considered in evaluation
89
  Examples:
90
  >>> import evaluate
91
+ >>> from seametrics.payload.processor import PayloadProcessor
92
+ >>> payload = PayloadProcessor(...).payload
93
+ >>> module = evaluate.load("SEA-AI/det-metrics", ...)
94
+ >>> module.add_payload(payload)
95
+ >>> result = module.compute()
96
+ >>> print(result)
97
+ {'all': {
98
+ 'range': [0, 10000000000.0],
99
+ 'iouThr': '0.00',
100
+ 'maxDets': 100,
101
+ 'tp': 1,
102
+ 'fp': 3,
103
+ 'fn': 1,
104
+ 'duplicates': 0,
105
+ 'precision': 0.25,
106
+ 'recall': 0.5,
107
+ 'f1': 0.3333333333333333,
108
+ 'support': 2,
109
+ 'fpi': 0,
110
+ 'nImgs': 2
 
 
111
  }
112
+ }
113
  """
114
 
115