전체 글88 [Computer Vision] Dolphin, Shark, Whale을 분류하는 ResNet50 파이프라인 구축 개발 환경: ColabDrive Mountfrom google.colab import drivedrive.mount('/content/drive')Device Settingimport torchdevice = torch.device("cuda" if torch.cuda.is_available() else "cpu")device---------------------------------------------------------------------'cuda'1. 데이터셋 준비import torch.nn as nn#하이퍼 파라미터batch_size=8lr=0.0001epochs=50optimizer_name='adam'model_name='resnet_50'criterion=nn.CrossEntropyLo.. 2024. 8. 29. [Computer Vision] Augmentation과 Normalization이 진행된 이미지를 시각화 개발 환경: ColabDrive Mountfrom google.colab import drivedrive.mount('/content/drive') Import Moduleimport torchimport torchvisionfrom torchvision import transforms # 이미지 데이터 augmentationimport osimport globPytorch 데이터셋 클래스1. 파이토치 데이터셋 클래스 만들기파이토치 데이터셋 클래스는 init, getitem,len 이렇게 특수 메소드 3개를 요구한다.항상 같은 포맷을 만드는 습관이 중요하다.따라서 root_path, mode(train/val/test), transform(전처리&Augmentation) 3개의 입력을 받아 data와 l.. 2024. 8. 29. [Computer Vision] 이미지 픽셀 값 조정 개발 환경: ColabDrive Mountfrom google.colab import drivedrive.mount('/content/drive') 우선, glob 함수를 통해 이미지의 경로를 리스트로 받아온다. import cv2import globfrom google.colab.patches import cv2_imshowfrom PIL import Image as PILImageimport matplotlib.pyplot as pltfig=plt.figure(figsize=(10,10))dolphin_img_list = glob.glob('/content/drive/MyDrive/Your_Path/origianl/dolphin/*')시각화위의 dolphin_img_list를 시각화하기 위한 모듈로는.. 2024. 8. 29. [Computer Vision] 학습 데이터 디렉토리 클래스 구축 개발 환경: Colab google 이미지에서 dolphin, shark, whale 이미지를 크롤링Drive Mount'내 드라이브'를 연동하기 위해 Colab에서 제공하는 drive 모듈을 사용한다. from google.colab import drivedrive.mount('/content/drive') 드라이브를 연결하고 경로를 확인해보면 초기 경로인 '/content'로 나올 것이다.pwd----------'/content' 그렇기에 경로를 현재 자신이 진행할 프로젝트 디렉토리로 변경해줘야한다.Your_Path 자리에 각자의 프로젝트 디렉토리로 대체하면 된다.%cd /content/drive/MyDrive/Your_Path/ 다시 경로를 확인해보면 바뀐 것을 확인할 수 있다.이 경로를 root .. 2024. 8. 28. [논문 리뷰] R-CNN: Rich feature hierarchies for accurate object detection and semantic segmentation (2014) Paper: https://arxiv.org/pdf/1311.2524 본 논문에서는 VOC 2012 dataset을 기준으로 이전의 방법들보다 mAP가 30% 이상 향상된 더 간단하고 확장 가능한 detection 알고리즘인 R-CNN 모델을 소개한다.이를 통해 53.3%의 mAP를 기록했다. R-CNN은 2가지 key insight의 결합으로 이뤄진다.Localize와 segmentation을 위한 bottom-up 방식의 region proposal을 CNN에 적용하였다.labeled data가 부족한 경우에, pre-trained된 CNN을 fine-tuning한다.R-CNNR-CNN은 Regions with CNN의 약자이다.즉, region proposals와 CNN이 결합된 구조이다.2-sta.. 2024. 8. 27. [논문 리뷰] DeepLabV3+: Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation (2018) Paper: https://arxiv.org/pdf/1802.02611v3Spatial Pyramid Pooling(SPP)와 Encoder-Decoder 구조는 semantic segmentation 분야에서 사용된다.SPP는 multi-scale contextual 정보를 인코딩할 수 있게 하고, Encoder-Decoder 구조는 object의 경계를 더 디테일하게 포착할 수 있게 한다.본 논문에서는 위 두 방법의 결합을 제안하며, DeepLabV3에 간단하지만 효과적인 decoder를 추가한 DeepLabV3+ 모델을 소개한다. 또한, Xception 모델의 Depthwise Separable Convolution을 ASPP와 Decoder에 적용하였다.ASPP이전의 DeepLab 모델 논문 리.. 2024. 8. 27. 이전 1 2 3 4 5 6 7 ··· 15 다음