Amazon Nova で画像内の個人情報を自動的に赤塗り処理
Amazon Nova は、文脈理解に基づく画像分析を通じて、複雑なエッジケースを含む PII を高精度に特定・除去するマルチステップパイプラインを提案し、GDPR や PCI DSS などのコンプライアンス要件への対応を強化します。
キーポイント
AI コーディネーターとしての Amazon Nova の役割
単なるマスキングツールではなく、画像全体の文脈を理解し、PII が存在するかどうかを推論する「インテリジェントな調整役」として機能します。
複雑なエッジケースへの対応
フレーム端の顔、反射面の映り込み、部分的にしか見えない標識など、従来のツールでは検出が困難な PII の形態を正確に識別します。
専用ツールの連携による高精度除去
Amazon Nova が Meta の SAM 3(セグメンテーション)と Amazon Textract(OCR)を指揮し、ピクセルレベルの精密な除去を実現するパイプラインを構築します。
コンプライアンスとデータ価値の両立
GDPR や PCI DSS などの法的要件を満たすための完全な PII 除去を行いながら、画像全体の有用性を損なわないバランスを保ちます。
重要な引用
Nova interprets image content holistically, reasons about whether something constitutes PII in context... and directs the entire redaction pipeline from start to finish.
These edge cases routinely defeat single-purpose masking tools.
By understanding the 'what' of PII, Nova coordinates specialized tools to achieve pixel-level precision in redaction while preserving the overall value of the image.
影響分析・編集コメントを表示
影響分析
このアプローチは、画像処理における PII 除去の課題を「単一ツールの限界」から「AI による統合的推論と実行」へと転換させる画期的なステップです。企業にとっては、コンプライアンスリスクを低減しつつ、機械学習モデルのトレーニングデータとしての画像資産を安全に活用できる道が開かれます。
編集コメント
画像内の PII 除去において、従来のルールベースや単一モデルの限界を打破し、LLM の推論能力を活用したオーケストレーションの重要性を示す事例です。実務レベルでのコンプライアンス対応への即効性が期待されます。
チーム間での社内データ共有、パートナーとの外部共有、または機械学習(ML)モデルのトレーニングなどのワークロードへの利用は、現代のビジネス運営において基本的な要素です。しかし、そのデータに個人識別情報(PII: Personally Identifiable Information)が含まれている場合、組織は一般データ保護規則(GDPR)やクレジットカード業界データセキュリティ基準(PCI DSS)などの規制の下で、重大な法的およびコンプライアンス上の義務を負います。共有または処理を行う前に PII が適切にマスキングされていない場合、規制違反による罰則、評判の毀損、顧客信頼の失墜といった結果を招く可能性があります。
実世界の画像データセットにおける PII のマスキングは特に困難です。構造化されたテキストとは異なり、画像内の PII は予期しない場所や形式で現れることがあります:フレームの端に捉えられた顔の一部、車の磨き上げられた表面に映り込んだ顔、他の視覚的手がかりと組み合わさると特定可能な部分しか見えない街路標識、あるいは机の上に置かれた文書が広角写真に写り込み、氏名、住所、または ID 番号を露呈してしまうケースなどです。これらのエッジケースは、単一目的のマスクツールによって通常は対処できません。
Amazon Nova は、高度な画像理解機能を備えたファウンデーションモデルのファミリーであり、複雑な画像分析ワークフローにおけるインテリジェントなコーディネーターとして機能する有力な候補です。Nova は画像内容を包括的に解釈し、文脈において何かが個人情報(PII: Personally Identifiable Information)に該当するかを推論します。これには前述した微妙で珍しいケースも含まれます。そして、赤化パイプラインの開始から終了まで全体を指揮します。"何が" PII であるかを理解することで、Nova は専門ツールを調整し、画像全体の価値を維持しつつ、ピクセルレベルの精度で赤化を実現します。
本稿では、Amazon Nova が主導する多段階パイプラインを紹介します。このパイプラインは、コンテキストに基づくビジョン推論を活用して補完的なツールを調整し、Meta のオープンソースである Segment Anything Model (SAM 3) を Amazon SageMaker AI で展開してピクセルレベルのセグメンテーションを行い、Amazon Textract を用いて光学式文字認識 (OCR: Optical Character Recognition) を実行します。このパイプラインは、任意の向きにある指紋、ID カード、またはナンバープレートといった困難なエッジケースに対しても、包括的でコンプライアンスに準拠した個人識別情報 (PII: Personally Identifiable Information) の削除を提供するように設計されています。
ソリューション概要
本ソリューションでは、包括的な PII 削除を実現するために以下の主要サービスを使用します:
Nova 2 Lite
Amazon Nova 2 Lite は、テキスト、画像、動画、ドキュメントを処理する高速かつコスト効果の高いマルチモーダル基盤モデルです。Amazon Bedrock で利用可能であり、優れた価格性能比を提供し、企業や開発者が能力があり、信頼性が高く、効率的なアプリケーションを構築できるよう支援します。このソリューションの中心的な調整役として機能し、PII(個人識別情報)の検出およびマスキングワークフロー全体を調整し、各段階で意思決定を行い、包括的な結果を実現するために専門サービスと連携します。
Segment Anything Model (SAM 3)
SAM 3 は、テキストおよび視覚的なプロンプトから画像内のオブジェクトを検出し、セグメント化し、追跡するオープンソースのセグメンテーションモデルです。本ソリューションでは、SAM 3 は Nova に指示された精密なツールとして機能します。Nova が視覚的な PII 要素を特定すると、マスキングのための正確な境界線を生成するためにセグメンテーションタスクを SAM 3 に委任します。

モデルプレイグラウンド(https://ai.meta.com/research/sam3/)で「flower」という単語をプロンプトとして入力した際に、元の画像に重ねられた SAM 3 のセグメンテーションマスク
Amazon Textract
Amazon Textract は、PDF、画像、表、フォームなどの形式からテキスト、手書き文字、レイアウト要素、およびデータを自動的に抽出する機械学習(ML)サービスです。このパイプラインにおいて、Amazon Textract は Nova の光学式文字認識(OCR)機能として機能します。Nova が画像に機密情報(PII)が含まれていると判断した場合、すべてのテキストコンテンツとその座標を抽出するために Amazon Textract を呼び出し、その後、画像全体の文脈を考慮して何が機密情報に該当するかを評価します。
PII 検出
画像内で一般的に見られる個人識別情報(PII)の項目には、以下が含まれますがこれらに限られません:
- 氏名。
- 運転免許証番号などの識別番号。
- 住所。
- 電話番号。
- メディアアクセスコントロール(MAC)アドレスなどの資産情報。
- 車両識別番号(VIN)などの財産識別番号。
- 顔画像などの身体的特徴。
- 指紋などの生体データ。
これらの項目は、テキスト系(氏名、識別番号、住所、電話番号、資産情報、財産識別番号)とビジュアル系(身体的特徴、生体データ)の 2 つのモダリティに分類できます。
Nova は、テキストまたは視覚的な個人識別情報 (PII) のピクセル座標をそれぞれ特定する 2 つのサブプロセスにアクセス可能なワークフローを指示します。まず Nova は画像に対して初期評価を行い、どのような種類の PII が含まれているかを判断した上で、画像を適切なサブプロセスへ知的にルーティングします。その後、AWS Lambda 関数が Nova の指示に基づいて特定された座標内の内容を隠蔽します。
このソリューションは、高い赤化精度が求められる単発またはバッチ処理の画像前処理シナリオに最適です。Nova 2 Lite は優れた価格性能比、低遅延、高度なマルチモーダル推論能力を備えており、組織が深い機械学習の専門知識を持っていなくても、あるいは目的別に構築したモデルを微調整しなくても、正確な PII の赤化を実現してこのワークフローを調整するのに適しています。
前提条件
本ソリューションを追体験するには、以下の準備が必要です:
- AWS アカウントをお持ちであること。
- Amazon Bedrock、Amazon SageMaker AI、Amazon Simple Storage Service (Amazon S3)、AWS Lambda、AWS Step Functions、Amazon EventBridge、および Amazon Textract に関する基本的な知識があること。
- お使いの AWS リージョンにおいて、Amazon Bedrock を通じて Nova 2 Lite にアクセスできる権限を持っていること。
- SageMaker AI 上で SAM 3 をデプロイ済みであること。
- AWS Software Development Kits (SDK) の基本的な知識があること。
- コンピュータビジョンの概念や画像処理に関する基礎的な理解があること。
- ファウンデーションモデルおよびプロンプトエンジニアリングの手法に関する一般的な知識があること。
なお、本ソリューションを利用すると、S3 ストレージ、Lambda 呼び出し、Step Functions の状態遷送、SageMaker AI エンドポイントのホスティング、Amazon Bedrock API 呼び出し、および Amazon Textract API 呼び出しに伴う AWS 利用料が発生します。対応するリソースを作成する前に、お使いの AWS リージョンにおける各サービスの価格体系を必ずご確認ください。
ソリューションアーキテクチャ
このセクションでは、Nova が画像処理ワークフローを主導し、並列的なテキスト解析と視覚解析を指示して機密情報を特定・削除するアーキテクチャガイダンスについて説明します。

1. ドキュメントのアップロードとワークフロートリガー
画像を S3 の input/ フォルダにアップロードすると、S3 イベント通知が EventBridge ルールをトリガーし、AWS Step Functions ワークフローを開始します。

2. ファイル検証と初期の個人識別情報(PII: Personally Identifiable Information)スクリーニング
ワークフローはまず、アップロードされたファイルの種類が Amazon Bedrock でサポートされている画像形式と互換性があるかを確認します。検証後、Nova 2 Lite が画像の初期評価を行い、個人識別情報が存在するかどうかを判断するための最初の知能ラインとして機能します。もし Nova が個人識別情報が存在しないと判断した場合、ワークフローは早期に終了し、画像はすぐに S3 の noPII/ フォルダへ移動されます。これにより、さらなる処理を行うことなく下流の用途に即座に使用可能となります。多くのビジネス用画像には個人識別情報は含まれていません。この Nova による早期終了の判断は、最もコストのかからない最初のステップで大量の画像を除外する経路を提供します。Amazon Textract や SageMaker AI 上の SAM 3 といった下流サービスへの不要な呼び出しを回避することで、全体のパイプラインコストを大幅に削減します。

3. PII の並列検出:ビジュアルプロセス
Nova 2 Lite が潜在的な個人識別情報(PII)を検出すると、検出された PII をテキスト型、ビジュアル型、またはその両方として分類し、下流処理のためのルーティング判断を行います。Nova の分類に基づき、Step Functions ワークフローは、Nova がテキスト型の PII を検出した場合はテキストプロセスを、ビジュアル型の PII を検出した場合はビジュアルプロセスを、あるいは両方のタイプを検出した場合は両方のプロセスを並列で選択的に呼び出します。
ビジュアルプロセスは、画像内の顔やナンバープレートなどの視覚的個人識別情報(PII)要素を検出することに焦点を当てています。Nova の指示のもと、SageMaker AI で展開された SAM 3 が、視覚的 PII 要素の位置特定とピクセル単位のセグメンテーションマスク生成を促されます。セグメンテーションマスクとは、画像内のオブジェクトの正確な形状を追跡するピクセルレベルのアウトラインであり、各ピクセルがそのオブジェクトに属するか否かをラベル付けします。これは精密なデジタルステンシルのようなものです。オブジェクトを取り囲む単純なバウンディングボックス(おおよその矩形)とは異なり、セグメンテーションマスクは検出されたアイテムの真の輪郭に沿うため、周囲の内容を隠すことなく、機密性の高いピクセルのみを削除(リダクション)することが可能になります。この精密なアプローチは、Nova による初期の PII 分類によって導かれ、機密領域のみを除去しながら画像の価値を維持するのに役立ちます。例えば、大規模な画像データセットで機械学習モデルをトレーニングする際、この手法により PII がモデルに渡されるのを防ぎつつ、データセットのサイズと非機密性の視覚情報を保持することができます。

4. Parallel PII detection: Textual process
テキスト処理プロセスでは、Amazon Textract の支援を受けながら、Nova のマルチモーダル推論機能を用いて画像内に埋め込まれたテキストを分析します。まず、Amazon Textract は画像内のテキストのピクセルレベルでの位置を特定し、その内容を抽出します。検出された各テキスト要素に対して、軸平行なバウンディングボックス座標とポリゴン座標の両方を提供しており、ユーザーは自身の赤外線処理(redaction)ニーズに最も適した座標タイプを選択できます。その後、Nova 2 Lite は、各抽出されたテキスト要素を生の画像データとともに評価し、氏名、住所、識別番号などの個人識別情報(PII: Personally Identifiable Information)を含むものを特定します。ここで Nova の文脈知能が極めて重要となります。一部のテキスト要素は単独で検討すると PII には見えない場合もありますが、Nova は画像内の周囲の視覚的文脈を推論することで、それらの機密性を認識できます。例えば、通り名と番地番号が別々の位置に分割されている場合、それぞれ単体では PII とは見なされませんが、同じ画像内に両方が存在するため完全な住所が表示されており、PII として隠蔽されるべきです。マルチモーダルモデルである Nova は、テキストと画像を同時に処理することで、こうした微妙な PII の判定を下すことができます。最後に、Amazon Textract は Nova が PII と特定したテキストの座標を返却し、次のステップで使用可能にします。
5. PII の赤字化と最終検証
Nova の指示の下、サブプロセス(複数ある場合はそのすべて)が分析を完了した後、それらの座標出力は次の段階へ渡され、赤字化処理が行われます。思い出してください。視覚プロセスからの出力は SAM 3 によるセグメンテーションマスクの座標であり、一方、テキストプロセスからの出力は Amazon Textract によるバウンディングボックスまたはポリゴンの座標です。
Lambda 関数が、各プロセスから返された座標を統合し、画像全体における PII(個人識別情報)の位置情報を統一されたセットとして結合します。その後、RedactPII Lambda 関数は、Python の Pillow (PIL) ライブラリを使用して、特定された領域を元の画像上で隠蔽し、赤字化処理が施された画像を S3 の redacted/ フォルダに保存します。
最終的な品質保証ステップとして、Nova 2 Lite は赤字化処理が施された画像を包括的にレビューし、検出された PII がすべて削除されたかどうかを判断します。この最終検証では、Nova の全体的なビジョン理解能力を活用して、残存する可能性のある機密コンテンツを検出します。もし Nova が画像に問題がないと判断すれば、その画像は下流処理用に S3 の noPII/ フォルダへ移動されます。一方、まだ PII が検出される場合は、手動レビュー用の隔離フォルダ(quarantine folder)へ移動され、PII が漏洩するのを防ぐための仕組みが用意されています。

6. ソリューションのテスト
ソリューションが正しく動作していることを確認するには、以下の手順に従ってください:
- PII(個人識別情報)を含むサンプルテスト画像を使用します。AI で生成された画像を利用することも可能です。
- AWS Command Line Interface (AWS CLI) または Amazon S3 コンソールを使用して、画像を S3 の originals/ バケットにアップロードします。
- AWS Step Functions コンソールで Step Functions の実行を監視し、ワークフローの進行状況を追跡します。
- 編集済み(リダクション済み)画像が S3 の redacted/ フォルダまたは humanreview/ フォルダに表示されていることを確認します。
- S3 の redacted/ フォルダまたは humanreview/ フォルダから出力画像をダウンロードします。
- 画像を検証し、PII が正常に削除されたかを確認するか、あるいは「PII 検出」セクションで言及されているもの以外の PII 要素(例えば、ニッチな要素など)が人間のレビューを必要とするかどうかを特定します。

テキスト形式の PII(住所)と視覚的な PII(顔)を含む AI 生成画像

Amazon Textract からのバウンディングボックス座標と SAM 3 からのセグメンテーションマスク座標をパイプラインで使用して、同一画像内の PII 要素がリダクション(編集)された様子
クリーンアップ
このソリューションが不要になった際にリソースをクリーンアップするには、以下の手順を実行してください。クリーンアップを進める前に、S3 バケットから保持する必要があるデータはすべてバックアップ済みであることを確認してください。以下の手順を実行すると、すべてのリソースとデータが永久的に削除されます。
- S3 バケットから必要なデータをすべてバックアップしてください。
- S3 バケット(originals/, noPII/, redacted/, humanreview/)を削除してください。
- SAM 3 モデルをホストしている SageMaker AI エンドポイントを削除してください。
- Step Functions ステートマシンを削除してください。
- Lambda 関数(PII 検出、リダクション、最終検証用)を削除してください。
- S3 イベント通知用に設定された EventBridge ルールを削除してください。
結論
本記事では、カスタムモデルのトレーニングやファインチューニングを必要とせず、画像から個人識別情報(PII: Personally Identifiable Information)を検出・リダクションするためのサーバーレスで自動化されたパイプラインにおいて、Amazon Nova 2 Lite が知的なコーディネーターとして機能する方法を実証しました。Nova のマルチモーダル推論は、ワークフロー内のすべての意思決定を駆動します。具体的には、初期の PII 検出と分類から、Amazon Textract や Amazon SageMaker AI 上の SAM 3 といった専門ツールへのインテリジェントなルーティング、そしてリダクション済み出力の最終的な品質検証に至るまでです。Nova 2 Lite の優れた価格性能比と高度なビジョン機能により、組織はデータ保護規制への完全な準拠を維持しながら、大規模な PII リダクションを展開することが可能になります。
本記事では、特定のコンプライアンス要件に合わせて適応し、お客様の AWS アカウント内でデプロイ可能なアーキテクチャのガイダンスを提供します。まずは Amazon Bedrock コンソール で Amazon Nova モデルを検索し、このパイプラインで使用される補完サービスをデプロイするために、Amazon Nova ドキュメント、Amazon Textract ドキュメント、および Amazon SageMaker AI ドキュメント を参照してください。
著者について
原文を表示
Sharing data internally across teams, externally with partners, or using it for workloads such as machine learning (ML) model training is fundamental to modern business operations. However, when that data contains Personally Identifiable Information (PII), organizations face significant legal and compliance obligations under regulations such as the General Data Protection Regulation (GDPR) and the Payment Card Industry Data Security Standard (PCI DSS). If PII isn’t properly redacted before sharing or processing data, the result can be regulatory penalties, reputational damage, and erosion of customer trust.
PII redaction in real-world image datasets is particularly challenging. Unlike structured text, PII in images can appear in unexpected places and forms: a partial face captured at the edge of a frame, a face reflected on the polished surface of a car, a partially visible street sign that, combined with other visual cues, becomes identifiable, or a document lying on a desk in a wide-angle photo that reveals names, addresses, or ID numbers. These edge cases routinely defeat single-purpose masking tools.
Amazon Nova is a family of foundation models with advanced vision understanding capabilities, making it a strong candidate to serve as the intelligent coordinator for complex image analysis workflows. Nova interprets image content holistically, reasons about whether something constitutes PII in context, including the subtle and unusual cases described earlier, and directs the entire redaction pipeline from start to finish. By understanding the “what” of PII, Nova coordinates specialized tools to achieve pixel-level precision in redaction while preserving the overall value of the image.
In this post, we present a multi-step pipeline directed by Amazon Nova, which uses its contextual vision reasoning to coordinate complementary tools, including Meta’s open-source Segment Anything Model (SAM 3) deployed on Amazon SageMaker AI for pixel-level segmentation, and Amazon Textract for optical character recognition (OCR). This pipeline is designed to provide comprehensive and compliant PII redaction even for challenging edge cases such as fingerprints, ID cards, or license plates in arbitrary orientations.
Solution overview
This solution uses the following key services to achieve comprehensive PII redaction:
Nova 2 Lite
Amazon Nova 2 Lite is a fast, cost-effective multimodal foundation model that processes text, images, videos, and documents. Available in Amazon Bedrock, the model offers strong price-performance and helps enterprises and developers build capable, reliable, and efficient applications. It serves as the central coordinator of this solution, coordinating the entire PII detection and redaction workflow, making decisions at every stage, and coordinating specialized services to achieve comprehensive results.
Segment Anything Model (SAM 3)
SAM 3 is an open-source segmentation model that detects, segments, and tracks objects in images from text and visual prompts. In this solution, SAM 3 acts as a precision instrument directed by Nova. When Nova identifies visual PII elements, it delegates the segmentation task to SAM 3 to produce exact boundaries for redaction.

SAM 3 segmentation masks overlaid on the original image when prompted with the word ‘flower’ on model playground (https://ai.meta.com/research/sam3/)
Amazon Textract
Amazon Textract is an ML service that automatically extracts text, handwriting, layout elements, and data from formats such as PDFs, images, tables, and forms. In this pipeline, Amazon Textract serves as Nova’s OCR capability. When Nova determines that an image contains textual PII, it directs Amazon Textract to extract all text content along with their coordinates, which Nova then evaluates to determine what constitutes sensitive information, taking into account context of the entire image.
PII detection
Common PII items found in images include, but are not limited to:
- Name.
- Identification number, such as driver’s license number.
- Address.
- Telephone number.
- Asset information, such as Media Access Control (MAC) address.
- Property identification number, such as a vehicle identification number (VIN).
- Personal characteristic, such as facial images.
- Biometric data, such as fingerprints.
These items can be divided into 2 modalities: textual (name, identification number, address, telephone number, asset information, and property identification number) and visual (personal characteristics and biometric data).
Nova directs a workflow with access to two sub-processes, each identifying either the pixel coordinates of the textual or the visual PII items. Nova first performs an initial assessment of the image to determine what types of PII are present, then intelligently routes the image to the appropriate sub-processes. An AWS Lambda function subsequently obscures the contents at the coordinates identified under Nova’s direction.
This solution is ideal for one-off or batch image pre-processing scenarios where high redaction accuracy is required. Nova 2 Lite’s strong price-performance, low latency, and advanced multimodal reasoning make it well-suited to coordinate this workflow, delivering accurate PII redaction without requiring your organization to have deep machine learning expertise or to fine-tune purpose-built models.
Prerequisites
To follow along with this solution, you should have:
- An AWS account.
- Familiarity with Amazon Bedrock, Amazon SageMaker AI, Amazon Simple Storage Service (Amazon S3), AWS Lambda, AWS Step Functions, Amazon EventBridge, and Amazon Textract.
- Access to Nova 2 Lite via Amazon Bedrock in your AWS Region.
- Deploy SAM 3 on SageMaker AI.
- Basic knowledge of AWS Software Development Kits (SDK).
- Basic understanding of computer vision concepts and image processing.
- Familiarity with foundation models and prompt engineering techniques.
Please be aware that this solution will incur AWS charges including: S3 storage, Lambda invocations, Step Functions state transitions, SageMaker AI endpoint hosting, Amazon Bedrock API calls, and Amazon Textract API calls. Make sure you understand the pricing for these services in your AWS Region before you create the corresponding resources.
Solution architecture
This section describes an architectural guidance where Nova drives the image processing workflow and directs parallel textual and visual analysis to identify and redact sensitive information.

1. Document upload and workflow trigger
When you upload an image to the S3 input/ folder, an S3 event notification triggers an EventBridge rule, which initiates the AWS Step Functions workflow.

2. File validation and initial PII screening
The workflow first validates that your uploaded file type is compatible with Amazon Bedrock supported image formats. After validation, Nova 2 Lite performs its initial assessment of the image, acting as the first line of intelligence to determine whether PII is present. If Nova determines that no PII exists, the workflow exits early and the image is immediately moved to the S3 noPII/ folder, ready for downstream use without further processing. Most business images contain no PII. This early-exit decision by Nova routes away a large number of images at the first and least expensive step. It significantly reduces overall pipeline cost by avoiding unnecessary invocations of downstream services such as Amazon Textract and SAM 3 on SageMaker AI.

3. Parallel PII detection: Visual process
When Nova 2 Lite identifies potential PII, it classifies the detected PII by type, textual, visual, or both, and makes the routing decision for downstream processing. Based on Nova’s classification, the Step Functions workflow selectively invokes one or both specialized processes: the textual process if Nova detected textual PII, the visual process if Nova detected visual PII, or both processes in parallel if Nova identified both types.
The visual process focuses on detecting visual PII elements such as faces and license plates within your image. Under Nova’s direction, SAM 3, deployed on SageMaker AI, is prompted to locate visual PII elements and produce pixel-by-pixel segmentation masks. A segmentation mask is a pixel-level outline that traces the exact shape of an object in an image. It labels each pixel as either belonging to that object or not, similar to a precise digital stencil. Unlike a simple bounding box (a rough rectangle around an object), a segmentation mask follows the true contours of the detected item, allowing redaction of only the sensitive pixels without obscuring surrounding content. This precision approach, guided by Nova’s initial PII classification, helps maintain the image’s value while removing only the sensitive regions. For example, when training ML models on large image datasets, this method helps prevent PII from being passed to the model while preserving your dataset size and non-sensitive visual information.

4. Parallel PII detection: Textual process
The textual process uses Nova’s multimodal reasoning to analyze text embedded within your image with the help of Amazon Textract. First, Amazon Textract identifies pixel-level location of text in images and extracts its content. It provides both axis-aligned bounding box and polygon coordinates for each detected text element, and you can choose which coordinate type best suits your redaction needs. Nova 2 Lite then evaluates each extracted text element, alongside the raw image, to determine which ones contain PII such as names, addresses, or identification numbers. This is where Nova’s contextual intelligence is critical: some text elements, when considered in isolation, might not appear to be PII, but Nova can reason about the surrounding visual context in the image to recognize their sensitive nature. For example, a street name and a street number broken into 2 locations do not constitute PII separately by themselves, but because they both appear in the same image, the full address is visible and should be obscured as PII. As a multimodal model, Nova can process text and image simultaneously to make these nuanced PII determinations. Finally, Amazon Textract returns the coordinates of the text that Nova identified as PII for use in the next step.
5. PII redaction and final verification
After the sub-process(es) complete their analysis under Nova’s direction, their coordinate outputs are passed to the next stage for redaction. Recall that the output from the visual process is segmentation mask coordinates from SAM 3, while the output from the textual process is bounding box or polygon coordinates from Amazon Textract.
A Lambda function merges coordinates returned from the process(es) into a unified set of PII locations across your image. The RedactPII Lambda function then obscures the identified regions in the original image using the Pillow (PIL) library in Python and stores the redacted image in the S3 redacted/ folder.
As a final quality assurance step, Nova 2 Lite performs a comprehensive review of the redacted image to decide if all detected PII has been removed. This final verification uses Nova’s holistic vision understanding to catch any residual sensitive content. If Nova determines that the image is clean, it is moved to the S3 noPII/ folder for downstream use. If Nova still detects PII, the image is moved to a quarantine folder for manual review, designed to help prevent PII from slipping through.

6. Test the solution
To verify that the solution is working correctly, follow these steps:
- Use a sample test image containing PII. You can use an AI-generated image.
- Upload the image to the S3 originals/ bucket using the AWS Command Line Interface (AWS CLI) or the Amazon S3 console.
- Monitor the Step Functions execution on the AWS Step Functions console to track the workflow progress.
- Verify the redacted image appears in the S3 redacted/ or humanreview/ folder.
- Download the output image from the S3 redacted/ or humanreview/ folder.
- Inspect the image to check if PII has been successfully removed, or identify PII elements (for example, niche elements beyond those cited in the “PII detection” section) that require human review.

AI-generated image with textual PII (address) and visual PII (face)

PII elements redacted in the same image by pipeline using bounding box coordinates from Amazon Textract and segmentation mask coordinates from SAM 3
Clean up
Complete the following steps to clean up your resources when you no longer need this solution. Before proceeding with cleanup, make sure you have backed up any data you need to retain from the S3 buckets. The following steps will permanently delete all resources and data.
- Back up any necessary data from the S3 buckets.
- Delete the S3 buckets (originals/, noPII/, redacted/, and humanreview/)
- Delete the SageMaker AI endpoint hosting the SAM 3 model.
- Delete the Step Functions state machine.
- Delete the Lambda functions (PII detection, redaction, and final verification).
- Delete the EventBridge rule configured for S3 event notifications.
Conclusion
In this post, we demonstrated how Amazon Nova 2 Lite serves as the intelligent coordinator of a serverless, automated pipeline for detecting and redacting PII from images without requiring custom model training or fine-tuning. Nova’s multimodal reasoning drives every decision in the workflow: from initial PII detection and classification, through intelligent routing to specialized tools like Amazon Textract and SAM 3 on Amazon SageMaker AI, to final quality verification of the redacted output. With Nova 2 Lite’s strong price-performance and advanced vision capabilities, organizations can deploy PII redaction at scale while maintaining full compliance with data protection regulations.
This post provides architectural guidance that you can adapt to your specific compliance requirements and deploy in your own AWS account. To get started, explore Amazon Nova models in the Amazon Bedrock console, and refer to the Amazon Nova documentation, the Amazon Textract documentation, and the Amazon SageMaker AI documentation to deploy the complementary services used in this pipeline.
About the authors
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み