Spaces:
Sleeping
Sleeping
update add_batch documention
Browse files
README.md
CHANGED
|
@@ -30,31 +30,26 @@ pip install evaluate git+https://github.com/SEA-AI/seametrics@develop
|
|
| 30 |
|
| 31 |
### Basic Usage
|
| 32 |
|
| 33 |
-
Here's how to quickly evaluate your object detection models using SEA-AI/
|
| 34 |
|
| 35 |
```python
|
| 36 |
import evaluate
|
| 37 |
|
| 38 |
# Define your predictions and references (dict values can also by numpy arrays)
|
| 39 |
-
predictions =
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
"scores": [0.153076171875, 0.72314453125],
|
| 44 |
-
}
|
| 45 |
-
]
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
}
|
| 53 |
-
]
|
| 54 |
|
| 55 |
# Load SEA-AI/det-metrics and evaluate
|
| 56 |
module = evaluate.load("SEA-AI/det-metrics")
|
| 57 |
-
module.
|
| 58 |
results = module.compute()
|
| 59 |
|
| 60 |
print(results)
|
|
@@ -62,19 +57,11 @@ print(results)
|
|
| 62 |
|
| 63 |
This will output the evaluation metrics for your detection model.
|
| 64 |
```
|
| 65 |
-
{'
|
| 66 |
-
'
|
| 67 |
-
'
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
'fn': 0,
|
| 71 |
-
'duplicates': 0,
|
| 72 |
-
'precision': 1.0,
|
| 73 |
-
'recall': 1.0,
|
| 74 |
-
'f1': 1.0,
|
| 75 |
-
'support': 2,
|
| 76 |
-
'fpi': 0,
|
| 77 |
-
'nImgs': 1}
|
| 78 |
```
|
| 79 |
|
| 80 |
## FiftyOne Integration
|
|
|
|
| 30 |
|
| 31 |
### Basic Usage
|
| 32 |
|
| 33 |
+
Here's how to quickly evaluate your object detection models using SEA-AI/box-metrics:
|
| 34 |
|
| 35 |
```python
|
| 36 |
import evaluate
|
| 37 |
|
| 38 |
# Define your predictions and references (dict values can also by numpy arrays)
|
| 39 |
+
predictions = {
|
| 40 |
+
"model1": [torch.tensor[n,6], torch.tensor[n,6]],
|
| 41 |
+
"model2": [torch.tensor[n,6], torch.tensor[n,6]]
|
| 42 |
+
}
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
#predictions box format: x1, y1, x2, y2, conf, label (torch metrics format)
|
| 45 |
+
|
| 46 |
+
references = [torch.tensor[n,5], torch.tensor[n,5]]
|
| 47 |
+
|
| 48 |
+
#refernces box format: label, x1, y1, x2, y2 (torch metrics format)
|
|
|
|
|
|
|
| 49 |
|
| 50 |
# Load SEA-AI/det-metrics and evaluate
|
| 51 |
module = evaluate.load("SEA-AI/det-metrics")
|
| 52 |
+
module.add_batch(prediction=predictions, reference=references, sequence_name="sequence")
|
| 53 |
results = module.compute()
|
| 54 |
|
| 55 |
print(results)
|
|
|
|
| 57 |
|
| 58 |
This will output the evaluation metrics for your detection model.
|
| 59 |
```
|
| 60 |
+
{'sequence': {'model1':
|
| 61 |
+
{'iou': '0.6',
|
| 62 |
+
'bep': 0.5,
|
| 63 |
+
...
|
| 64 |
+
}}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
```
|
| 66 |
|
| 67 |
## FiftyOne Integration
|