이미지 인식, 합성곱신경망(CNN)

첨부파일 CNN (콘볼루션신경망) (1) . ipynb 파일다운로드내컴퓨터저장 첨부파일 CNN (콘볼루션신경망) (1) . ipynb 파일다운로드내컴퓨터저장

네이버 MYBOX에 저장 네이버 MYBOX에 저장

개요

사람이 쓴 손글씨는 우리가 직접 읽고 이해하는 것은 어렵지 않다. 하지만 컴퓨터에 손글씨를 읽게 해 어떤 의미를 지니는지 알려주는 과정은 그리 쉽지 않다. MNIST 데이터셋은 미국 국립표준기술원(NIST)이 고등학생과 인구조사국 직원 등이 쓴 손글씨를 이용해 만든 데이터로 구성돼 있다. 7만개의 글자 이미지에 각각 0부터 9까지 이름표를 단 데이터셋에서 이러한 데이터를 가지고 딥러닝을 이용해 손글씨 이미지를 몇 % 정확하게 예측할 수 있을까? 사람이 쓴 손글씨는 우리가 직접 읽고 이해하는 것은 어렵지 않다. 하지만 컴퓨터에 손글씨를 읽게 해 어떤 의미를 지니는지 알려주는 과정은 그리 쉽지 않다. MNIST 데이터셋은 미국 국립표준기술원(NIST)이 고등학생과 인구조사국 직원 등이 쓴 손글씨를 이용해 만든 데이터로 구성돼 있다. 7만개의 글자 이미지에 각각 0부터 9까지 이름표를 단 데이터셋에서 이러한 데이터를 가지고 딥러닝을 이용해 손글씨 이미지를 몇 % 정확하게 예측할 수 있을까?

이 데이터 세트로 딥러닝을 진행해 보고 결과를 보자. 이미지를 인식하는 원리(데이터셋 로딩 및 분리) 이 데이터 세트로 딥러닝을 진행해 보고 결과를 보자. 이미지를 인식하는 원리(데이터셋 로딩 및 분리)

from tensorflow.keras.data simport mnistfrom tensorflow.keras.utils import to_categorical import matplotlib.pyplot as pltimport sys #MNIST 데이터셋을 불러와 학습세트와 테스트세트로 저장(X_train, y_train), (X_test, y_test)=mnist.load_data() #학습세트와 테스트세트가 각각 몇 개의 이미지로 구성되어 있는지 확인print( [0] from tensorflow.keras.data simport mnistfrom tensorflow.keras.utils import to_categorical import matplotlib.pyplot as pltimport sys #MNIST 데이터셋을 불러와 학습세트와 테스트세트로 저장(X_train, y_train), (X_test, y_test)=mnist.load_data() #학습세트와 테스트세트가 각각 몇 개의 이미지로 구성되어 있는지 확인print( [0]

출력 출력

Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz11490434/11490434 [ ============================== ] – 2s 0 us/step 학습 세트 이미지 수: 60000개 테스트 세트 이미지 수: 10000個 Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz11490434/11490434 [ ============================== ] – 2s 0 us/step 학습 세트 이미지 수: 60000개 테스트 세트 이미지 수: 10000개

학습 데이터와 테스트 데이터를 각각 나누었다. 학습용 데이터 세트의 첫 번째 데이터를 읽어보자. 학습 데이터와 테스트 데이터를 각각 나누었다. 학습용 데이터 세트의 첫 번째 데이터를 읽어보자.

# 첫 번째 이미지 확인 plt. imshow (X_train [0], cmap=’Greys’) plt. show () # 첫 번째 이미지 확인 plt. imshow (X_train[0], cmap=’Greys’) plt. show ()

출력 출력

이러한 이미지는 컴퓨터에서 어떻게 인식시킬까요? 다음으로 컴퓨터가 이미지를 인식하는 원리를 보여줍니다. 이러한 이미지는 컴퓨터에서 어떻게 인식시킬까요? 다음으로 컴퓨터가 이미지를 인식하는 원리를 보여줍니다.

# Understanding how images are recognized X_train[0] の x の combined:x の i:sys.stdout き込み write (“sinbor4s” %i) sys.stdout き込み book ‘ (‘\n)’) # Understanding how images are recognized X_train[0] の x の combined:x の i:sys.stdout き込み write (“sinbor4s” %i) sys.stdout き込み book ‘ (‘\n)’)

I’m going to print it out. I’m going to print it out

The computer divides the image into a total of 784 pixels, 28 by 28 and ranks it from 0 to 255. Pixels containing characters are filled with one of the numbers from 1 to 255 and converted into a single set of long matrices. US>Creating.. The computer divides the image into a total of 784 pixels, 28 by 28 and ranks it from 0 to 255. Pixels containing characters are filled with one of the numbers from 1 to 255 and converted into a single set of long matrices. US>Creating..

error: Content is protected !!