使用python和TensorRT进行图片推理时安装的一些过程

离线安装opencv的两种链接地址:https://blog.csdn.net/PercentageC/article/details/126883961
安装face_recognition:

(cuda116) C:\Users\jiao\Desktop\推理加速环境准备\03 cuda cudnn tensorrt pycuda 10.29>pip install face_recognition
Collecting face_recognition
  Downloading face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Collecting face-recognition-models>=0.3.0 (from face_recognition)
  Downloading face_recognition_models-0.3.0.tar.gz (100.1 MB)
     ---------------------------------------- 100.1/100.1 MB 701.2 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting Click>=6.0 (from face_recognition)
  Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting dlib>=19.7 (from face_recognition)
  Downloading dlib-19.24.2.tar.gz (11.8 MB)
     ---------------------------------------- 11.8/11.8 MB 722.0 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in d:\software install location\anaconda\envs\cuda116\lib\site-packages (from face_recognition) (1.26.1)
Collecting Pillow (from face_recognition)
  Downloading Pillow-10.1.0-cp310-cp310-win_amd64.whl.metadata (9.6 kB)
Collecting colorama (from Click>=6.0->face_recognition)
  Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Downloading click-8.1.7-py3-none-any.whl (97 kB)
   ---------------------------------------- 97.9/97.9 kB 701.6 kB/s eta 0:00:00
Downloading Pillow-10.1.0-cp310-cp310-win_amd64.whl (2.6 MB)
   ---------------------------------------- 2.6/2.6 MB 684.4 kB/s eta 0:00:00
Building wheels for collected packages: dlib, face-recognition-models
  Building wheel for dlib (pyproject.toml) ... done
  Created wheel for dlib: filename=dlib-19.24.2-cp310-cp310-win_amd64.whl size=2841283 sha256=92d098ffdee49099e668690ea7b533af664dd4be2180ba696d00423318fc3997
  Stored in directory: c:\users\jiao\appdata\local\pip\cache\wheels\9b\e2\80\888fdc098db86b463ff0c83ae5e5ca151889e901bc1e9a3a11
  Building wheel for face-recognition-models (setup.py) ... done
  Created wheel for face-recognition-models: filename=face_recognition_models-0.3.0-py2.py3-none-any.whl size=100566184 sha256=27be23a752289e58f1d32322acf2b5f96d616d64fad336c889bb59aec677b234
  Stored in directory: c:\users\jiao\appdata\local\pip\cache\wheels\7a\eb\cf\e9eced74122b679557f597bb7c8e4c739cfcac526db1fd523d
Successfully built dlib face-recognition-models
Installing collected packages: face-recognition-models, dlib, Pillow, colorama, Click, face_recognition
Successfully installed Click-8.1.7 Pillow-10.1.0 colorama-0.4.6 dlib-19.24.2 face-recognition-models-0.3.0 face_recognition-1.3.0

查看

(face) C:\Users\jiao\Desktop\推理加速环境准备\03 cuda cudnn tensorrt pycuda 10.29>python
Python 3.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from tensorflow.python.client import device_lib
2023-10-30 23:08:13.058298: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
>>> device_lib.list_local_devices()
2023-10-30 23:08:13.776161: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2023-10-30 23:08:13.779426: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2023-10-30 23:08:14.118577: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: NVIDIA GeForce RTX 4080 major: 8 minor: 9 memoryClockRate(GHz): 2.595
pciBusID: 0000:01:00.0
2023-10-30 23:08:14.120207: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 1 with properties:
name: NVIDIA GeForce RTX 4080 major: 8 minor: 9 memoryClockRate(GHz): 2.595
pciBusID: 0000:05:00.0
2023-10-30 23:08:14.121688: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2023-10-30 23:08:14.122851: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0, 1
2023-10-30 23:08:16.437501: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-10-30 23:08:16.438750: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0 1
2023-10-30 23:08:16.439422: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N N
2023-10-30 23:08:16.440124: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 1:   N N
2023-10-30 23:08:16.451432: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/device:GPU:0 with 12650 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce RTX 4080, pci bus id: 0000:01:00.0, compute capability: 8.9)
2023-10-30 23:08:16.453731: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/device:GPU:1 with 12650 MB memory) -> physical GPU (device: 1, name: NVIDIA GeForce RTX 4080, pci bus id: 0000:05:00.0, compute capability: 8.9)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 2497104892240981966
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 13265094574
locality {
  bus_id: 1
  links {
  }
}
incarnation: 10967300363631988347
physical_device_desc: "device: 0, name: NVIDIA GeForce RTX 4080, pci bus id: 0000:01:00.0, compute capability: 8.9"
, name: "/device:GPU:1"
device_type: "GPU"
memory_limit: 13265094574
locality {
  bus_id: 1
  links {
  }
}
incarnation: 15018336740011620404
physical_device_desc: "device: 1, name: NVIDIA GeForce RTX 4080, pci bus id: 0000:05:00.0, compute capability: 8.9"
]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

饿了就干饭

你的鼓励将是我创作的最大动力~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值