CTC Loss 공부하면서 정리한 글입니다.
CTC Loss
- CTC: 음성인식이나 문자인식에서 target과 output seq의 길이가 다를 때 (output > target) loss function 정의하는 방법
'Blank'
- hello --> hhhellloo --> hello?
- 'hhh' --> h / lll --> ll
- 합쳐야 하는 character와 합치지 않아야 하는 character를 구분하기 위해 blank 도입
- EX) GT = a (t=2)
Loss 계산 방법
- 주어진 GT를 만들 수 있는 모든 output의 확률 합을 구하기 위해 Dynamic Programming 기법이 사용
- t = 2 * len(GT) + 1 (사이사이에 blank 끼우는 경우의 수)
- pt(c): time t에서 character c가 나올 확률 -> 모델이 예측
- CTCLoss=−log(Σpt(c) 이용한 path 확률)
출처