Spaces:
Running
Running
Updated README.md to include W&B logging changes
Browse files
README.md
CHANGED
@@ -288,6 +288,45 @@ fig.show()
|
|
288 |
|
289 |

|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
|
292 |
## Further References
|
293 |
|
|
|
288 |
|
289 |

|
290 |
|
291 |
+
## W&B logging
|
292 |
+
When you use **module.wandb()**, it is possible to log the detection metrics values for each model in Weights and Bias (W&B). The W&B key is stored as a Secret in this repository.
|
293 |
+
|
294 |
+
### Params
|
295 |
+
- **wandb_project** - Name of the W&B project (Default: `'detection_metrics'`)
|
296 |
+
|
297 |
+
```python
|
298 |
+
import evaluate
|
299 |
+
import logging
|
300 |
+
from seametrics.payload.processor import PayloadProcessor
|
301 |
+
|
302 |
+
logging.basicConfig(level=logging.WARNING)
|
303 |
+
|
304 |
+
# Configure your dataset and model details
|
305 |
+
processor = PayloadProcessor(
|
306 |
+
dataset_name="SAILING_PANOPTIC_DATASET_QA_REVIEWED",
|
307 |
+
gt_field="ground_truth_det",
|
308 |
+
models=["ahoy-b2-IR"],
|
309 |
+
data_type="thermal",
|
310 |
+
slices = ['thermal_right', 'thermal_left', 'thermal_narrow', 'thermal_wide'],
|
311 |
+
)
|
312 |
+
|
313 |
+
AREA_RNGS = [[0, 1e5**2],
|
314 |
+
[0**2, 6**2],
|
315 |
+
[6**2, 12**2],
|
316 |
+
[12**2, 1e5**2]]
|
317 |
+
AREA_NAMES = ["all", "small", "medium", "large"]
|
318 |
+
area_ranges_tuples = list(zip(AREA_NAMES, AREA_RNGS))
|
319 |
+
|
320 |
+
# Evaluate using SEA-AI/det-metrics
|
321 |
+
module = evaluate.load("SEA-AI/det-metrics", payload=processor.payload, area_ranges_tuples=area_ranges_tuples)
|
322 |
+
results = module.compute()
|
323 |
+
|
324 |
+
# Log the results on W&B.
|
325 |
+
module.wandb(results)
|
326 |
+
|
327 |
+
```
|
328 |
+
|
329 |
+

|
330 |
|
331 |
## Further References
|
332 |
|