timm documentation

Hiera

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v1.0.30).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Hiera

카테고리: ViT · 코드: timm/models/hiera.py · 아키텍처: 8 · 프리트레이닝 가중치: 16 (ImageNet-1k 결과가 포함된 8개)

Hiera는 전문 모듈(합성곱, 시프트된 윈도우, 상대 위치 편향)이 없는 계층형 비전 트랜스포머로, 공간적 편향을 학습하기 위해 마스크 오토인코더(MAE) 사전 학습에 의존합니다.

논문

사용

사전 학습된 가중치 로드, 이미지 전처리 및 파인튜닝에 대해서는 Quickstart를, 모델을 백본으로 사용하는 방법에 대해서는 Feature Extraction을 참고하세요.

>>> import timm
>>> model = timm.create_model('hiera_tiny_224.mae_in1k_ft_in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)

모델 API 지원

기능Hiera
features_only=True feature map✓ (strides 4, 8, 16, 32)
forward_intermediates()✓
prune_intermediate_layers()✓
입력 크기 무관, 변경 불필요✗
set_input_size()✗
dynamic_img_size=True✗
set_grad_checkpointing()✓
레이어별 LR 감쇠(group_matcher())✓
reset_classifier()✓

✓ 지원됨, ✓ (정사각형) 정사각형 크기만 지원됨, ✗ 미지원, – 필요 없음(모델이 이미 모든 입력 크기를 허용함). 무작위로 초기화된 모델(Hiera의 hiera_tiny_224, 224)에서 각 기능을 실행하여 확인했습니다. 같은 클래스의 다른 아키텍처도 동일한 동작을 하는 것으로 예상됩니다. 자세한 내용은 Model API 페이지를 참조하세요.

아키텍처

아키텍처매개변수 (M)GMAC입력 크기사전 학습된 가중치
hiera_base_22451.529.402242
hiera_base_abswin_25651.2712.462560
hiera_base_plus_22469.9012.672242
hiera_huge_224672.78124.852242
hiera_large_224213.7440.342242
hiera_small_22435.016.422242
hiera_small_abswin_25634.368.292564
hiera_tiny_22427.914.912242

GMACs와 매개변수 수는 각 아키텍처의 기본 입력 크기 및 분류기에 대한 값이며, 벤치마크 결과에서 가져왔습니다.

사전 학습된 가중치

Top-1은 results-imagenet.csv에 나열된 평가 크기에서 측정된 ImageNet-1k 검증 정확도입니다. - 가중치에 ImageNet-1k 결과가 없는 경우(예: 사전 학습 또는 이미지-텍스트 가중치)에는 표시하지 않습니다. Classes는 사전 학습된 분류기의 크기를 나타내며, 분류기가 없는 가중치의 경우 none입니다.

Weights는 소스에 따라 그룹화됩니다. 사전 학습 설정에 명시된 논문 또는 출처, 그렇지 않으면 timm가 아닌 Hub 조직, 그렇지 않으면 사전 학습 태그의 첫 번째 부분(architecture.tag)입니다. 단일 weight만 있는 소스는 other에 나열됩니다.

mae 태그

가중치입력 크기Top-1(%)평가 크기클래스라이선스Hub
hiera_base_224.mae224--없음cc-by-nc-4.0timm
hiera_base_224.mae_in1k_ft_in1k22484.5282241000cc-by-nc-4.0timm
hiera_base_plus_224.mae224--없음cc-by-nc-4.0timm
hiera_base_plus_224.mae_in1k_ft_in1k22485.1362241000cc-by-nc-4.0timm
hiera_huge_224.mae224--없음cc-by-nc-4.0timm
hiera_huge_224.mae_in1k_ft_in1k22486.8402241000cc-by-nc-4.0timm
hiera_large_224.mae224--없음cc-by-nc-4.0timm
hiera_large_224.mae_in1k_ft_in1k22486.0462241000cc-by-nc-4.0timm
hiera_small_224.mae224--없음cc-by-nc-4.0timm
hiera_small_224.mae_in1k_ft_in1k22483.8882241000cc-by-nc-4.0timm
hiera_tiny_224.mae224--없음cc-by-nc-4.0timm
hiera_tiny_224.mae_in1k_ft_in1k22482.8262241000cc-by-nc-4.0timm

sbb2 태그

가중치입력 크기Top-1(%)평가 크기클래스라이선스Hub
hiera_small_abswin_256.sbb2_e200_in12k256--11821apache-2.0timm
hiera_small_abswin_256.sbb2_e200_in12k_ft_in1k25684.9122561000apache-2.0timm
hiera_small_abswin_256.sbb2_pd_e200_in12k256--11821apache-2.0timm
hiera_small_abswin_256.sbb2_pd_e200_in12k_ft_in1k25684.5642561000apache-2.0timm
Update on GitHub