Porting deep learning models on embedded platforms

Porting deep learning models on embedded platforms

Porting deep learning models on embedded platforms

The requirement of our client was to develop an advanced video surveillance solution using deep learning models. The identified model for object detection, classification and localization was implemented using TensorFlow framework. However, the target platform selected supported CNN model implementations based on Caffe framework only. Equonix Tech Lab transformed the solution across frameworks and optimized the same for target platform.

Please find the case study now to learn about topics such as :

  • Challenges in porting deep learning models across embedded platforms
  • Equonix Tech Lab solution to address these challenges
  • How Equonix Tech Lab delivered an implementation accuracy of 99%
    This case study contains details regarding product information, standards, and technical specifications.

Introduction

Deep learning and artificial intelligence are enabling us to find solutions to complex problems and further enhancing overall scale of what is achievable within various domains.
While deep learning paradigm is still evolving, research in deep learning has given way to a wide variety of deep learning models implemented in different frameworks like Caffe, TensorFlow, Keras etc.
Machine learning frameworks are the backbone of any deep learning implementation as they
not only stand ardize the development but also speed up the process. However, they
differ from each other in many respects including the way the data is handled as well as in the implementation of operations, computation graphs and optimization techniques. For e.g. Caffe framework is layer based (can be considered as a set of operations) while TensorFlow is operation based. While this diversity allows us to choose and experiment with the models and frameworks to obtain the best results for the required application, it poses several challenges. It may happen that a target platform does not support the framework in which the model is implemented. This is when the conversion tools are needed. Also, as many of the models may be implemented in only one of the frameworks, porting the model to use another framework may provide better performance/accuracy on target platform. This allows one to choose the best model in terms of design and performance, independent of the deployed framework and also sufficing the requirements of target platform. Case in point is a client who was looking to develop a video surveillance application. Client wanted to deploy a specific object detection & localization model (CNN based) on a proprietary embedded platform. However, this specific model was available only in TensorFlow framework while the selected embedded platform SDK supported only Caffe framework. Hence, Equonix Tech Lab was required to port the model to Caffe framework on the embedded platform, while managing performance, reliability and accuracy requirement.

Challenges

Porting & deploying the object detection model for our customer on their target platform involved several challenges. These included:

  • Selecting and adding the right Caffe layers to replicate the TensorFlow model

  • Adding support for TensorFlow layers not supported in the Caffe framework and the embedded platform SDK

  • Developing TensorFlow equivalent of post processing functionality for Caffe framework based on the limited set of features available in the target platform SDK

  • As Caffe supports only symmetric padding, extra concatenation layer added to take care of asymmetric padding in TensorFlow (though in some cases, even the symmetric padding in TensorFlow may require concatenation layers depending on the TensorFlow model used).

Solution offered

The two core functions in a deep learning model conversion are (a) Porting the network parameters and (b) Porting the model architecture. Equonix Tech Lab, with its extensive expertise on ML frameworks in terms of data representation, file formats (for storing network parameters), the implementation of operations (in layers) and handling framework- specific layers had developed tools for porting models across frameworks e.g. TensorFlow to Caffe & vice-versa. These tools along with our extensive experience with deep learning models and embedded platforms allow us to help our customers with porting, tuning and deploying of such models on their target embedded platform in an expedited time frame with minimal impact on model accuracy & performance.

Some of the key activities performed included:

  • Ported the model to the Caffe framework supported by the embedded platform SDK

  • Optimized workload distribution/mapping for the deep learning model components to the right hardware acceleration & execution units available in the embedded H/W

  • Profiled and benchmarked the ported model with respect to the performance/accuracy of the original model on the target platform

Benefits Delivered

Equonix Tech Lab addressed all challenges highlighted by client and provided practical solutions within expected timelines. After porting and optimizing the model on target platform, an accuracy of 99% was achieved, wrt the original model implementation.

About Equonix Tech Lab

Equonix Tech Lab is a growing startup in providing technology solutions and product engineering services for developing innovative intelligent systems. Equonix Tech Lab offers a portfolio of enabling products and comprehensive services spanning embedded systems, hardware design, and system integration. We work with device manufacturers, system integrators and solution providers across diverse industry domains such as automotive, consumer electronics, drones, video surveillance, medical devices etc. Our deep technology expertise in multimedia systems, deep learning solutions, vision based systems, connectivity technologies, and imaging pipelines coupled with our experience in underlying hardware platforms, enables us to provide complete solutions to our customers while expediting their time to market, and future proofing investments.

Leave a Reply

Close Menu