- Install your preferred IDE. Example: VS Code
- Clone this repository or download the zip file.
- Navigate to console.cloud.google.com
- Create a new project
- Configure your billing account
- Search for Cloud Vision API -> Enable. Cloud Vision API
- Search for Vertex AI API -> Enable Vertex AI API
In this hack, we will explore the Vision API and its features. The one we will take a look at is "Detecting Faces".
Steps
- Click on the three lines to navigate to the drop down list. Click on APIs & Services -> Credentials. Click + Create Credentials -> Service Account. Select a role -> Basic -> Owner. Once created, Click service account url -> Go to keys -> Add Key -> JSON. Save this file inside the directory.
- Create a virtual env inside your preferred IDE. I am using VS Code. Once you are in the correct directory, open a terminal and run this command to create a virtual environment.
- python -m venv gcpdemo
- gcpdemo/Scripts/activate
- Install some libraries
- pip install --upgrade google-cloud-vision
- pip install pandas
- pip install pillow
- Open the Interpreter (Ctrl + Shift + P) to select your virtual environment.
- Run the script
In this hack, we will explore the Generative AI Studio inside Vertex AI component of the GCP console.
Steps
- Navigate to the three lines at the top left of the GCP Console. You will see a dropdown list. Scroll down until you find the Artificail Intelligence section. We want to click on Vertex AI. It may be helpful to pin this service so it shows up at the top of the drop down next time.
- You will see the Generative AI Studio on the left sidebar. Click on Vision. Choose the "Gen-AI-Demo-Img" from the data folder and upload it to the UI.
- We can experiement with the two features "Caption" and "Visual Q&A"
In this hack, we will explore how to create your own custom models in the Vertex AI portal. We will train a simple object detection model to detect a buffalo versus a zebra.
Steps
- Naviagate to Cloud Storage using the search bar at the top of the console. Click on +Create. Upload the folder that contains all the training images.
- Prepare your data. We will need to create a CSV/JSONL file containing the annotations for the training data. See the resources linked below for more information.
- If needed, label a couple of the images with the labelling tool.
- Navigate to Vertex AI from the left drop down.
- Datasets -> Create -> Image object detection -> Select image files from Cloud Storage -> Select the annotations file.
- Training -> Create
- Deploy and Use -> Create
- Test with the endpoint