2.5D Image Training / 1D & 2.5D CNN

Kimgoing·2022년 12월 23일
1

https://www.kaggle.com/competitions/dfl-bundesliga-data-shootout

캐글 솔루션 복기 중 2.5D CNN이라는 내용이 나와서 정리해 본다.
일반적인 컴퓨터 비전에서는 RGB 이미지를 사용하지만 의료나 로봇공학에서 영상을 다룰 때는 RGB-D (RGB+depth)를 많이 이용하는 것 같다. 이 때 depth 채널을 가진 이미지를 2D CNN으로 학습시킬때 2.5D Image trainging이라고 부르는 듯하다.

정리하자면,
1. 1D CNN : 일반적으로 자연어처럼 임베딩 벡터의 차원이 크지 않은 경우 주로 사용. 2D 컨볼루션 필터는 가로/세로로 슬라이딩하지만 학습 데이터의 차원이 크지 않다면 CNN 필터가 세로로만 슬라이딩해서 일련의 1차원 결과값을 생성.
2. 3D CNN : 4개 차원의 데이터에 사용. ex> channel x depth x height x width
3. 2.5D CNN : 4개 차원의 데이터를 3개 차원으로 변환하여 사용. DFL 캐글 대회에서는 RGB 영상을 GRAY로 변환하여 1 채널 데이터로 만든후 stack해서 2.5D 이미지 학습을 시킴.

(자세히 읽지 않았지만 CT이미지는 마치 영화 필름처럼 CT사진이 이어져서 붙어있는데 이걸 슬라이싱해서 stack하여 이미지를 생성하지 않았을까 싶다.)

2.5D Image Training

  • In a nutshell, 2.5D Image Training is training of 3D image like 2D Image. More about 2.5D training is discussed later. 2.5D images can take leverage of the extra depth information like our typical RGB image.

  • Even though we can do easy straight-forward 2D training, we can utilize ct slices for extra depth information. For example, we can stack consecutive slices of the scans to get a 3D volume. But one of the reasons why I'm inferring them as 2.5D is that we'll be training 3D images like 2D images. Those who haven't come across this method may get confused at first but let me explain. When we train 2D images like RGB images we actually pass a 3D tensor ex:[None, channel, height, width] to a model. For PyTorch, the last two dimensions are spacial(height & width) and the first one is the channel dimension. Now for the ct image, we don't have any channel information so we can use that dimension to stack multiple ct scans as channels and train them as 2d images.

※ reference

0개의 댓글