ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [패스트캠퍼스] AI 기술을 활용한 의료 데이터 분석과 바이오 진단 학습후기
    카테고리 없음 2025. 5. 14. 19:25

    전반적으로 강의에서 소개되는 기술들은 현재 서비스나 제품에서 활용되는 최신 기술들이라기보다는 몇 년전까지 사용되던 기술들이라는 인상을 받았다. 다만, 최신 기술들도 결국에는 해당 기술들의 아이디어나 한계점을 개선하기 위한 방법들이기 결국 모두 알아야하는 내용들이라고 판단되었기 때문에 관심을 가지고 수강하게 되었다. 해당 강의에서 절반은 MLP, CNN, RNN, Transformer, GAN 등 주요 Deep Learning 기초들을 다루고 있고 나머지 절반은 의료에서 주로 사용되는 데이터처리, 학습방법, 평가방법, 응용 분야 등을 다루고 있다. 워낙 다루는 범위가 넓다보니 하나의 기술이나 논문에 대해서 짧게는 몇 십초에서 길게는 몇 분정도의 분량을 가지고 있다. 하지만 해당 기술들이나 논문에 대해서 너무 개괄적으로 설명하기 때문에 처음 접하는 내용들에 대해서는 해당 강의만으로는 이해하기 어려웠다. 따라서 해당 강의 내용들을 entry point로 보다 깊은 이해를 위해 NotebookLM, ChatGPT, 그리고 Gemini 등을 통해서 보다 깊은 이해를 할 수 있었다. 

    NotebookLM

    앞서 말한바와 같이 9차시까지는 주로 MLP, Deep Learning의 기초에 관한 내용으로 이미 널리 알려진 내용들을 다루고 있고 해당 내용에 대해서 이미 접한 경험이 있기 때문에 리마인드 차원에서 빠르게 훑어보았다. 이하로는 내가 이 강의를 통해서 주로 관심있게 시청하였던 Object Detection, Instance Segmentation에 관하여 키워드들을 정리해놓았다.

    Image Segmentation

    ROI 분할

    challenges: a lot of noise, hard to acquire a perfect annotation, bias of annotators

    Preprocessing

    pretrained model, patching, and oversampling

    Augmentation

    flipping, cropping, rotation, color jitter, cutout, mixup, cutmix

    Architecture

    UNET

    Deep Lab

    Atrous convolution: dilate rate를 조절하여 receptive field를 키움

    DeepLab - atrous convolution

    Astrou spatial pyramid pooling (ASPP): multi-scale kernel에 대해서 다양한 receptive field 얻어 다양한 position에 대하여 학습

    DeepLab - astrou spatial pyramid pooling (ASPP)

    UENTR

    Encoder 부분에 Transformer를 활용하여 기존보다 long range에 대해서 spatial dependency를 개선

    Transformer를 사용하여 단일 계층 내에서도 patches의 attention을 통해 전역적인 receptive field를 확보하여 Deep Lab의 locality 연산의 누적의 한계를 극복함.

    UENTR

    Inference

    Test Time Augmentation (TTA)

    Ensemble: robustness, generalization, prediction confidence

    TTA

    Postprocessing

    Edge enhancement, Hole filling

    Loss

    Cross Entropy: pixel-wise classification, weight for class imbalance

    Dice Coefficient Loss: 

    Jaccard/Intersection over Union(IoU) Loss:

    Dice Loss vs Jaccard Loss

    주요 차이점

    1. 감도(Gradient) 분포
      • Dice Loss: 낮은 IoU 영역에서 비선형으로 급격한 펄스를 줘 소형 객체나 초기 학습에서 빠른 수렴 유도
      • Jaccard Loss: 선형 감소
    2. 수치적 안정성
      • 두 Loss 모두 0–1 사이지만, Dice 식에 분모가 2 TP+FP+FN2\,\text{TP}+\text{FP}+\text{FN} 이므로 소수 FP/FN 존재 시에도 더 높은 값을 유지
      • Jaccard는 FP+FN 에 민감
    3. 사용 사례
      • Dice Loss: 의료 영상 segmentation, 클래스 불균형 극심할 때
      • Jaccard Loss(IoU Loss): 객체 탐지의 위치 회귀(IoU-based), 세그멘테이션에서도 쓰이나 Dice 만큼 보편적이지 않음

    Evalution

    Annotator에 따라 차이가 큼

    TOWARDS A GUIDELINE FOR EVALUATION METRICS IN MEDICAL IMAGE SEGMENTATION

    Specificity: Brain - 미세한 cancel region이 모두 matter이기 때문에 유효

    Sensitivity: histopathology - 최대한 많은 영역을 segmentation하는 것이 목적이기 때문에 유효

    Dice, Jaccard, Mean IoU - 모든 class에 대한 IoU 평, GIoU - region의 거리까지 고, DIoU - gt, predict의 center points 거리까지 고려

    pixel-wise evaluation: f1 score, sensitivity, specificity, accuracy

    Hausdorff distance: gt, prediction 간의 꼭지점 거리를 계산하여 매칭 계산

    Object Detection

    Localization and classification

    Challenges: Positive and Negative imbalance data, Anchor box, feature map

    Preprocessing

    Online Hard Negative Mining (OHEM): Top N confidence negative sampling

    HEM
    OHEM

    Multi-scale sample

    improving robustness to scale variations, enhancing feature representation, and capturing both local detail and global context

    Convolutional Neural Networks for Automated PET/CT Detection of Diseased Lymph Node Burden in Patients with Lymphoma

    Augmentation: flip, rotate, cutout, mosaic, mixup, cutmix

    Models

    Faster-RCNN: Region proposal network. Localization에 대해서 Proposal된 영역에 대해서만 classification하여 기존의 sliding windows 방법 대비 효율적

    Cancel Cells detection in Phase-Contrast Microscopy Images Based on Faster RCNN

    FPN

    FPN

    YOLO: 1-stage, cell & anchor box, confidence

    Fully Convolutional One-stage Object Detection: Anchor-free

    End-to-End Object Detection with Transformers (DETR): Hungarian maximum matching algorithm, Transformer, patch

    nnUNET

    Annotation과 Image만으로 Model 학습. Positive patch, Anchor box, NMS 등 preprocessing, postprocessing의 수고를 줄이기 위함. Fixed parameter, Rule-based parameter, Empirical parameter

    AutoML vs NNunet

    Fixed parameter - optimizer, loss function, network (ex: UNET), Augmentation, Inference (ex: sliding window), Epoch

    Rule-based parameter: depending on the data. normalizing, pixel scaling, batch, patch size, number of gpu

    Empirical parameter: Auto

    nnDetection

    Successor of nnUNET

    Hard negative mining: 1/3 positive, 2/3 negative, Classification: CE, Optimizer: SGD, 60 epochs, Architecture: Multi-scale FPN 

    nnDetection

    Generalized IOU used for searching anchor box automatically

    시나리오 IoU GIoU 시각적 특징 & 해석

    Perfect overlap 1.000 1.000 두 박스가 완전히 일치 → 외접 C = A = B, 빈 공간 0 ⇒ GIoU = IoU = 1
    Partial overlap 0.195 0.015 교집합은 작고 외접 C 가 커서 빈 공간 비율 ↑ → GIoU가 IoU보다 더 낮음
    No overlap 0.000 –0.263 IoU = 0 이라 gradient 0 이지만, GIoU는 음수 페널티 → 학습 신호 유지

    Rule-based parameters: heuristic rules, searching for IOU maximizing an anchor box, differ resampling for each image domain, from full-resolution model to low resolution model when missing context

    Empirical parameters: Postprocessing, Sliding windows for NMS, Weighted box clustering

    Loss

    Focal loss - weighted to too many negatives

    Postprocessing

    Non-maximum Suppression (NMS) - IOU > Threshold, Sliding window - patch inference for small objects

    Evaluation

    IOU

    Precision-recall curve, MAP, ROC Curve - Sensitivity and specificity, Free-Response ROC Curve (FROC)

    Precision-Recall with Threshold

    Fully Convolutional One-Stage Object Detection (FPOC)

    Anchor box size나 scale을 custom하게 설정하는 것이 아니라 class label classification, bounding box regression, and centerness 등을 prediction함. 또 FPN으로 다양한 scale에 대한 객체 처리.

    FPOC

    개념 정의 표준 ROC와의 차이

    Sensitivity (TPR) 탐지된 병변(Correct Lesions)전체 실제 병변\dfrac{\text{탐지된 병변(Correct Lesions)}}{\text{전체 실제 병변}} 동일
    FP / Image 한 이미지당 잘못 탐지된 개수 평균 ROC의 FPR(비율) 대신 절대 개수 사용
    FROC Curve x축 = FP per image, y축 = Sensitivity 한 이미지 안에 복수의 탐지 후보가 있어도 평가 가능

    Threshold 0.9 - few detections
    threshold 0.5 - balanced

     

    threshold 0.1 - many fp

    Instance Segmentation

    Preprocessing: Copy and pastes augmentation, Contour mask, Gradient map

    ToothNet: Mask-RCNN, 2-stage, Edge map, Region proposal network (RPN), Similarity Matrix

    ToothNet

    Real-time Instance Segmentation of Surgical Instruments using Attention and Multi-scale Feature Fusion: YOLACT++, 1-stage, FPN, Attention

    Real-time Instance Segmentation of Surgical Instruments using Attention and Multi-scale Feature Fusion
    Real-time Instance Segmentation of Surgical Instruments using Attention and Multi-scale Feature Fusion

    Postprocessing: Watershed

     

     

     

     

     

     

     

     

     

     

     

     

    댓글

Designed by Tistory.