Spaces:
Sleeping
Sleeping
kevinconka
commited on
Commit
·
d705d80
1
Parent(s):
12aa779
fixed documentation
Browse files- 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
|
48 |
-
It is based on a modified version of the commonly used
|
|
|
49 |
"""
|
50 |
|
51 |
|
52 |
_KWARGS_DESCRIPTION = """
|
53 |
-
Calculates object detection metrics given predicted and ground truth bounding boxes for
|
|
|
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 |
-
>>>
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
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 |
|