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

issue with google cloud vision integration #1

Open
sushantsapra opened this issue Nov 27, 2023 · 1 comment
Open

issue with google cloud vision integration #1

sushantsapra opened this issue Nov 27, 2023 · 1 comment

Comments

@sushantsapra
Copy link

hello sir
thanks a lot for uploading your work

I am getting the following error with respect to integration and credentials of google cloud vision client

{'Error': 'No EXIF data found in the image.'}

0: 480x640 1 license, 72.8ms
Speed: 5.3ms preprocess, 72.8ms inference, 3.0ms postprocess per image at shape (1, 3, 480, 640)
Traceback (most recent call last):
File "/home/sushant/YOLOv8-License-Plate-Detection/inference.py", line 334, in
recognized_img = detector.recognize_license_plate(file_path)
File "/home/sushant/YOLOv8-License-Plate-Detection/inference.py", line 54, in recognize_license_plate
license_plate = self.extract_license_plate_text(roi)
File "/home/sushant/YOLOv8-License-Plate-Detection/inference.py", line 119, in extract_license_plate_text
client = vision.ImageAnnotatorClient()
File "/home/sushant/anaconda321/envs/banodet/lib/python3.10/site-packages/google/cloud/vision_v1/services/image_annotator/client.py", line 462, in init
self._transport = Transport(
File "/home/sushant/anaconda321/envs/banodet/lib/python3.10/site-packages/google/cloud/vision_v1/services/image_annotator/transports/grpc.py", line 155, in init
super().init(
File "/home/sushant/anaconda321/envs/banodet/lib/python3.10/site-packages/google/cloud/vision_v1/services/image_annotator/transports/base.py", line 103, in init
credentials, _ = google.auth.default(
File "/home/sushant/anaconda321/envs/banodet/lib/python3.10/site-packages/google/auth/_default.py", line 691, in default
raise exceptions.DefaultCredentialsError(_CLOUD_SDK_MISSING_CREDENTIALS)
google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information.

@yihong1120
Copy link
Owner

Hey there!

Thanks for reaching out. Looks like you've hit a couple of snags with the Google Cloud Vision API. Let's untangle this, shall we?

  1. Missing EXIF Data:

    • This error usually pops up when your image file is missing EXIF data. That's the stuff like camera settings, timestamps, etc., embedded in the picture. Just double-check your images to make sure they've got this data.
  2. Default Credentials Not Found:

    • This one's about the API client not finding the creds it needs to kick things off. Here’s a quick guide to fix it:
      • Make sure you've got a project set up in Google Cloud Console with the Vision API turned on.
      • Create a service account and download its key (a JSON file).
      • Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to your key file.
    • You can find more detailed instructions in the Google Cloud docs. They’re pretty handy.

By the way, we're planning to add a tutorial on setting up the Google Cloud Vision API soon. Keep an eye out for that – it should help you get things running smoothly.

Cheers!

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

2 participants