examples icon indicating copy to clipboard operation
examples copied to clipboard

[Bug] Unable to reproduce zero-shot object detection

Open vardaan123 opened this issue 1 year ago • 1 comments

Is this a new bug?

  • [X] I believe this is a new bug
  • [X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I tried running the zero=shot object detection notebook at https://www.pinecone.io/learn/series/image-search/zero-shot-object-detection-clip/ without any changes but am unable to reproduce the result given on the website. The bounding boxes output for the cat and butterfly are identical

Kindly help me debug this.

Expected Behavior

The expected output is the set of correct bounding boxes for cat and butterfly.

Steps To Reproduce

The colab notebook with outputs is https://colab.research.google.com/drive/1Js1aame9wOYSkiOz0Fi14aemLSeycR1R?usp=sharing

Relevant log output

No response

Environment

- **OS**: Colab runtime 
- **Language version**:
- **Pinecone client version**:

Additional Context

No response

vardaan123 avatar Mar 12 '24 00:03 vardaan123

Hi there, I am facing the same issue. Does anyone have solutions? Thanks :)

junrur avatar Apr 08 '24 15:04 junrur

Try adding do_rescale=False when passing the image to the processor. Before: inputs = processor( images=big_patch, return_tensors="pt", text=prompt, padding=True ).to(device) After: inputs = processor( images=big_patch, return_tensors="pt", text=prompt, padding=True, do_rescale=False ).to(device)

Angry-Biscuit avatar Oct 31 '24 13:10 Angry-Biscuit

Try adding do_rescale=False when passing the image to the processor. Before: inputs = processor( images=big_patch, return_tensors="pt", text=prompt, padding=True ).to(device) After: inputs = processor( images=big_patch, return_tensors="pt", text=prompt, padding=True, do_rescale=False ).to(device)

This worked for me! Thank you!

Abs-Famppy avatar Nov 18 '24 02:11 Abs-Famppy

Thanks

vardaan123 avatar Nov 18 '24 03:11 vardaan123