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

  • 2019 年 12 月 27 日
  • 筆記

YOLACT 是ICCV 2019 接收的實時實例分割論文 YOLACT: Real-time Instance Segmentation 提出的演算法,近期該文作者又對此進行了擴展,提出YOLACT++:Better Real-time Instance Segmentation,其 resnet50 模型在Titan Xp 上運行速度達 33.5 fps,在COCO 的test-dev數據集上達到34.1 mAP,並開源了程式碼。

論文作者/程式碼開發者來自加州大學戴維斯分校。

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

可見 YOLACT 系列具有較大的速度優勢,YOLACT++ 則又在 YOLACT基礎上精度提高不少。

以下影片為該文作者在ICCV 2019 公布的實例分割Demo:

這些結果並非後期處理的,而是在GPU上實時運行出來的。

YOLACT 網路架構:

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

YOLACT / YOLACT++ 取得了速度最快的同時,取得了不錯的分割精度。

作者已經開源了多個模型:

並提供了程式碼,可以很方便在COCO數據集上評測性能:

# 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

以及對影像和影片上跑實例分割:

# 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
# 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

同時該程式碼也開放了訓練程式,開發者可以很輕鬆在COCO 、Pascal SBD上訓練模型,並添加 多GPU 支援。

如果開發者想要在自己的數據集上訓練實例分割,只需要有COCO風格的目標檢測標註JSON數據即可。

以下是分割結果示例:

論文地址:

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

開源地址:

https://github.com/dbolya/yolact

目前該程式碼已經獲得 2K+ 顆星,是近期最熱門的實例分割開源庫。