반응형

cnn 4

[Deep Learning][딥러닝] CNN Image Augmentation(이미지 증식)

적은 datasets에 CNN 학습하는 경우 Data의 수가 많지 않을 때 CNN을 통한 모형 학습이 어려울 수 있음 딥러닝은 많은 수의 데이터를 통해 feature engineering 과정 없이 feature를 찾을 수 있는데 있음 하지만 모델이 작고 regularization이 잘 되어 있다면 수백 개의 샘플로도 훈련 가능 Data가 많지 않아 CNN 학습에 어려움이 있을 때 사용 가능한 방법 Data augmentation 활용 이미지의 색깔, 각도 등을 약간씩 변형하여 data의 수를 늘림 Pre-trained network의 활용 ImageNet 등에서 학습된 기존의 모형과 weight를 불러온 후 목적에 맞게 약간 수정하여 모형 생성 Data for cats vs. dogs 2013년 Kag..

[Deep Learning][딥러닝] CNN MNIST 분류

MNIST 데이터에 CNN 적용 하이퍼파라미터 및 데이터셋 전처리 import tensorflow as tf import tensorflow.keras as keras import tensorflow.keras.layers as layers import numpy as np np.random.seed(1) tf.random.set_seed(1) # 하이퍼파라미터 정의 learning_rate = 0.001 N_EPOCHS = 20 N_BATCH = 100 N_CLASS = 10 # 데이터 저장 (train_images, train_labels), (test_images, test_labels) = keras.datasets.mnist.load_data() N_TRAIN = train_images.shap..

[Deep Learning][딥러닝] CNN_MNIST분류 / 모델저장/ FunctionalAPI

Convolutional Neural Network 구현 import matplotlib.pyplot as plt # 학습결과 그래프 함수 # loss 그래프 def loss_plot(history): # plt.figure(figsize=(10,7)) plt.plot(history.history['loss'], label='Train loss') plt.plot(history.history['val_loss'], label='Validation loss') plt.title('Loss') plt.xlabel('Epoch') plt.ylabel('Loss') plt.legend() plt.show() # accuracy 그래프 def accuracy_plot(history): # plt.figure(fi..

[Deep Learning][딥러닝] CNN 개요

CNN - 합성곱 신경망(Convolutional Neural Network) DCNN (Deep Convolutional Neural Network) Overview 컴퓨터 비전(이미지, 동영상관련 처리) 에서 사용되는 딥러닝 모델 특히 이미지 분류에 가장 많이 사용된다. 일반적으로 Convolution layer, Pooling Layer, Fully-connected layer 로 구성되어 있다. Convolution layer와 pooling layer: Feature Extraction 담당 Fully-connected layer : 분류 담당 CNN 응용 이미지 분류 64*64 이미지를 입력하였을 때 고양이인지 여부 판단 2. Object detection(객체 찾기) 이미지 안의 물체를 탐색..

반응형