Slide 28
Slide 28 text
Copyright © 2024, Oracle and/or its affiliates
28
オブジェクト・ストレージから画像を参照させ、⾮同期処理で分類を⾏う
顔検出(事前学習済みモデル)
create_image_job_details = CreateImageJobDetails(
features = [
FaceDetectionFeature(
feature_type = "FACE_DETECTION",
)
],
input_location = ObjectListInlineInputLocation(
source_type = "OBJECT_LIST_INLINE_INPUT_LOCATION",
object_locations = object_locations
),
output_location = OutputLocation(
namespace_name = NAMESPACE,
bucket_name = BUCKET_NAME,
prefix = f"batch_job_result_{now}"
),
compartment_id = COMPARTMENT_ID,
display_name = f"ObjectDetectionBatchJob-{now}"
)
batch_job_response = vision_client.create_image_job(
create_image_job_details = create_image_job_details
)
※実際には、結果はバケットに出⼒されます
{
"detected_faces": [
{
"bounding_polygon": {
"normalized_vertices": [
{
"x": 0.4865...,
"y": 0.2895...
}, ...
]
},
"confidence": 0.98381543,
"landmarks": [
{
"type": "LEFT_EYE",
"x": 0.52,
"y": 0.40991735
}, ...
],
"quality_score": 0.90399426
},
],
}