This simple code example demonstrates how to use the Google Vision API to tag images.
-
Extract the file test-images.tar.gz to project root folder.
-
Setup environment
virtualenv -p python3 venv source venv/bin/activate pip3 install -r requirement.txt
-
Running example:
export PROJECT=your-gcp-project python3 snippet.py ${PROJECT} images/dataset.csv --export_json True
-
Check results: This example saves image tags to Google Cloud Datastore and uploads the image to Google Cloud Storage. This can be useful to build an extension to allow searching images by tags.