Giter Club home page Giter Club logo

compare-dllibrary's Introduction

compare-DLlibrary

深層学習ライブラリのCPU推論速度比較

概要

画像認識タスクにおいて、PyTorch, OpenCV, ONNXの推論速度比較を行います。 使用モデルは「densenet121」とします。

その他、以下は省きます

  • FP16 (PyTorch - GPU推論のみ)
  • TensorRT (GPU推論のみ)
  • LibTorch
  • OpenCV (GPU推論)
  • OpenVINO

実行環境

ライブラリ名 バージョン
numpy 1.24.1
torch 1.12.1+cu113
torchvision 0.13.1+cu113
Pillow 9.4.0
opencv-python 4.7.0.68
onnxruntime 1.13.1

環境構築手順

  1. venvによって環境を構築

    python -m venv compareEnv
    
  2. 環境を有効化

    // Windows
    .\compareEnv\Scripts\activate
    
    // Linux
    source compareEnv/bin/activate
    
  3. ライブラリをダウンロード

    pip install -r requirements.txt
    

実験

3回実行してその平均実行時間を結果としました。

ライブラリ名 平均実行時間[s]  推定ラベル名 信頼度
PyTorch 0.18(0.178) steel arch bridge 0.84
ONNX 0.14(0.142) steel arch bridge 0.88
ONNX (前処理変更) 0.14(0.144) steel arch bridge 0.84
OpenCV 0.14(0.139) steel arch bridge 0.88

compare-dllibrary's People

Contributors

textcunma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.