Skip to content

Commit 563df6d

Browse files
committed
Corrections for YOLO on non-CPU Linux
1 parent cea1a2e commit 563df6d

File tree

3 files changed

+60
-29
lines changed

3 files changed

+60
-29
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"logicaldisk",
9696
"logvals",
9797
"lproj",
98+
"Matplotlib",
9899
"maxs",
99100
"megas",
100101
"megaunit",
@@ -133,6 +134,7 @@
133134
"postprocess",
134135
"prerm",
135136
"pstree",
137+
"psutil",
136138
"pushd",
137139
"pycoral",
138140
"pypi",
@@ -175,6 +177,7 @@
175177
"statuseseses",
176178
"subshell",
177179
"Systemmd",
180+
"TDQM",
178181
"Tegra",
179182
"tegrastats",
180183
"tempstore",
@@ -188,6 +191,7 @@
188191
"totalspacebytes",
189192
"tpus",
190193
"ufeff",
194+
"Ultralytics",
191195
"unclip",
192196
"uninstallexe",
193197
"upsampling",
Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
#! Python3.7
22

3-
Pandas # Installing Pandas, a data analysis / data manipulation tool
4-
CoreMLTools # Installing CoreMLTools, for working with .mlmodel format models
5-
OpenCV-Python # Installing OpenCV, the Open source Computer Vision library
6-
Pillow<10.0.0 # Installing Pillow, a Python Image Library
7-
SciPy # Installing SciPy, a library for mathematics, science, and engineering
8-
PyYAML # Installing PyYAML, a library for reading configuration files
3+
opencv-python-headless==4.8.1.78 # Installing OpenCV (headless), the Open source Computer Vision library
4+
numpy==1.26.0 # Installing NumPy, a package for scientific computing
5+
matplotlib>=3.3.0 # Installing Matplotlib, the Python plotting package
6+
opencv-python>=4.6.0 # Installing OpenCV, the Open source Computer Vision library
7+
pillow>=7.1.2 # Installing Pillow, a Python Image Library
8+
pyyaml>=5.3.1 # Installing PyYAML, a library for reading configuration files
9+
requests>=2.23.0 # Installing Requests, the HTTP library
10+
scipy>=1.4.1 # Installing SciPy, a library for mathematics, science, and engineering
11+
tqdm>=4.64.0 # Installing TDQM, the Fast, Extensible Progress Meter
12+
pandas>=1.1.4 # Installing Pandas, a data analysis / data manipulation tool
13+
psutil # Installing psutil, a tool to check system utilization
14+
dill # Installing dill, for serializing and de-serializing Python objects
15+
py-cpuinfo # Installing py-cpuinfo to allow us to query CPU info
16+
ipython # Installing ipython, for interactive notebooks
917

1018
# PyTorch-DirectML not working for this module
1119
# torch-directml # Installing the PyTorch DirectML plugin
1220

13-
--extra-index-url https://download.pytorch.org/whl/cpu
14-
Torch # Installing Torch, for Tensor computation and Deep neural networks
15-
--extra-index-url https://download.pytorch.org/whl/cpu
16-
TorchVision # Installing TorchVision, for Computer Vision based AI
21+
# CPU specific Torch 1.8.0. Size ~531Mb
22+
-f https://download.pytorch.org/whl/cpu/torch_stable.html
23+
torch==1.8.0+cpu # Installing PyTorch, for Tensor computation and Deep neural networks
24+
-f https://download.pytorch.org/whl/cpu/torch_stable.html
25+
torchvision==0.9.0+cpu # Installing TorchVision, for Computer Vision based AI
1726

18-
# We'll lock down to Torch 1.X, CPU-only to play it safe
19-
#--extra-index-url https://download.pytorch.org/whl/cpu
20-
#torch==1.13.1+cpu `# Installing Torch, for Tensor computation and Deep neural networks
21-
#--extra-index-url https://download.pytorch.org/whl/cpu
22-
#torchvision==0.14.1+cpu `# Installing TorchVision, for Computer Vision based AI
27+
# CPU specific Torch 1.13.0. Size ~830Mb
28+
# --extra-index-url https://download.pytorch.org/whl/cpu
29+
# torch==1.13.0+cpu # Installing PyTorch, for Tensor computation and Deep neural networks
30+
# --extra-index-url https://download.pytorch.org/whl/cpu
31+
# torchvision==0.14.0+cpu # Installing TorchVision, for Computer Vision based AI
2332

24-
yolov5==6.2.3 # Installing Ultralytics YoloV5 package for object detection in images
33+
# Explicitly install ultralytics without optional dependencies (like CUDA).
34+
--no-deps
35+
yolov5==6.2.3 # Installing Ultralytics YoloV5 package for object detection in images
2536

26-
# We need this, but we don't need this.
27-
Seaborn # Installing Seaborn, a data visualization library based on matplotlib
37+
# CoreMLTools # Installing CoreMLTools, for working with .mlmodel format models
2838

29-
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
39+
40+
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
3041

3142
# last line empty.
Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
#! Python3.8
22

3-
# Torch # Installing Torch, for Tensor computation and Deep neural networks
4-
# TorchVision # Installing TorchVision, for Computer Vision based AI
3+
# Based on the answer for pleas to Ultralytics to not include the full bloated NVIDIA libraries
4+
# when no GPU present: https://github.com/ultralytics/ultralytics/issues/749#issuecomment-1806360075
55

6-
# We'll lock down to Torch 1.X, CPU-only to play it safe
7-
--extra-index-url https://download.pytorch.org/whl/cpu
8-
torch==1.13.1+cpu # Installing Torch, for Tensor computation and Deep neural networks
9-
--extra-index-url https://download.pytorch.org/whl/cpu
10-
torchvision==0.14.1+cpu # Installing TorchVision, for Computer Vision based AI
6+
opencv-python-headless==4.8.1.78 # Installing OpenCV (headless), the Open source Computer Vision library
7+
numpy==1.26.0 # Installing NumPy, a package for scientific computing
8+
matplotlib>=3.3.0 # Installing Matplotlib, the Python plotting package
9+
opencv-python>=4.6.0 # Installing OpenCV, the Open source Computer Vision library
10+
pillow>=7.1.2 # Installing Pillow, a Python Image Library
11+
pyyaml>=5.3.1 # Installing PyYAML, a library for reading configuration files
12+
requests>=2.23.0 # Installing Requests, the HTTP library
13+
scipy>=1.4.1 # Installing SciPy, a library for mathematics, science, and engineering
14+
tqdm>=4.64.0 # Installing TDQM, the Fast, Extensible Progress Meter
15+
pandas>=1.1.4 # Installing Pandas, a data analysis / data manipulation tool
16+
psutil # Installing psutil, a tool to check system utilization
17+
dill # Installing dill, for serializing and de-serializing Python objects
18+
py-cpuinfo # Installing py-cpuinfo to allow us to query CPU info
1119

12-
# Specific version because we have a patch
13-
ultralytics==8.1.2 # Installing Ultralytics package for object detection in images
20+
#Install torch and torchvision CPU only versions
21+
-f https://download.pytorch.org/whl/cpu/torch_stable.html
22+
torch==1.8.0+cpu # Installing PyTorch, for Tensor computation and Deep neural networks
23+
-f https://download.pytorch.org/whl/cpu/torch_stable.html
24+
torchvision==0.9.0+cpu # Installing TorchVision, for Computer Vision based AI
1425

15-
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
26+
# Explicitly install ultralytics without optional dependencies (like CUDA).
27+
--no-deps
28+
ultralytics==8.1.2 # Installing Ultralytics package for object detection in images
29+
30+
31+
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
1632

1733
# last line empty.

0 commit comments

Comments
 (0)