Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data/owlvit-base-patch32-image-encoder.engine" not found #11

Open
enazari opened this issue Jan 10, 2024 · 3 comments
Open

data/owlvit-base-patch32-image-encoder.engine" not found #11

enazari opened this issue Jan 10, 2024 · 3 comments

Comments

@enazari
Copy link

enazari commented Jan 10, 2024

Hi @jaybdub ,
I have a question about populating the data folder with different engine files. How should one populate this folder? After installing all the dependencies, when I run the script below, I encounter FileNotFoundError error:


from nanoowl.owl_predictor import OwlPredictor

predictor = OwlPredictor(
    "google/owlvit-base-patch32",
    image_encoder_engine="data/owlvit-base-patch32-image-encoder.engine"
)

image = PIL.Image.open("assets/owl_glove_small.jpg")

output = predictor.predict(image=image, text=["an owl", "a glove"], threshold=0.1)

print(output)

The error is:
FileNotFoundError: [Errno 2] No such file or directory: 'data/owlvit-base-patch32-image-encoder.engine'

Thank you very much for your patience and help.

Best,
Ehsan

@jaybdub
Copy link
Contributor

jaybdub commented Jan 10, 2024

Hi @enazari ,

The path should be relative to the location your running the Python script from.

Which directory are you executing the code from, and where is the engine file relative to this?

John

@enazari
Copy link
Author

enazari commented Jan 10, 2024

Thank you @jaybdub for your prompt reply.

I created a jupyter file inside nanoowl directory where data directory lies. Inside data directory, I have owl_image_encoder_patch32.engine and owl_predict_out.jpg that are generated when I executed other scripts in this repo's readme.

I am not sure how I can generate/obtain owlvit-base-patch32-image-encoder.engine.

Thank you,
Ehsan

@kenJPG
Copy link

kenJPG commented Mar 21, 2024

Hi, after toying with this project, my perspective is that owlvit-base-patch32-image-encoder.engine is intended to be owl_image_encoder_patch32.engine. Thus you just need to rename and it will be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants