dnth / eva02_large_patch14_448

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: October 04 2024
image-classification

Introduction of eva02_large_patch14_448

Model Details of eva02_large_patch14_448

PyTorch to ONNX-TensorRT

This repository contains code to optimize PyTorch image models using ONNX Runtime and TensorRT, achieving up to 8x faster inference speeds. Read the full blog post here .

Installation

Create and activate a conda environment:

conda create -n supercharge_timm_tensorrt python=3.11
conda activate supercharge_timm_tensorrt

Install required packages:

pip install timm
pip install onnx
pip install onnxruntime-gpu==1.19.2
pip install cupy-cuda12x
pip install tensorrt==10.1.0 tensorrt-cu12==10.1.0 tensorrt-cu12-bindings==10.1.0 tensorrt-cu12-libs==10.1.0

Install CUDA dependencies:

conda install -c nvidia cuda=12.2.2 cuda-tools=12.2.2 cuda-toolkit=12.2.2 cuda-version=12.2 cuda-command-line-tools=12.2.2 cuda-compiler=12.2.2 cuda-runtime=12.2.2

Install cuDNN:

conda install cudnn==9.2.1.18

Set up library paths:

export LD_LIBRARY_PATH="/home/dnth/mambaforge-pypy3/envs/supercharge_timm_tensorrt/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/home/dnth/mambaforge-pypy3/envs/supercharge_timm_tensorrt/lib/python3.11/site-packages/tensorrt_libs:$LD_LIBRARY_PATH"
Running the code

The following codes correspond to the steps in the blog post.

PyTorch latency benchmark:
python 01_pytorch_latency_benchmark.py

Read more here

Convert model to ONNX:
python 02_convert_to_onnx.py

Read more here

ONNX Runtime CPU inference:
python 03_onnx_cpu_inference.py

Read more here

ONNX Runtime CUDA inference:
python 04_onnx_cuda_inference.py

Read more here

ONNX Runtime TensorRT inference:
python 05_onnx_trt_inference.py

Read more here

Export preprocessing to ONNX:
python 06_export_preprocessing_onnx.py

Read more here

Merge preprocessing and model ONNX:
python 07_onnx_compose_merge.py

Read more here

Run inference on merged model:
python 08_inference_merged_model.py

Read more here

Run inference on video:
python 09_video_inference.py sample.mp4 output.mp4 --live 

To run on a webcam as input source

python 09_video_inference.py --webcam --live 

Runs of dnth eva02_large_patch14_448 on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About eva02_large_patch14_448 huggingface.co Model

More eva02_large_patch14_448 license Visit here:

https://choosealicense.com/licenses/mit

eva02_large_patch14_448 huggingface.co

eva02_large_patch14_448 huggingface.co is an AI model on huggingface.co that provides eva02_large_patch14_448's model effect (), which can be used instantly with this dnth eva02_large_patch14_448 model. huggingface.co supports a free trial of the eva02_large_patch14_448 model, and also provides paid use of the eva02_large_patch14_448. Support call eva02_large_patch14_448 model through api, including Node.js, Python, http.

eva02_large_patch14_448 huggingface.co Url

https://huggingface.co/dnth/eva02_large_patch14_448

dnth eva02_large_patch14_448 online free

eva02_large_patch14_448 huggingface.co is an online trial and call api platform, which integrates eva02_large_patch14_448's modeling effects, including api services, and provides a free online trial of eva02_large_patch14_448, you can try eva02_large_patch14_448 online for free by clicking the link below.

dnth eva02_large_patch14_448 online free url in huggingface.co:

https://huggingface.co/dnth/eva02_large_patch14_448

eva02_large_patch14_448 install

eva02_large_patch14_448 is an open source model from GitHub that offers a free installation service, and any user can find eva02_large_patch14_448 on GitHub to install. At the same time, huggingface.co provides the effect of eva02_large_patch14_448 install, users can directly use eva02_large_patch14_448 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

eva02_large_patch14_448 install url in huggingface.co:

https://huggingface.co/dnth/eva02_large_patch14_448

Url of eva02_large_patch14_448

eva02_large_patch14_448 huggingface.co Url

Provider of eva02_large_patch14_448 huggingface.co

dnth
ORGANIZATIONS

Other API from dnth

huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 01 2022