Network14 [Network] hugging face에서 ImageNet1K 다운받아서 사용하기 컴퓨터 비전 실험을 하다보면 아이디어가 떠올라서 가장 처음에는 MNIST나 CIFAR10/100과 같은 작은 데이터셋에서 실험을 수행하게 된다. 이후 작은데이터셋에서의 검증이 끝나면 어느정도 규모가 있는 데이터셋에서 실험을 하고 싶다. 이때 만만한 데이터셋이 ImageNet 1K이다. 학습데이터 : 1281167개, 검증데이터 : 50000개가 존재한다.그런데, hugginngface 에서 쉽게 받을수 있는 방법이 있어서 소개하려한다. 이미지넷은 아주 예전 포스팅에서 한번 다뤘었다. https://csm-kr.tistory.com/6 ILSVRC(Imagenet classification)validation set torchvision 으로 성능평가하기안녕하세요! "pulluper" 입니다. 이번 포스.. 2025. 1. 3. [DNN] Swin Transformer 리뷰 및 구현 (ICCV 2021) 안녕하세요 pulluper 입니다. 이번 포스팅에서는 ICCV2021 발표 후 많은 비전 모델의 백본으로 사용되고 있는 swin transformer 논문에 대하여 알아보겠습니다. https://arxiv.org/abs/2103.14030 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows This paper presents a new vision Transformer, called Swin Transformer, that capably serves as a general-purpose backbone for computer vision. Challenges in adapting Transformer from language t.. 2023. 4. 12. [DNN] torchvision module 이용해서 resnet-dc5 구현하기 Resnet50 등에서 dc5 구현방법 dc5 모델이란? https://github.com/facebookresearch/detectron2/blob/main/MODEL_ZOO.md GitHub - facebookresearch/detectron2: Detectron2 is a platform for object detection, segmentation and other visual recognition t Detectron2 is a platform for object detection, segmentation and other visual recognition tasks. - GitHub - facebookresearch/detectron2: Detectron2 is a platform for ob.. 2023. 3. 21. [DNN] timm을 이용한 VIT models ILSVRC classification 성능평가 안녕하세요 pulluper 입니다! 이번 포스팅에서는 timm 모듈을 이용하여 평가한 vit(vision transformer) classification성능을 정리 해보겠습니다. timm 모듈은 hugging face에서 만들어주신 다음 레포에서 확인 할수 있습니다. (너무 감사합니다!) https://github.com/huggingface/pytorch-image-models GitHub - huggingface/pytorch-image-models: PyTorch image models, scripts, pretrained weights -- ResNet, ResNeXT, EfficientNet, E PyTorch image models, scripts, pretrained weights -- R.. 2023. 3. 17. [DNN] multi-head cross attention vs multi-head self attention 비교 안녕하세요 pulluper 입니다. attention 을 사용한 모듈을 보면, 하나의 인풋이 들어와서 q, k, v 가 같은 length를 가지는 경우가 있고, q의 길이와 k, v의 길이는 다른 경우를 왕왕 볼 수 있습니다. 예를들어 DETR의 decoder의 경우에서 사용하는 attention 중 하나는 q, k, v 의 길이가 모두 같지 않습니다. 이때 timm의 구현과 비슷하게 다음을 구현해 보겠습니다. 모두 같은 길이를 같는 모듈은 Multi-head Self Attention(MSA) 이라 하겠고, 그렇지 않으면 Multi-head Cross Attention(MCA) 이라 하겠습니다. 다음은 그것들의 구현입니다. import torch import torch.nn as nn import to.. 2023. 2. 2. performer 구현 import os import time import torch import visdom import argparse import torch.nn as nn import torchvision.transforms as tfs from torch.utils.data import DataLoader from timm.models.layers import trunc_normal_ from torchvision.datasets.cifar import CIFAR10 # performer ############################################# import math import torch import torch.nn as nn from functools import partial from ei.. 2022. 12. 12. 이전 1 2 3 다음