Custom Metadata
You can attach a custom metadata value to each inference result and view it in the Model Monitoring dashboard.
Applications
Custom metadata has a number of applications, from tagging data to make it easier to find and organize, to adding additional context to an inference result. For example, let's suppose you're an automotive manufacturer with three factories across the United States. A few things you might consider adding to your inference results include location, which production-line an image was taken on, whether a certain operation passed or failed, and the expected result of the inference (like color=blue
).
Create Custom Metadata
POST
/:workspace/inference-stats/metadata
Attaches additional data to an inference result that will be displayed in the Model Monitoring dashboard.
When you make an inference request with Roboflow's Inference Container or Hosted Inference API, you will receive an inference_id
in the response. Using this ID, you can add it to the inference_ids
array as shown below to attach your metadata to it. The field_name
is a name for the property, and the value
is the value.
For example, if I want to attach a geographic location to my inference results, I would set the field_name
to "location" and the value
would be a location like "united_states".
Note: The values for field_name
and field_value
are completely user-defined. Be sure to keep the formatting consistent, including the letter case. For example field_name: "my_location"
and field_name: "My_location"
will be treated as two separate metadata values.
Example Request:
Headers:
Content-Type
application/json
Body:
data
Array<Metadata>
{
"inference_ids": Array<string>;
"field_name": string;
"field_value": string;
}
Response:
Example Using Python:
Last updated