valor-lite 0.33.3__py3-none-any.whl → 0.33.5__py3-none-any.whl
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.
- valor_lite/detection/__init__.py +12 -7
- valor_lite/detection/annotation.py +34 -2
- valor_lite/detection/computation.py +285 -164
- valor_lite/detection/manager.py +693 -202
- valor_lite/detection/metric.py +60 -34
- {valor_lite-0.33.3.dist-info → valor_lite-0.33.5.dist-info}/METADATA +2 -1
- valor_lite-0.33.5.dist-info/RECORD +12 -0
- valor_lite-0.33.3.dist-info/RECORD +0 -12
- {valor_lite-0.33.3.dist-info → valor_lite-0.33.5.dist-info}/LICENSE +0 -0
- {valor_lite-0.33.3.dist-info → valor_lite-0.33.5.dist-info}/WHEEL +0 -0
- {valor_lite-0.33.3.dist-info → valor_lite-0.33.5.dist-info}/top_level.txt +0 -0
valor_lite/detection/metric.py
CHANGED
|
@@ -19,7 +19,7 @@ class MetricType(str, Enum):
|
|
|
19
19
|
ARAveragedOverScores = "ARAveragedOverScores"
|
|
20
20
|
mARAveragedOverScores = "mARAveragedOverScores"
|
|
21
21
|
PrecisionRecallCurve = "PrecisionRecallCurve"
|
|
22
|
-
|
|
22
|
+
ConfusionMatrix = "ConfusionMatrix"
|
|
23
23
|
|
|
24
24
|
@classmethod
|
|
25
25
|
def base_metrics(cls):
|
|
@@ -329,52 +329,78 @@ class PrecisionRecallCurve:
|
|
|
329
329
|
|
|
330
330
|
|
|
331
331
|
@dataclass
|
|
332
|
-
class
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
332
|
+
class ConfusionMatrix:
|
|
333
|
+
confusion_matrix: dict[
|
|
334
|
+
str, # ground truth label value
|
|
335
|
+
dict[
|
|
336
|
+
str, # prediction label value
|
|
337
|
+
dict[
|
|
338
|
+
str, # either `count` or `examples`
|
|
339
|
+
int
|
|
340
|
+
| list[
|
|
341
|
+
dict[
|
|
342
|
+
str, # either `datum`, `groundtruth`, `prediction` or score
|
|
343
|
+
str # datum uid
|
|
344
|
+
| tuple[
|
|
345
|
+
float, float, float, float
|
|
346
|
+
] # bounding box (xmin, xmax, ymin, ymax)
|
|
347
|
+
| float, # prediction score
|
|
348
|
+
]
|
|
349
|
+
],
|
|
350
|
+
],
|
|
351
|
+
],
|
|
341
352
|
]
|
|
342
|
-
|
|
343
|
-
|
|
353
|
+
hallucinations: dict[
|
|
354
|
+
str, # prediction label value
|
|
355
|
+
dict[
|
|
356
|
+
str, # either `count` or `examples`
|
|
357
|
+
int
|
|
358
|
+
| list[
|
|
359
|
+
dict[
|
|
360
|
+
str, # either `datum`, `prediction` or score
|
|
361
|
+
str # datum uid
|
|
362
|
+
| float # prediction score
|
|
363
|
+
| tuple[
|
|
364
|
+
float, float, float, float
|
|
365
|
+
], # bounding box (xmin, xmax, ymin, ymax)
|
|
366
|
+
]
|
|
367
|
+
],
|
|
368
|
+
],
|
|
344
369
|
]
|
|
345
|
-
|
|
346
|
-
|
|
370
|
+
missing_predictions: dict[
|
|
371
|
+
str, # ground truth label value
|
|
372
|
+
dict[
|
|
373
|
+
str, # either `count` or `examples`
|
|
374
|
+
int
|
|
375
|
+
| list[
|
|
376
|
+
dict[
|
|
377
|
+
str, # either `datum` or `groundtruth`
|
|
378
|
+
str # datum uid
|
|
379
|
+
| tuple[
|
|
380
|
+
float, float, float, float
|
|
381
|
+
], # bounding box (xmin, xmax, ymin, ymax)
|
|
382
|
+
]
|
|
383
|
+
],
|
|
384
|
+
],
|
|
347
385
|
]
|
|
348
|
-
|
|
349
|
-
list[tuple[str, tuple[float, float, float, float]]]
|
|
350
|
-
]
|
|
351
|
-
score_thresholds: list[float]
|
|
386
|
+
score_threshold: float
|
|
352
387
|
iou_threshold: float
|
|
353
|
-
|
|
388
|
+
label_key: str
|
|
389
|
+
number_of_examples: int
|
|
354
390
|
|
|
355
391
|
@property
|
|
356
392
|
def metric(self) -> Metric:
|
|
357
393
|
return Metric(
|
|
358
394
|
type=type(self).__name__,
|
|
359
395
|
value={
|
|
360
|
-
"
|
|
361
|
-
"
|
|
362
|
-
"
|
|
363
|
-
"fn_misclassification": self.fn_misclassification,
|
|
364
|
-
"fn_missing_prediction": self.fn_missing_prediction,
|
|
365
|
-
"tp_examples": self.tp_examples,
|
|
366
|
-
"fp_misclassification_examples": self.fp_misclassification_examples,
|
|
367
|
-
"fp_hallucination_examples": self.fp_hallucination_examples,
|
|
368
|
-
"fn_misclassification_examples": self.fn_misclassification_examples,
|
|
369
|
-
"fn_missing_prediction_examples": self.fn_missing_prediction_examples,
|
|
396
|
+
"confusion_matrix": self.confusion_matrix,
|
|
397
|
+
"hallucinations": self.hallucinations,
|
|
398
|
+
"missing_predictions": self.missing_predictions,
|
|
370
399
|
},
|
|
371
400
|
parameters={
|
|
372
|
-
"
|
|
401
|
+
"score_threshold": self.score_threshold,
|
|
373
402
|
"iou_threshold": self.iou_threshold,
|
|
374
|
-
"
|
|
375
|
-
"key": self.label[0],
|
|
376
|
-
"value": self.label[1],
|
|
377
|
-
},
|
|
403
|
+
"label_key": self.label_key,
|
|
378
404
|
},
|
|
379
405
|
)
|
|
380
406
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: valor-lite
|
|
3
|
-
Version: 0.33.
|
|
3
|
+
Version: 0.33.5
|
|
4
4
|
Summary: Compute valor metrics directly in your client.
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -32,6 +32,7 @@ Requires-Dist: Pillow >=9.1.0
|
|
|
32
32
|
Requires-Dist: tqdm
|
|
33
33
|
Requires-Dist: requests
|
|
34
34
|
Requires-Dist: numpy
|
|
35
|
+
Requires-Dist: shapely
|
|
35
36
|
Requires-Dist: importlib-metadata ; python_version < "3.8"
|
|
36
37
|
Provides-Extra: test
|
|
37
38
|
Requires-Dist: pytest ; extra == 'test'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
valor_lite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
valor_lite/schemas.py,sha256=r4cC10w1xYsA785KmGE4ePeOX3wzEs846vT7QAiVg_I,293
|
|
3
|
+
valor_lite/detection/__init__.py,sha256=PiKfemo8FkZRzBhPSjhil8ahGURLy0Vk_iV25CB4UBU,1139
|
|
4
|
+
valor_lite/detection/annotation.py,sha256=BspLc3SjWXj6qYlGGpzDPHEZ8j7CiFzIL5cNlk0WCAM,2732
|
|
5
|
+
valor_lite/detection/computation.py,sha256=HDFfPTFQN2obm-g570KKDf7SP9V-h09OyMtFEJXsoTA,26323
|
|
6
|
+
valor_lite/detection/manager.py,sha256=ld2ytAw96UOO25iTwnfvAI1D2UY2Z1AGmP7cyCrT-V4,52801
|
|
7
|
+
valor_lite/detection/metric.py,sha256=RYKN17nEFRIZIqmotQa6OyNnU0nkjXyfFIclX_5hGpY,9933
|
|
8
|
+
valor_lite-0.33.5.dist-info/LICENSE,sha256=M0L53VuwfEEqezhHb7NPeYcO_glw7-k4DMLZQ3eRN64,1068
|
|
9
|
+
valor_lite-0.33.5.dist-info/METADATA,sha256=WL0LQR2fT4CO4MuV0aXIkLPt3zQW2SsBS4MwcA_kHJY,1865
|
|
10
|
+
valor_lite-0.33.5.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
11
|
+
valor_lite-0.33.5.dist-info/top_level.txt,sha256=9ujykxSwpl2Hu0_R95UQTR_l07k9UUTSdrpiqmq6zc4,11
|
|
12
|
+
valor_lite-0.33.5.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
valor_lite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
valor_lite/schemas.py,sha256=r4cC10w1xYsA785KmGE4ePeOX3wzEs846vT7QAiVg_I,293
|
|
3
|
-
valor_lite/detection/__init__.py,sha256=WHLHwHoKzXTBjkjC6E1_lhqB7gRWkiGWVWPqkKn-yK8,997
|
|
4
|
-
valor_lite/detection/annotation.py,sha256=c45pZD1Pp2vf5GeyW_6Kl9JCx5FoaaktCaaa4q3QDUo,1758
|
|
5
|
-
valor_lite/detection/computation.py,sha256=7PttK0VuOWlhRN92wpLVrGzB7RAdfdZyT3b1aTm_WaI,23214
|
|
6
|
-
valor_lite/detection/manager.py,sha256=ziVnukGs-WrkyBEBBO3LVSv4LTbaWFaWqLWarVosj2c,35807
|
|
7
|
-
valor_lite/detection/metric.py,sha256=DLqpODJZOG7SCqt7TCgR4am68PQORRCIQW_SXiTb1IA,9473
|
|
8
|
-
valor_lite-0.33.3.dist-info/LICENSE,sha256=M0L53VuwfEEqezhHb7NPeYcO_glw7-k4DMLZQ3eRN64,1068
|
|
9
|
-
valor_lite-0.33.3.dist-info/METADATA,sha256=FBpd-wMWv-m37EK5BfFuiVmnJXg4GNzCaJrTDHv4-gE,1842
|
|
10
|
-
valor_lite-0.33.3.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
11
|
-
valor_lite-0.33.3.dist-info/top_level.txt,sha256=9ujykxSwpl2Hu0_R95UQTR_l07k9UUTSdrpiqmq6zc4,11
|
|
12
|
-
valor_lite-0.33.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|