[Bug] Unable to reproduce zero-shot object detection
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
Hi there, I am facing the same issue. Does anyone have solutions? Thanks :)
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)
Try adding
do_rescale=Falsewhen 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!
Thanks