Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Choose your framework/language

Gen1 DocsLegacy

Page updated Mar 26, 2026

画像内のラベルオブジェクト

注: まず入門セクションを完了してください。ここで適切なポリシーアクションを持つIAMロールを設定します

APIの使用

画像に机や椅子などのラベルが含まれているかを検出します

import { Predictions } from '@aws-amplify/predictions';
Predictions.identify({
labels: {
source: {
file
},
type: 'LABELS'
}
})
.then((response) => {
const { labels } = response;
labels.forEach((object) => {
const { name, boundingBoxes } = object;
});
})
.catch((err) => console.log({ err }));

画像内の不適切なコンテンツを検出します

import { Predictions } from '@aws-amplify/predictions';
const { unsafe } = await Predictions.identify({
labels: {
source: {
file
},
type: 'UNSAFE'
}
})

ラベルと不適切なコンテンツの両方を検出します

import { Predictions } from '@aws-amplify/predictions';
const { labels, unsafe } = await Predictions.identify({
labels: {
source: {
file
},
type: 'ALL'
}
})