Perform image labeling on images uploaded to storage and write the labels in Firestore.
### How this function works
This function will label (classify) from any jpg, jpeg, or png images uploaded to Cloud Storage and write the labels to Firestore.
### Prerequisites
- You must have previous knowledge of **Firestore**.
- You must have previous knowledge of **Firebase Storage**.
- You must have previous knowledge of **Cloud Vision API**.
### Function details
In order to complete the installation process, you must add the required info to the form:
- **Bucket Name**: The name of the bucket that you'd like this function to listen to for changes to the object, e.g., 'images'.
- **LABELS_COLLECTION_PATH**: The collection path where the extracted labels will be stored.
> Note that you must enter a valid bucket name. Invalid bucket names can cause the installation to fail.
### Using this function
Upload images to the configured Storage bucket. Then a new document with the extracted labels will appear in the Firestore collection within a few seconds. The document will have the name of the file that was uploaded as shown in the following example:
```
{
file: "gs://default-bucket/test.png",
labels: ["Sky", "Cloud", "Water", "Plant", "Blue"]
}
```
> Labels are returned in English only.
### Resources
- [Detect labels in images documentation](https://cloud.google.com/vision/docs/labels)
- [Cloud Vision API](https://cloud.google.com/vision/docs/reference/rest?hl=en)