timm documentation

LowFormer

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

and get access to the augmented documentation experience

to get started

LowFormer

Thể loại: Hiệu quả/Di động · Code: timm/models/lowformer.py · Kiến trúc: 8 · Trọng số tiền huấn luyện: 7 (0 có kết quả ImageNet-1k)

LowFormer là một backbone transformer tích chập được thiết kế cho hiệu quả phần cứng (đo thông lượng và độ trễ thay vì MACs). Các biến thể GPU biên E1 / E2 / E3 đến từ phần mở rộng của tạp chí.

Bài báo

Cách sử dụng

Xem Quickstart để tải trọng số được huấn luyện trước, tiền xử lý ảnh và tinh chỉnh, và Feature Extraction để sử dụng các mô hình làm bộ xương sống.

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

Hỗ trợ API mô hình

Tính năngLowFormer
bản đồ đặc trưng features_only=True✓ (các bước nhảy 4, 8, 16, 32)
forward_intermediates()✓
prune_intermediate_layers()✓
Bất kỳ kích thước đầu vào nào, không cần thay đổi✓
set_input_size()–
dynamic_img_size=True–
set_grad_checkpointing()✓
Suy giảm LR theo lớp (group_matcher())✓
reset_classifier()✓

✓ được hỗ trợ, ✓ (vuông) chỉ hoạt động với kích thước vuông, ✗ không được hỗ trợ, – không cần thiết (mô hình đã chấp nhận bất kỳ kích thước đầu vào nào). Được kiểm tra bằng cách chạy từng tính năng trên một mô hình được khởi tạo ngẫu nhiên (LowFormer với lowformer_b0 ở 224), các kiến trúc khác cùng lớp được kỳ vọng sẽ hoạt động tương tự. Xem trang Model API để biết chi tiết.

Kiến trúc

Kiến trúcSố tham số (M)GMACsKích thước đầu vàoTrọng số được huấn luyện trước
lowformer_b014.10-2241
lowformer_b117.94-2241
lowformer_b244.99-2240
lowformer_b357.09-2241
lowformer_b1533.98-2241
lowformer_e118.90-2241
lowformer_e222.75-2241
lowformer_e341.32-2241

GMACs và số lượng tham số được tính cho kích thước đầu vào và bộ phân loại mặc định của mỗi kiến trúc, từ kết quả benchmark.

Trọng số được huấn luyện trước

Top-1 là độ chính xác kiểm tra trên ImageNet-1k từ results-imagenet.csv ở kích thước eval được liệt kê, - nếu trọng số không có kết quả ImageNet-1k (ví dụ trọng số pretraining hoặc image-text). Classes là kích thước của bộ phân loại được huấn luyện trước, không có đối với các trọng số không có bộ phân loại.

Trọng sốKích thước đầu vàoTop-1 (%)Kích thước đánh giáCác lớpGiấy phépHub
lowformer_b0.in1k224--1000apache-2.0timm
lowformer_b1.in1k224--1000apache-2.0timm
lowformer_b3.in1k224--1000apache-2.0timm
lowformer_b15.in1k224--1000apache-2.0timm
lowformer_e1.in1k224--1000apache-2.0timm
lowformer_e2.in1k224--1000apache-2.0timm
lowformer_e3.in1k224--1000apache-2.0timm

Trích dẫn

@article{Nottebaum2024LowFormerHE,
  title={LowFormer: Hardware Efficient Design for Convolutional Transformer Backbones},
  author={Moritz Nottebaum and Matteo Dunnhofer and Christian Micheloni},
  journal={2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
  year={2024},
  pages={7008-7018},
}

@article{Nottebaum2026BeyondMACs,
  author  = {Nottebaum, Moritz and Dunnhofer, Matteo and Micheloni, Christian},
  title   = {Beyond {MAC}s: Hardware Efficient Architecture Design for Vision Backbones},
  journal = {International Journal of Computer Vision},
  year    = {2026},
  volume  = {134},
  number  = {6},
  pages   = {295},
  doi     = {10.1007/s11263-026-02873-5},
  url     = {https://doi.org/10.1007/s11263-026-02873-5}
}
Update on GitHub