Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pierre-Alexandre Broux
s4dl
Commits
ea822ed4
Commit
ea822ed4
authored
Apr 26, 2018
by
Sulfyderz
Browse files
[Error Update]:Removing alarmViterbi for segments under 2*tolerance.
parent
a0683141
Changes
1
Hide whitespace changes
Inline
Side-by-side
s4dl/Show.py
View file @
ea822ed4
...
...
@@ -3484,11 +3484,6 @@ class Show(object):
# ATTENTION: Chaque condition considere que la frontiere "start" est validé/correcte (a été modifié à l'itération précédente si besoin il y a eu), quel ne dépasse pas le segment de ref
# VITERBI
print
(
"SAME #VIN:"
,
DiarTools
.
sameDiar
(
value
,
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
value
)))
if
not
DiarTools
.
sameDiar
(
value
,
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
value
)):
print
(
value
)
print
(
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
value
))
sys
.
exit
()
if
viterbi
and
((
alarmViterbi
==
True
and
alarmViterbiValue
is
None
)
or
(
alarmViterbi
==
True
and
alarmViterbiValue
is
not
None
and
alarmViterbiValue
<=
diarRef
[
i
-
1
][
'start'
]
+
tolerance
)):
alarmViterbi
=
False
alarmViterbiValue
=
None
...
...
@@ -3547,7 +3542,7 @@ class Show(object):
if
len
(
diarCheckedTmpBis
)
!=
0
and
((
viterbi__jumpOverSegmentsWithDuration
is
not
None
and
valueRef
.
duration
()
>
viterbi__jumpOverSegmentsWithDuration
)
or
viterbi__jumpOverSegmentsWithDuration
is
None
):
valueToLearn
=
DiarTools
.
mergeDiar
(
diar1
=
diarCheckedTmpBis
,
diar2
=
diarUncheckedTmp
,
sort
=
True
)
print
(
"UHUHU"
)
hmm
=
HumanAssistedViterbi
(
self
.
cepstrum
,
valueToLearn
,
exit_penalties
=
viterbi__exit_penalties
,
loop_penalties
=
viterbi__loop_penalties
,
adjustBoundaries
=
viterbi__adjustBoundaries
,
adjustBoundaries__pack
=
viterbi__adjustBoundaries__pack
)
if
actionsTime
or
viterbi__giveBackControlToUser
:
...
...
@@ -3667,13 +3662,7 @@ class Show(object):
# Stocke chaque diar apres chaque interaction humaine
if
diarIncrementalActionsHumanAssistedCorrection
and
i
!=
0
:
diarIncrementalThr
.
append
(
copy
.
deepcopy
(
value
))
print
(
"SAME #VOUT:"
,
DiarTools
.
sameDiar
(
value
,
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
value
)))
if
not
DiarTools
.
sameDiar
(
value
,
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
value
)):
print
(
value
)
print
(
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
value
))
sys
.
exit
()
diarIncrementalThr
.
append
(
copy
.
deepcopy
(
value
))
# SELECTIONNE TOUS LES SEGMENTS HYPOTHESES AVANT LE PREMIER SEGMENT DE REFERENCE (signifie mal classé car silence coté ref)
if
i
==
0
:
...
...
@@ -3872,11 +3861,6 @@ class Show(object):
# si 1 alors affectation + move bound si besoin/et ou create bound sur stop
# si > 1 alors affectation + move bound si besoin/et ou create bound sur stop + merge
else
:
print
(
"SAME #1:"
,
DiarTools
.
sameDiar
(
valueTmp
,
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
valueTmp
)))
if
not
DiarTools
.
sameDiar
(
valueTmp
,
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
valueTmp
)):
print
(
valueTmp
)
print
(
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
valueTmp
))
sys
.
exit
()
# verifie que la valueRef ne se trouve pas recouvert par la tolerance
if
not
DiarTools
.
segmentExistsAccordingToTolerance
(
valueRef
,
tolerance
):
for
z
in
listHypRefSegment
:
...
...
@@ -4172,7 +4156,7 @@ class Show(object):
reassignment__thrValue
=
reassignment__thr
else
:
reassignment__thrValue
=
key
print
(
"OHLALA"
)
if
not
constrainedClustering
:
if
actionsTime
:
t1
=
time
.
time
()
...
...
@@ -4392,11 +4376,7 @@ class Show(object):
if
actionsIncremental
:
actionsIncrementalSegmentationBoundaryMergeThrTurn
.
append
(
copy
.
deepcopy
([
newSegment
,
listTmp
[
y
]]))
newSegment
,
valueTmp
=
DiarTools
.
mergeSegment
(
newSegment
,
listTmp
[
y
],
valueTmp
)
print
(
"SAME #2:"
,
DiarTools
.
sameDiar
(
valueTmp
,
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
valueTmp
)))
if
not
DiarTools
.
sameDiar
(
valueTmp
,
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
valueTmp
)):
print
(
valueTmp
)
print
(
DiarTools
.
releaseFramesAccordingToDiar
(
diarRef
,
valueTmp
))
sys
.
exit
()
# MAJ diar
value
=
valueTmp
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment