1. 程式人生 > >Fast and accurate object detection in high resolution 4K and 8K video using GPUs 論文筆記

Fast and accurate object detection in high resolution 4K and 8K video using GPUs 論文筆記

文章目錄

一、基本資訊

標題:《Fast and accurate object detection in high resolution 4K and 8K video using GPUs》

時間:2018-10-26

出版源:HPEC 2018

論文領域:目標檢測(Object Detection)

主要連結:

關鍵詞:yolov2、attention、high resolution

二、研究背景

大多數目標檢測論文都是聚焦在低解析度影象上(特別是VOC、COCO),而低解析度影象會損失很多細節,並且目前很多裝置拍攝的影象或者視訊都是高清的(4k/8k)。

如下圖所示,一幅高清影象可以識別到更多的目標,如果使用傳統的目標檢測演算法,resize影象後,會丟失很多目標(recall很低)。

在這裡插入圖片描述

因此這篇論文主要針對高清影象/視訊來提出有效的目標檢測演算法,保證準確率和速度。

三、創新點

3.1 概述

論文提出Attention pipeline。第一階段,將原始影象下采樣(downscaling)到低解析度空間中。在低解析度中目標檢測引導model attention到原圖的重要區域。第二階段,model直接處理原圖上的區域,僅限於上述highlighted areas。

這裡有個關鍵詞Attention,其概念就是僅關注原圖中少數的區域。

注:本文使用YOLOv2演算法為基礎網路。

主要貢獻如下:

  • We propose a novel method which processes high
    resolution video data while balancing the trade-off
    of accuracy and performance.

  • We show that our method reduces the number of
    inspected crops as compared to a baseline method
    of processing all crops in each image and as a result
    increases performance by up to 27%.

  • We increase the PASCAL VOC Average Precision
    score on our dataset from 33.6 AP50 to 75.4 AP50 as
    compared to using YOLO v2 in baseline approach
    of downsampling images to the model’s resolution.

  • Implement efficient code which distributes work
    across GPU cluster and measure the performance of
    each individual operation of proposed method.

速度結果:

  • 3-6 FPS on 4k video

  • 2 FPS on 8k video

3.2 詳解

3.2.1 問題分析

在本文的上下文中,我們將使用高解析度的視訊資料集,可以將其視為連續幀的stream。

除了每個幀內的空間資訊之外,還存在跨相鄰幀傳送的時間資訊(相同的跟蹤物件可能存在於相似位置的下一幀中)。

Basiline approaches

1.將原圖縮放(downscale)到evaluating 模型的解析度

2.用略微重疊的固定解析度網格覆蓋原始影象,並分別評估每個crop的區域。

First approach is to downscale the whole image original image into resolution of the evaluating model. This approach offers fast evaluation,
but loses large amounts of information potentially hidden in the image, which especially applies with high resolutions. Second approach is to overlay the original image with a slightly overlapping grid of fixed resolution and evaluate each cut out crop separately. In this second approach we pay the full computational cost as we evaluate every single crop of the image.

本文定義了"crop",如下圖中的綠色方框所示,"crop"其實包含了bounding box的方形區域。

在這裡插入圖片描述

3.2.2 Attention pipeline

本文提出了 attention pipeline模型,有助於優化上述兩個步驟,提高精確率和效能。

本文根據兩個stage來評估模型:

  • “attention evalution” stage 關注影象的roughly取樣區域,以獲得我們正在定位物件的懷疑區域。
  • “final evalution” stage 關注在更高解析度下檢視這些選定區域。

注:attention可以譯為注意力

在這裡插入圖片描述

Attention evaluation

將原圖輸入到attention evaluation stage,為了平衡精度和速度,我們選擇通過在原始影象上按行數(影象高度)進行crop,保證相鄰網格之間存在畫素重疊。

注意:此次crop引數是行數

例如,可以選擇注意力評估來通過以行數為引數的方形網格來裁剪影象,使得原始影象完全被最小量的正方形覆蓋。請注意,這些方形區域可能重疊。

然後將crop的區域縮小為具有對應於縱橫比的608px高度和寬度。影象的寬度將細分為608x608畫素的正方形。

請參閱圖3中第一和第二階段中此網格的示例。

在這裡插入圖片描述

由上圖可知,有2=1x2個方形網格

本文使用YOLOv2來評估這些初始attention crop,並獲得檢測目標的bounding boxes。注意,初始評估也許會丟失影象中的小目標或者被遮擋的目標,但這些目標仍然會在感興趣的rough 區域上獲得。在視訊分析的實際設定中,本文使用視訊的時間方面,並在幾個相鄰幀中合併和重用attention。

在這裡插入圖片描述

Active crop selection

按行數/2將影象劃分為多個方形網格,然後檢查每個網格與在attention evaluation階段中檢測的bouding boxes的交叉。具有重疊的網格將被標記為final evaluation中的active crop。

Active crop數量通常少於所有crop的數量。

注意:此次crop引數是行數/2

在這裡插入圖片描述

由上圖可知,有8=2x4個方形網格

Final evaluation

在final evaluation階段,本文使用YOLOv2模型在更高解析度的方形crop定位目標。如下圖中的第三階段所示,

請注意crop解析度的差異(1060px比例縮放至608px,而不是2160px,縮放至608px)

在這裡插入圖片描述

Postprocessing

在評估影象的多個重疊crop區域時,我們獲得這些區域中的每一個的邊界框列表。為了限制邊界框的數量,我們執行非最大抑制(non-maximum suppression)演算法以僅保留最佳預測。因為我們不知道物件的大小或其在影象中的位置,我們可能會在多個相鄰區域中檢測到相同的物件。如果物件大於我們網格的區域,或者如果它位於兩個相鄰區域的邊界上,實際上被切成兩半,則會發生這種情況。 如圖5所示。

在這裡插入圖片描述

如果沿著splitting邊界觀察,則可以檢測被重疊網格切割的物件。本文嘗試檢測併合並附近的邊界框。 這個問題是資料特定的,如果我們試圖定位像人類這樣的物件,情況往往在影象中高而不是寬。這可以根據檢測到的物件類進行調整。根據經驗,我們設定了幾個距離閾值,在這些閾值下我們可以合併相同物件類的附近邊界框。 對於人體檢測,我們考慮合併僅垂直相鄰的區域。

3.2.3 Implementation of the client-server version

本文提出的attention pipeline 的動機是使4K視訊的實時評估。針對以下兩個特定屬性來實現快速處理。

第一點是image crop 評估是一個並行問題

第二個是final評估總是取決於先前的attention評估步驟。其實繞過這種依賴性,在當前幀的最終評估的同時計算下一幀的評估步驟,這樣有效地減少了每個注意力評估步驟的等待時間,見圖6。

在這裡插入圖片描述

為了利用這些屬性,我們使用了客戶端 - 伺服器實現,如圖7所示。請注意,對於客戶端機器,我們還可以將輸入/輸出操作和影象處理移動到多個執行緒中,從而進一步加快每幀效能。

在這裡插入圖片描述

四、實驗結果

執行環境:在PSC’s Bridges cluster上執行,每個node的配置是 2 Intel Broadwell E5-2683 v4 CPUs running at 2.1 to
3.0 GHz and 2 NVIDIA Tesla P100 Pascal GPUs。

資料集:PEViD-UHD

準確率度量:IoU 0.5、IoU 0.25和IoU 0.75下的平均準確率,即AP50、AP25和AP75。

Crop 設定:Crop設定受將原圖劃分成多少行的影響。論文儘可能的用最小的方向crop數量來覆蓋整幅影象。然後每個方形都被縮放到608*608。表1顯示了根據網格數量得到的網格解析度,其中預設方形crop之間存在20畫素的重疊。

在這裡插入圖片描述

準確率

在這裡插入圖片描述

FPS

在這裡插入圖片描述

五、結論與思考

5.1 作者結論

As a motivation of this paper we have stated two goals in processing high resolution data. First goal consists of the ability to detect even small details included in the 4K or 8K image and not loosing them due to downscaling. Secondly we wanted to achieve fast performance and save on the number of processed crops as compared with the baseline approach of processing every crop in each frame. Our results show that we outperform the individual baseline approaches, while allowing the user to set the desired trade-off between accuracy and performance.

5.2 記錄該工作的亮點,以及可以改進的地方

  • Attention trick
  • 兩次YOLOv2
  • 按行數劃分方形網格

參考

None