Need to configure your backend?See Build a Backend →
画像内のラベルオブジェクト
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' }})