A multitask deep learning model for real-time deployment in embedded systems

Miquel Martí, Atsuto MakiarXiv 2017

Abstract

We propose an approach to Multitask Learning (MTL) to make deep learning models faster and lighter for applications in which multiple tasks need to be solved simultaneously, which is particularly useful in embedded, real-time systems. We develop a multitask model for both Object Detection and Semantic Segmentation and analyze the challenges that appear during its training. Our multitask network is 1.6x faster, lighter and uses less memory than deploying the single-task models in parallel. We conclude that MTL has the potential to give superior performance in exchange of a more complex training process that introduces challenges not present in single-task models.

Introduction

In the domain of autonomous drones and embedded robotics, achieving real-time performance is a critical requirement. However, modern deep learning models are computationally intensive. When a system must simultaneously perform object detection (identifying specific entities) and semantic segmentation (understanding pixel-level scene layout), a common but inefficient approach is to run two independent models in parallel. This "naive" solution doubles the memory footprint, storage requirements, and computational load—resources that are often strictly limited in embedded environments.

This paper explores Multitask Learning (MTL) as a solution to this bottleneck. By using a single "trunk" network to extract features for multiple "branch" networks, the system can share the heavy computational lifting across tasks, leading to significant efficiency gains.

Proposed Architecture

The researchers designed a unified architecture that balances speed and accuracy for embedded deployment. The model consists of three primary components:

  • Shared Backbone (Trunk): A ResNet-50 network serves as the shared feature extractor, learning a robust representation of the input image suitable for multiple objectives.
  • Segmentation Branch: A Fully Convolutional Network (FCN) utilizes skip connections to preserve fine-grained spatial details necessary for accurate pixel-level classification.
  • Detection Branch: A Single Shot MultiBox Detector (SSD) was selected for its high inference speed and competitive accuracy.
The proposed multitask architecture featuring a shared ResNet-50 backbone with specialized branches for object detection (SSD) and semantic segmentation (FCN).

By training these components jointly, the model learns features that generalize across tasks. However, this introduces the challenge of "learning speed difference," where one task may converge faster than the other, necessitating careful hyperparameter tuning to balance the learning process.

Datasets and Training

The model was evaluated using two distinct data scenarios:

  1. Pascal VOC: A subset of VOC07, VOC12, and SBD datasets was used, specifically targeting samples with ground-truth annotations for both detection and segmentation.
  2. Aerial View Data: To overcome the lack of unified aerial datasets, the authors employed an interleaving strategy. Each mini-batch contained samples from both the Stanford Drone Dataset (for detection) and the Okutama/Swiss datasets (for segmentation).

Results and Performance Analysis

The multitask model demonstrated substantial improvements over the naive parallel approach across all key metrics for embedded systems:

  • Inference Speed: The multitask model achieved a frame time of 30ms, a 1.6x speedup over the 49ms required by the naive setup.
  • Resource Efficiency: Memory usage was reduced by approximately 40%, dropping from 2511 MB to 1552 MB. Similarly, the model's storage footprint decreased from 235 MB to 140 MB.
  • Accuracy: On the Pascal VOC benchmark, the model achieved 51.8% mAP for detection and 54.4% mIoU for segmentation, proving competitive with single-task baselines.
Qualitative results on aerial imagery demonstrating the model's ability to perform simultaneous object detection (yellow bounding boxes) and semantic segmentation (colored masks) for cars and infrastructure.

Conclusion and Future Work

While the multitask approach offers clear advantages for deployment, it complicates the training phase. Challenges include the difficulty of applying universal data augmentation and the intensive manual process of balancing task-specific loss functions. Future research will focus on automating hyperparameter tuning and developing methods to train more effectively on heterogeneous datasets where labels for different tasks are not perfectly aligned.

Summary updated

BibTeX
@misc{marti2017multitask,
  author = {Miquel Martí and Atsuto Maki},
  title = {{A multitask deep learning model for real-time deployment in embedded systems}},
  year = {2017},
  eprint = {1711.00146},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.00146},
}
Figure