GithubHelp home page GithubHelp logo

Image sizes about recognize-anything HOT 4 OPEN

shersoni610 avatar shersoni610 commented on May 28, 2024
Image sizes

from recognize-anything.

Comments (4)

xinyu1205 avatar xinyu1205 commented on May 28, 2024

Hi, the default input size is 384, and you can also specify the input size at will when model initialization.

from recognize-anything.

shersoni610 avatar shersoni610 commented on May 28, 2024

Hello Xinyu,

After looking at the code it seems only two sizes are suported 224 and 384 and there is assert statement to check the image size. How should we handle 2k or 4K images?

from recognize-anything.

shersoni610 avatar shersoni610 commented on May 28, 2024

This is error message with RAM:
(ramrecog) $ python inference_ram.py --image ~/Downloads/dot-and-mom-aziza-2-649f050319cb3.jpg --image-size 1024
Traceback (most recent call last):
File "/Users/Projects/SegmentAnything/RAM/recognize-anything/inference_ram.py", line 42, in
model = ram(pretrained=args.pretrained, image_size=args.image_size, vit='swin_l')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Projects/SegmentAnything/RAM/recognize-anything/ram/models/ram.py", line 263, in ram
model = RAM(**kwargs)
^^^^^^^^^^^^^
File "/Users/Projects/SegmentAnything/RAM/recognize-anything/ram/models/ram.py", line 77, in init
vision_config = read_json(vision_config_path)
^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'vision_config_path' where it is not associated with a value

from recognize-anything.

xinyu1205 avatar xinyu1205 commented on May 28, 2024

Hi, the reason should be that we only include the Swin config for 224&384 in ram/configs/swin. Perhaps you should check how Swin adapts to larger image resolutions.

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.