본문 바로가기

DataScience/TensorFlow[CNN]7

딥러닝 텐서플로우 에포크 시마다, 가장 좋은 모델을 저장하는, ModelCheckpoint 사용방법, 에포크 시마다, 기록을 남길 수 있는, CSVLogger 사용 방법 The Vehicle Type Classification Project¶ Summary¶ Use Case: Vehicle Type Algorithm: MobileNetV2 Number of training images: 603 Number of classes: 7 Batch Size: 64 Optimizer: Adam Learning Rate: 0.0001 Loss Type:CategoricalCrossentropy Transfer Learning: Yes | Imagenet Labels¶0: 'car-bus-alltypes', 1: 'car-sedan-alltypes', 2: 'car-suv-alltypes', 3: 'motocycle-bicycle-kids', 4: 'motocycle-bicycle-.. 2023. 1. 2.
딥러닝 텐서플로우 Transfer_Learning_and_Fine_Tunning 개와 고양이 분류를, 이미 잘 만들어진 뉴럴네트워크를 활용하여, 성능을 올려보자.¶ Stage 1: Install dependencies and setting up GPU environment¶ In [ ]: # !pip install tensorflow-gpu==2.0.0.alpha0 In [ ]: # !pip install tqdm Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (4.28.1) Downloading the Dogs vs Cats dataset¶ In [1]: !wget --no-check-certificate \ https://storage.googleapis.com/mledu-datasets.. 2023. 1. 2.
딥러니 텐서플로우 CNN을 이용하여, CIFAR-10 이미지 분류하기, 데이트셋이 이미 넘파이라면? CNN을 이용하여, CIFAR-10 이미지 분류하기¶ STEP 0: 데이터셋 설명¶ CIFAR-10 is a dataset that consists of several images divided into the following 10 classes: Airplanes Cars Birds Cats Deer Dogs Frogs Horses Ships Trucks The dataset stands for the Canadian Institute For Advanced Research (CIFAR) CIFAR-10 is widely used for machine learning and computer vision applications. The dataset consists of 60,000 32x32 colo.. 2023. 1. 2.
딥러닝 텐서플로우 이미지 증강 예시 Image Augmentation¶ Cats v Dogs 로 다음처럼 모델링 하고, 학습시켜본다. 4 convolutional layers with 32, 64, 128 and 128 convolutions train for 100 epochs 데이터 제너레이터를 통해 이미지를 증강한다.¶ train_datagen = ImageDataGenerator( rotation_range=40, width_shift_range=0.2, height_shift_range=0.2, shear_range=0.2, zoom_range=0.2, horizontal_flip=True, fill_mode='nearest') rotation_range is a value in degrees (0–180), a range wit.. 2022. 12. 30.
딥러닝 텐서플로우 개와 고양이 분류하는 Neural Network 만들기 Using more sophisticated images with Convolutional Neural Networks¶I실생활의 이미지는 모양도 다르고, 비율도 다르고, 색깔도 다양하다. 이러한 것들을 분류하는 CNN을 만들어 본다. Cats and Dogs 이미지 이용 개와 고양이 분류하는 Neural Network 만들기 Evaluate the Training and Validation accuracy Explore the Example Data¶ /tmp 컬럼에, 2000개의 이미지를 다운로드 받아서 저장한다. NOTE: 2,000 개의 이미지는 캐글에서 가져왔다. "Dogs vs. Cats" dataset 원래는 25,000 개의 이미지 이지만, 실습용으로 추렸음. In [ ]: In [2]: .. 2022. 12. 30.
딥러닝 텐서플로우 CNN 인간,말 분류, 파이썬으로 압축풀기, 이미지파일을 넘파이 어레이로가져오기 이미지 파일 다운로드. 말, 인간 분류하기 위한 사진 파일 다운로드 하기 In [1]: !wget --no-check-certificate \ # !wget 리눅스 주피터노트북에서 웹파일을 가져오는 명령어 https://storage.googleapis.com/laurencemoroney-blog.appspot.com/horse-or-human.zip \ -O /tmp/horse-or-human.zip # -O 여기에 다운로드 받아라. --2022-12-30 02:05:48-- https://storage.googleapis.com/laurencemoroney-blog.appspot.com/horse-or-human.zip Resolving storage.googleapis.com (storage.goo.. 2022. 12. 30.
딥러닝 텐서플로우 CNN의 기본개념 kenel == filter == feature detector 라고도 함 https://poloclub.github.io/cnn-explainer/ 풀링 stride = 2 == (2행2열) 풀링이란 예를들어 4*4 를 2*2로 줄이는방법 relu == 0밑은 무조건 0으로 바꿈, 양수는 그대로 쓴다 Fully Connected == ANN (같은말) 이렇게 하는 이유는 1.컴퓨팅 자원을 적게 쓰기 위함 2.특징을 살린다(예를들면 위치정보 같은것) 2022. 12. 29.