-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.py
More file actions
37 lines (26 loc) · 978 Bytes
/
Copy pathtest.py
File metadata and controls
37 lines (26 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# # import torch
# # import cv
# # import cv2
# # print(torch.cuda.is_available())
# # print(torch.cuda.get_device_name(0))
# # print(cv.__version__)
# # print(cv.cuda.getCudaEnabledDeviceCount())
# # import torch
# # import cv2
# # print("CUDA available with PyTorch:", torch.cuda.is_available())
# # print("CUDA device name with PyTorch:", torch.cuda.get_device_name(0))
# # print("OpenCV version:", cv2.__version__)
# # print("CUDA enabled devices with OpenCV:", cv2.cuda.getCudaEnabledDeviceCount())
# # import cv2
# # count = cv2.cuda.getCudaEnabledDeviceCount()
# # print(count)
# # import cv2
# # print("OpenCV version:", cv2.__version__)
# # print("CUDA enabled devices with OpenCV:", cv2.cuda.getCudaEnabledDeviceCount())
# # #print(cv2.getBuildInformation())
from ultralytics import YOLO
import tensorrt
# Load model
model = YOLO(r"C:\TriggerBot\runs\detect\train3yolo11\weights\best.pt")
# Export the model to TensorRT format
model.export(format='engine')