Recurrent Neural Network(RCNN)에서 영감을 받아 Gated RCNN(GRCNN)을 제안합니다.
Recurrent convolution layer(RCL)에 gate를 추가한 Gated Recurrent Convolution Layer(GRCL)이 핵심요소입니다. Gate는 RCL에서 context를 조정하고 feed-forward information과 recurrent information간의 균형을 맞춥니다.
Introduction
feed-forward-model은 넓은 receptive field를 가진 higher layer의 context만을 포착합니다. 하지만 이는 작은 물체를 인식하기 위한 lower layer에서 오는 정보를 조절할 수 없습니다. Recurrent connection을 convolutional layer에 이용한 일명 RCL은 모든 레이어에 context정보를 가져올 수 있게 합니다. 단점은 iteration이 반복되면 receptive field가 계속 커집니다. 따라서 이를 효율적으로 제한할 mechanism이 필요합니다.
또한 성능 향상 관점에서 RCNN의 neuron의 context조정을 필요로 합니다. 예를 들어 Figure 1.에서 한 글자를 읽을 경우 모든 context가 필요하지 않습니다. 네트워크가 h를 인식할 때 recurrent kernel이 문자의 다른 부분을 cover하는 것이 이득이 됩니다. 하지만 recurrent kernel이 커져서 다른 문자 까지 커질 경우 이는 불필요 하게 됩니다. 따라서 관련되지 않은 context에서 오는 signal을 약하게 하고 feed-forward information과 recurrent information을 유연하게 조합해야 합니다.
Proposed Method (GRCNN-BLSTM Model)
1. Recurrent Convolution Layer and RCNN
- RCL(Reference link)
RCL은 CNN에서 recurrent connections을 사용한 모듈입니다.
feed forward input으로 u(t)를 가지는 일반적인 RNN model을 생각해봅시다.
internal state x(t)는 다음과 같이 정의됩니다.
- F: RNN의 non-linear function
- θ: model parameter
- *: convolution layer
- u(t): feed forward input
- x(t-1): recurrent input
- w^f: feed-forward weights
- w^r: recurrent weights
위와 같은 RCL이 쌓인 모델을 RCNN이라고 부릅니다.
2. Gated Recurrent Convolution Layer and GRCNN
- The Gated Recurrent Convolution Layer (GRCL)
GRCL은 RCL에 context modulation을 제어하기 위한 gate를 추가하여 관련이 없는 context를 약하게 또는 없애도록 할 수 있습니다.
RNN의 한 종류인 Gated Recurrent Unit(GRU)에서 영감을 받아 gate가 feed-forward input과 지난 step의 state를 받도록 했습니다. 두개의 1x1 kernel인 w^f_g와 w^r_g를 이용하여 각 feed-forward-input과 recurrent input에 개별적으로 convolution을 적용합니다.
- w^f_g: feed forward weight for the gate
- w^r_g: recurrent weight for the gate(recurrent weight는 모든 step에 공유됩니다)
- BN: batch normalization
GRCL은 아래의 식과 같이 표현됩니다. RCL에 gate term과 성능을 위한 BN이 추가되었습니다.
- G(t)는 element-wise multiplication이 적용됩니다.
- GRCL에서 feed forward input인 u(t)는 time마다 항상 같다고 가정합니다. 이는 time에 연관된 sequential data와 GRCL의 time step이 동일하지 않다는 것을 확실히 합니다. 여기서 time step은 input을 processing하기 위한 iteration입니다.
1) t=0
- feed-forward network의 input에 대해 convolution이 계산됩니다.
2) t=1
- feed-forward network와 previous state를 통해서 G(1)이 계산됩니다.
- G(t)가 1인 경우 일반적인 RCL이 되며 0인경우는 일반적인 Convolution layer가 됩니다(recurrent정보가 흐르지 않게 됨.)
3. Overall Architecture
전체적인 architecture는 세가지로 구성됩니다.
1) feature sequence extraction
2) sequence modelling
3) transcription
- Feature Sequence Extraction
Fully connected layer없이 GRCNN을 사용합니다.
- Network의 input은 고정된 width와 height를 가진 이미지 입니다.
- feature map은 왼쪽 부터 오른쪽으로 column별로 slice되어 seqeunce를 갖게 됩니다.
- 각 column의 width를 1로 고정하기 위해서 max pooling layer를 추가했습니다.
- 각 feature vector는 input image의 사각형 영역을 표현하며 일반적인 GRCL보다 벡터화된 feature가 더 넓은 영역을 표현해서 recognition에 도움을 줍니다.
- Sequence Modeling
LSTM이 feature extraction 이후에 sequential modeling을 위해서 사용됬습니다. gate가 input을 이전 레이어로부터만 받지 않고 cell state까지 받는 peepholeLSTM를 사용했습니다.
LSTM의 전체 식은 아래와 같습니다.
- γ는 indication factor로 0과 1 사이입니다. γ에 따라서 cell state를 받는 정도가 결정됩니다.
- LSTM은 이전만 context가 남기 때문에 bidirectional로 사용합니다.
- Transcription
각 frame의 prediction을 실제 label로 변경합니다. Connectionist Temporal Classification (CTC)가 사용되었습니다.
- input Image I에서 각 t의 prediction이 π_t라고 할때 π는 blank와 반복된 label을 포함할 수 있습니다.(Ex. (a − b − −b), (ab − −bb)이를 abb로 줄여줄 수 잇음)
- β는 blank와 중복을 걸러내는 함수입니다.
- y는 π_t를 만들어내는 label의 확률을 의미합니다.
lexicon free transcription
lexicon transcription
Experiment
1. Datasets
- ICDAR2003
- IIIT5K
- Street View Text (SVT)
- Synth90k
2. Implementation Details
- input은 gray sacle, 100×32 크기로 고정합니다.
- sh: height에 따른 stride of kernel
- sw: width에 따른 stride of kernel
- ph: height에 따른 padding
- pw: width에 따른 padding
- num: number of feature map
- pixel value는 (-1, 1)로 rescale
- feature extractor는 26frame을 output으로 합니다.
- dropout없이 512unit을 가진 bidirectional LSTM을 사용합니다.
optimizer
- ADADELTA를 ρ=0.9로 학습
- batch_size: 192
- iterations: 300K
3. Explorative Study
(a)Pure CNN, RCNN(RCL이용), GRCNN(GRCL이용)을 각각 비교하여 Gated Recurrent Convolutional Layer의 효과를 확인합니다.
(b) LSTM의 peephole γ에 따른 실험입니다. peephole이 없는 것이 scen-text recognition에 적합함을 확인했습니다.
4. Comparison with the state-of-the-art
GRCNN은 Table 1과 같이 설정하고GRCL의 T=5로 실험하였습니다.
Conclusions
GRCNN이라는 gate로 recurrent connection을 조절하는 새로운 Architecture를 제안했습니다. 이를 통해
context information을 dynamic하게 조절하여 feed forward input과 recurrent part를 결합할 수 있습니다.
Share article