Show highest scoring category on video

If you have a model that returns scores, you can display the highest scoring category as a text overlay on the video feed using the Nx Meta Rules Engine.

Select a suitable model

You need a model that outputs a score. You can quickly identify these by looking for the Scores tag in the model overview.

Nx AI Cloud model listing showing a model with the Scores tag highlighted
Look for the Scores tag to identify models that output category scores

Or check the model detail page: if the model outputs named scores, they appear in the output description.

Model detail page showing the output description listing named score values
Model detail — outputs listing confirms the model returns named scores

Create an Event Rule in Nx Meta

In the Nx Meta Desktop client, open Camera Rules for the camera running the AI plugin.

Nx Meta Desktop Client showing the Camera Rules option in the camera context menu
Open Camera Rules from the camera context menu

Click Add a New Rule. See the inference framerate how-to for a step-by-step walkthrough of the rule editor interface.

Set the "When" Condition

Source: Select the camera device (usually pre-selected).

Event: Select Analytics Event with type Category detected.

Set the "Do" Action

At: Select the same camera as the source.

Action: Select Show text overlay.

Text: The default $eventText value contains the highest scoring category name. No custom text is needed.

Completed event rule showing Analytics Event - Category detected as the trigger and Show text overlay as the action
Completed rule — triggers on Category detected and shows the result as an overlay

When the event fires, the highest scoring category is displayed on the video feed.

Camera video feed showing the highest scoring category name as a text overlay
Highest scoring category displayed as a text overlay on the video feed

Last updated