본문 바로가기
  • 문과생의 백엔드 개발자 성장기
|Playdata_study/AI

210811_DeepLearning1

by 케리's 2021. 8. 11.

1. Computer Vision 

 

Computer vision

 

   : 기계의 시각화

     인간의 시각이 할수 있는 일을 머신이 수행하는 자율적인 시스템을 구축하는 학문 

 

학문분야

  : Biology, Psychology, Computer Science, Mathematics, Engineering, Physics

 

 

 

 

2. Classification

 

Edge Detection 알고리즘 

 

Edge는 경계선, 윤곽선을 뜻하는데

영상을 보면 명암의 밝기가 낮은 곳에서 높은 곳으로 혹은 밝기가 높은 곳에서 낮은 곳으로 변하는 지점에

존재하는 부분이 Edge가 된다.

 

결국 Edge는 영상의 명암도를 기준으로 명암의 변화가 큰 지점이 된다.

이러한 명암의 밝기 변화, 즉 기울기를 검출해야 한다.

기울기 검출방법이 바로 1차 미분법이다.

 

영상에서 보여지는 기울기를 Gradient라고 하고 이 Gradient를 구하면 비로소 Edge를 얻게된다. 

 

 

 

CNN (Convolutional Neural Network)

 

딥러닝의 대가 : 얀 르쿤, 제프리 힌슨, 요슈아 벤지오 

 

 

 

Deep Learning Pipeline 

 

  • (1) Training Data Loading
  • (2) Training Data Augmentation
  • (3) Deep Neural Network Training/Validation with Training Data (Training 할때 Validation도 같이 진행 해야함)
  • (4) Deep Neural Network Testing with Testing Data (예측결과포함, label이 있음)
  • (5) Inference with verified Deep Neural Network (상용화 전 테스트, label이 없음)

 

 

 

2-1) Classification

 

Data-Driven Approach (데이터 중심 접근 방식)

  • Collect a dataset of images and labels (이미지 및 레이블 데이터 집합 수집)
  • Use Machine Learning to train a classifier (기계 학습을 사용하여 분류자 교육)
  • Evaluate the classifier on new images (새 이미지에 대한 분류자 평가)

 

 

2-2) Nearest Neighbor

 

많이 사용하지 않음

 

  • Memorize all data and labels 

 : 가장 심플 방식 (이미지, 라벨을 함께 외움)

 

 

def train(images, labels):
	# Machine learning!
    return model

 

 

 

  • Predict the label of the most similar training image (유사도)
def predict(model, test_images):
	# Use model to predict labels
    return test_labels

 

 

 

2-3) Cross-validation

 

  • Hyperparameters

Heuristic Values : Choices about the algorithm that we set rather than learn

학습으로 부터 배우는 값이라기 보다는 우리가 먼저 선정 (경험으로부터) 해야 하는 값 

 

  ex) k-fold cross validation, learning rate, epoch, and number of layers

 

 

 

 

3. Linear Classification (W*x + b = y^)

 

  • MNIST (가장 기본적인 정보, 구조를 알고 사용 해야한다)

(1) 흑백

(2) 사이즈 28 * 28

(3) 한장의 속성의 갯수 784만개 :: 28*28*1 = 채널

(4) 7만개 (6만개-Training Data set, 1만개-Test Data set)

(5) Label 카테고리수는 10개

 

 

 

  • Recall CIFAR 10

(1) 칼라

(2) 사이즈 32 * 32

(3) 한 장의 속성 (Feather) 의 갯수 3072만개 :: 32*32*3 = 채널

(4) 6만개 (5만개-Training Data set, 1만개-Test Data set)

(5) Label 카테고리수는 10개

 

 

 

 

 

 

행렬 연산

 

 

 

4. Loss Function 

 

 

4-1) Hinge Function

4-2) Softmax Function

4-3) Regularization

 

댓글