Using CloudSight’s Visual Understanding on Google Cloud

Brad Folkens
CloudSight
Published in
3 min readApr 1, 2020

--

CloudSight’s breakthrough image recognition technology is now available in your own private cloud, via a Google Cloud virtual machine image. If your business uses a private cloud, or there are privacy or security requirements that prevent its use, then this option is the perfect solution. Similar to CloudSight’s public cloud API, the CloudSight VM on Google Cloud allows you to send images and retrieve a description of the image in natural language, except the traffic stays completely in your own private network.

Let’s get Started

Getting started is very quick and easy. First, navigate to the Google Partner and find a CloudSight VM. Once found, click “Launch” to begin the process.

Click “Launch” begin the process.

On the next page, you’ll have an opportunity to configure your machine. We recommend using a machine with a GPU accelerator to speed up the response time for each request. When you have completed the configuration of your instance, click “Deploy” to start a new VM instance in your account from the CloudSight VM image.

Click “Deploy” to start a VM instance in your account from the CloudSight VM image.

As your instance is created, the progress will be shown as in the screenshot below.

Google Cloud shows the progress of the new VM deployment.

When the startup of the instance is complete, ensure the machine is running by navigating to the Compute > VM Instances menu option, or using the following from the command line:

gcloud compute instances list

Note the IP address of the running instance (either internal or external, depending on how you wish to access the machine), and use the following command, where [MACHINE_IP] is the IP address of the newly created virtual machine, in order to determine when the CloudSight service is ready:

curl -I http://[MACHINE_IP]:8080/ping

The system is ready when the endpoint above returns a 200. Now that the service is running, send an image to the service to test that the service is working properly. In the example below, a local file named example.jpg is used.

curl -X POST -H 'Content-Type: application/octet-stream' \
--data-binary '@example.jpg' \
http://[MACHINE_IP]:8080/images

Note that the service expects an HTTP POST request with the binary data of the requested image.

If successful, you should see a response like the following:

{"caption": "woman in white button up shirt walking in a crosswalk in the rain on a busy city street"}

That’s it! Your machine is now ready for service. If you’d like to scale up the number of images processed, it’s easy to scale horizontally by adding more machines to your cluster, and placing these machines behind a standard HTTP Load Balancer.

--

--

Co-Founder of @CloudSightAPI, @CamFind, @TapTapSee. Photographer. Musician. Plant-based athlete.