Skip to main content
QUICK REVIEW

[Paper Review] NNStreamer: Stream Processing Paradigm for Neural Networks, Toward Efficient Development and Execution of On-Device AI Applications

MyungJoo Ham, Ji Joong Moon|arXiv (Cornell University)|Jan 12, 2019
Advanced Neural Network ApplicationsComputer Science27 references3 citations
TL;DR

NNStreamer proposes a stream processing paradigm that treats neural networks as filters in GStreamer-based pipelines, enabling efficient on-device AI execution. By integrating diverse neural network frameworks and multimedia filters into a unified pipeline, it improves performance, reduces development complexity, and supports real-time processing on edge devices with up to 171.62% throughput gain on certain hardware.

ABSTRACT

We propose nnstreamer, a software system that handles neural networks as filters of stream pipelines, applying the stream processing paradigm to neural network applications. A new trend with the wide-spread of deep neural network applications is on-device AI; i.e., processing neural networks directly on mobile devices or edge/IoT devices instead of cloud servers. Emerging privacy issues, data transmission costs, and operational costs signifies the need for on-device AI especially when a huge number of devices with real-time data processing are deployed. Nnstreamer efficiently handles neural networks with complex data stream pipelines on devices, improving the overall performance significantly with minimal efforts. Besides, nnstreamer simplifies the neural network pipeline implementations and allows reusing off-shelf multimedia stream filters directly; thus it reduces the developmental costs significantly. Nnstreamer is already being deployed with a product releasing soon and is open source software applicable to a wide range of hardware architectures and software platforms.

Motivation & Objective

  • Address the growing need for on-device AI to reduce data transmission, latency, and operational costs in edge and IoT devices.
  • Overcome challenges in deploying complex, multi-network, multi-sensor AI pipelines on resource-constrained devices.
  • Simplify development by enabling reuse of existing multimedia filters and supporting multiple neural network frameworks within a single pipeline.
  • Improve system performance and code maintainability through a standardized stream processing model for neural networks.
  • Enable deployment of on-device AI applications with minimal hardware cost and high throughput, even under real-time constraints.

Proposed method

  • Treat each neural network as a stream filter within a GStreamer pipeline, abstracting model inference as data transformation in a stream.
  • Define standardized tensor and container data formats to interoperate across different neural network frameworks and media types.
  • Introduce stream path manipulators and synchronization policies to manage complex, dynamic pipeline topologies with shared inputs and outputs.
  • Leverage GStreamer's modular architecture and existing plugins to reuse multimedia processing components and reduce custom development.
  • Implement custom tensor_filter sub-plugins for efficient tensor operations and memory management, minimizing redundant data copies.
  • Support dynamic pipeline reconfiguration and integration with external systems like ROS and protobuf for distributed and interoperable AI workloads.

Experimental results

Research questions

  • RQ1How can neural network inference be efficiently integrated into real-time stream processing pipelines on edge devices?
  • RQ2To what extent can a unified stream processing framework reduce development complexity and improve performance in on-device AI applications?
  • RQ3What performance gains are achievable by decoupling neural network processing from monolithic AI frameworks in embedded systems?
  • RQ4How does supporting multiple neural network frameworks within a single pipeline affect system maintainability and resource utilization?
  • RQ5Can stream processing paradigms effectively manage synchronization and data flow in complex, multi-network AI pipelines?

Key findings

  • NNStreamer achieved up to 171.62% performance improvement in frame processing rate for MTCNN inference on Full-HD video streams compared to a ROS-based implementation.
  • The system maintained 30 FPS display output even when input frame rates exceeded processing capacity, by intelligently dropping non-critical input frames.
  • Performance degradation in R-Net and O-Net stages was observed due to memory copies during image patch generation, but this was mitigated on devices with higher memory bandwidth.
  • Memory consumption increased by over 10 times in the MTCNN-NNStreamer pipeline compared to ARS-NNStreamer, primarily due to excessive queue usage storing Full-HD frames.
  • Custom tensor_filter plugins that generate multi-scale image pyramids directly from input streams could significantly reduce both CPU and memory usage.
  • The framework enables seamless integration of neural networks with traditional multimedia filters and supports deployment across diverse platforms including Tizen, Android, and Ubuntu.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.