Coder Social home page Coder Social logo

Comments (2)

lvboodvl avatar lvboodvl commented on August 15, 2024

@yinjiahuidada hello, I meet the same problem, and switch to transformer offine mode as below:
TRANSFORMERS_OFFLINE=1 python inference_ram.py --image images/1641173_2291260800.jpg --pretrained pretrained/ram_swin_large_14m.pth

from recognize-anything.

lcc815 avatar lcc815 commented on August 15, 2024

@lvboodvl thanks for your solutions, but i still got the following errors following your way

Traceback (most recent call last):
  File "inference_ram.py", line 43, in <module>
    model = ram(pretrained=args.pretrained,
  File "/mnt/csi-data-aly/user/*/recognize-anything/ram/models/ram.py", line 263, in ram
    model = RAM(**kwargs)
  File "/mnt/csi-data-aly/user/*/recognize-anything/ram/models/ram.py", line 103, in __init__
    self.tokenizer = init_tokenizer()
  File "/mnt/csi-data-aly/user/*/recognize-anything/ram/models/utils.py", line 131, in init_tokenizer
    tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
  File "/opt/conda/envs/bevfusion/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 1736, in from_pretrained
    raise EnvironmentError(msg)
OSError: Can't load tokenizer for 'bert-base-uncased'. Make sure that:

- 'bert-base-uncased' is a correct model identifier listed on 'https://huggingface.co/models'
  (make sure 'bert-base-uncased' is not a path to a local directory with something else, in that case)

- or 'bert-base-uncased' is the correct path to a directory containing relevant tokenizer files

from recognize-anything.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.