ä¼ç¤¾ã§å¿ è¦ã«ãªã£ãã®ã§ãYOLOã®v8ã試ãã¦ã¿ãã
å ¬å¼GitHub
â é »ç¹ã«ãã¼ã¸ã§ã³ã¢ããããã®ã§ãv8.1.0ã®ã¿ã°ãä»ãã¦ããã¨ããã®ãªã³ã¯ã
ããã¥ã¡ã³ãè¦ãã¨ãYOLO v5ã§ãã£ãã¨ãã ã¨GitHubãªãã¸ããªããã¯ãã¼ã³ãã¦ä½¿ã£ã¦ããããä»ã¯pipã§ã¤ã³ã¹ãã¼ã«ããã°ããã ãã«ãªã£ã¦ããããã
ãããããã¨
人ç©ã®å§¿å¢æ¨å®ãããããã
åOpenPoseã§ãã£ã¦ã¿ãããæè¿ã®YOLOã§ãç°¡åã«ã§ããããã«ãªã£ã¦ããããã ã£ãã®ã§ããã£ã¦ã¿ãã
以éã¯Jupyterã§å®è¡ã
ç°å¢æºå
condaç°å¢æ°ããä½ã£ã¦ãããã«pipã§ã¤ã³ã¹ãã¼ã«ããã
!conda create -n yolov8 python=3.10 -y
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: C:\Users\a\.conda\envs\yolov8
added / updated specs:
- python=3.10
The following NEW packages will be INSTALLED:
bzip2 pkgs/main/win-64::bzip2-1.0.8-he774522_0
ca-certificates pkgs/main/win-64::ca-certificates-2023.12.12-haa95532_0
libffi pkgs/main/win-64::libffi-3.4.4-hd77b12b_0
openssl pkgs/main/win-64::openssl-3.0.12-h2bbff1b_0
pip pkgs/main/win-64::pip-23.3.1-py310haa95532_0
python pkgs/main/win-64::python-3.10.13-he1021f5_0
setuptools pkgs/main/win-64::setuptools-68.2.2-py310haa95532_0
sqlite pkgs/main/win-64::sqlite-3.41.2-h2bbff1b_0
tk pkgs/main/win-64::tk-8.6.12-h2bbff1b_0
tzdata pkgs/main/noarch::tzdata-2023d-h04d1e81_0
vc pkgs/main/win-64::vc-14.2-h21ff451_1
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
wheel pkgs/main/win-64::wheel-0.41.2-py310haa95532_0
xz pkgs/main/win-64::xz-5.4.5-h8cc25b3_0
zlib pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0
Downloading and Extracting Packages
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
#
# To activate this environment, use
#
# $ conda activate yolov8
#
# To deactivate an active environment, use
#
# $ conda deactivate
==> WARNING: A newer version of conda exists. <==
current version: 23.5.2
latest version: 23.11.0
Please update conda by running
$ conda update -n base -c defaults conda
Or to minimize the number of packages updated during conda update use
conda install conda=23.11.0
Jupyterã«ã¼ãã«ãä½ã£ãyolov8ç°å¢ã«åãæ¿ãã¦ã
!pip install ultralytics
Collecting ultralytics
Downloading ultralytics-8.1.5-py3-none-any.whl.metadata (40 kB)
---------------------------------------- 0.0/40.2 kB ? eta -:--:--
------------------- ------------------ 20.5/40.2 kB 640.0 kB/s eta 0:00:01
-------------------------------------- 40.2/40.2 kB 637.5 kB/s eta 0:00:00
Collecting matplotlib>=3.3.0 (from ultralytics)
Downloading matplotlib-3.8.2-cp310-cp310-win_amd64.whl.metadata (5.9 kB)
Collecting numpy>=1.22.2 (from ultralytics)
Downloading numpy-1.26.3-cp310-cp310-win_amd64.whl.metadata (61 kB)
---------------------------------------- 0.0/61.2 kB ? eta -:--:--
---------------------------------------- 61.2/61.2 kB 3.4 MB/s eta 0:00:00
Collecting opencv-python>=4.6.0 (from ultralytics)
Downloading opencv_python-4.9.0.80-cp37-abi3-win_amd64.whl.metadata (20 kB)
Collecting pillow>=7.1.2 (from ultralytics)
Downloading pillow-10.2.0-cp310-cp310-win_amd64.whl.metadata (9.9 kB)
Collecting pyyaml>=5.3.1 (from ultralytics)
Downloading PyYAML-6.0.1-cp310-cp310-win_amd64.whl.metadata (2.1 kB)
Collecting requests>=2.23.0 (from ultralytics)
Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting scipy>=1.4.1 (from ultralytics)
Downloading scipy-1.12.0-cp310-cp310-win_amd64.whl.metadata (60 kB)
---------------------------------------- 0.0/60.4 kB ? eta -:--:--
---------------------------------------- 60.4/60.4 kB 3.1 MB/s eta 0:00:00
Collecting torch>=1.8.0 (from ultralytics)
Downloading torch-2.1.2-cp310-cp310-win_amd64.whl.metadata (26 kB)
Collecting torchvision>=0.9.0 (from ultralytics)
Downloading torchvision-0.16.2-cp310-cp310-win_amd64.whl.metadata (6.6 kB)
Collecting tqdm>=4.64.0 (from ultralytics)
Downloading tqdm-4.66.1-py3-none-any.whl.metadata (57 kB)
---------------------------------------- 0.0/57.6 kB ? eta -:--:--
---------------------------------------- 57.6/57.6 kB ? eta 0:00:00
Requirement already satisfied: psutil in c:\users\a\.conda\envs\yolov8\lib\site-packages (from ultralytics) (5.9.0)
Collecting py-cpuinfo (from ultralytics)
Downloading py_cpuinfo-9.0.0-py3-none-any.whl (22 kB)
Collecting thop>=0.1.1 (from ultralytics)
Downloading thop-0.1.1.post2209072238-py3-none-any.whl (15 kB)
Collecting pandas>=1.1.4 (from ultralytics)
Downloading pandas-2.2.0-cp310-cp310-win_amd64.whl.metadata (19 kB)
Collecting seaborn>=0.11.0 (from ultralytics)
Downloading seaborn-0.13.1-py3-none-any.whl.metadata (5.4 kB)
Collecting contourpy>=1.0.1 (from matplotlib>=3.3.0->ultralytics)
Downloading contourpy-1.2.0-cp310-cp310-win_amd64.whl.metadata (5.8 kB)
Collecting cycler>=0.10 (from matplotlib>=3.3.0->ultralytics)
Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib>=3.3.0->ultralytics)
Downloading fonttools-4.47.2-cp310-cp310-win_amd64.whl.metadata (160 kB)
---------------------------------------- 0.0/160.8 kB ? eta -:--:--
-------------------------------------- 160.8/160.8 kB 4.9 MB/s eta 0:00:00
Collecting kiwisolver>=1.3.1 (from matplotlib>=3.3.0->ultralytics)
Downloading kiwisolver-1.4.5-cp310-cp310-win_amd64.whl.metadata (6.5 kB)
Requirement already satisfied: packaging>=20.0 in c:\users\a\.conda\envs\yolov8\lib\site-packages (from matplotlib>=3.3.0->ultralytics) (23.2)
Collecting pyparsing>=2.3.1 (from matplotlib>=3.3.0->ultralytics)
Downloading pyparsing-3.1.1-py3-none-any.whl.metadata (5.1 kB)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\a\.conda\envs\yolov8\lib\site-packages (from matplotlib>=3.3.0->ultralytics) (2.8.2)
Collecting pytz>=2020.1 (from pandas>=1.1.4->ultralytics)
Downloading pytz-2023.3.post1-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.7 (from pandas>=1.1.4->ultralytics)
Downloading tzdata-2023.4-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting charset-normalizer<4,>=2 (from requests>=2.23.0->ultralytics)
Downloading charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl.metadata (34 kB)
Collecting idna<4,>=2.5 (from requests>=2.23.0->ultralytics)
Downloading idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests>=2.23.0->ultralytics)
Downloading urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests>=2.23.0->ultralytics)
Downloading certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
Collecting filelock (from torch>=1.8.0->ultralytics)
Downloading filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB)
Requirement already satisfied: typing-extensions in c:\users\a\.conda\envs\yolov8\lib\site-packages (from torch>=1.8.0->ultralytics) (4.9.0)
Collecting sympy (from torch>=1.8.0->ultralytics)
Downloading sympy-1.12-py3-none-any.whl (5.7 MB)
---------------------------------------- 0.0/5.7 MB ? eta -:--:--
--- ------------------------------------ 0.5/5.7 MB 14.2 MB/s eta 0:00:01
-------- ------------------------------- 1.2/5.7 MB 15.6 MB/s eta 0:00:01
------------- -------------------------- 2.0/5.7 MB 15.8 MB/s eta 0:00:01
------------------ --------------------- 2.7/5.7 MB 15.7 MB/s eta 0:00:01
--------------------- ------------------ 3.1/5.7 MB 15.3 MB/s eta 0:00:01
-------------------------- ------------- 3.9/5.7 MB 14.5 MB/s eta 0:00:01
----------------------------- ---------- 4.3/5.7 MB 14.4 MB/s eta 0:00:01
---------------------------------- ----- 5.0/5.7 MB 14.5 MB/s eta 0:00:01
--------------------------------------- 5.7/5.7 MB 14.6 MB/s eta 0:00:01
---------------------------------------- 5.7/5.7 MB 14.1 MB/s eta 0:00:00
Collecting networkx (from torch>=1.8.0->ultralytics)
Downloading networkx-3.2.1-py3-none-any.whl.metadata (5.2 kB)
Collecting jinja2 (from torch>=1.8.0->ultralytics)
Downloading Jinja2-3.1.3-py3-none-any.whl.metadata (3.3 kB)
Collecting fsspec (from torch>=1.8.0->ultralytics)
Downloading fsspec-2023.12.2-py3-none-any.whl.metadata (6.8 kB)
Requirement already satisfied: colorama in c:\users\a\.conda\envs\yolov8\lib\site-packages (from tqdm>=4.64.0->ultralytics) (0.4.6)
Requirement already satisfied: six>=1.5 in c:\users\a\.conda\envs\yolov8\lib\site-packages (from python-dateutil>=2.7->matplotlib>=3.3.0->ultralytics) (1.16.0)
Collecting MarkupSafe>=2.0 (from jinja2->torch>=1.8.0->ultralytics)
Downloading MarkupSafe-2.1.4-cp310-cp310-win_amd64.whl.metadata (3.1 kB)
Collecting mpmath>=0.19 (from sympy->torch>=1.8.0->ultralytics)
Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
---------------------------------------- 0.0/536.2 kB ? eta -:--:--
------------------------------------- 536.2/536.2 kB 17.0 MB/s eta 0:00:00
Downloading ultralytics-8.1.5-py3-none-any.whl (702 kB)
---------------------------------------- 0.0/702.8 kB ? eta -:--:--
-------------------------------------- 696.3/702.8 kB 14.6 MB/s eta 0:00:01
--------------------------------------- 702.8/702.8 kB 14.7 MB/s eta 0:00:00
Downloading matplotlib-3.8.2-cp310-cp310-win_amd64.whl (7.6 MB)
---------------------------------------- 0.0/7.6 MB ? eta -:--:--
---- ----------------------------------- 0.9/7.6 MB 18.7 MB/s eta 0:00:01
...
--------------------------------------- 7.6/7.6 MB 14.0 MB/s eta 0:00:01
---------------------------------------- 7.6/7.6 MB 13.2 MB/s eta 0:00:00
Downloading numpy-1.26.3-cp310-cp310-win_amd64.whl (15.8 MB)
---------------------------------------- 0.0/15.8 MB ? eta -:--:--
- -------------------------------------- 0.6/15.8 MB 18.6 MB/s eta 0:00:01
...
--------------------------------------- 15.8/15.8 MB 13.9 MB/s eta 0:00:01
---------------------------------------- 15.8/15.8 MB 13.4 MB/s eta 0:00:00
Downloading opencv_python-4.9.0.80-cp37-abi3-win_amd64.whl (38.6 MB)
---------------------------------------- 0.0/38.6 MB ? eta -:--:--
---------------------------------------- 0.4/38.6 MB 23.7 MB/s eta 0:00:02
...
--------------------------------------- 38.6/38.6 MB 11.9 MB/s eta 0:00:01
---------------------------------------- 38.6/38.6 MB 11.3 MB/s eta 0:00:00
Downloading pandas-2.2.0-cp310-cp310-win_amd64.whl (11.6 MB)
---------------------------------------- 0.0/11.6 MB ? eta -:--:--
-- ------------------------------------- 0.7/11.6 MB 14.8 MB/s eta 0:00:01
...
--------------------------------------- 11.4/11.6 MB 13.4 MB/s eta 0:00:01
---------------------------------------- 11.6/11.6 MB 13.1 MB/s eta 0:00:00
Downloading pillow-10.2.0-cp310-cp310-win_amd64.whl (2.6 MB)
---------------------------------------- 0.0/2.6 MB ? eta -:--:--
---------- ----------------------------- 0.7/2.6 MB 14.4 MB/s eta 0:00:01
-------------------- ------------------- 1.4/2.6 MB 14.4 MB/s eta 0:00:01
--------------------------------- ------ 2.2/2.6 MB 15.5 MB/s eta 0:00:01
---------------------------------------- 2.6/2.6 MB 15.2 MB/s eta 0:00:00
Downloading PyYAML-6.0.1-cp310-cp310-win_amd64.whl (145 kB)
---------------------------------------- 0.0/145.3 kB ? eta -:--:--
---------------------------------------- 145.3/145.3 kB ? eta 0:00:00
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
---------------------------------------- 0.0/62.6 kB ? eta -:--:--
---------------------------------------- 62.6/62.6 kB 3.3 MB/s eta 0:00:00
Downloading scipy-1.12.0-cp310-cp310-win_amd64.whl (46.2 MB)
---------------------------------------- 0.0/46.2 MB ? eta -:--:--
---------------------------------------- 0.5/46.2 MB 30.1 MB/s eta 0:00:02
...
--------------------------------------- 46.2/46.2 MB 15.2 MB/s eta 0:00:01
---------------------------------------- 46.2/46.2 MB 14.2 MB/s eta 0:00:00
Downloading seaborn-0.13.1-py3-none-any.whl (294 kB)
---------------------------------------- 0.0/294.8 kB ? eta -:--:--
--------------------------------------- 294.8/294.8 kB 17.8 MB/s eta 0:00:00
Downloading torch-2.1.2-cp310-cp310-win_amd64.whl (192.3 MB)
---------------------------------------- 0.0/192.3 MB ? eta -:--:--
---------------------------------------- 0.7/192.3 MB 13.9 MB/s eta 0:00:14
...
-------------------------------------- 192.3/192.3 MB 12.8 MB/s eta 0:00:01
--------------------------------------- 192.3/192.3 MB 10.2 MB/s eta 0:00:00
Downloading torchvision-0.16.2-cp310-cp310-win_amd64.whl (1.1 MB)
---------------------------------------- 0.0/1.1 MB ? eta -:--:--
----------- ---------------------------- 0.3/1.1 MB 10.2 MB/s eta 0:00:01
------------ --------------------------- 0.4/1.1 MB 3.8 MB/s eta 0:00:01
--------------- ------------------------ 0.4/1.1 MB 3.1 MB/s eta 0:00:01
----------------- ---------------------- 0.5/1.1 MB 2.6 MB/s eta 0:00:01
----------------------- ---------------- 0.7/1.1 MB 3.0 MB/s eta 0:00:01
-------------------------------------- - 1.1/1.1 MB 3.9 MB/s eta 0:00:01
---------------------------------------- 1.1/1.1 MB 3.6 MB/s eta 0:00:00
Downloading tqdm-4.66.1-py3-none-any.whl (78 kB)
---------------------------------------- 0.0/78.3 kB ? eta -:--:--
---------------------------------------- 78.3/78.3 kB 4.5 MB/s eta 0:00:00
Downloading certifi-2023.11.17-py3-none-any.whl (162 kB)
---------------------------------------- 0.0/162.5 kB ? eta -:--:--
---------------------------------------- 162.5/162.5 kB 9.5 MB/s eta 0:00:00
Downloading charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl (100 kB)
---------------------------------------- 0.0/100.3 kB ? eta -:--:--
---------------------------------------- 100.3/100.3 kB ? eta 0:00:00
Downloading contourpy-1.2.0-cp310-cp310-win_amd64.whl (186 kB)
---------------------------------------- 0.0/186.7 kB ? eta -:--:--
--------------------------------------- 186.7/186.7 kB 11.0 MB/s eta 0:00:00
Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)
Downloading fonttools-4.47.2-cp310-cp310-win_amd64.whl (2.2 MB)
---------------------------------------- 0.0/2.2 MB ? eta -:--:--
---------- ----------------------------- 0.6/2.2 MB 17.8 MB/s eta 0:00:01
---------------------- ----------------- 1.2/2.2 MB 15.9 MB/s eta 0:00:01
--------------------------------- ------ 1.8/2.2 MB 14.7 MB/s eta 0:00:01
---------------------------------------- 2.2/2.2 MB 13.9 MB/s eta 0:00:00
Downloading idna-3.6-py3-none-any.whl (61 kB)
---------------------------------------- 0.0/61.6 kB ? eta -:--:--
---------------------------------------- 61.6/61.6 kB ? eta 0:00:00
Downloading kiwisolver-1.4.5-cp310-cp310-win_amd64.whl (56 kB)
---------------------------------------- 0.0/56.1 kB ? eta -:--:--
---------------------------------------- 56.1/56.1 kB ? eta 0:00:00
Downloading pyparsing-3.1.1-py3-none-any.whl (103 kB)
---------------------------------------- 0.0/103.1 kB ? eta -:--:--
---------------------------------------- 103.1/103.1 kB 5.8 MB/s eta 0:00:00
Downloading pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
---------------------------------------- 0.0/502.5 kB ? eta -:--:--
--------------------------------------- 502.5/502.5 kB 15.9 MB/s eta 0:00:00
Downloading tzdata-2023.4-py2.py3-none-any.whl (346 kB)
---------------------------------------- 0.0/346.6 kB ? eta -:--:--
--------------------------------------- 346.6/346.6 kB 21.0 MB/s eta 0:00:00
Downloading urllib3-2.1.0-py3-none-any.whl (104 kB)
---------------------------------------- 0.0/104.6 kB ? eta -:--:--
---------------------------------------- 104.6/104.6 kB ? eta 0:00:00
Downloading filelock-3.13.1-py3-none-any.whl (11 kB)
Downloading fsspec-2023.12.2-py3-none-any.whl (168 kB)
---------------------------------------- 0.0/169.0 kB ? eta -:--:--
--------------------------------------- 169.0/169.0 kB 10.6 MB/s eta 0:00:00
Downloading Jinja2-3.1.3-py3-none-any.whl (133 kB)
---------------------------------------- 0.0/133.2 kB ? eta -:--:--
---------------------------------------- 133.2/133.2 kB ? eta 0:00:00
Downloading networkx-3.2.1-py3-none-any.whl (1.6 MB)
---------------------------------------- 0.0/1.6 MB ? eta -:--:--
------------ --------------------------- 0.5/1.6 MB 11.1 MB/s eta 0:00:01
------------- -------------------------- 0.6/1.6 MB 5.9 MB/s eta 0:00:01
--------------------------- ------------ 1.1/1.6 MB 8.1 MB/s eta 0:00:01
---------------------------------------- 1.6/1.6 MB 9.5 MB/s eta 0:00:00
Downloading MarkupSafe-2.1.4-cp310-cp310-win_amd64.whl (17 kB)
Installing collected packages: pytz, py-cpuinfo, mpmath, urllib3, tzdata, tqdm, sympy, pyyaml, pyparsing, pillow, numpy, networkx, MarkupSafe, kiwisolver, idna, fsspec, fonttools, filelock, cycler, charset-normalizer, certifi, scipy, requests, pandas, opencv-python, jinja2, contourpy, torch, matplotlib, torchvision, thop, seaborn, ultralytics
Successfully installed MarkupSafe-2.1.4 certifi-2023.11.17 charset-normalizer-3.3.2 contourpy-1.2.0 cycler-0.12.1 filelock-3.13.1 fonttools-4.47.2 fsspec-2023.12.2 idna-3.6 jinja2-3.1.3 kiwisolver-1.4.5 matplotlib-3.8.2 mpmath-1.3.0 networkx-3.2.1 numpy-1.26.3 opencv-python-4.9.0.80 pandas-2.2.0 pillow-10.2.0 py-cpuinfo-9.0.0 pyparsing-3.1.1 pytz-2023.3.post1 pyyaml-6.0.1 requests-2.31.0 scipy-1.12.0 seaborn-0.13.1 sympy-1.12 thop-0.1.1.post2209072238 torch-2.1.2 torchvision-0.16.2 tqdm-4.66.1 tzdata-2023.4 ultralytics-8.1.5 urllib3-2.1.0
ä¾åããããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãããããã ããä¾ãã°pytorchã¯ã©ããï¼
GPU使ãå ´åã¯å
¥ãæ¿ããããããªãã¨ãããªããã
!pip show torch
Name: torch
Version: 2.1.2
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: [email protected]
License: BSD-3
Location: c:\users\a\.conda\envs\yolov8\lib\site-packages
Requires: filelock, fsspec, jinja2, networkx, sympy, typing-extensions
Required-by: thop, torchvision, ultralytics
å ¥ã£ã¦ãã
ã¤ãã§ã«ãultralytics
ããã±ã¼ã¸èªä½ã®ãã¼ã¸ã§ã³ã確èªã
ä»å¾ã¢ãããã¼ãããã¦ãä»åã¨åããã¨ãã§ããããã«ãä»ã®ãã¼ã¸ã§ã³ãæ§ãã¦ããã
!pip show ultralytics
Name: ultralytics
Version: 8.1.5
Summary: Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
Home-page:
Author: Glenn Jocher, Ayush Chaurasia, Jing Qiu
Author-email:
License: AGPL-3.0
Location: c:\users\a\.conda\envs\yolov8\lib\site-packages
Requires: matplotlib, numpy, opencv-python, pandas, pillow, psutil, py-cpuinfo, pyyaml, requests, scipy, seaborn, thop, torch, torchvision, tqdm
Required-by:
ãã¼ã¸ã§ã³8.1.5ã ã£ãã
æ¨è«å®è¡
ä»ã¾ã§ã¯Pythonã§ã¹ã¯ãªãããå®è¡ããå½¢ã ã£ãããyolo
ã³ãã³ãã§å®è¡ã§ããããã
ã¾ãyolo
ã³ãã³ããå®è¡ã§ãã確èªã
!yolo version
8.1.5
GitHubãªãã¸ããªã®ãµã³ãã«éãã«ããªãã·ã§ã³ãä»ãã¦ããµã³ãã«ç»åã対象ã«ãã£ã¦ã¿ãã
GitHub - ultralytics/ultralytics at v8.1.0
!yolo detect predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg'
Ultralytics YOLOv8.1.5 ð Python-3.10.13 torch-2.1.2+cpu CPU (12th Gen Intel Core(TM) i7-12700H)
YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs
Downloading https://ultralytics.com/images/bus.jpg to 'bus.jpg'...
image 1/1 c:\work\yolo_test\yolov8\bus.jpg: 640x480 4 persons, 1 bus, 1 stop sign, 76.0ms
Speed: 3.0ms preprocess, 76.0ms inference, 1.5ms postprocess per image at shape (1, 3, 640, 480)
Results saved to [1mruns\detect\predict[0m
ð¡ Learn more at https://docs.ultralytics.com/modes/predict
0%| | 0.00/476k [00:00<?, ?B/s]
100%|ââââââââââ| 476k/476k [00:00<00:00, 12.5MB/s]
ã²ã¨ã¾ãåãã¦ãèªèãããã¦ãããã
試ãããã£ãã®ã¯ã人ç©ã®å§¿å¢æ¨å®ã
ãã®ãµã³ãã«ç»åã§äººãæ ã£ã¦ããã®ã§ã試ãã¦ã¿ãã
yolo
ã³ãã³ãã®ä½¿ç¨æ¹æ³ã¯ãUltralytics社ã®ããã¥ã¡ã³ããããã
Configuration - Ultralytics YOLOv8 Docs
- yoloã³ãã³ãã®1ã¤ç®ã®å¼æ°(Optional)ã§ã
pose
ãæå®ãããã§å§¿å¢æ¨å®ã®ã¢ã¼ãã«ãªããã - GitHubããã¥ã¡ã³ããè¦ãã¨ã姿å¢æ¨å®ç¨ã®pretrained modelãããããã ã£ãã®ã§ããããæå®ã
!yolo pose predict model=yolov8n-pose.pt source='https://ultralytics.com/images/bus.jpg'
Downloading https://github.com/ultralytics/assets/releases/download/v8.1.0/yolov8n-pose.pt to 'yolov8n-pose.pt'...
Ultralytics YOLOv8.1.5 ð Python-3.10.13 torch-2.1.2+cpu CPU (12th Gen Intel Core(TM) i7-12700H)
YOLOv8n-pose summary (fused): 187 layers, 3289964 parameters, 0 gradients, 9.2 GFLOPs
Found https://ultralytics.com/images/bus.jpg locally at bus.jpg
image 1/1 c:\work\yolo_test\yolov8\bus.jpg: 640x480 4 persons, 96.1ms
Speed: 3.0ms preprocess, 96.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 480)
Results saved to [1mruns\pose\predict[0m
ð¡ Learn more at https://docs.ultralytics.com/modes/predict
0%| | 0.00/6.51M [00:00<?, ?B/s]
23%|âââ | 1.50M/6.51M [00:00<00:00, 14.7MB/s]
49%|âââââ | 3.22M/6.51M [00:00<00:00, 16.3MB/s]
75%|ââââââââ | 4.90M/6.51M [00:00<00:00, 16.7MB/s]
100%|ââââââââââ| 6.51M/6.51M [00:00<00:00, 17.1MB/s]
ããã§ã§ããã
- æ¤åºå¯¾è±¡ã¯äººã ãã«ãªã£ã¦ãã
- 姿å¢æ¨å®ã¯ãããªãã«ã§ãã¦ããããªã
- é¡ã®ãã¼ããããç¨åº¦åºã¦ã(ç®ãé¼»ãè³)
- è ã¯ãæé¦ã¾ã§
- 足ã¯ã足é¦ã¾ã§
ã¢ãã«ãå¤ãããå¤ãããï¼
ä¸çªéãã¢ãã«ã使ã£ã¦ã¿ãã
!yolo pose predict model=yolov8x-pose.pt source='https://ultralytics.com/images/bus.jpg'
Downloading https://github.com/ultralytics/assets/releases/download/v8.1.0/yolov8x-pose.pt to 'yolov8x-pose.pt'...
Ultralytics YOLOv8.1.5 ð Python-3.10.13 torch-2.1.2+cpu CPU (12th Gen Intel Core(TM) i7-12700H)
YOLOv8x-pose summary (fused): 287 layers, 69462204 parameters, 0 gradients, 263.2 GFLOPs
Found https://ultralytics.com/images/bus.jpg locally at bus.jpg
image 1/1 c:\work\yolo_test\yolov8\bus.jpg: 640x480 4 persons, 594.3ms
Speed: 2.9ms preprocess, 594.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 480)
Results saved to [1mruns\pose\predict2[0m
ð¡ Learn more at https://docs.ultralytics.com/modes/predict
0%| | 0.00/133M [00:00<?, ?B/s]
1%| | 1.02M/133M [00:00<00:13, 10.4MB/s]
2%|â | 2.41M/133M [00:00<00:11, 12.2MB/s]
3%|â | 4.11M/133M [00:00<00:09, 14.7MB/s]
4%|â | 5.52M/133M [00:00<00:09, 14.3MB/s]
...
97%|ââââââââââ| 128M/133M [00:08<00:00, 12.4MB/s]
98%|ââââââââââ| 130M/133M [00:09<00:00, 13.5MB/s]
99%|ââââââââââ| 131M/133M [00:09<00:00, 14.0MB/s]
100%|ââââââââââ| 133M/133M [00:09<00:00, 15.0MB/s]
çµæã
- æ¨è«æéã¯ããã伸ã³ã(yolov8n-pose: 96.1ms -> yolov8x-pose: 594.3ms)
- å³ã®äººã®èã®ä½ç½®ã®æ¨å®ãæ£ç¢ºã«ãªã£ã¦ã
- å·¦ã®äººã®è çµã¿ã®æ§åãæ£ç¢ºã«ã¨ãããããããã«ãªã£ã¦ã
GPU使ã
以åã¨åæ§ã«ãGPU使ãPyTorchãã¤ã³ã¹ãã¼ã«ããã
å ã«ç¾ç¶ã®ç¢ºèªã
import torch
torch.__version__
'2.1.2+cpu'
ãã£ã±ãCPU使ãçã«ãªã£ã¦ãã
GPUçãã¤ã³ã¹ãã¼ã«ããã
!pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --upgrade --force-reinstall
Looking in indexes: https://download.pytorch.org/whl/cu118
Collecting torch
Downloading https://download.pytorch.org/whl/cu118/torch-2.1.2%2Bcu118-cp310-cp310-win_amd64.whl (2722.7 MB)
---------------------------------------- 0.0/2.7 GB ? eta -:--:--
---------------------------------------- 0.0/2.7 GB 11.5 MB/s eta 0:03:56
...
--------------------------------------- 2.7/2.7 GB 14.9 MB/s eta 0:00:01
--------------------------------------- 2.7/2.7 GB 14.9 MB/s eta 0:00:01
--------------------------------------- 2.7/2.7 GB 14.9 MB/s eta 0:00:01
---------------------------------------- 2.7/2.7 GB 1.0 MB/s eta 0:00:00
Collecting torchvision
Downloading https://download.pytorch.org/whl/cu118/torchvision-0.16.2%2Bcu118-cp310-cp310-win_amd64.whl (4.9 MB)
---------------------------------------- 0.0/4.9 MB ? eta -:--:--
--- ------------------------------------ 0.4/4.9 MB 8.5 MB/s eta 0:00:01
------ --------------------------------- 0.7/4.9 MB 9.5 MB/s eta 0:00:01
-------- ------------------------------- 1.1/4.9 MB 7.8 MB/s eta 0:00:01
------------ --------------------------- 1.5/4.9 MB 7.8 MB/s eta 0:00:01
---------------- ----------------------- 2.0/4.9 MB 8.6 MB/s eta 0:00:01
----------------------- ---------------- 2.9/4.9 MB 10.2 MB/s eta 0:00:01
----------------------------- ---------- 3.6/4.9 MB 10.8 MB/s eta 0:00:01
------------------------------------ --- 4.5/4.9 MB 12.0 MB/s eta 0:00:01
---------------------------------------- 4.9/4.9 MB 12.0 MB/s eta 0:00:00
Collecting torchaudio
Downloading https://download.pytorch.org/whl/cu118/torchaudio-2.1.2%2Bcu118-cp310-cp310-win_amd64.whl (3.9 MB)
---------------------------------------- 0.0/3.9 MB ? eta -:--:--
-------- ------------------------------- 0.8/3.9 MB 16.8 MB/s eta 0:00:01
--------------- ------------------------ 1.6/3.9 MB 16.4 MB/s eta 0:00:01
----------------------- ---------------- 2.3/3.9 MB 16.2 MB/s eta 0:00:01
------------------------------- -------- 3.0/3.9 MB 16.2 MB/s eta 0:00:01
----------------------------------- ---- 3.5/3.9 MB 14.7 MB/s eta 0:00:01
------------------------------------- -- 3.6/3.9 MB 12.9 MB/s eta 0:00:01
--------------------------------------- 3.9/3.9 MB 11.9 MB/s eta 0:00:01
---------------------------------------- 3.9/3.9 MB 11.4 MB/s eta 0:00:00
Collecting filelock (from torch)
Downloading https://download.pytorch.org/whl/filelock-3.9.0-py3-none-any.whl (9.7 kB)
Collecting typing-extensions (from torch)
Downloading https://download.pytorch.org/whl/typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting sympy (from torch)
Downloading https://download.pytorch.org/whl/sympy-1.12-py3-none-any.whl (5.7 MB)
---------------------------------------- 0.0/5.7 MB ? eta -:--:--
---- ----------------------------------- 0.7/5.7 MB 15.0 MB/s eta 0:00:01
------- -------------------------------- 1.1/5.7 MB 12.1 MB/s eta 0:00:01
------------- -------------------------- 2.0/5.7 MB 13.8 MB/s eta 0:00:01
------------------- -------------------- 2.8/5.7 MB 15.1 MB/s eta 0:00:01
------------------------ --------------- 3.5/5.7 MB 15.9 MB/s eta 0:00:01
--------------------------- ------------ 3.9/5.7 MB 14.8 MB/s eta 0:00:01
------------------------------ --------- 4.4/5.7 MB 14.1 MB/s eta 0:00:01
---------------------------------- ----- 5.0/5.7 MB 13.8 MB/s eta 0:00:01
--------------------------------------- 5.7/5.7 MB 13.4 MB/s eta 0:00:01
---------------------------------------- 5.7/5.7 MB 12.7 MB/s eta 0:00:00
Collecting networkx (from torch)
Downloading https://download.pytorch.org/whl/networkx-3.0-py3-none-any.whl (2.0 MB)
---------------------------------------- 0.0/2.0 MB ? eta -:--:--
-------------- ------------------------- 0.7/2.0 MB 15.4 MB/s eta 0:00:01
---------------------------- ----------- 1.4/2.0 MB 15.4 MB/s eta 0:00:01
---------------------------------------- 2.0/2.0 MB 16.3 MB/s eta 0:00:00
Collecting jinja2 (from torch)
Downloading https://download.pytorch.org/whl/Jinja2-3.1.2-py3-none-any.whl (133 kB)
---------------------------------------- 0.0/133.1 kB ? eta -:--:--
---------------------------------------- 133.1/133.1 kB ? eta 0:00:00
Collecting fsspec (from torch)
Downloading https://download.pytorch.org/whl/fsspec-2023.4.0-py3-none-any.whl (153 kB)
---------------------------------------- 0.0/154.0 kB ? eta -:--:--
---------------------------------------- 154.0/154.0 kB ? eta 0:00:00
Collecting numpy (from torchvision)
Downloading https://download.pytorch.org/whl/numpy-1.24.1-cp310-cp310-win_amd64.whl (14.8 MB)
---------------------------------------- 0.0/14.8 MB ? eta -:--:--
-- ------------------------------------- 0.8/14.8 MB 24.4 MB/s eta 0:00:01
--- ------------------------------------ 1.4/14.8 MB 14.9 MB/s eta 0:00:01
----- ---------------------------------- 2.2/14.8 MB 15.4 MB/s eta 0:00:01
------- -------------------------------- 2.9/14.8 MB 16.9 MB/s eta 0:00:01
---------- ----------------------------- 3.9/14.8 MB 16.8 MB/s eta 0:00:01
------------ --------------------------- 4.8/14.8 MB 16.9 MB/s eta 0:00:01
-------------- ------------------------- 5.3/14.8 MB 16.2 MB/s eta 0:00:01
---------------- ----------------------- 6.2/14.8 MB 17.1 MB/s eta 0:00:01
------------------ --------------------- 6.8/14.8 MB 16.8 MB/s eta 0:00:01
-------------------- ------------------- 7.5/14.8 MB 16.5 MB/s eta 0:00:01
---------------------- ----------------- 8.4/14.8 MB 16.7 MB/s eta 0:00:01
------------------------ --------------- 9.1/14.8 MB 16.7 MB/s eta 0:00:01
-------------------------- ------------ 10.0/14.8 MB 16.8 MB/s eta 0:00:01
---------------------------- ---------- 10.6/14.8 MB 16.4 MB/s eta 0:00:01
----------------------------- --------- 11.4/14.8 MB 16.8 MB/s eta 0:00:01
------------------------------- ------- 11.9/14.8 MB 16.4 MB/s eta 0:00:01
--------------------------------- ----- 12.6/14.8 MB 16.4 MB/s eta 0:00:01
---------------------------------- ---- 13.1/14.8 MB 15.6 MB/s eta 0:00:01
----------------------------------- --- 13.5/14.8 MB 15.2 MB/s eta 0:00:01
------------------------------------ -- 13.9/14.8 MB 14.6 MB/s eta 0:00:01
------------------------------------- - 14.3/14.8 MB 14.2 MB/s eta 0:00:01
-------------------------------------- 14.5/14.8 MB 13.4 MB/s eta 0:00:01
--------------------------------------- 14.8/14.8 MB 12.8 MB/s eta 0:00:00
Collecting requests (from torchvision)
Downloading https://download.pytorch.org/whl/requests-2.28.1-py3-none-any.whl (62 kB)
---------------------------------------- 0.0/62.8 kB ? eta -:--:--
---------------------------------------- 62.8/62.8 kB 3.3 MB/s eta 0:00:00
Collecting pillow!=8.3.*,>=5.3.0 (from torchvision)
Downloading https://download.pytorch.org/whl/Pillow-9.3.0-cp310-cp310-win_amd64.whl (2.5 MB)
---------------------------------------- 0.0/2.5 MB ? eta -:--:--
------ --------------------------------- 0.4/2.5 MB 12.6 MB/s eta 0:00:01
---------------- ----------------------- 1.0/2.5 MB 12.9 MB/s eta 0:00:01
--------------------- ------------------ 1.3/2.5 MB 10.6 MB/s eta 0:00:01
---------------------------------- ----- 2.1/2.5 MB 12.2 MB/s eta 0:00:01
---------------------------------------- 2.5/2.5 MB 12.1 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0 (from jinja2->torch)
Downloading https://download.pytorch.org/whl/MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl (17 kB)
Collecting charset-normalizer<3,>=2 (from requests->torchvision)
Downloading https://download.pytorch.org/whl/charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5 (from requests->torchvision)
Downloading https://download.pytorch.org/whl/idna-3.4-py3-none-any.whl (61 kB)
---------------------------------------- 0.0/61.5 kB ? eta -:--:--
---------------------------------------- 61.5/61.5 kB ? eta 0:00:00
Collecting urllib3<1.27,>=1.21.1 (from requests->torchvision)
Downloading https://download.pytorch.org/whl/urllib3-1.26.13-py2.py3-none-any.whl (140 kB)
---------------------------------------- 0.0/140.6 kB ? eta -:--:--
---------------------------------------- 140.6/140.6 kB ? eta 0:00:00
Collecting certifi>=2017.4.17 (from requests->torchvision)
Downloading https://download.pytorch.org/whl/certifi-2022.12.7-py3-none-any.whl (155 kB)
---------------------------------------- 0.0/155.3 kB ? eta -:--:--
---------------------------------------- 155.3/155.3 kB ? eta 0:00:00
Collecting mpmath>=0.19 (from sympy->torch)
Downloading https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB)
---------------------------------------- 0.0/536.2 kB ? eta -:--:--
------------------------------------ 522.2/536.2 kB 16.5 MB/s eta 0:00:01
------------------------------------- 536.2/536.2 kB 11.2 MB/s eta 0:00:00
Installing collected packages: mpmath, urllib3, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, idna, fsspec, filelock, charset-normalizer, certifi, requests, jinja2, torch, torchvision, torchaudio
Attempting uninstall: mpmath
Found existing installation: mpmath 1.3.0
Uninstalling mpmath-1.3.0:
Successfully uninstalled mpmath-1.3.0
Attempting uninstall: urllib3
Found existing installation: urllib3 2.1.0
Uninstalling urllib3-2.1.0:
Successfully uninstalled urllib3-2.1.0
Attempting uninstall: typing-extensions
Found existing installation: typing_extensions 4.9.0
Uninstalling typing_extensions-4.9.0:
Successfully uninstalled typing_extensions-4.9.0
Attempting uninstall: sympy
Found existing installation: sympy 1.12
Uninstalling sympy-1.12:
Successfully uninstalled sympy-1.12
Attempting uninstall: pillow
Found existing installation: pillow 10.2.0
Uninstalling pillow-10.2.0:
Successfully uninstalled pillow-10.2.0
Attempting uninstall: numpy
Found existing installation: numpy 1.26.3
Uninstalling numpy-1.26.3:
Successfully uninstalled numpy-1.26.3
Attempting uninstall: networkx
Found existing installation: networkx 3.2.1
Uninstalling networkx-3.2.1:
Successfully uninstalled networkx-3.2.1
Attempting uninstall: MarkupSafe
Found existing installation: MarkupSafe 2.1.4
Uninstalling MarkupSafe-2.1.4:
Successfully uninstalled MarkupSafe-2.1.4
Attempting uninstall: idna
Found existing installation: idna 3.6
Uninstalling idna-3.6:
Successfully uninstalled idna-3.6
Attempting uninstall: fsspec
Found existing installation: fsspec 2023.12.2
Uninstalling fsspec-2023.12.2:
Successfully uninstalled fsspec-2023.12.2
Attempting uninstall: filelock
Found existing installation: filelock 3.13.1
Uninstalling filelock-3.13.1:
Successfully uninstalled filelock-3.13.1
Attempting uninstall: charset-normalizer
Found existing installation: charset-normalizer 3.3.2
Uninstalling charset-normalizer-3.3.2:
Successfully uninstalled charset-normalizer-3.3.2
Attempting uninstall: certifi
Found existing installation: certifi 2023.11.17
Uninstalling certifi-2023.11.17:
Successfully uninstalled certifi-2023.11.17
Attempting uninstall: requests
Found existing installation: requests 2.31.0
Uninstalling requests-2.31.0:
Successfully uninstalled requests-2.31.0
Attempting uninstall: jinja2
Found existing installation: Jinja2 3.1.3
Uninstalling Jinja2-3.1.3:
Successfully uninstalled Jinja2-3.1.3
Attempting uninstall: torch
Found existing installation: torch 2.1.2
Uninstalling torch-2.1.2:
Successfully uninstalled torch-2.1.2
Attempting uninstall: torchvision
Found existing installation: torchvision 0.16.2
Uninstalling torchvision-0.16.2:
Successfully uninstalled torchvision-0.16.2
Successfully installed MarkupSafe-2.1.3 certifi-2022.12.7 charset-normalizer-2.1.1 filelock-3.9.0 fsspec-2023.4.0 idna-3.4 jinja2-3.1.2 mpmath-1.3.0 networkx-3.0 numpy-1.24.1 pillow-9.3.0 requests-2.28.1 sympy-1.12 torch-2.1.2+cu118 torchaudio-2.1.2+cu118 torchvision-0.16.2+cu118 typing-extensions-4.4.0 urllib3-1.26.13
WARNING: Failed to remove contents in a temporary directory 'C:\Users\a\.conda\envs\yolov8\Lib\site-packages\~umpy.libs'.
You can safely remove it manually.
WARNING: Failed to remove contents in a temporary directory 'C:\Users\a\.conda\envs\yolov8\Lib\site-packages\~umpy'.
You can safely remove it manually.
WARNING: Failed to remove contents in a temporary directory 'C:\Users\a\.conda\envs\yolov8\Lib\site-packages\~orch'.
You can safely remove it manually.
åã¨éã£ã¦ã2.4GHzã®WiFiã«æ¥ç¶ãã¦ãã¾ã£ã¦ãã®ã§ãæéãé·ããªã£ã¦ãã¾ã£ãã
ãããã¯ã¼ã¯ç°å¢å¤§äºã
â åå
â ä»å
pip show
ã§ã®ç¢ºèªã¨ãããã±ã¼ã¸ãã¤ã³ãã¼ããã¦ã®ãã¼ã¸ã§ã³ç¢ºèªã
!pip show torch
Name: torch
Version: 2.1.2+cu118
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: [email protected]
License: BSD-3
Location: c:\users\a\.conda\envs\yolov8\lib\site-packages
Requires: filelock, fsspec, jinja2, networkx, sympy, typing-extensions
Required-by: thop, torchaudio, torchvision, ultralytics
import torch
torch.__version__
'2.1.2+cpu'
jupyterã«ã¼ãã«åèµ·åããªãã¨ãã¡ãï¼
import torch
torch.__version__
'2.1.2+cu118'
ã§ããããã
GPU使ã£ã¦æ¨è«
ä¸ã¨åããä¸çªéãã¢ãã«ã§ã®å§¿å¢æ¨å®ãã£ã¦ã¿ãã
!yolo pose predict model=yolov8x-pose.pt source='https://ultralytics.com/images/bus.jpg'
Ultralytics YOLOv8.1.5 ð Python-3.10.13 torch-2.1.2+cu118 CUDA:0 (NVIDIA GeForce RTX 3060 Laptop GPU, 6144MiB)
YOLOv8x-pose summary (fused): 287 layers, 69462204 parameters, 0 gradients, 263.2 GFLOPs
Found https://ultralytics.com/images/bus.jpg locally at bus.jpg
image 1/1 c:\work\yolo_test\yolov8\bus.jpg: 640x480 4 persons, 110.8ms
Speed: 6.1ms preprocess, 110.8ms inference, 13.7ms postprocess per image at shape (1, 3, 640, 480)
Results saved to [1mruns\pose\predict3[0m
ð¡ Learn more at https://docs.ultralytics.com/modes/predict
æ¨è«æéã¯ã594.3ms -> 110.8msã¨ããªãéããªã£ãã 姿å¢æ¨å®ã®çµæã¯ãç¹ã«å¤ãããªããå½ç¶ãã
以ä¸
YOLOã§ç°¡åã«å§¿å¢æ¨å®ãåããã¦ãæ§è½ããããªãã«åºããã¨ãããã¨ãåãã£ãã