|
@@ -370,13 +370,13 @@ def find_repetitions(results, segments_needed=2, calibration=None):
|
|
|
segments_needed = 1
|
|
|
|
|
|
for index, result in enumerate(results):
|
|
|
- if result['confidence'] >= high:
|
|
|
- if found_high is None:
|
|
|
- found_high = index
|
|
|
- elif result['confidence'] > results[found_high]['confidence']:
|
|
|
- found_high = index
|
|
|
- elif result['confidence'] >= middle_high:
|
|
|
- found_middle_high.append(index)
|
|
|
+ #if result['confidence'] >= high:
|
|
|
+ # if found_high is None:
|
|
|
+ # found_high = index
|
|
|
+ # elif result['confidence'] > results[found_high]['confidence']:
|
|
|
+ # found_high = index
|
|
|
+ #elif result['confidence'] >= middle_high:
|
|
|
+ # found_middle_high.append(index)
|
|
|
|
|
|
if not expect_space:
|
|
|
if result['confidence'] >= threshold:
|
|
@@ -413,14 +413,14 @@ def find_repetitions(results, segments_needed=2, calibration=None):
|
|
|
found_index = None
|
|
|
expect_recover = False
|
|
|
# Aquí veremos si hay un valor alto
|
|
|
- if found_high is not None:
|
|
|
- found_row = results[found_high]
|
|
|
- found.append(found_row)
|
|
|
- elif len(found_middle_high) >= segment_middle_needed:
|
|
|
- found_row = results[found_middle_high[0]]
|
|
|
- found.append(found_row)
|
|
|
- found_high = None
|
|
|
- found_middle_high = []
|
|
|
+ #if found_high is not None:
|
|
|
+ # found_row = results[found_high]
|
|
|
+ # found.append(found_row)
|
|
|
+ #elif len(found_middle_high) >= segment_middle_needed:
|
|
|
+ # found_row = results[found_middle_high[0]]
|
|
|
+ # found.append(found_row)
|
|
|
+ #found_high = None
|
|
|
+ #found_middle_high = []
|
|
|
|
|
|
else:
|
|
|
if result['confidence'] <= threshold:
|
|
@@ -431,8 +431,8 @@ def find_repetitions(results, segments_needed=2, calibration=None):
|
|
|
found.append(found_row)
|
|
|
found_counter = 0
|
|
|
expect_space = True
|
|
|
- found_high = None
|
|
|
- found_middle_high = []
|
|
|
+ #found_high = None
|
|
|
+ #found_middle_high = []
|
|
|
|
|
|
return found
|
|
|
|