0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[Google Cloud]Jump Start Solutions を試す

Last updated at Posted at 2023-09-30

概要

Google Cloud Next '23でJump Start SolutionsがGAとなったので試してみます。

Jump Start Solutionsとは

コンソールから数回クリックするだけでGoogle Cloud ベストプラクティスに沿ったサンプル アプリケーションとインフラストラクチャをデプロイできる仕組みです。コンソールからのクリックだけでなくTerraform等のコードも用意されています。

ドキュメント

ブログ

Jump Start Solutionsを使ってみる

1.ここからデプロイしたいものを選びます。今回は左上の「AI/ML image processing on Cloud Functions」を試してみました。
image.png

2.詳細をクリックするとソリューション紹介のページに遷移しアーキテクチャの説明などを確認することができます。
image.png

3.ページを読み進めていくとデプロイ方法の選択のところでTerraformでデプロイするかコンソールから選べます。今回はコンソールからデプロイしてみようと思うので、ページ中の「Cloud Functions での AI / ML 画像処理ソリューションに移動」をクリックします
image.png

4.クリックするとGoogle Cloudコンソールに移動し、アーキテクチャやプロダクト、料金を確認することができます。
image.png

5.デプロイを押すとプロジェクトやリージョン等を選択できます。
image.png
デプロイ前には有効化されるAPIを確認することもできます。
image.png

6.デプロイを押して数分待つとデプロイ完了となります
image.png
作成状況はリソースタブから確認できます
image.png

作成されたGCF
image.png
作成されたGCS
image.png

デプロイしたサービスを使ってみる

デプロイされたものではオンラインのAPIリクエストもしくはGCSにファイルを配置したバッチのどちらかで画像にアノテーションを付けることができます。
image.png

APIの場合、以下のように動作します

※以下の画像利用
image.jpg

以下のようにアノテーションの付与ができる

$ curl -X POST -F image=@image.jpg -F features=OBJECT_LOCALIZATION "https://asia-northeast1-XXXXXXXX.cloudfunctions.net/annotate-http/annotate"
{
  "localizedObjectAnnotations": [
    {
      "mid": "/m/0k4j",
      "name": "Car",
      "score": 0.8716894,
      "boundingPoly": {
        "normalizedVertices": [
          {
            "x": 0.5042977,
            "y": 0.4700892
          },
          {
            "x": 0.87957644,
            "y": 0.4700892
          },
          {
            "x": 0.87957644,
            "y": 0.5699384
          },
          {
            "x": 0.5042977,
            "y": 0.5699384
          }
        ],
        "vertices": []
      },
      "languageCode": ""
    },
    {
      "mid": "/m/0cgh4",
      "name": "Building",
      "score": 0.8094783,
      "boundingPoly": {
        "normalizedVertices": [
          {
            "x": 0.0010392503,
            "y": 0.0
          },
          {
            "x": 0.2614052,
            "y": 0.0
          },
          {
            "x": 0.2614052,
            "y": 0.5553696
          },
          {
            "x": 0.0010392503,
            "y": 0.5553696
          }
        ],
        "vertices": []
      },
      "languageCode": ""
    },
    {
      "mid": "/m/01bjv",
      "name": "Bus",
      "score": 0.5640942,
      "boundingPoly": {
        "normalizedVertices": [
          {
            "x": 0.42706275,
            "y": 0.4339448
          },
          {
            "x": 0.55545807,
            "y": 0.4339448
          },
          {
            "x": 0.55545807,
            "y": 0.5248143
          },
          {
            "x": 0.42706275,
            "y": 0.5248143
          }
        ],
        "vertices": []
      },
      "languageCode": ""
    }
  ],
  "faceAnnotations": [],
  "landmarkAnnotations": [],
  "logoAnnotations": [],
  "labelAnnotations": [],
  "textAnnotations": []
}

おわりに

もともとGoogle Cloudはアーキテクチャセンタの情報が豊富かつ使いやすいと感じていましたが、今回Jump Start Solutionsによって短時間で試すということが容易となりより便利になった印象です。
まだ利用できるアーキテクチャはそこまで多くないのでこれから種類が増えたり新しいサービスもすぐに使えるようになっていくと検証のコストが下がっていくと感じています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?