pythia.utils.str2pythia#

Utilities to convert strings to pythia wrappers.

pythia.utils.str2pythia.find_analytics(pipeline: Gst.Pipeline) Analytics | None[source]#

Extract analytics from parsed pipeline.

Parameters:

pipeline – The root bin where to look for nvdsanalytics elements.

Returns:

First nvdsanalytics found, wrapped as Analytics.

pythia.utils.str2pythia.find_models(pipeline: Gst.Pipeline) list[InferenceEngine][source]#

Extract nvifer s from parsed pipeline.

Parameters:

pipeline – The root bin where to look for ninfer elements.

Returns:

List of all the nvinfer wrappers wrapped as

InferenceEngine.

pythia.utils.str2pythia.find_tracker(pipeline: Gst.Pipeline) Tracker | None[source]#

Extract tracker from parsed pipeline.

Parameters:

pipeline – The root bin where to look for nvtracker elements.

Returns:

First nvtracker found, wrapped as Tracker.

pythia.utils.str2pythia.is_analytics(element: Element) bool[source]#

Check wether a Gst.Element is a nvdsanalytics.

Parameters:

element – the gstreamer element to check.

Returns:

True iff the element is a nvdsanalytics. False otherwise.

pythia.utils.str2pythia.is_inference(element: Element) bool[source]#

Check wether a Gst.Element is a nvinfer.

Parameters:

element – the gstreamer element to check.

Returns:

True iff the element is a nvinfer. False otherwise.

pythia.utils.str2pythia.is_tracker(element: Element) bool[source]#

Check wether a Gst.Element is a nvtracker.

Parameters:

element – the gstreamer element to check.

Returns:

True iff the element is a nvtracker. False otherwise.