当前位置:网站首页>Mmclassification installation and debugging
Mmclassification installation and debugging
2022-06-29 07:27:00 【Coding leaves】
MMClassification It's based on PyTorch Open source image classification toolbox , yes OpenMMLab One of the members of the project The main branch code currently supports PyTorch 1.5 Version above . MMClassification It contains many classic or high-performance image classification algorithms , Some of the latest papers and achievements are reproduced , In particular, it includes a large number of CVPR Reproduction of papers .
1 Project address
Project address :GitHub - open-mmlab/mmclassification: OpenMMLab Image Classification Toolbox and Benchmark
Installation guide :
Prerequisites — MMClassification 0.23.1 documentation
Getting Started — MMClassification 0.23.1 documentation
2 Installation steps
mmclassification The installation steps are as follows :
conda create -n openmmlab python=3.7 -y
conda activate openmmlab
pip install torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
pip3 install openmim
mim install mmcv-full
git clone https://github.com/open-mmlab/mmclassification.git
# If github Can't connect , You can use gittee Replace .
#git clone https://gitee.com/monkeycc/mmclassification.git
cd mmclassification
pip install -v -e .among ,pytorch The version is based on its own cuda Version install the corresponding version . If git Can't use , You can also use the browser to download and unzip . If Github cannot access , You can use gittee Replace , namely :https://gitee.com/monkeycc/mmclassification.git.
The installation process prompts are shown in the following figure , Finally, you will be prompted that the installation is successful .

3 Effect test
(1) Download pre training model
Run the following command to download the pre training model :
mim download mmcls --config resnet50_8xb32_in1k --dest .
After running , Two files will be downloaded in the current directory , namely resnet50_8xb32_in1k.py and resnet50_8xb32_in1k_20210831-ea4938fc.pth.
If you run the file , Tips search.py Throw the following exception :
TypeError: __init__() got an unexpected keyword argument 'autocompletion'
The reason for this mistake is click Version mismatch , You can reinstall an earlier version of by following the command below click.
pip install click==7.1.2
After fixing the above errors ,search.py The file will continue to report the following errors :
modify python Environment /lib/python3.7/site-packages/mim/commands/search.py file , This file will also prompt you when you hold it wrong 357 Row threw exception , The error prompt is as follows :
File "/root/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mim/commands/search.py", line 169, in get_model_info
dataframe = convert2df(metadata)
File "/root/anaconda3/envs/openmmlab/lib/python3.7/site-packages/mim/commands/search.py", line 357, in convert2df
for result in results:
TypeError: 'NoneType' object is not iterable
The solution is in 357 Previous increase if results is None: continue. As shown below :
if results is None:
continue
for result in results:(2) Run the test script
python demo/image_demo.py demo/demo.JPEG resnet50_8xb32_in1k.py resnet50_8xb32_in1k_20210831-ea4938fc.pth --device cpuAfter running , The following will be output on the command line :

4 【python Three dimensional deep learning 】python 3D point cloud from basic to deep learning _Coding Leaves blog -CSDN Blog _python Three dimensional point cloud
More 3D 、 Please pay attention to two-dimensional perception algorithm and financial quantitative analysis algorithm “ Lele perception school ” WeChat official account , And will continue to update .
边栏推荐
- Webrtc series - 8-connectivity detection for network transmission
- CI工具Jenkins安装配置教程
- golang 修改 结构体切片的值
- Crawler data analysis (introduction 2-re analysis)
- uva10859
- Beanpostprocessor and beanfactorypostprocessor
- NoSQL数据库之Redis(五):Redis_Jedis_测试
- Two ways to write throttling - recently seen
- And check the collection hello
- Chinese garbled code on idea console [valid through personal test]
猜你喜欢

数字ic设计——UART

Imx6dl4.1.15 supports EIM bus (upper) - actual operation and modification.

NoSQL数据库之Redis(二):Redis配置文件介绍
![[QNX Hypervisor 2.2用户手册]6.2.1 Guest之间通信](/img/3d/6a0cde206a09a7ef03038fb99cf532.png)
[QNX Hypervisor 2.2用户手册]6.2.1 Guest之间通信

国内代码托管中心- 码云

And check the collection hello

IMX6DL4.1.15支持EIM总线(下)——配置原理分析。
![[software test] interface - Basic test process](/img/8d/f61f7d3f721a60c28fc16115c138b4.jpg)
[software test] interface - Basic test process

Exploring the depth of objects in JVM series

Uniapp obtains the date implementation of the beginning and end of the previous month and the next month
随机推荐
And check the collection hello
MFC中利用CDockablePane实现悬浮窗
uva10891
Chinese garbled code on idea console [valid through personal test]
NoSQL数据库之Redis(一):安装 & 简介
SAP UI5 初学 ( 一 )、简介
Markdown skill tree (1): introduction to markdown
机器学习笔记 - 时间序列的混合模型
Oscilloscope symbols
How to talk about salary correctly in software test interview?
systemd 管理node-exporter
Redis (V) of NoSQL database: redis_ Jedis_ test
Livedata source code appreciation - basic use
反射修改final
JMeter can't find its own jar package imported by BeanShell
When the soft keyboard appears, it makes my EditText field lose focus
详解Autosar Arxml中的CANFD报文及格式
Suggestions on working methods and efficient work
机器学习笔记 - 时间序列使用机器学习进行预测
uva10635