Image segmentation
Image segmentation은 디지털 이미지를 개체별로 분리하는 방법이다.
Image segmentation은 sementic segmentation, instance segmentation, panoptic segmentation으로 나눌 수 있다.
sementic segmentation은 동일한 클래스를 구분한다.
instance segmentation은 클래스별로 인스턴스를 구분한다.
panoptic segmentation은 클래스와 인스턴스를 함께 구분한다.
이미지 분할은 임계값이 기준이된다.
예를 들어 Balanced Histogram Thresholding Method은 전경과 배경을 나누는 기준이 되는데 히스토그램을 기준으로ㅗ 가중치를 부여하여 균형점을 찾는다.
instance segmentation의 대표적 알고리즘으로 Mask R-CNN이 있다. 그러나 현재는 깃허브의 사례를 확인해보면 다소 오래된 알고리즘으로 대우받는 경향이 보인다.
현재는 panoptic segmentation을 수행하는 Dectron2가 활성화되어 있는 것으로 보인다.
https://github.com/orestes74/detectron2
GitHub - orestes74/detectron2: Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
Detectron2 is a platform for object detection, segmentation and other visual recognition tasks. - GitHub - orestes74/detectron2: Detectron2 is a platform for object detection, segmentation and othe...
github.com
colab의 샘플
# We can use `Visualizer` to draw the predictions on the image.
v = Visualizer(im[:, :, ::-1], MetadataCatalog.get(cfg.DATASETS.TRAIN[0]), scale=1.2)
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
cv2_imshow(out.get_image()[:, :, ::-1])
https://detectron2.readthedocs.io/en/latest/index.html
Welcome to detectron2’s documentation! — detectron2 0.6 documentation
© Copyright 2019-2020, detectron2 contributors Revision 8c4a333c.
detectron2.readthedocs.io