> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/deployment/hi/monitoring-and-analytics/model-monitoring.md).

# Model Monitoring

## के बारे में

Roboflow का Model Monitoring डैशबोर्ड आपको आपके मॉडलों की अद्वितीय दृश्यता देता है, प्रोटोटाइपिंग से लेकर उत्पादन तक। Model Monitoring के साथ, आप उच्च-स्तरीय आँकड़े देख सकते हैं ताकि समय के साथ आपके मॉडल कैसे प्रदर्शन कर रहे हैं, इसकी जानकारी मिल सके, या व्यक्तिगत inference अनुरोध भी देख सकते हैं, ताकि आप देख सकें कि आपके मॉडल edge cases पर कैसे प्रदर्शन करते हैं।

{% hint style="info" %}
मॉडल निगरानी **अप्रचलित किया जाएगा** और Vision Events से प्रतिस्थापित किया जाएगा। देखें [Vision Events दस्तावेज़ीकरण](/deployment/hi/monitoring-and-analytics/vision-events.md) अतिरिक्त जानकारी के लिए।
{% endhint %}

## वेब ऐप

### Model Monitoring तक पहुँचना

Model Monitoring, Models पेज पर एक उप-टैब है। इसे एक्सेस करने के लिए, अपने workspace navigation bar में "Models" ड्रॉपडाउन खोलें और "Model Monitoring" चुनें, या सीधे Models पेज पर "Model Monitoring" टैब पर जाएँ।

### Workspace डैशबोर्ड

तुरंत, आपको अपने मॉडलों से संबंधित तीन आँकड़े दिखाई देंगे:

* **कुल अनुरोध**: आपके workspace के सभी मॉडलों पर किए गए inferences की कुल संख्या
* **औसत confidence:** आपके मॉडलों द्वारा किए गए सभी predictions में औसत confidence.
* **औसत inference समय**: सभी inferences में औसत inference समय (छवियों की preprocessing सहित predictions उत्पन्न करने में लगा समय, सेकंड में)

<figure><img src="/files/8a2d76d764313ba4c88ce961835ad8e2ff45852e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
% परिवर्तन मान वर्तमान अवधि बनाम पिछली अवधि पर आधारित हैं। डिफ़ॉल्ट रूप से, ये आँकड़े आपको पिछले सप्ताह का डेटा दिखाएँगे। हालाँकि, आप आँकड़ों के ऊपर दिए गए बटनों का उपयोग करके समय सीमा बदल सकते हैं।

<img src="/files/70c234a4d15c385a4ee0b75ef51b4e37b616a785" alt="" data-size="original">
{% endhint %}

Models तालिका सभी मॉडलों को दिखाती है जिन पर inferences हैं, और उन पर क्लिक करने से आप यहाँ पहुँच जाएँगे: [Model Dashboard](#model-dashboard).

<figure><img src="/files/158b111cc4ec8a930408d7ebd7a9504b880a19a3" alt=""><figcaption></figcaption></figure>

आप हालिया inferences (सभी मॉडलों में) देखने के लिए टैब और [alerts सेट करने के लिए भी एक्सेस कर सकते हैं](#alerting).

<figure><img src="/files/3be1608a08730c28cd7355b27793b3c3ddd06996" alt="" width="375"><figcaption></figcaption></figure>

### Model Dashboard

Models टैब के अंतर्गत, आप अपने डेटा को देखने के लिए किसी विशिष्ट मॉडल का चयन कर सकते हैं। वहाँ, आपको Workspace Overview जैसे ही आँकड़े दिखेंगे, लेकिन केवल एक मॉडल के लिए।

यहाँ, आँकड़ों के अलावा, आप मॉडल में प्रत्येक class के लिए detections की संख्या देख सकते हैं, और अन्य classes के सापेक्ष उसका वितरण भी देख सकते हैं।

<figure><img src="/files/8e650b5a1c42215e8923adb27a6a798cd6d2b45f" alt=""><figcaption></figcaption></figure>

तालिका के ऊपर दाईं ओर "See All Inferences" बटन पर क्लिक करने से आप यहाँ पहुँच जाएँगे: [Inferences तालिका](#inferences-table).

### Inferences तालिका

यहाँ, आप अपने मॉडल के लिए सभी prediction परिणाम देख सकते हैं। इसके अलावा, आपको आपके inferences में जोड़ा गया कोई भी custom metadata भी दिखाई देगा। अपने inferences के किसी उपसमुच्चय को देखने के लिए, आप तालिका के ऊपर दाईं ओर के filters का उपयोग कर सकते हैं।

<figure><img src="/files/ba4bd116f8a9d06aae342ad203f330636fda05ae" alt=""><figcaption></figcaption></figure>

#### Inference विवरण

Inferences तालिका से, आप किसी विशिष्ट inference में गहराई से जाकर अधिक विवरण देख सकते हैं। आइए इसे इस छवि में दिखाए गए क्रम में समझते हैं:

<figure><img src="/files/ef36ebf6212b746b67b51e8eda5179d5517e36d2" alt=""><figcaption></figcaption></figure>

1. **छवि:** यहाँ, आप वह छवि देख सकते हैं जिस पर inference किया गया था। *नोट: यह डिफ़ॉल्ट रूप से सक्षम नहीं है। देखें* [*Inference Images सक्षम करना*](#enabling-inference-images)
2. **Inference विवरण:** इस पैनल पर, आप अपने inference अनुरोध के बारे में सभी विवरण और गुण देख सकते हैं। सभी उपलब्ध फ़ील्ड डिफ़ॉल्ट रूप से दिखाए जाते हैं, लेकिन यदि आप कुछ छिपाना चाहते हैं, तो आप फ़ील्ड छिपाने के लिए ऊपर दाएँ कोने में "Cog" आइकन पर क्लिक कर सकते हैं। (यह सेटिंग आपके ब्राउज़र में बनी रहेगी)
3. कुछ फ़ील्ड्स पर, यदि उपलब्ध हों, तो उस फ़ील्ड के आधार पर inferences खोजने का विकल्प होगा। हाइलाइट किए गए उदाहरण में, यह उसी मॉडल के inferences खोजेगा।
4. **Detections:** यह संक्षिप्त/फैलाया जा सकने वाला पैन inference से प्राप्त detections की सूची दिखाता है। आप तालिका के सॉर्ट क्रम को चुनने के लिए "Class" और "Confidence" तालिका शीर्षकों पर क्लिक कर सकते हैं।
5. **डाउनलोड और लिंक बटन:** यहाँ, आप inference से संबद्ध छवि डाउनलोड कर सकते हैं या बाद के संदर्भ के लिए इस Inference विवरण का लिंक कॉपी कर सकते हैं।

#### Inference Images सक्षम करना

{% hint style="info" %}
Active Learning या Dataset Upload द्वारा सहेजी गई छवियाँ, आपके प्रोजेक्ट में छवि अपलोड करने के समान ही गिनी जाएँगी। आपके plan type के अनुसार credit, limit या quota उपयोग लागू हो सकता है।
{% endhint %}

Model Monitoring में inference images दिखाने के लिए दो तरीके हैं:

* **Roboflow Dataset Upload ब्लॉक:** Workflows में, आप एक "Roboflow Dataset Upload" ब्लॉक जोड़ सकते हैं। एक बार जब आप predictions और prediction image को जोड़ देते हैं, तो यह Model Monitoring में दिखाई देगा।

<figure><img src="/files/8642a778b9da1bf4b5b1d396ae33e408de0a9185" alt="" width="151"><figcaption></figcaption></figure>

* **Active Learning:** आप कॉन्फ़िगर कर सकते हैं [सक्रिय शिक्षण](/deployment/hi/monitoring-and-analytics/active-learning.md) अपने Project से नियम, ताकि production inference images स्वतः एकत्र की जा सकें।

<figure><img src="/files/3e6fb61c5c666cf1d1660e24d1c2a53c4ec0fb39" alt="" width="198"><figcaption></figcaption></figure>

### अलर्टिंग

आप और आपकी टीम के अन्य सदस्य, जब आपके मॉडल के साथ समस्याएँ या विसंगतियाँ होती हैं, तो real-time alerts की सदस्यता ले सकते हैं। उदाहरण के लिए, यदि आपके मॉडल का confidence अचानक घट जाता है, या आपका Inference Server बंद हो जाता है, और आपका मॉडल चलना बंद कर देता है, तो आपकी टीम को एक ईमेल सूचना मिलेगी।

Alerting पेज पर अधिक जानकारी देखें:

{% content-ref url="/pages/6afb282d58833df4e700416778ad8991287a22f5" %}
[अलर्टिंग](/deployment/hi/monitoring-and-analytics/model-monitoring/alerting.md)
{% endcontent-ref %}

### कस्टम मेटाडेटा

किसी inference में अतिरिक्त metadata जोड़ने के लिए, आप Model Monitoring की custom metadata सुविधा का उपयोग कर सकते हैं। custom metadata का उपयोग करके, आप किसी inference में जानकारी जोड़ सकते हैं, जैसे कि छवि कहाँ ली गई थी, prediction का अपेक्षित मान, आदि। आपका custom metadata "Recent Inferences" और "All Inferences" दृश्यों में दिखाई देगा।

किसी inference परिणाम में custom metadata जोड़ने के लिए, कृपया देखें [Custom Metadata API](#http-api) दस्तावेज़ीकरण।

### Model Monitoring API

स्वचालन और बाहरी प्रणालियों के एकीकरण के लिए, आप Model Monitoring आँकड़े उपयोग करके प्राप्त कर सकते हैं [model monitoring के लिए हमारा API](#http-api).

### समर्थित Deployments

Model Monitoring Roboflow की Hosted API या Roboflow Inference Server का उपयोग करके किए गए inference अनुरोधों का समर्थन करता है, बशर्ते Inference Server के पास इंटरनेट पहुँच हो। इसमें edge deployments भी शामिल हैं जो Roboflow के [License Server](https://blog.roboflow.com/roboflow-license-server/).

## HTTP API

### Workspace में तैनात मॉडलों के बारे में आँकड़े प्राप्त करें

आप Model Monitoring API का उपयोग करके Model Monitoring आँकड़े प्राप्त कर सकते हैं। यह endpoint वर्तमान में 3 क्वेरी पैरामीटर स्वीकार करता है (api\_key के अतिरिक्त):

* **startTime**: "YYYY-MM-DD HH" प्रारूप में DateTime string:flag\_mm:ss"। यदि खाली हो, तो अनुरोध के समय से 24 घंटे बाद डिफ़ॉल्ट होगा
* **endTime**: "YYYY-MM-DD HH" प्रारूप में DateTime string:flag\_mm:ss"। यदि खाली हो, तो यह अनुरोध के वर्तमान समय पर डिफ़ॉल्ट होगा
* **modelNames**: कॉमा से अलग किए गए model names की string, यानी "?modelNames=license-plate-detector,truck-detector"

#### आँकड़े

`GET /:workspace/inference-stats`

#### **उदाहरण अनुरोध:**

```
curl --location --request GET 'https://api.roboflow.com/${WORKSPACE}/inference-stats?api_key=$ROBOFLOW_API_KEY&startTime=&endTime=' \
```

**उदाहरण प्रतिक्रिया:**

{% tabs %}
{% tab title="200" %}

```json
{
    "num_inferences": 120,
    "prev_num_inferences": 290,
    "num_errors": 0,
    "prev_num_errors": 0,
    "avg_confidence": 0.92541713388321,
    "prev_avg_confidence": 0.8610920182589827,
    "avg_response_time": 0.16464362986438943,
    "prev_avg_response_time": 0.043521592255159045,
    "inference_stats": [
        {
            "model_name": "cards-3z9gn",
            "predicted_class": "Playingcards",
            "num_inferences": 106,
            "prev_num_inferences": 190,
            "num_errors": null,
            "prev_num_errors": null,
            "avg_confidence": 0.931105958703923,
            "prev_avg_confidence": 0.935741652940449,
            "avg_response_time": 0.176652773857811,
            "prev_avg_response_time": 0.05487422056841488,
            "median_confidence": 0.9268901944160461,
            "class_count": 211,
            "deployment_types": "hosted",
            "inference_server_versions": "0.15.3,0.16.0",
            "model_num_inferences": 107,
            "prev_model_num_inferences": 190
        },
        {
            "model_name": "cards-3z9gn",
            "predicted_class": "",
            "num_inferences": 1,
            "prev_num_inferences": null,
            "num_errors": null,
            "prev_num_errors": null,
            "avg_confidence": 0,
            "prev_avg_confidence": null,
            "avg_response_time": 0,
            "prev_avg_response_time": null,
            "median_confidence": 0,
            "class_count": 1,
            "deployment_types": "hosted",
            "inference_server_versions": "0.16.0",
            "model_num_inferences": 107,
            "prev_model_num_inferences": null
        },
        {
            "model_name": "hard-hat-sample-8j2w3",
            "predicted_class": "head",
            "num_inferences": null,
            "prev_num_inferences": 100,
            "num_errors": null,
            "prev_num_errors": null,
            "avg_confidence": null,
            "prev_avg_confidence": 0.6933842897415161,
            "avg_response_time": null,
            "prev_avg_response_time": 0.021951598459972955,
            "median_confidence": null,
            "class_count": null,
            "deployment_types": "hosted",
            "inference_server_versions": "0.15.1",
            "model_num_inferences": null,
            "prev_model_num_inferences": 100
        },
        {
            "model_name": "hard-hat-sample-8j2w3",
            "predicted_class": "helmet",
            "num_inferences": null,
            "prev_num_inferences": 100,
            "num_errors": null,
            "prev_num_errors": null,
            "avg_confidence": null,
            "prev_avg_confidence": 0.7451311349868774,
            "avg_response_time": null,
            "prev_avg_response_time": 0.021951598459972955,
            "median_confidence": null,
            "class_count": null,
            "deployment_types": "hosted",
            "inference_server_versions": "0.15.1",
            "model_num_inferences": null,
            "prev_model_num_inferences": 100
        },
        {
            "model_name": "coco",
            "predicted_class": "car",
            "num_inferences": 11,
            "prev_num_inferences": null,
            "num_errors": null,
            "prev_num_errors": null,
            "avg_confidence": 0.91790372133255,
            "prev_avg_confidence": null,
            "avg_response_time": 0.0647244118180817,
            "prev_avg_response_time": null,
            "median_confidence": 0.91790372133255,
            "class_count": 22,
            "deployment_types": "hosted",
            "inference_server_versions": "0.15.3",
            "model_num_inferences": 11,
            "prev_model_num_inferences": null
        },
        {
            "model_name": "license-plate-recognition-rxg4e",
            "predicted_class": "License_Plate",
            "num_inferences": 2,
            "prev_num_inferences": null,
            "num_errors": null,
            "prev_num_errors": null,
            "avg_confidence": 0.8706022202968597,
            "prev_avg_confidence": null,
            "avg_response_time": 0.07911215199999333,
            "prev_avg_response_time": null,
            "median_confidence": 0.8706022202968597,
            "class_count": 2,
            "deployment_types": "hosted",
            "inference_server_versions": "0.15.3",
            "model_num_inferences": 2,
            "prev_model_num_inferences": null
        }
    ]
}
```

{% endtab %}
{% endtabs %}

### किसी Inference में Metadata संलग्न करें

आप प्रत्येक inference परिणाम में एक custom metadata मान संलग्न कर सकते हैं और उसे Model Monitoring डैशबोर्ड में देख सकते हैं।

**अनुप्रयोग**

Custom metadata के कई उपयोग हैं, डेटा को टैग करके उसे ढूँढ़ना और व्यवस्थित करना आसान बनाने से लेकर, inference परिणाम में अतिरिक्त संदर्भ जोड़ने तक। उदाहरण के लिए, मान लीजिए कि आप संयुक्त राज्य भर में तीन फैक्ट्रियों वाले एक ऑटोमोटिव निर्माता हैं। कुछ चीजें जिन्हें आप अपने inference परिणामों में जोड़ने पर विचार कर सकते हैं, उनमें स्थान, किस production-line पर छवि ली गई थी, क्या कोई निश्चित संचालन सफल रहा या विफल, और inference का अपेक्षित परिणाम (जैसे `color=blue`).

**Custom Metadata बनाएं**

<mark style="color:हरा;">`POST`</mark> `/:workspace/inference-stats/metadata`

किसी inference परिणाम में अतिरिक्त डेटा संलग्न करता है जिसे Model Monitoring डैशबोर्ड में प्रदर्शित किया जाएगा।

जब आप Roboflow के Inference Container या Serverless Hosted API के साथ inference अनुरोध करते हैं, तो आपको एक `inference_id` प्रतिक्रिया में प्राप्त होगा। इस ID का उपयोग करके, आप इसे `inference_ids` array में नीचे दिखाए अनुसार जोड़ सकते हैं ताकि अपना metadata उससे संलग्न कर सकें। `field_name` गुण का नाम है, और `value` मान है।

उदाहरण के लिए, यदि मैं अपने inference परिणामों में भौगोलिक स्थान जोड़ना चाहता हूँ, तो मैं `field_name` को "location" पर सेट करूँगा और `value` एक ऐसे स्थान जैसे "united\_states" होगा।

**नोट:** के लिए मान `field_name` और `field_value` पूरी तरह से उपयोगकर्ता-निर्धारित होते हैं। फ़ॉर्मेटिंग को, अक्षर-केस सहित, एकसमान रखना सुनिश्चित करें। उदाहरण के लिए `field_name: "my_location"` और `field_name: "My_location"` को दो अलग-अलग metadata मानों के रूप में माना जाएगा।

**उदाहरण अनुरोध:**

```
curl --location --request POST 'https://api.roboflow.com/${WORKSPACE}/inference-stats/metadata' \
--header 'Content-Type: application/json' \
--data-raw '{
    "api_key": "YOUR_API_KEY",
    "data": [
        {
            "inference_ids": ["a12a19a9-a933-44c9-970c-a55ea03bb453"],
            "field_name": "camera_location",
            "field_value": "canada"
        },
        {
            "inference_ids": ["accf0af9-bdf0-4b22-8106-6988d4cada5a"],
            "field_name": "camera_location",
            "field_value": "emea"
        }
    ]
}'
```

**हेडर:**

| नाम          | मान                |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**बॉडी:**

| नाम    | प्रकार           | विवरण                                                                                                               |
| ------ | ---------------- | ------------------------------------------------------------------------------------------------------------------- |
| `data` | Array\<Metadata> | <p>{</p><p>"inference\_ids": Array\<string>;</p><p>"field\_name": string;</p><p>"field\_value": string;</p><p>}</p> |

**प्रतिक्रिया:**

{% tabs %}
{% tab title="200" %}

```json
{
  "status": "ok"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "अमान्य अनुरोध"
}
```

{% endtab %}
{% endtabs %}

**Python का उपयोग करते हुए उदाहरण:**

```python
import requests
from inference_sdk import InferenceHTTPClient

#### इन्हें बदलें
api_key = "YOUR_API_KEY"
workspace = "YOUR_WORKSPACE_ID"

#### डिफ़ॉल्ट मान
field_name = "test_field"
field_value = "test_value"
model_id = "coco/24"
image_path = "https://cdn.britannica.com/79/232779-050-6B0411D7/German-Shepherd-dog-Alsatian.jpg"
api_url = "https://serverless.roboflow.com"

#### क्लाइंट आरंभ करें
print("InferenceHTTPClient आरंभ किया जा रहा है...")
client = InferenceHTTPClient(api_url=api_url, api_key=api_key)

#### inference चलाएँ
result = client.infer(image_path, model_id=model_id)
print("परिणाम:", result)

#### परिणाम से inference ID निकालें
inference_id = result.get('inference_id')
if inference_id:
    print("Inference ID:", inference_id)
अन्यथा:
    raise ValueError("प्रतिक्रिया में Inference ID नहीं मिला।")

url = f"https://api.roboflow.com/{workspace}/inference-stats/metadata"

#### POST अनुरोध के लिए हेडर और डेटा सेट करें
headers = {
    "Content-Type": "application/json"
}
data = {
    "api_key": api_key,
    "data": [
        {
            "inference_ids": [inference_id],
            "field_name": field_name,
            "field_value": field_value
        }
    ]
}

#### custom metadata संलग्न करने के लिए POST अनुरोध करें
response = requests.post(url, headers=headers, json=data)

#### प्रतिक्रिया स्थिति जाँचें
if response.status_code == 200:
    print("Custom metadata सफलतापूर्वक संलग्न किया गया:", response.json())
अन्यथा:
    print("Custom metadata संलग्न करने में विफल:", response.text)
```
