Github上目前最熱門的實時實例分割開源庫YOLACT++


Github上目前最熱門的實時實例分割開源庫YOLACT++


YOLACT是ICCV2019收到的實時實例分割paper。


YOLACT提出的實時實例分割算法最近被作者擴展為YOLACT++:更好的實時實例分割。它的resnet50模型運行在Titan Xp上。速度達到33.5fps,在COCO的test dev數據集上達到34.1map,而且代碼是開源的。


作者來自自加州大學戴維斯分校:

Github上目前最熱門的實時實例分割開源庫YOLACT++


作者提出了一個簡單的,全卷積的實時(> 30 fps)實例分割模型,該模型在單個Titan Xp上評估的MS COCO上取得了非常有競爭性結果,其速度明顯快於任何現有技術方法。


此外是在一個GPU上訓練後即可獲得此結果。


作者通過將實例分割分為兩個並行的子任務來完成此任務:

(1)生成一組原型蒙版

(2)預測每個實例的蒙版係數。

(3)通過將原型與模板係數線性組合來生成實例模板。


由於此過程不依賴於回收,因此此方法可產生非常高質量的蒙版並免費顯示時間穩定性。分析了原型的湧現行為後,並顯示了它們是完全卷積的,但學會了以翻譯變體的方式自行定位實例。


作者還提出了快速NMS,這是對標準NMS的12毫秒快速替代,僅會影響性能。最後,通過將可變形卷積合併到骨幹網絡中,使用更好的錨定比例和長寬比優化預測頭,並添加新穎的快速蒙版重新評分分支,我們的YOLACT ++模型可以在33.5 fps的MS COCO上實現34.1 mAP,即仍然非常先進,同時仍在實時運行。


下圖顯示了YOLACT/YOLACT++與其他實例分割算法的速度和精度比較:

Github上目前最熱門的實時實例分割開源庫YOLACT++

由此可見,YOLACT級數具有很大的速度優勢,YOLACT++在YOLACT的基礎上提高了精度。

這些結果不是後處理的,而是在GPU上實時運行的。


YOLACT網絡架構:

Github上目前最熱門的實時實例分割開源庫YOLACT++

圖2:YOLACT體系結構藍色/黃色表示原型中的低/高值,灰色節點表示未經訓練的功能,在此示例中,k = 4。 我們使用ResNet-101 + FPN在RetinaNet [25]基礎上建立了該架構。

Github上目前最熱門的實時實例分割開源庫YOLACT++

YOLACT評估結果基於COCO的測試開發集。 該基本模型在33.0 fps時達到29.8 mAP。 所有圖像的置信度閾值均設置為0.3。


與COCO數據集上其他算法的更詳細比較結果:

Github上目前最熱門的實時實例分割開源庫YOLACT++

表1:MS COCO結果我們將最先進的掩模mAP方法與COCO test-dev上的速度進行了比較,幷包括了一些基本模型的刪節,不同的骨幹網絡和圖像大小。 我們表示具有網絡深度功能的骨幹架構,其中R和D分別指ResNet和DarkNet。 我們的基本模型,帶有ResNet-101的YOLACT-550,比以前的具有競爭性口罩mAP的最快方法快3.9倍。 我們的帶有ResNet-50的YOLACT ++-550模型具有相同的速度,同時將基本模型的性能提高了4.3 mAP。 與Mask R-CNN相比,YOLACT ++-R-50快3.9倍,僅落後1.6 mAP。


YOLACT/YOLACT++實現了最快的速度,同時獲得了良好的分割精度。

作者已經開放了幾個模型:

Github上目前最熱門的實時實例分割開源庫YOLACT++

我們來看看如何使用:


關於COCO的定量結果

<code># Quantitatively evaluate a trained model on the entire validation set. Make sure you have COCO downloaded as above.# This should get 29.92 validation mask mAP last time I checked.python eval.py --trained_model=weights/yolact_base_54_800000.pth# Output a COCOEval json to submit to the website or to use the run_coco_eval.py>

COCO的定性結果

<code># Display qualitative results on COCO. From here on I'll use a confidence threshold of 0.15.python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --display/<code>

COCO基準

<code># Run just the raw model on the first 1k images of the validation setpython eval.py --trained_model=weights/yolact_base_54_800000.pth --benchmark --max_images=1000/<code>

Images

<code># Display qualitative results on the specified image.python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --image=my_image.png# Process an image and save it to another file.python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --image=input_image.png:output_image.png# Process a whole folder of images.python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --images=path/to/input/folder:path/to/output/folder/<code>

Video

<code># Display a video in real-time. "--video_multiframe" will process that many frames at once for improved performance.# If you want, use "--display_fps" to draw the FPS directly on the frame.python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --video_multiframe=4 --video=my_video.mp4# Display a webcam feed in real-time. If you have multiple webcams pass the index of the webcam you want instead of 0.python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --video_multiframe=4 --video=0# Process a video and save it to another file. This uses the same pipeline as the ones above now, so it's fast!python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --video_multiframe=4 --video=input_video.mp4:output_video.mp4/<code>

訓練

<code># Trains using the base config with a batch size of 8 (the default).python train.py --config=yolact_base_config# Trains yolact_base_config with a batch_size of 5. For the 550px models, 1 batch takes up around 1.5 gigs of VRAM, so specify accordingly.python train.py --config=yolact_base_config --batch_size=5# Resume training yolact_base with a specific weight file and start from the iteration specified in the weight file's name.python train.py --config=yolact_base_config --resume=weights/yolact_base_10_32100.pth --start_iter=-1# Use the help option to see a description of all available command line argumentspython train.py --help/<code>

看下分割結果示例

Github上目前最熱門的實時實例分割開源庫YOLACT++

Github上目前最熱門的實時實例分割開源庫YOLACT++

Github上目前最熱門的實時實例分割開源庫YOLACT++

論文地址:

https://arxiv.org/pdf/1912.06218.pdf

開源地址:

https://github.com/dbolya/yolact


分享到:


相關文章: