当前位置:网站首页>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 .
边栏推荐
- ES 查询语法
- Machine learning notes - time series prediction using machine learning
- 通过keyup监听textarea输入更改按钮样式
- Tree drop-down selection box El select combined with El tree effect demo (sorting)
- YGG pilipinas: typhoon Odette disaster relief work update
- VPS是干嘛用的?有哪些知名牌子?与云服务器有什么区别?
- How to fix Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorli
- Markdown skill tree (5): picture
- 详解Autosar Arxml中的CANFD报文及格式
- Redis of NoSQL database (II): introduction to redis configuration file
猜你喜欢
随机推荐
树形下拉选择框el-select结合el-tree效果demo(整理)
Who is the main body of the waiting insurance record? Record in the local network security, right?
VPS是干嘛用的?有哪些知名牌子?与云服务器有什么区别?
NoSQL数据库之Redis(五):Redis_Jedis_测试
什么是测试架构师
关于工作方法和高效工作的建议
Markdown skill tree (2): paragraph and emphasis
Final summary spark
Markdown 技能树(9):表格
NoSQL數據庫之Redis(五):Redis_Jedis_測試
Imx6dl4.1.15 supports EIM bus (Part 2) - configuration principle analysis.
Markdown skill tree (5): picture
ES 查询语法
QT custom bit operation class
To: Hou Hong: the key to enterprise digital transformation is not technology, but strategy
服装行业的CRM品牌供应商如何选型?
Autosar SWC在Simulink中Parameter的使用
uva10635
Is virtual DOM really the fastest?
JMeter can't find its own jar package imported by BeanShell


![[software test] interface - Basic test process](/img/8d/f61f7d3f721a60c28fc16115c138b4.jpg)





