recognize-anything
recognize-anything copied to clipboard
python inference_ram_openset.py --image images/openset_example.jpg --pretrained ./ram_swin_large_14m.pth
openset_example.jpg --pretrained ./ram_swin_large_14m.pth
Traceback (most recent call last):
File "inference_ram_openset.py", line 45, in
You can manually download the bert pretrained tokenizer and load it locally. Please change this code: https://github.com/xinyu1205/recognize-anything/blob/main/ram/models/utils.py#L131C5-L131C67
给需要帮助的人
- 首先去下载文件 https://huggingface.co/google-bert/bert-base-uncased/tree/main 只需要这几个 config.json 、tokenizer.json、tokenizer_config.json、vocab.txt、gitattributes、LICENSE、README.md 2.保存到项目目录下,如 resources/bert-base-uncased 3.在初始化时候指定目录即可 model = ram_plus(pretrained='resources/ram_plus_swin_large_14m.pth', image_size=384, vit='swin_l',text_encoder_type='resources/bert-base-uncased')
- text_encoder_type='resources/bert-base-uncased'
大哥,贼吊