Spaces:
Running
Running
Commit
·
29520b3
1
Parent(s):
9cf5bb9
update readme
Browse files
README.md
CHANGED
@@ -84,6 +84,8 @@ See [Output Values](#output-values) for more detailed information about the retu
|
|
84 |
|
85 |
Integrate SEA-AI/det-metrics with FiftyOne datasets for enhanced analysis and visualization:
|
86 |
|
|
|
|
|
87 |
```python
|
88 |
import evaluate
|
89 |
import logging
|
@@ -129,6 +131,54 @@ This will output the following dictionary containing metrics for the detection m
|
|
129 |
|
130 |
See [Output Values](#output-values) for more detailed information about the returned results structure, which includes metrics, eval, and params fields for each model passed as input.
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
## Metric Settings
|
134 |
|
|
|
84 |
|
85 |
Integrate SEA-AI/det-metrics with FiftyOne datasets for enhanced analysis and visualization:
|
86 |
|
87 |
+
### Class-agnostic Example
|
88 |
+
|
89 |
```python
|
90 |
import evaluate
|
91 |
import logging
|
|
|
131 |
|
132 |
See [Output Values](#output-values) for more detailed information about the returned results structure, which includes metrics, eval, and params fields for each model passed as input.
|
133 |
|
134 |
+
### Class-specific example
|
135 |
+
```python
|
136 |
+
import evaluate
|
137 |
+
import logging
|
138 |
+
from seametrics.payload.processor import PayloadProcessor
|
139 |
+
|
140 |
+
logging.basicConfig(level=logging.WARNING)
|
141 |
+
|
142 |
+
# Configure your dataset and model details
|
143 |
+
processor = PayloadProcessor(
|
144 |
+
dataset_name="SAILING_DATASET_QA",
|
145 |
+
gt_field="ground_truth_det",
|
146 |
+
models=["yolov5n6_RGB_D2304-v1_9C", "tf1zoo_ssd-mobilenet-v2_agnostic_D2207"],
|
147 |
+
sequence_list=["Trip_14_Seq_1"],
|
148 |
+
data_type="rgb",
|
149 |
+
slices=["rgb"]
|
150 |
+
)
|
151 |
+
|
152 |
+
# Evaluate using SEA-AI/det-metrics
|
153 |
+
module = evaluate.load("SEA-AI/det-metrics", payload=processor.payload, class_agnostic=False)
|
154 |
+
print("Used labels: \n", module.label_mapping)
|
155 |
+
results = module.compute()
|
156 |
+
|
157 |
+
print("Results: \n", results)
|
158 |
+
```
|
159 |
+
|
160 |
+
```json
|
161 |
+
Used labels:
|
162 |
+
{
|
163 |
+
"SHIP": 0,
|
164 |
+
"FISHING_SHIP": 0,
|
165 |
+
"BOAT_WITHOUT_SAILS": 1,
|
166 |
+
...
|
167 |
+
}
|
168 |
+
Results:
|
169 |
+
{
|
170 |
+
"yolov5n6_RGB_D2304-v1_9C": {
|
171 |
+
"metrics": ..., # metrics are arrays instead of single numbers, where the indices represent class 0, 1, etc. from the label mapping
|
172 |
+
"eval": ...,
|
173 |
+
"params": ...
|
174 |
+
},
|
175 |
+
"tf1zoo_ssd-mobilenet-v2_agnostic_D2207": {
|
176 |
+
"metrics": ...,
|
177 |
+
"eval": ...,
|
178 |
+
"params": ...
|
179 |
+
}
|
180 |
+
}
|
181 |
+
```
|
182 |
|
183 |
## Metric Settings
|
184 |
|