機器之心整理
參與:張倩、澤南
在機器學習帶來的所有顛覆性技術中,計算機視覺領域吸引了業內人士和學術界最大的關注。
剛剛推出 1.3 正式版的 PyTorch 風頭正勁,人們已經圍繞這一深度學習框架開發出了越來越多的工具。最近,一個名為 TorchCV 的計算機視覺模型框架站上了 GitHub 趨勢榜。
項目鏈接:https://github.com/donnyyou/torchcv
該庫提供了基於深度學習的大部分 CV 問題研究的源代碼,對於使用者來說,調用最常用、最為先進的計算機模型從此可以變得更加容易。TorchCV 的作者 Donny You 來自北京大學,是機器感知與智能教育部重點實驗室的一名研三學生。
TorchCV 支持的模型
TorchCV 支持圖像分類、語義分割、目標檢測、姿態檢測、實例分割、生成對抗網絡等任務中的多個常見模型,列表如下:
圖像分類
VGG: Very Deep Convolutional Networks for Large-Scale Image Recognition
ResNet: Deep Residual Learning for Image Recognition
DenseNet: Densely Connected Convolutional Networks
ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices
ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design
Partial Order Pruning: for Best Speed/Accuracy Trade-off in Neural Architecture Search
語義分割
DeepLabV3: Rethinking Atrous Convolution for Semantic Image Segmentation
PSPNet: Pyramid Scene Parsing Network
DenseASPP: DenseASPP for Semantic Segmentation in Street Scenes
Asymmetric Non-local Neural Networks for Semantic Segmentation
目標檢測
SSD: Single Shot MultiBox Detector
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
YOLOv3: An Incremental Improvement
FPN: Feature Pyramid Networks for Object Detection
姿態檢測
CPM: Convolutional Pose Machines
OpenPose: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields
實例分割
Mask R-CNN
生成對抗網絡
Pix2pix: Image-to-Image Translation with Conditional Adversarial Nets
CycleGAN: Unpaired Image-to-Image Translation using Cycle-Consistent
快速啟動 TorchCV
TorchCV 目前僅支持 Python3.x 和 pytorch 1.0。
利用 TorchCV 得到的模型性能數據
以下所示的性能數據完全複現了論文的結果。
圖像分類
語義分割
目標檢測
姿態估計
OpenPose: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields
實例分割
Mask R-CNN
生成對抗網絡
Pix2pix
CycleGAN
TorchCV 的數據集
TorchCV 定義了你能在數據集子目錄中查到的所有任務的數據格式。下面是一個用於訓練語義分割的數據集目錄樹示例。你可以使用 datasets/seg/preprocess文件夾中的腳本對開源數據集進行預處理。
文件夾地址:https://github.com/donnyyou/torchcv/tree/master/datasets/seg/preprocess
TorchCV 的命令
項目作者提供了命令行工具,供用戶使用模型,代碼如下:
訓練
恢復訓練
驗證
測試
2019 年,PyTorch 正在逐漸趕超 TensorFlow,在研究領域成為最為流行的深度學習框架。隨著後者使用人數的增多,我們未來還會看到更多高效工具。