Commit 49ec3566 authored by Sulfyderz's avatar Sulfyderz
Browse files

[Error Update]:Removing alarmViterbi for segments under 2*tolerance.

parent b53f253d
......@@ -3484,11 +3484,7 @@ 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 +3543,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:
......@@ -3668,12 +3664,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()
# SELECTIONNE TOUS LES SEGMENTS HYPOTHESES AVANT LE PREMIER SEGMENT DE REFERENCE (signifie mal classé car silence coté ref)
if i==0:
......@@ -3872,11 +3863,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:
......@@ -3950,7 +3936,6 @@ class Show(object):
perfectBoundary=True
else:
# Application d'un viterbi à la prochaine iteration
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!alarm4")
alarmViterbi=True
if not perfectBoundary:
......@@ -4174,7 +4159,7 @@ class Show(object):
reassignment__thrValue=reassignment__thr
else:
reassignment__thrValue=key
print("OHLALA")
if not constrainedClustering:
if actionsTime:
t1=time.time()
......@@ -4394,11 +4379,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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment