You are reading the documentation for MMClassification 0.x, which will soon be deprecated at the end of 2022. We recommend you upgrade to MMClassification 1.0 to enjoy fruitful new features and better performance brought by OpenMMLab 2.0. Check the installation tutorial, migration tutorial and changelog for more details.
Frequently Asked Questions¶
We list some common troubles faced by many users and their corresponding solutions here. Feel free to enrich the list if you find any frequent issues and have ways to help others to solve them. If the contents here do not cover your issue, please create an issue using the provided templates and make sure you fill in all required information in the template.
Compatibility issue between MMCV and MMClassification; “AssertionError: MMCV==xxx is used but incompatible. Please install mmcv>=xxx, <=xxx.”
Compatible MMClassification and MMCV versions are shown as below. Please choose the correct version of MMCV to avoid installation issues.
devbranch is under frequent development, the MMCV version dependency may be inaccurate. If you encounter problems when using the
devbranch, please try to update MMCV to the latest version.
If you would like to use
albumentations, we suggest using
pip install -r requirements/albu.txtor
pip install -U albumentations --no-binary qudida,albumentations.
If you simply use
pip install albumentations>=0.3.2, it will install
opencv-python-headlesssimultaneously (even though you have already installed
opencv-python). Please refer to the official documentation for details.
Do I need to reinstall mmcls after some code modifications?
If you follow the best practice and install mmcls from source, any local modifications made to the code will take effect without reinstallation.
How to develop with multiple MMClassification versions?
Generally speaking, we recommend to use different virtual environments to manage MMClassification in different working directories. However, you can also use the same environment to develop MMClassification in different folders, like mmcls-0.21, mmcls-0.23. When you run the train or test shell script, it will adopt the mmcls package in the current folder. And when you run other Python script, you can also add
PYTHONPATH=`pwd`at the beginning of your command to use the package in the current folder.
Conversely, to use the default MMClassification installed in the environment rather than the one you are working with, you can remove the following line in those shell scripts: