windows下mmclassification安装教程

mmclassification版本0.23.1

一.官方安转教程

官网

在这里插入图片描述

二.安装教程

  1. 创建conda环境

    conda create --name openmmlab python=3.8 -y
    

    在这里插入图片描述

  2. 进入创建的环境

    conda activate openmmlab
    

    在这里插入图片描述

  3. 安转pytorcch

    conda install pytorch torchvision -c pytorch
    

    要是想安装Openmmlab的部署库mmdeploy,最好安装pytorch==1.8.0版本
    方法2

    conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
    

    方法3

    pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
    

    在这里插入图片描述

  4. 安转openmim

    pip install -U openmim
    

    在这里插入图片描述

  5. 安转mmcv

    mim install mmcv-full
    

    在这里插入图片描述

  6. 下载mmclassification源码

    下载地址:https://github.com/open-mmlab/mmclassification

    git clone https://github.com/open-mmlab/mmclassification.git
    

    在这里插入图片描述

  7. 进入mmclassification源码目录

    cmd进入下载好的mmclassification源码目录,并激活创建好的环境
    在这里插入图片描述

  8. 安转常用的软件包

    pip install scikit-image -i https://pypi.mirrors.ustc.edu.cn/simple/
    pip install pillow -i https://pypi.mirrors.ustc.edu.cn/simple/
    pip install opencv-python -i https://pypi.mirrors.ustc.edu.cn/simple/
    pip install tqdm -i https://pypi.mirrors.ustc.edu.cn/simple/
    pip install matplotlib -i https://pypi.mirrors.ustc.edu.cn/simple/
    pip install wandb -i https://pypi.mirrors.ustc.edu.cn/simple/
    pip install tensorboard -i https://pypi.mirrors.ustc.edu.cn/simple/
    
  9. 安转mmclassification

    pip install -v -e .
    

    在这里插入图片描述

  10. 测试安转是否成功

    1. 下载权重

      mim download mmcls --config resnet50_8xb32_in1k --dest .
      

      在这里插入图片描述

    2. 运行检测命令

      python demo/image_demo.py demo/demo.JPEG resnet50_8xb32_in1k.py resnet50_8xb32_in1k_20210831-ea4938fc.pth --device cpu
      

      在这里插入图片描述
      输出如上结果则代表安转成功

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

AoDeLuo

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

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

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

打赏作者

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

抵扣说明:

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

余额充值