-
Notifications
You must be signed in to change notification settings - Fork 13
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
Unable to process .pgm or grayscale images #4
Comments
Hello @Mars-204! Thank you for creating this Issue! Autodistill implements its own image loading logic. This is because we want to standardize how we process images across all models. We didn't account for You should be able to load an image with PIL, convert it as necessary, then pass the PIL object through directly to image = Image.open('test.pgm')
image = image.convert('L')
model.predict(image) Let me know if this code helps! |
Thanks for the information. I am using autodistill-grounding-dino for creating annotated dataset. How should I proceed if I want to pass the whole folder of images as input? For eg: base_model_dino.label(input_folder=folder_name, output_folder=save_dir, extension=".pgm") |
My solution above will not work with I have submitted a PR that will load Would you be interested in testing the implmentation? You can install the fix using: pip uninstall autodistill
pip install git+https://github.com/autodistill/autodistill.git@add-pgm-support Then, run your code. |
Thanks for the updtae. But still it is unable to process the pgm images with the fix.
I also tried changing ''image = load_image(input, return_format="PIL")'' but got the error:
|
Current model is unable to process the .pgm images. While the actual grounding DINO model can process these type of images(Tested on the colab notebook https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/zero-shot-object-detection-with-grounding-dino.ipynb#scrollTo=VKzXm8mNR2XS)
The text was updated successfully, but these errors were encountered: