U-Net (semantic segmentation)
Image Segmentation with a U-Net-Like architecture keras 홈페이지에 제공하는 내용으로 소스코드 및 구현에 대하여 정리하였습니다.
https://keras.io/examples/vision/oxford_pets_image_segmentation/
Segmentation 은 기본적으로 저번 포스팅과 동일하게 픽셀 단위로 클래스를 분류하는 기법을 배경으로 한다. 정확하게는 (Instance Segmentation)
아래와 같이 대략적으로 볼 수 있다. (글로 표현이 아직힘든...)

Andrew Ng 교수님의 강의에서도 예로 설명이 있는데, 자율주행에서 사용되는 경향을 제시한다.
자율 주행에서 쓰이는 이유는 도로를 배경으로 인식해주는 것 (주행가능한 장애물이 없는 도로와 장애물이 있는 지역은 픽셀 단위로 클래스 분류가 되기때문에 탐지가 되는 것)

오늘 다룰 U-Net 과는 다르지만 유사 Segmentation 작업으로 자율주행 환경 구축에 도움을 주는 DeepLab v3 이다.
https://keras.io/examples/vision/deeplabv3_plus/
Keras documentation: Multiclass semantic segmentation using DeepLabV3+
» Code examples / Computer Vision / Multiclass semantic segmentation using DeepLabV3+ Multiclass semantic segmentation using DeepLabV3+ Author: Soumik Rakshit Date created: 2021/08/31 Last modified: 2021/09/1 View in Colab • GitHub source Description: I
keras.io
이 또한 케라스에 구현할 수 있는 source code 를 제공하기 때문에 한번 더 학습해볼 수 있을 것.
다시 본론인 U-net 으로 돌아와 보면 구조 자체를 직관적으로 파악해보면,
Input --> Normal Conv (Downsampling) --> Transpose Conv (Upsampling) --> Output (Using skip connection)
주요 기능
Normal Conv layer : decrease height, width, increase channel [very high resolution, low level feature information]
Transpose Conv layer : increase height, width, decrese channel [high level contextual information, low resolution]


첫 segmentation target image 를 직접 출력한 것이고, 두번째 이미지가 segmentation 의 predict 값이다.