Share via


クイック スタート: Azure AI Studio の画像とビデオで、GPT-4 Turbo with Vision の使用を開始する

重要

この記事で説明する機能の一部は、プレビューでのみ使用できる場合があります。 このプレビューはサービス レベル アグリーメントなしで提供されており、運用環境ではお勧めしません。 特定の機能はサポート対象ではなく、機能が制限されることがあります。 詳しくは、Microsoft Azure プレビューの追加使用条件に関するページをご覧ください。

この記事を使用して、GPT-4 Turbo with Vision モデルをデプロイしてテストするために Azure AI Studio の使用を開始します。

GPT-4 Turbo with Vision と Azure AI Vision では、次のような高度な機能を提供します。

  • 光学式文字認識 (OCR): 画像からテキストを抽出し、ユーザーのプロンプトと画像と組み合わせてコンテキストを展開します。
  • オブジェクト グラウンディング: GPT-4 Turbo with Vision テキスト応答をオブジェクト グラウンディングで補完し、入力画像内の顕著なオブジェクトの輪郭を示します。
  • ビデオ プロンプト: GPT-4 Turbo with Vision では、ユーザーのプロンプトとの関連性が最も高いビデオ フレームを取得して、質問に回答できます。

GPT-4 Turbo with Vision と Azure AI Vision の機能の使用時には、追加の使用料金が適用される場合があります。

前提条件

  • Azure サブスクリプション。無料で作成できます
  • 目的の Azure サブスクリプション内の Azure OpenAI に付与されたアクセス権。 現時点では、このサービスへのアクセスは申請によってのみ許可されます。 Azure OpenAI へのアクセスを申請するには、https://aka.ms/oai/access のフォームに入力してください。 問題がある場合は、このリポジトリで問題をオープンしてお問い合わせください。
  • Azure サブスクリプションを取得したら、Azure OpenAI リソースを作成します。
  • Azure OpenAI リソースが接続として追加された AI Studio ハブ

メディアを準備する

画像のクイックスタートを完了するには、画像が必要です。 このサンプル画像または、任意の利用できる画像を使用できます。

このクイックスタートを完了するために使用できる自動車事故の写真。

動画プロンプトの場合は、長さ 3 分以下のビデオが必要です。

GPT-4 Turbo with Vision モデルをデプロイする

  1. Azure AI Studio にサインインし、作業するハブを選択します。
  2. 左側のナビゲーション メニューで [AI サービス] を選択します。 [GPT-4 Turbo を試す] パネルを選択します。
  3. gpt-4 ページで [展開] を選択します。 表示されたウィンドウで、Azure OpenAI リソースを選択します。 モデル バージョンとして vision-preview を選択します。
  4. 展開 を選択します。
  5. 次に、新しいモデルのページに移動し、[プレイグラウンドで開く] を選択します。 チャット プレイグラウンドに、[展開] ドロップダウンで作成した GPT-4 の展開が選択されます。

このチャット セッションでは、入力した画像を解釈できるようにアシスタントに指示します。

  1. [システム メッセージ] タブの [システム メッセージ ] テキスト ボックスで、アシスタントをガイドするためのプロンプト "You're an AI assistant that helps people find information." を指定します。このプロンプトは、イメージまたはシナリオに合わせて調整できます。
  2. [変更の適用] を選択して変更を保存します。
  3. チャット セッション ウィンドウで、添付ファイル ボタンを選択し、[画像のアップロード] を選択します。 イメージを選択します。
  4. チャット フィールドに質問 "Describe this image" を追加し、送信する右矢印アイコンを選択します。
  5. 右矢印アイコンは[停止]ボタンに置き換えられます。 これを選択すると、アシスタントは要求の処理を停止します。 このクイックスタートでは、アシスタントに返信を完了させます。
  6. アシスタントは、画像の説明と共に応答します。
  7. 画像の分析に関連するフォローアップの質問をします。 "What should I highlight about this image to my insurance company?" のように入力できます。
  8. 次に示すような関連する応答が表示されるはずです。
    When reporting the incident to your insurance company, you should highlight the following key points from the image:  
    
    1. **Location of Damage**: Clearly state that the front end of the car, particularly the driver's side, is damaged. Mention the crumpled hood, broken front bumper, and the damaged left headlight.  
    
    2. **Point of Impact**: Indicate that the car has collided with a guardrail, which may suggest that no other vehicles were involved in the accident.  
    
    3. **Condition of the Car**: Note that the damage seems to be concentrated on the front end, and there is no visible damage to the windshield or rear of the car from this perspective.  
    
    4. **License Plate Visibility**: Mention that the license plate is intact and can be used for identification purposes.  
    
    5. **Environment**: Report that the accident occurred near a roadside with a guardrail, possibly in a rural or semi-rural area, which might help in establishing the accident location and context.  
    
    6. **Other Observations**: If there were any other circumstances or details not visible in the image that may have contributed to the accident, such as weather conditions, road conditions, or any other relevant information, be sure to include those as well.  
    
    Remember to be factual and descriptive, avoiding speculation about the cause of the accident, as the insurance company will conduct its own investigation.
    

コードの表示とエクスポート

チャット セッションの任意の時点で、チャット ウィンドウの上部にある [未加工の JSON の表示] スイッチを有効にして、JSON 形式で整形された会話を表示できます。 クイックスタート チャット セッションの開始時の内容を次に示します。

[
	{
		"role": "system",
		"content": [
			"You are an AI assistant that helps people find information."
		]
	},
]

リソースをクリーンアップする

不要な Azure コストが発生しないように、このクイックスタートで作成したリソースが不要になったら削除してください。 リソースを管理するために、Azure portal を使用できます。

次のステップ