Distinguish the role of coco minival and coco test-dev, conda common commands and python -m of the COCO data set

1. The test sets of COCO data set coco minival and coco test-dev:

The corresponding content of the two data sets on the official website is as follows:
COCO data set official website: https://cocodataset.org/#download
Insert image description here
The reference website for distinguishing the two data sets: https://zhuanlan.zhihu.com/p/ 533676547
Insert image description here

2. Commonly used conda commands:

①Create a virtual environment

conda create -n env-name python=xx -y

②Activate the virtual environment:

conda activate env-name

③Exit the virtual environment

conda deactivate

④Copy virtual environment

conda create -n 新环境名 --clone 旧环境名

⑤Export environment:

conda env export > env_name.yaml

⑥Use conda env export to export a file in yaml format. This file records the environment name, software source address and installation package list. In turn, use the yaml configuration file to create a new environment.

conda env create -f env_name.yaml

⑦Migrate virtual environment:

pip install conda-pack  """安装conda-pack"""
conda pack -n env_name  """env_name为环境名,打包之后的文件名为env_name.tar.gz"""
conda pack -n env_name --ignore-editable-packages """出现动态链接库无法打包时使用"""

Upload env_name.tar.gz to the anaconda3 environment of the new device, that is, in the conda/env/ directory

mkdir -p env_name  """创建新环境名文件夹"""
tar -xzf env_name.tar.gz -C env_name  """解压打包出来的压缩文件,压缩包解压到文件夹"""
conda activate env_name  """"激活迁移的环境"""

3. The role of python -m

Reference: https://zhuanlan.zhihu.com/p/339104015

python xxx.py
python -m xxx.py

Here are two ways to load py files:

1 is called direct operation

2. Start the module as a script (note: but the value of __name__ is 'main')

python xxx.py -m xxxx 

Experience with the second way:

It is equivalent to python will locate the path after -m in the code execution path, that is, the code in xxxx

Guess you like

Origin blog.csdn.net/qq_44442727/article/details/130676576