learning-loop-node 0.17.1__py3-none-any.whl → 0.17.2__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.
Potentially problematic release.
This version of learning-loop-node might be problematic. Click here for more details.
- learning_loop_node/detector/inbox_filter/cam_observation_history.py +13 -4
- {learning_loop_node-0.17.1.dist-info → learning_loop_node-0.17.2.dist-info}/METADATA +1 -1
- {learning_loop_node-0.17.1.dist-info → learning_loop_node-0.17.2.dist-info}/RECORD +4 -4
- {learning_loop_node-0.17.1.dist-info → learning_loop_node-0.17.2.dist-info}/WHEEL +0 -0
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from typing import List, Union
|
|
3
3
|
|
|
4
|
-
from ...data_classes import (
|
|
5
|
-
|
|
4
|
+
from ...data_classes import (
|
|
5
|
+
BoxDetection,
|
|
6
|
+
ClassificationDetection,
|
|
7
|
+
ImageMetadata,
|
|
8
|
+
Observation,
|
|
9
|
+
PointDetection,
|
|
10
|
+
SegmentationDetection,
|
|
11
|
+
)
|
|
6
12
|
|
|
7
13
|
|
|
8
14
|
class CamObservationHistory:
|
|
@@ -10,6 +16,8 @@ class CamObservationHistory:
|
|
|
10
16
|
self.reset_time = 3600
|
|
11
17
|
self.recent_observations: List[Observation] = []
|
|
12
18
|
self.iou_threshold = 0.5
|
|
19
|
+
self.min_uncertain_threshold = float(os.environ.get('MIN_UNCERTAIN_THRESHOLD', '0.3'))
|
|
20
|
+
self.max_uncertain_threshold = float(os.environ.get('MAX_UNCERTAIN_THRESHOLD', '0.6'))
|
|
13
21
|
|
|
14
22
|
def forget_old_detections(self) -> None:
|
|
15
23
|
self.recent_observations = [detection
|
|
@@ -25,7 +33,8 @@ class CamObservationHistory:
|
|
|
25
33
|
continue
|
|
26
34
|
if isinstance(detection, ClassificationDetection):
|
|
27
35
|
# self.recent_observations.append(Observation(detection))
|
|
28
|
-
|
|
36
|
+
if self.min_uncertain_threshold <= detection.confidence <= self.max_uncertain_threshold:
|
|
37
|
+
causes.add('uncertain')
|
|
29
38
|
continue
|
|
30
39
|
|
|
31
40
|
assert isinstance(detection, (BoxDetection, PointDetection)), f"Unknown detection type: {type(detection)}"
|
|
@@ -37,7 +46,7 @@ class CamObservationHistory:
|
|
|
37
46
|
continue
|
|
38
47
|
|
|
39
48
|
self.recent_observations.append(Observation(detection))
|
|
40
|
-
if
|
|
49
|
+
if self.min_uncertain_threshold <= detection.confidence <= self.max_uncertain_threshold:
|
|
41
50
|
causes.add('uncertain')
|
|
42
51
|
|
|
43
52
|
return list(causes)
|
|
@@ -16,7 +16,7 @@ learning_loop_node/detector/detector_logic.py,sha256=0RilHkb_IYFk-BXso1QJ8in01Wo
|
|
|
16
16
|
learning_loop_node/detector/detector_node.py,sha256=3xWI6kauXJx4WAe6iaRsdBxk-c0zAKEMusxTKQqOCyY,29961
|
|
17
17
|
learning_loop_node/detector/exceptions.py,sha256=C6KbNPlSbtfgDrZx2Hbhm7Suk9jVoR3fMRCO0CkrMsQ,196
|
|
18
18
|
learning_loop_node/detector/inbox_filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
learning_loop_node/detector/inbox_filter/cam_observation_history.py,sha256=
|
|
19
|
+
learning_loop_node/detector/inbox_filter/cam_observation_history.py,sha256=slPGm87TbBCfDUdpRTAM5yOz1An8Br5X_2HFJOGSrFg,3540
|
|
20
20
|
learning_loop_node/detector/inbox_filter/relevance_filter.py,sha256=IpoJMBPAO5GSr2uGINNu5uFar_jxWQWbH0Lz6FQ3n1M,1501
|
|
21
21
|
learning_loop_node/detector/outbox.py,sha256=HaNps_XEbvOZ-jlpZTCsk4Dbk5zq-vNYdKMBu001ckU,12132
|
|
22
22
|
learning_loop_node/detector/rest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -100,6 +100,6 @@ learning_loop_node/trainer/test_executor.py,sha256=6BVGDN_6f5GEMMEvDLSG1yzMybSvg
|
|
|
100
100
|
learning_loop_node/trainer/trainer_logic.py,sha256=eK-01qZzi10UjLMCQX8vy5eW2FoghPj3rzzDC-s3Si4,8792
|
|
101
101
|
learning_loop_node/trainer/trainer_logic_generic.py,sha256=KcHmXr-Hp8_Wuejzj8odY6sRPqi6aw1SEXv3YlbjM98,27057
|
|
102
102
|
learning_loop_node/trainer/trainer_node.py,sha256=tsAMzJewdS7Bi_1b9FwG0d2lGlv2lY37pgOLWr0bP_I,4582
|
|
103
|
-
learning_loop_node-0.17.
|
|
104
|
-
learning_loop_node-0.17.
|
|
105
|
-
learning_loop_node-0.17.
|
|
103
|
+
learning_loop_node-0.17.2.dist-info/METADATA,sha256=iw2TwzqWwCht4SD4u9Z_Vqnt0n13ejGIlbti8-fMrKY,13979
|
|
104
|
+
learning_loop_node-0.17.2.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
|
|
105
|
+
learning_loop_node-0.17.2.dist-info/RECORD,,
|
|
File without changes
|