valor-lite 0.33.13__tar.gz → 0.33.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of valor-lite might be problematic. Click here for more details.

Files changed (93) hide show
  1. {valor_lite-0.33.13/valor_lite.egg-info → valor_lite-0.33.15}/PKG-INFO +1 -1
  2. {valor_lite-0.33.13 → valor_lite-0.33.15}/benchmarks/benchmark_classification.py +1 -1
  3. {valor_lite-0.33.13 → valor_lite-0.33.15}/examples/object-detection.ipynb +95 -91
  4. valor_lite-0.33.15/examples/tabular_classification.ipynb +633 -0
  5. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_accuracy.py +30 -22
  6. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_confusion_matrix.py +44 -15
  7. valor_lite-0.33.15/tests/classification/test_counts.py +1318 -0
  8. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_evaluator.py +4 -3
  9. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_f1.py +122 -38
  10. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_filtering.py +60 -60
  11. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_precision.py +122 -38
  12. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_recall.py +55 -38
  13. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_rocauc.py +17 -15
  14. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_accuracy.py +11 -20
  15. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_average_precision.py +31 -33
  16. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_average_recall.py +25 -21
  17. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_confusion_matrix.py +43 -11
  18. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_counts.py +8 -16
  19. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_evaluator.py +9 -3
  20. valor_lite-0.33.15/tests/object_detection/test_f1.py +470 -0
  21. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_pr_curve.py +5 -4
  22. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_precision.py +46 -16
  23. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_recall.py +46 -16
  24. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_accuracy.py +10 -7
  25. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_confusion_matrix.py +4 -4
  26. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_evaluator.py +4 -4
  27. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_f1.py +16 -16
  28. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_iou.py +29 -30
  29. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_precision.py +16 -16
  30. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_recall.py +16 -16
  31. valor_lite-0.33.15/valor_lite/classification/__init__.py +17 -0
  32. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/classification/computation.py +2 -2
  33. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/classification/manager.py +32 -244
  34. valor_lite-0.33.15/valor_lite/classification/metric.py +385 -0
  35. valor_lite-0.33.15/valor_lite/classification/utilities.py +222 -0
  36. valor_lite-0.33.15/valor_lite/object_detection/__init__.py +28 -0
  37. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/object_detection/computation.py +25 -22
  38. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/object_detection/manager.py +38 -497
  39. valor_lite-0.33.15/valor_lite/object_detection/metric.py +735 -0
  40. valor_lite-0.33.15/valor_lite/object_detection/utilities.py +505 -0
  41. valor_lite-0.33.15/valor_lite/schemas.py +17 -0
  42. valor_lite-0.33.15/valor_lite/semantic_segmentation/__init__.py +12 -0
  43. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/semantic_segmentation/computation.py +1 -1
  44. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/semantic_segmentation/manager.py +13 -116
  45. valor_lite-0.33.15/valor_lite/semantic_segmentation/metric.py +255 -0
  46. valor_lite-0.33.15/valor_lite/semantic_segmentation/utilities.py +104 -0
  47. {valor_lite-0.33.13 → valor_lite-0.33.15/valor_lite.egg-info}/PKG-INFO +1 -1
  48. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite.egg-info/SOURCES.txt +4 -0
  49. valor_lite-0.33.13/examples/tabular_classification.ipynb +0 -618
  50. valor_lite-0.33.13/tests/classification/test_counts.py +0 -761
  51. valor_lite-0.33.13/valor_lite/classification/__init__.py +0 -30
  52. valor_lite-0.33.13/valor_lite/classification/metric.py +0 -426
  53. valor_lite-0.33.13/valor_lite/object_detection/__init__.py +0 -59
  54. valor_lite-0.33.13/valor_lite/object_detection/metric.py +0 -808
  55. valor_lite-0.33.13/valor_lite/schemas.py +0 -15
  56. valor_lite-0.33.13/valor_lite/semantic_segmentation/__init__.py +0 -27
  57. valor_lite-0.33.13/valor_lite/semantic_segmentation/metric.py +0 -278
  58. {valor_lite-0.33.13 → valor_lite-0.33.15}/LICENSE +0 -0
  59. {valor_lite-0.33.13 → valor_lite-0.33.15}/README.md +0 -0
  60. {valor_lite-0.33.13 → valor_lite-0.33.15}/benchmarks/.gitignore +0 -0
  61. {valor_lite-0.33.13 → valor_lite-0.33.15}/benchmarks/benchmark_objdet.py +0 -0
  62. {valor_lite-0.33.13 → valor_lite-0.33.15}/examples/.gitignore +0 -0
  63. {valor_lite-0.33.13 → valor_lite-0.33.15}/pyproject.toml +0 -0
  64. {valor_lite-0.33.13 → valor_lite-0.33.15}/setup.cfg +0 -0
  65. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/__init__.py +0 -0
  66. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/__init__.py +0 -0
  67. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/conftest.py +0 -0
  68. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_dataloader.py +0 -0
  69. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_schemas.py +0 -0
  70. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/classification/test_stability.py +0 -0
  71. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/__init__.py +0 -0
  72. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/conftest.py +0 -0
  73. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_dataloader.py +0 -0
  74. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_filtering.py +0 -0
  75. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_iou.py +0 -0
  76. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_schemas.py +0 -0
  77. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/object_detection/test_stability.py +0 -0
  78. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/__init__.py +0 -0
  79. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/conftest.py +0 -0
  80. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_annotation.py +0 -0
  81. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_dataloader.py +0 -0
  82. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_filtering.py +0 -0
  83. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/semantic_segmentation/test_stability.py +0 -0
  84. {valor_lite-0.33.13 → valor_lite-0.33.15}/tests/text_generation/__init__.py +0 -0
  85. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/LICENSE +0 -0
  86. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/__init__.py +0 -0
  87. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/classification/annotation.py +0 -0
  88. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/object_detection/annotation.py +0 -0
  89. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/semantic_segmentation/annotation.py +0 -0
  90. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite/text_generation/__init__.py +0 -0
  91. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite.egg-info/dependency_links.txt +0 -0
  92. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite.egg-info/requires.txt +0 -0
  93. {valor_lite-0.33.13 → valor_lite-0.33.15}/valor_lite.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: valor-lite
3
- Version: 0.33.13
3
+ Version: 0.33.15
4
4
  Summary: Compute valor metrics locally.
5
5
  License: MIT License
6
6
 
@@ -211,7 +211,7 @@ def run_benchmarking_analysis(
211
211
  )
212
212
 
213
213
  # evaluate
214
- eval_time, _ = time_it(evaluator.compute_precision_recall)()
214
+ eval_time, _ = time_it(evaluator.compute_precision_recall_rocauc)()
215
215
  if eval_time > evaluation_timeout and evaluation_timeout != -1:
216
216
  raise TimeoutError(
217
217
  f"Base evaluation timed out with {evaluator.n_datums} datums."
@@ -234,7 +234,7 @@
234
234
  "name": "stderr",
235
235
  "output_type": "stream",
236
236
  "text": [
237
- "100%|██████████| 5000/5000 [00:01<00:00, 3682.79it/s]\n"
237
+ "100%|██████████| 5000/5000 [00:00<00:00, 8122.07it/s]\n"
238
238
  ]
239
239
  }
240
240
  ],
@@ -321,86 +321,86 @@
321
321
  {
322
322
  "data": {
323
323
  "text/plain": [
324
- "[AP(value=0.03931711480949181, iou_threshold=0.25, label='person'),\n",
325
- " AP(value=0.00574667500702136, iou_threshold=0.25, label='chair'),\n",
326
- " AP(value=0.012869301715994604, iou_threshold=0.25, label='potted plant'),\n",
327
- " AP(value=0.12468056653228336, iou_threshold=0.25, label='dining table'),\n",
328
- " AP(value=0.025555256805287804, iou_threshold=0.25, label='tv'),\n",
329
- " AP(value=0.0873892652423137, iou_threshold=0.25, label='microwave'),\n",
330
- " AP(value=0.07156154587928347, iou_threshold=0.25, label='refrigerator'),\n",
331
- " AP(value=0.0, iou_threshold=0.25, label='book'),\n",
332
- " AP(value=0.017410438586802798, iou_threshold=0.25, label='clock'),\n",
333
- " AP(value=0.01582175783225678, iou_threshold=0.25, label='vase'),\n",
334
- " AP(value=0.231753782860388, iou_threshold=0.25, label='bear'),\n",
335
- " AP(value=0.23569425610798753, iou_threshold=0.25, label='bed'),\n",
336
- " AP(value=0.000695619913279384, iou_threshold=0.25, label='bottle'),\n",
337
- " AP(value=0.002421632122336015, iou_threshold=0.25, label='car'),\n",
338
- " AP(value=0.059802019119639865, iou_threshold=0.25, label='truck'),\n",
339
- " AP(value=0.12696681676449215, iou_threshold=0.25, label='stop sign'),\n",
340
- " AP(value=0.14102282165570407, iou_threshold=0.25, label='teddy bear'),\n",
341
- " AP(value=0.0007519739315703722, iou_threshold=0.25, label='skis'),\n",
342
- " AP(value=0.027301028578575685, iou_threshold=0.25, label='oven'),\n",
343
- " AP(value=0.0007072135785007071, iou_threshold=0.25, label='sports ball'),\n",
344
- " AP(value=0.014991066775850518, iou_threshold=0.25, label='baseball glove'),\n",
345
- " AP(value=0.012910114540865852, iou_threshold=0.25, label='tennis racket'),\n",
346
- " AP(value=0.002605523710265763, iou_threshold=0.25, label='backpack'),\n",
347
- " AP(value=0.0012280297797221582, iou_threshold=0.25, label='handbag'),\n",
348
- " AP(value=0.014437478085599116, iou_threshold=0.25, label='boat'),\n",
349
- " AP(value=0.02472893969494828, iou_threshold=0.25, label='bird'),\n",
350
- " AP(value=0.0173023682386164, iou_threshold=0.25, label='cell phone'),\n",
351
- " AP(value=0.21514217763688503, iou_threshold=0.25, label='train'),\n",
352
- " AP(value=0.039401614478727934, iou_threshold=0.25, label='bowl'),\n",
353
- " AP(value=0.09553809158302397, iou_threshold=0.25, label='sandwich'),\n",
354
- " AP(value=0.008772195312241687, iou_threshold=0.25, label='cup'),\n",
355
- " AP(value=0.003529433618784017, iou_threshold=0.25, label='surfboard'),\n",
356
- " AP(value=0.057312433796814985, iou_threshold=0.25, label='laptop'),\n",
357
- " AP(value=0.003592328379843429, iou_threshold=0.25, label='mouse'),\n",
358
- " AP(value=0.007705426769738388, iou_threshold=0.25, label='keyboard'),\n",
359
- " AP(value=0.0015763816845228704, iou_threshold=0.25, label='traffic light'),\n",
360
- " AP(value=0.14803132929413712, iou_threshold=0.25, label='bus'),\n",
361
- " AP(value=0.2706385426934155, iou_threshold=0.25, label='cat'),\n",
362
- " AP(value=0.06197253140976744, iou_threshold=0.25, label='airplane'),\n",
363
- " AP(value=0.11098807002863581, iou_threshold=0.25, label='zebra'),\n",
364
- " AP(value=0.000456968773800457, iou_threshold=0.25, label='tie'),\n",
365
- " AP(value=0.01789546873590162, iou_threshold=0.25, label='apple'),\n",
366
- " AP(value=0.00497941318169436, iou_threshold=0.25, label='baseball bat'),\n",
367
- " AP(value=0.008054041938151662, iou_threshold=0.25, label='wine glass'),\n",
368
- " AP(value=0.0013656538067599864, iou_threshold=0.25, label='knife'),\n",
369
- " AP(value=0.034283643667397244, iou_threshold=0.25, label='cake'),\n",
370
- " AP(value=0.0010068803490518544, iou_threshold=0.25, label='spoon'),\n",
371
- " AP(value=0.005547968589962444, iou_threshold=0.25, label='snowboard'),\n",
372
- " AP(value=0.03775782935785413, iou_threshold=0.25, label='banana'),\n",
373
- " AP(value=0.06007451642097835, iou_threshold=0.25, label='donut'),\n",
374
- " AP(value=0.04456774994898758, iou_threshold=0.25, label='toilet'),\n",
375
- " AP(value=0.006179001878088361, iou_threshold=0.25, label='sink'),\n",
376
- " AP(value=0.03680123352285498, iou_threshold=0.25, label='broccoli'),\n",
377
- " AP(value=0.014936047541778902, iou_threshold=0.25, label='skateboard'),\n",
378
- " AP(value=0.022694552738821507, iou_threshold=0.25, label='bench'),\n",
379
- " AP(value=0.002867675716650755, iou_threshold=0.25, label='fork'),\n",
380
- " AP(value=0.0080174142984774, iou_threshold=0.25, label='carrot'),\n",
381
- " AP(value=0.04041483896880335, iou_threshold=0.25, label='couch'),\n",
382
- " AP(value=0.0007135848720007136, iou_threshold=0.25, label='remote'),\n",
383
- " AP(value=0.02584120622988414, iou_threshold=0.25, label='bicycle'),\n",
384
- " AP(value=0.06534653465346534, iou_threshold=0.25, label='scissors'),\n",
385
- " AP(value=0.046674509472276055, iou_threshold=0.25, label='orange'),\n",
386
- " AP(value=0.023613502704789624, iou_threshold=0.25, label='sheep'),\n",
387
- " AP(value=0.14258072068496863, iou_threshold=0.25, label='elephant'),\n",
388
- " AP(value=0.013407926158469507, iou_threshold=0.25, label='frisbee'),\n",
389
- " AP(value=0.04803841606991949, iou_threshold=0.25, label='umbrella'),\n",
390
- " AP(value=0.10212714134235075, iou_threshold=0.25, label='horse'),\n",
391
- " AP(value=0.09399604539879332, iou_threshold=0.25, label='motorcycle'),\n",
392
- " AP(value=0.1316711323706997, iou_threshold=0.25, label='dog'),\n",
393
- " AP(value=0.016052361400942596, iou_threshold=0.25, label='kite'),\n",
394
- " AP(value=0.13853737273699804, iou_threshold=0.25, label='pizza'),\n",
395
- " AP(value=0.03162000973589944, iou_threshold=0.25, label='cow'),\n",
396
- " AP(value=0.0702284791057795, iou_threshold=0.25, label='fire hydrant'),\n",
397
- " AP(value=0.04231869341571282, iou_threshold=0.25, label='suitcase'),\n",
398
- " AP(value=0.16491634254279497, iou_threshold=0.25, label='giraffe'),\n",
399
- " AP(value=0.048692537906881606, iou_threshold=0.25, label='hot dog'),\n",
400
- " AP(value=0.02254763291455196, iou_threshold=0.25, label='parking meter'),\n",
401
- " AP(value=0.0, iou_threshold=0.25, label='toothbrush'),\n",
402
- " AP(value=0.0, iou_threshold=0.25, label='toaster'),\n",
403
- " AP(value=0.0, iou_threshold=0.25, label='hair drier')]"
324
+ "[Metric(type='AP', value=0.03931711480949181, parameters={'iou_threshold': 0.25, 'label': 'person'}),\n",
325
+ " Metric(type='AP', value=0.00574667500702136, parameters={'iou_threshold': 0.25, 'label': 'chair'}),\n",
326
+ " Metric(type='AP', value=0.012869301715994604, parameters={'iou_threshold': 0.25, 'label': 'potted plant'}),\n",
327
+ " Metric(type='AP', value=0.12468056653228336, parameters={'iou_threshold': 0.25, 'label': 'dining table'}),\n",
328
+ " Metric(type='AP', value=0.025555256805287804, parameters={'iou_threshold': 0.25, 'label': 'tv'}),\n",
329
+ " Metric(type='AP', value=0.0873892652423137, parameters={'iou_threshold': 0.25, 'label': 'microwave'}),\n",
330
+ " Metric(type='AP', value=0.07156154587928347, parameters={'iou_threshold': 0.25, 'label': 'refrigerator'}),\n",
331
+ " Metric(type='AP', value=0.0, parameters={'iou_threshold': 0.25, 'label': 'book'}),\n",
332
+ " Metric(type='AP', value=0.017410438586802798, parameters={'iou_threshold': 0.25, 'label': 'clock'}),\n",
333
+ " Metric(type='AP', value=0.01582175783225678, parameters={'iou_threshold': 0.25, 'label': 'vase'}),\n",
334
+ " Metric(type='AP', value=0.231753782860388, parameters={'iou_threshold': 0.25, 'label': 'bear'}),\n",
335
+ " Metric(type='AP', value=0.23569425610798753, parameters={'iou_threshold': 0.25, 'label': 'bed'}),\n",
336
+ " Metric(type='AP', value=0.000695619913279384, parameters={'iou_threshold': 0.25, 'label': 'bottle'}),\n",
337
+ " Metric(type='AP', value=0.002421632122336015, parameters={'iou_threshold': 0.25, 'label': 'car'}),\n",
338
+ " Metric(type='AP', value=0.059802019119639865, parameters={'iou_threshold': 0.25, 'label': 'truck'}),\n",
339
+ " Metric(type='AP', value=0.12696681676449215, parameters={'iou_threshold': 0.25, 'label': 'stop sign'}),\n",
340
+ " Metric(type='AP', value=0.14102282165570407, parameters={'iou_threshold': 0.25, 'label': 'teddy bear'}),\n",
341
+ " Metric(type='AP', value=0.0007519739315703722, parameters={'iou_threshold': 0.25, 'label': 'skis'}),\n",
342
+ " Metric(type='AP', value=0.027301028578575685, parameters={'iou_threshold': 0.25, 'label': 'oven'}),\n",
343
+ " Metric(type='AP', value=0.0007072135785007071, parameters={'iou_threshold': 0.25, 'label': 'sports ball'}),\n",
344
+ " Metric(type='AP', value=0.014991066775850518, parameters={'iou_threshold': 0.25, 'label': 'baseball glove'}),\n",
345
+ " Metric(type='AP', value=0.012910114540865852, parameters={'iou_threshold': 0.25, 'label': 'tennis racket'}),\n",
346
+ " Metric(type='AP', value=0.002605523710265763, parameters={'iou_threshold': 0.25, 'label': 'backpack'}),\n",
347
+ " Metric(type='AP', value=0.0012280297797221582, parameters={'iou_threshold': 0.25, 'label': 'handbag'}),\n",
348
+ " Metric(type='AP', value=0.014437478085599116, parameters={'iou_threshold': 0.25, 'label': 'boat'}),\n",
349
+ " Metric(type='AP', value=0.02472893969494828, parameters={'iou_threshold': 0.25, 'label': 'bird'}),\n",
350
+ " Metric(type='AP', value=0.0173023682386164, parameters={'iou_threshold': 0.25, 'label': 'cell phone'}),\n",
351
+ " Metric(type='AP', value=0.21514217763688503, parameters={'iou_threshold': 0.25, 'label': 'train'}),\n",
352
+ " Metric(type='AP', value=0.039401614478727934, parameters={'iou_threshold': 0.25, 'label': 'bowl'}),\n",
353
+ " Metric(type='AP', value=0.09553809158302397, parameters={'iou_threshold': 0.25, 'label': 'sandwich'}),\n",
354
+ " Metric(type='AP', value=0.008772195312241687, parameters={'iou_threshold': 0.25, 'label': 'cup'}),\n",
355
+ " Metric(type='AP', value=0.003529433618784017, parameters={'iou_threshold': 0.25, 'label': 'surfboard'}),\n",
356
+ " Metric(type='AP', value=0.057312433796814985, parameters={'iou_threshold': 0.25, 'label': 'laptop'}),\n",
357
+ " Metric(type='AP', value=0.003592328379843429, parameters={'iou_threshold': 0.25, 'label': 'mouse'}),\n",
358
+ " Metric(type='AP', value=0.007705426769738388, parameters={'iou_threshold': 0.25, 'label': 'keyboard'}),\n",
359
+ " Metric(type='AP', value=0.0015763816845228704, parameters={'iou_threshold': 0.25, 'label': 'traffic light'}),\n",
360
+ " Metric(type='AP', value=0.14803132929413712, parameters={'iou_threshold': 0.25, 'label': 'bus'}),\n",
361
+ " Metric(type='AP', value=0.2706385426934155, parameters={'iou_threshold': 0.25, 'label': 'cat'}),\n",
362
+ " Metric(type='AP', value=0.06197253140976744, parameters={'iou_threshold': 0.25, 'label': 'airplane'}),\n",
363
+ " Metric(type='AP', value=0.11098807002863581, parameters={'iou_threshold': 0.25, 'label': 'zebra'}),\n",
364
+ " Metric(type='AP', value=0.000456968773800457, parameters={'iou_threshold': 0.25, 'label': 'tie'}),\n",
365
+ " Metric(type='AP', value=0.01789546873590162, parameters={'iou_threshold': 0.25, 'label': 'apple'}),\n",
366
+ " Metric(type='AP', value=0.00497941318169436, parameters={'iou_threshold': 0.25, 'label': 'baseball bat'}),\n",
367
+ " Metric(type='AP', value=0.008054041938151662, parameters={'iou_threshold': 0.25, 'label': 'wine glass'}),\n",
368
+ " Metric(type='AP', value=0.0013656538067599864, parameters={'iou_threshold': 0.25, 'label': 'knife'}),\n",
369
+ " Metric(type='AP', value=0.034283643667397244, parameters={'iou_threshold': 0.25, 'label': 'cake'}),\n",
370
+ " Metric(type='AP', value=0.0010068803490518544, parameters={'iou_threshold': 0.25, 'label': 'spoon'}),\n",
371
+ " Metric(type='AP', value=0.005547968589962444, parameters={'iou_threshold': 0.25, 'label': 'snowboard'}),\n",
372
+ " Metric(type='AP', value=0.03775782935785413, parameters={'iou_threshold': 0.25, 'label': 'banana'}),\n",
373
+ " Metric(type='AP', value=0.06007451642097835, parameters={'iou_threshold': 0.25, 'label': 'donut'}),\n",
374
+ " Metric(type='AP', value=0.04456774994898758, parameters={'iou_threshold': 0.25, 'label': 'toilet'}),\n",
375
+ " Metric(type='AP', value=0.006179001878088361, parameters={'iou_threshold': 0.25, 'label': 'sink'}),\n",
376
+ " Metric(type='AP', value=0.03680123352285498, parameters={'iou_threshold': 0.25, 'label': 'broccoli'}),\n",
377
+ " Metric(type='AP', value=0.014936047541778902, parameters={'iou_threshold': 0.25, 'label': 'skateboard'}),\n",
378
+ " Metric(type='AP', value=0.022694552738821507, parameters={'iou_threshold': 0.25, 'label': 'bench'}),\n",
379
+ " Metric(type='AP', value=0.002867675716650755, parameters={'iou_threshold': 0.25, 'label': 'fork'}),\n",
380
+ " Metric(type='AP', value=0.0080174142984774, parameters={'iou_threshold': 0.25, 'label': 'carrot'}),\n",
381
+ " Metric(type='AP', value=0.04041483896880335, parameters={'iou_threshold': 0.25, 'label': 'couch'}),\n",
382
+ " Metric(type='AP', value=0.0007135848720007136, parameters={'iou_threshold': 0.25, 'label': 'remote'}),\n",
383
+ " Metric(type='AP', value=0.02584120622988414, parameters={'iou_threshold': 0.25, 'label': 'bicycle'}),\n",
384
+ " Metric(type='AP', value=0.06534653465346534, parameters={'iou_threshold': 0.25, 'label': 'scissors'}),\n",
385
+ " Metric(type='AP', value=0.046674509472276055, parameters={'iou_threshold': 0.25, 'label': 'orange'}),\n",
386
+ " Metric(type='AP', value=0.023613502704789624, parameters={'iou_threshold': 0.25, 'label': 'sheep'}),\n",
387
+ " Metric(type='AP', value=0.14258072068496863, parameters={'iou_threshold': 0.25, 'label': 'elephant'}),\n",
388
+ " Metric(type='AP', value=0.013407926158469507, parameters={'iou_threshold': 0.25, 'label': 'frisbee'}),\n",
389
+ " Metric(type='AP', value=0.04803841606991949, parameters={'iou_threshold': 0.25, 'label': 'umbrella'}),\n",
390
+ " Metric(type='AP', value=0.10212714134235075, parameters={'iou_threshold': 0.25, 'label': 'horse'}),\n",
391
+ " Metric(type='AP', value=0.09399604539879332, parameters={'iou_threshold': 0.25, 'label': 'motorcycle'}),\n",
392
+ " Metric(type='AP', value=0.1316711323706997, parameters={'iou_threshold': 0.25, 'label': 'dog'}),\n",
393
+ " Metric(type='AP', value=0.016052361400942596, parameters={'iou_threshold': 0.25, 'label': 'kite'}),\n",
394
+ " Metric(type='AP', value=0.13853737273699804, parameters={'iou_threshold': 0.25, 'label': 'pizza'}),\n",
395
+ " Metric(type='AP', value=0.03162000973589944, parameters={'iou_threshold': 0.25, 'label': 'cow'}),\n",
396
+ " Metric(type='AP', value=0.0702284791057795, parameters={'iou_threshold': 0.25, 'label': 'fire hydrant'}),\n",
397
+ " Metric(type='AP', value=0.04231869341571282, parameters={'iou_threshold': 0.25, 'label': 'suitcase'}),\n",
398
+ " Metric(type='AP', value=0.16491634254279497, parameters={'iou_threshold': 0.25, 'label': 'giraffe'}),\n",
399
+ " Metric(type='AP', value=0.048692537906881606, parameters={'iou_threshold': 0.25, 'label': 'hot dog'}),\n",
400
+ " Metric(type='AP', value=0.02254763291455196, parameters={'iou_threshold': 0.25, 'label': 'parking meter'}),\n",
401
+ " Metric(type='AP', value=0.0, parameters={'iou_threshold': 0.25, 'label': 'toothbrush'}),\n",
402
+ " Metric(type='AP', value=0.0, parameters={'iou_threshold': 0.25, 'label': 'toaster'}),\n",
403
+ " Metric(type='AP', value=0.0, parameters={'iou_threshold': 0.25, 'label': 'hair drier'})]"
404
404
  ]
405
405
  },
406
406
  "execution_count": 7,
@@ -430,7 +430,7 @@
430
430
  {
431
431
  "data": {
432
432
  "text/plain": [
433
- "[mAP(value=0.049578458401377326, iou_threshold=0.25)]"
433
+ "[Metric(type='mAP', value=0.049578458401377326, parameters={'iou_threshold': 0.25})]"
434
434
  ]
435
435
  },
436
436
  "execution_count": 8,
@@ -473,7 +473,11 @@
473
473
  "plt.figure()\n",
474
474
  "recall = [x / 100 for x in range(0,101)]\n",
475
475
  "for curve in metrics[MetricType.PrecisionRecallCurve]:\n",
476
- " plt.plot(recall, curve.precisions, label=curve.label)\n",
476
+ " plt.plot(\n",
477
+ " recall, \n",
478
+ " curve.value[\"precisions\"],\n",
479
+ " label=curve.parameters[\"label\"],\n",
480
+ " )\n",
477
481
  "plt.title(\"Precision-Recall Curve\")\n",
478
482
  "plt.legend(prop={'size': 6})\n",
479
483
  "plt.show()"
@@ -481,7 +485,7 @@
481
485
  },
482
486
  {
483
487
  "cell_type": "code",
484
- "execution_count": 15,
488
+ "execution_count": 10,
485
489
  "id": "c4877536",
486
490
  "metadata": {},
487
491
  "outputs": [
@@ -503,7 +507,7 @@
503
507
  "plt.figure()\n",
504
508
  "recall = [x / 100 for x in range(0,101)]\n",
505
509
  "for curve in metrics[MetricType.PrecisionRecallCurve]:\n",
506
- " plt.plot(recall, curve.scores, label=curve.label)\n",
510
+ " plt.plot(recall, curve.value[\"scores\"], label=curve.parameters[\"label\"])\n",
507
511
  "plt.title(\"Score-Recall Curve\")\n",
508
512
  "plt.legend(prop={'size': 6})\n",
509
513
  "plt.show()"
@@ -554,7 +558,7 @@
554
558
  ")[MetricType.ConfusionMatrix]\n",
555
559
  "metric = matrices[0]\n",
556
560
  "\n",
557
- "metric.confusion_matrix[\"person\"][\"person\"][\"examples\"]"
561
+ "metric.value[\"confusion_matrix\"][\"person\"][\"person\"][\"examples\"]"
558
562
  ]
559
563
  },
560
564
  {
@@ -941,10 +945,10 @@
941
945
  "source": [
942
946
  "cm = {\n",
943
947
  " gt: {\n",
944
- " pd: metric.confusion_matrix[gt][pd][\"count\"]\n",
945
- " for pd in metric.confusion_matrix[gt]\n",
948
+ " pd: metric.value[\"confusion_matrix\"][gt][pd][\"count\"]\n",
949
+ " for pd in metric.value[\"confusion_matrix\"][gt]\n",
946
950
  " }\n",
947
- " for gt in metric.confusion_matrix\n",
951
+ " for gt in metric.value[\"confusion_matrix\"]\n",
948
952
  "}\n",
949
953
  "pd.DataFrame(cm)"
950
954
  ]
@@ -1760,7 +1764,7 @@
1760
1764
  }
1761
1765
  ],
1762
1766
  "source": [
1763
- "metric.hallucinations"
1767
+ "metric.value[\"hallucinations\"]"
1764
1768
  ]
1765
1769
  },
1766
1770
  {
@@ -2991,7 +2995,7 @@
2991
2995
  }
2992
2996
  ],
2993
2997
  "source": [
2994
- "metric.missing_predictions"
2998
+ "metric.value[\"missing_predictions\"]"
2995
2999
  ]
2996
3000
  }
2997
3001
  ],