AI practical training camp&MMSegmentation installation and configuration

A basic environment configuration

First install pytorch

pip3 install install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio==0.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html

Then use mim to install MMCV.
Please add image description
The above steps are not popular, and then follow the following operations: Install other required libraries

pip3 install opencv-python pillow matplotlib seaborn tqdm pytorch-lightning 'mmdet>=3.0.0rc1' -i https://pypi.tuna.tsinghua.edu.cn/simple

2. Install MMSegmentation

First check if there is MMSegmentation locally and delete it if so.

# 删掉原有的 mmsegmentation 文件夹(如有)
rm -rf mmsegmentation

Then clone it from the official website.
Please add image description
After the download is completed, we enter the folder we just downloaded and compile it: (I have cloned it many times and I always get raped)
Please add image description

After downloading, you can check whether the installation is successful by running the following command:
Please add image description

3. Using MMSegmentation

We can use the pre-trained model and weight file Model Zoo here
: https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/model_zoo.md
Please add image description
Here you can download its configuration file and pre- The training model can be easily applied.

Please add image descriptionWe use PSPNet for experiments
Please add image description

Guess you like

Origin blog.csdn.net/shengweiit/article/details/131194053