Divide and Conquer: an Accurate Machine Learning Algorithm to Process Split Videos on a Parallel Processing Infrastructure

Walter M. Mayor Toro, Juan Carlos Perafan Villota, Oscar H. Mondragon, Johan S. Obando-CeronarXiv 2019

TL;DR

This paper tackles the challenge of efficiently processing massive amounts of traffic camera video data using parallel processing. They propose a novel "divide and conquer" approach that splits videos into chunks for distributed processing, combined with a heuristic algorithm to prevent vehicles from being counted multiple times across chunks, ensuring accurate results.

What Problem Does This Paper Address?

The proliferation of traffic cameras generates an overwhelming volume of video data. While parallel processing frameworks like Hadoop MapReduce are well-suited for handling such big data, existing approaches often process entire videos on a single node. This can lead to "load imbalance" issues, especially with long videos, and limits the scalability of parallel processing to scenarios with a large number of videos rather than large individual videos. Furthermore, splitting videos for parallel processing introduces a new problem: a single vehicle might be detected in multiple video chunks, leading to inaccurate counts. This paper aims to address these challenges by developing an intelligent video processing algorithm that leverages chunking for efficiency while maintaining accuracy.

Methods

The core of the proposed solution is a "divide and conquer" strategy. Videos are first split into equal chunks by a master node. These chunks are then sent to different data nodes for processing. On each data node, three algorithms are applied:

  1. Vehicle Detection: The YOLO (You Only Look Once) deep learning algorithm is used to detect vehicles within each chunk.
  2. Vehicle Tracking: Kalman filters and the Hungarian algorithm are employed to track the detected vehicles.
  3. Vehicle Filtering: This is the novel contribution. A heuristic algorithm is used to filter out vehicles that have already been registered in previous chunks. This algorithm considers the vehicle's direction and its position relative to a predefined "street line" (defined by the user). If a vehicle is detected before and after the line, or only after the line a few frames ago, it's considered part of the current chunk. Otherwise, it's filtered to avoid double-counting.

The entire framework is built upon the Hadoop MapReduce ecosystem, with Spark potentially used for worker nodes.

Datasets

The authors mention using datasets of videos from traffic cameras, including some from YouTube and others from traffic cameras in Cali, Colombia. They also describe a configuration process where a user draws lines on a video to define a specific street or counting area, which is then saved as a "Dataset Street configuration" for future use. This configuration is crucial for the filtering algorithm.

Key Insights and Ideas

  • Chunking for Scalability: Splitting large videos into smaller chunks is a viable strategy to leverage parallel processing infrastructure more effectively, even for individual large video files.
  • The Double-Counting Dilemma: The primary challenge introduced by chunking is accurately counting vehicles that might span across chunk boundaries.
  • Heuristic Filtering is Key: A well-designed heuristic algorithm, considering vehicle direction and position relative to defined boundaries, can effectively solve the double-counting problem without sacrificing accuracy.
  • User-Defined Regions of Interest: Allowing users to define specific areas for analysis (like a street segment) makes the system more flexible and applicable to real-world traffic management scenarios.

Key Results

The paper demonstrates the accuracy of their approach through an experiment comparing two methods: processing an entire video on a single node versus processing it in four chunks across different nodes. The results showed that the final vehicle frequency count was the same for both methods, indicating that their chunking and filtering strategy successfully maintained accuracy. Figure 2 visually supports this, showing the same count for the entire video and the chunked processing.

Limitations and Future Work

Limitations: * The paper acknowledges that video division "may produce inaccurate results" if not handled properly, which their heuristic aims to solve. * The accuracy of the filtering algorithm is dependent on the quality of the initial street configuration and the vehicle detection/tracking algorithms.

Future Work: * The paper suggests that the results can be "continuously accessed for probabilistic analysis in vehicular traffic tasks," implying future work in analyzing traffic patterns and making predictions. * While not explicitly stated as future work, the reliance on specific deep learning models (YOLO) and tracking algorithms suggests potential for exploring other or more advanced models.

Summary updated

BibTeX
@misc{toro2019divide,
  author = {Walter M. Mayor Toro and Juan Carlos Perafan Villota and Oscar H. Mondragon and Johan S. Obando-Ceron},
  title = {{Divide and Conquer: an Accurate Machine Learning Algorithm to Process Split Videos on a Parallel Processing Infrastructure}},
  year = {2019},
  eprint = {1912.09601},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.09601},
}
Figure