# Show highest scoring category on video

If you have a model that returns a score you can display the highest scoring category on the video feed.

You can achieve this by leveraging the plugin's ability to generate Analytics Events and display them as a Text Overlay on the video feed with the built in Rules Engine.

#### Select a suitable model

The have a highest scoring category, you need to use a model that outputs a score. You can check this by looking at the model output for a model.&#x20;

You can quicly see this if the model has the tag '`Scores`' in the overview.

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

Of if the detailed output shows that the model has scores in the output name.

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

#### Create an Event Rule in Nx Meta

In the Nx Meta Desktop client, go to the 'Camera Rules' for the camera running the AI plugin that you want to use for the FPS display.

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

Then click the button 'Add a New Rule'.

This will open a dialog where you can configure an event rule. See the [inference framerate howto](/nx-ai-manager/howtos/show-ai-inference-framerate-on-video.md) for more detailed info.

#### Set the "When" Condition with the following options

**Source**: Select the camera device, it will usually be preselected.

**Event**: Select "*Analytics Event*' with the type "*Category detected*"

#### Set the "Do" Action with the following options

**At**: Select the camera device (Use the same camera as the source camera)

**Action**: Select Show text overlay.

**Text**: Here, you would use a macro or placeholder provided by the Nx AI Manager to insert the value of the inference speed from the analytics event.

In this case the default is sufficient, so not custom text is needed.

<figure><img src="/files/2LlpBmTSazCHUZ8RgZgC" alt=""><figcaption></figcaption></figure>

When the analytics event containing the category detection is triggered, the overlay with the highest scoring category will be displayed on the video feed in the Nx Meta client.&#x20;

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

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nx.docs.scailable.net/nx-ai-manager/howtos/show-highest-scoring-category-on-video.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
