THU-MIG / RepViT

RepViT: Revisiting Mobile CNN From ViT Perspective [CVPR 2024] and RepViT-SAM: Towards Real-Time Segmenting Anything
https://arxiv.org/abs/2307.09283
Apache License 2.0
730 stars 55 forks source link

Has the repvit model been registered in the timm library? #4

Closed Wangxingzhi closed 1 year ago

Wangxingzhi commented 1 year ago

from timm.models import create_model model = create_model('repvit_m1')

Has the repvit model been registered in the timm library?

I cannot use the repvit model from the timm library. The error report is "RuntimeError: Unknown model (repvit_m1)". The versions of the timm library we used are timm-0.5.4 and timm-0.9.2.

Thanks.

jameslahm commented 1 year ago

Thanks, we are integrating repvit models into timm in this pr huggingface/pytorch-image-models#1876. After it is merged, repvit models can be used from the timm library directly. For now, we suggest that you could copy the file model/repvit.py locally and then use the repvit model like this:

import repvit
from timm.models import create_model
model = create_model('repvit_m1')
jameslahm commented 1 year ago

Hi, repvit models have been merged into timm in https://github.com/huggingface/pytorch-image-models/pull/1876. You can directly use repvit models from the timm library in its new release. 😊