展厅大屏1号主机配置Anaconda Pytorch环境

1、创建环境

conda create -n wind_2022 python==3.7

(base) D:\>
(base) D:\>
(base) D:\>
(base) D:\>conda create -n wind_2022 python==3.7
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.12.0
  latest version: 4.13.0

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: C:\Users\y\.conda\envs\wind_2022

  added / updated specs:
    - python==3.7


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2022.6.15          |   py37haa95532_0         153 KB
    pip-22.1.2                 |   py37haa95532_0         2.5 MB
    python-3.7.0               |       hea74fb7_0        16.6 MB
    setuptools-61.2.0          |   py37haa95532_0         1.0 MB
    wincertstore-0.2           |   py37haa95532_2          15 KB
    ------------------------------------------------------------
                                           Total:        20.3 MB

The following NEW packages will be INSTALLED:

  certifi            pkgs/main/win-64::certifi-2022.6.15-py37haa95532_0
  pip                pkgs/main/win-64::pip-22.1.2-py37haa95532_0
  python             pkgs/main/win-64::python-3.7.0-hea74fb7_0
  setuptools         pkgs/main/win-64::setuptools-61.2.0-py37haa95532_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/noarch::wheel-0.37.1-pyhd3eb1b0_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py37haa95532_2


Proceed ([y]/n)?y
View Code

 

创建完成:

To activate this environment, use
#
#     $ conda activate wind_2022
#
# To deactivate an active environment, use
#
#     $ conda deactivate


(base) D:\>
(base) D:\>
(base) D:\>

 

2、配置pytorch

激活环境

(base) D:\>
(base) D:\>
(base) D:\>conda activate wind_2022

(wind_2022) D:\>

 

 

#pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113

  pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113


pip install opencv-python

pip install  pyrealsense2

pip install tqdm

pip install pyyaml

pip install matplotlib

pip install pandas

pip install seaborn

pip install argparse

 

 3、测试yolov5

(wind_2022) E:\PyTorch_Project\yolov5-master>
(wind_2022) E:\PyTorch_Project\yolov5-master>python detect.py  --weights models/yolov5s.pt --source data/images
detect: weights=['models/yolov5s.pt'], source=data/images, data=data\coco128.yaml, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs\detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False
YOLOv5  2022-7-13 Python-3.7.0 torch-1.11.0+cu113 CUDA:0 (NVIDIA GeForce RTX 3060, 12288MiB)

Fusing layers...
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients
image 1/2 E:\PyTorch_Project\yolov5-master\data\images\bus.jpg: 640x480 4 persons, 1 bus, Done. (0.000s)
image 2/2 E:\PyTorch_Project\yolov5-master\data\images\zidane.jpg: 384x640 2 persons, 2 ties, Done. (0.000s)
Speed: 0.0ms pre-process, 0.0ms inference, 7.8ms NMS per image at shape (1, 3, 640, 640)
Results saved to runs\detect\exp

(wind_2022) E:\PyTorch_Project\yolov5-master>
(wind_2022) E:\PyTorch_Project\yolov5-master>

 

 

 

Start Locally | PyTorch

#############################

posted @ 2022-07-14 14:12  西北逍遥  阅读(54)  评论(0编辑  收藏  举报