Skip to content

Commit

Permalink
unify module name (#2530)
Browse files Browse the repository at this point in the history
* unify module name

* update

* update
  • Loading branch information
cuicheng01 authored Nov 25, 2024
1 parent a092ae6 commit 303f30d
Show file tree
Hide file tree
Showing 47 changed files with 173 additions and 169 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tar -xf ./dataset/mvtec_examples.tar -C ./dataset/
A single command can complete data validation:

```bash
python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
python main.py -c paddlex/configs/image_anomaly_detection/STFPM.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/mvtec_examples
```
Expand Down Expand Up @@ -118,7 +118,7 @@ After executing the above command, PaddleX will validate the dataset and collect
A single command is sufficient to complete model training, taking the training of STFPM as an example:

```bash
python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
python main.py -c paddlex/configs/image_anomaly_detection/STFPM.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/mvtec_examples
```
Expand Down Expand Up @@ -150,7 +150,7 @@ Other related parameters can be set by modifying the `Global` and `Train` fields
After completing model training, you can evaluate the specified model weight file on the validation set to verify the model's accuracy. Using PaddleX for model evaluation, you can complete the evaluation with a single command:

```bash
python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
python main.py -c paddlex/configs/image_anomaly_detection/STFPM.yaml \
-o Global.mode=evaluate \
-o Global.dataset_dir=./dataset/mvtec_examples
```
Expand All @@ -172,7 +172,7 @@ After completing model training and evaluation, you can use the trained model we
#### 4.4.1 Model Inference
* To perform inference prediction through the command line, simply use the following command. Before running the following code, please download the [demo image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/uad_grid.png) to your local machine.
```bash
python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
python main.py -c paddlex/configs/image_anomaly_detection/STFPM.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./output/best_model/inference" \
-o Predict.input="uad_grid.png"
Expand Down
8 changes: 4 additions & 4 deletions docs/module_usage/tutorials/cv_modules/anomaly_detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ tar -xf ./dataset/mvtec_examples.tar -C ./dataset/
一行命令即可完成数据校验:

```bash
python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
python main.py -c paddlex/configs/image_anomaly_detection/STFPM.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/mvtec_examples
```
Expand Down Expand Up @@ -116,7 +116,7 @@ python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
一条命令即可完成模型的训练,以此处STFPM的训练为例:

```bash
python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
python main.py -c paddlex/configs/image_anomaly_detection/STFPM.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/mvtec_examples
```
Expand Down Expand Up @@ -147,7 +147,7 @@ python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
在完成模型训练后,可以对指定的模型权重文件在验证集上进行评估,验证模型精度。使用 PaddleX 进行模型评估,一条命令即可完成模型的评估:

```bash
python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
python main.py -c paddlex/configs/image_anomaly_detection/STFPM.yaml \
-o Global.mode=evaluate \
-o Global.dataset_dir=./dataset/mvtec_examples
```
Expand All @@ -169,7 +169,7 @@ python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
#### 4.4.1 模型推理
* 通过命令行的方式进行推理预测,只需如下一条命令,运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/uad_grid.png)到本地。
```bash
python main.py -c paddlex/configs/anomaly_detection/STFPM.yaml \
python main.py -c paddlex/configs/image_anomaly_detection/STFPM.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./output/best_model/inference" \
-o Predict.input="uad_grid.png"
Expand Down
6 changes: 3 additions & 3 deletions docs/module_usage/tutorials/cv_modules/face_feature.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ tar -xf ./dataset/face_rec_examples.tar -C ./dataset/
A single command can complete data validation:

```bash
python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
python main.py -c paddlex/configs/face_feature/MobileFaceNet.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/face_rec_examples
```
Expand Down Expand Up @@ -186,7 +186,7 @@ images/Miyako_Miyazaki_0002.jpg images/Munir_Akram_0002.jpg 0
Model training can be completed with a single command. Here is an example of training MobileFaceNet:

```bash
python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
python main.py -c paddlex/configs/face_feature/MobileFaceNet.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/face_rec_examples
```
Expand Down Expand Up @@ -240,7 +240,7 @@ After completing model training and evaluation, you can use the trained model we
#### 4.4.1 Model Inference
* To perform inference predictions through the command line, you only need the following command. Before running the following code, please download the [example image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_recognition_001.jpg) to your local machine.
```bash
python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
python main.py -c paddlex/configs/face_feature/MobileFaceNet.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./output/best_model/inference" \
-o Predict.input="face_recognition_001.jpg"
Expand Down
8 changes: 4 additions & 4 deletions docs/module_usage/tutorials/cv_modules/face_feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ tar -xf ./dataset/face_rec_examples.tar -C ./dataset/
一行命令即可完成数据校验:

```bash
python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
python main.py -c paddlex/configs/face_feature/MobileFaceNet.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/face_rec_examples
```
Expand Down Expand Up @@ -184,7 +184,7 @@ images/Miyako_Miyazaki_0002.jpg images/Munir_Akram_0002.jpg 0
一条命令即可完成模型的训练,以此处MobileFaceNet的训练为例:

```bash
python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
python main.py -c paddlex/configs/face_feature/MobileFaceNet.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/face_rec_examples
```
Expand Down Expand Up @@ -216,7 +216,7 @@ python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
在完成模型训练后,可以对指定的模型权重文件在验证集上进行评估,验证模型精度。使用 PaddleX 进行模型评估,一条命令即可完成模型的评估:

```bash
python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
python main.py -c paddlex/configs/face_feature/MobileFaceNet.yaml \
-o Global.mode=evaluate \
-o Global.dataset_dir=./dataset/face_rec_examples
```
Expand All @@ -238,7 +238,7 @@ python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
#### 4.4.1 模型推理
* 通过命令行的方式进行推理预测,只需如下一条命令,运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_recognition_001.jpg)到本地。
```bash
python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
python main.py -c paddlex/configs/face_feature/MobileFaceNet.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./output/best_model/inference" \
-o Predict.input="face_recognition_001.jpg"
Expand Down
16 changes: 8 additions & 8 deletions docs/module_usage/tutorials/cv_modules/image_feature.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ tar -xf ./dataset/Inshop_examples.tar -C ./dataset/
#### 4.1.2 Data Validation
A single command can complete data validation:
```bash
python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/Inshop_examples
```
Expand Down Expand Up @@ -174,13 +174,13 @@ CheckDataset:
......
</code></pre>
<p>Then execute the command:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/image_classification_labelme_examples
</code></pre>
<p>After the data conversion is executed, the original annotation files will be renamed to <code>xxx.bak</code> in the original path.</p>
<p>The above parameters also support being set by appending command line arguments:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/image_classification_labelme_examples \
-o CheckDataset.convert.enable=True \
Expand All @@ -206,13 +206,13 @@ CheckDataset:
......
</code></pre>
<p>Then execute the command:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/Inshop_examples
</code></pre>
<p>After the data splitting is executed, the original annotation files will be renamed to <code>xxx.bak</code> in the original path.</p>
<p>The above parameters also support being set by appending command line arguments:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/Inshop_examples \
-o CheckDataset.split.enable=True \
Expand All @@ -228,7 +228,7 @@ CheckDataset:
Model training can be completed with a single command, taking the training of the image feature model PP-ShiTuV2_rec as an example:

```bash
python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/Inshop_examples
```
Expand Down Expand Up @@ -259,7 +259,7 @@ Other related parameters can be set by modifying the `Global` and `Train` fields
After completing model training, you can evaluate the specified model weight file on the validation set to verify the model's accuracy. Using PaddleX for model evaluation can be done with a single command:

```bash
python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=evaluate \
-o Global.dataset_dir=./dataset/Inshop_examples
```
Expand All @@ -283,7 +283,7 @@ After completing model training and evaluation, you can use the trained model we
To perform inference prediction through the command line, simply use the following command. Before running the following code, please download the [demo image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_recognition_001.jpg) to your local machine.

```bash
python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./output/best_model/inference" \
-o Predict.input="general_image_recognition_001.jpg"
Expand Down
16 changes: 8 additions & 8 deletions docs/module_usage/tutorials/cv_modules/image_feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ tar -xf ./dataset/Inshop_examples.tar -C ./dataset/
一行命令即可完成数据校验:

```bash
python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/Inshop_examples
```
Expand Down Expand Up @@ -178,13 +178,13 @@ CheckDataset:
......
</code></pre>
<p>随后执行命令:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/image_classification_labelme_examples
</code></pre>
<p>数据转换执行之后,原有标注文件会被在原路径下重命名为 <code>xxx.bak</code>。</p>
<p>以上参数同样支持通过追加命令行参数的方式进行设置:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/image_classification_labelme_examples \
-o CheckDataset.convert.enable=True \
Expand All @@ -210,13 +210,13 @@ CheckDataset:
......
</code></pre>
<p>随后执行命令:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/Inshop_examples
</code></pre>
<p>数据划分执行之后,原有标注文件会被在原路径下重命名为 <code>xxx.bak</code>。</p>
<p>以上参数同样支持通过追加命令行参数的方式进行设置:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/Inshop_examples \
-o CheckDataset.split.enable=True \
Expand All @@ -232,7 +232,7 @@ CheckDataset:
一条命令即可完成模型的训练,以此处图像特征模型 PP-ShiTuV2_rec 的训练为例:

```
python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/Inshop_examples
```
Expand Down Expand Up @@ -263,7 +263,7 @@ python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
在完成模型训练后,可以对指定的模型权重文件在验证集上进行评估,验证模型精度。使用 PaddleX 进行模型评估,一条命令即可完成模型的评估:

```bash
python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=evaluate \
-o Global.dataset_dir=./dataset/Inshop_examples
```
Expand All @@ -286,7 +286,7 @@ python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
通过命令行的方式进行推理预测,只需如下一条命令。运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_recognition_001.jpg)到本地。

```bash
python main.py -c paddlex/configs/general_recognition/PP-ShiTuV2_rec.yaml \
python main.py -c paddlex/configs/image_feature/PP-ShiTuV2_rec.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./output/best_model/inference" \
-o Predict.input="general_image_recognition_001.jpg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ tar -xf ./dataset/mlcls_nus_examples.tar -C ./dataset/
A single command can complete data validation:
```bash
python main.py -c paddlex/configs/multilabel_classification/PP-LCNet_x1_0_ML.yaml \
python main.py -c paddlex/configs/image_multilabel_classification/PP-LCNet_x1_0_ML.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/mlcls_nus_examples
```
Expand Down Expand Up @@ -175,13 +175,13 @@ CheckDataset:
......
</code></pre>
<p>Then execute the command:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/multilabel_classification/PP-LCNet_x1_0_ML.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_multilabel_classification/PP-LCNet_x1_0_ML.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/det_coco_examples
</code></pre>
<p>After the data conversion is executed, the original annotation files will be renamed to <code>xxx.bak</code> in the original path.</p>
<p>The above parameters also support being set by appending command line arguments:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/multilabel_classification/PP-LCNet_x1_0_ML.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_multilabel_classification/PP-LCNet_x1_0_ML.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/det_coco_examples \
-o CheckDataset.convert.enable=True \
Expand All @@ -207,13 +207,13 @@ CheckDataset:
......
</code></pre>
<p>Then execute the command:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/multilabel_classification/PP-LCNet_x1_0_ML.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_multilabel_classification/PP-LCNet_x1_0_ML.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/det_coco_examples
</code></pre>
<p>After the data splitting is executed, the original annotation files will be renamed to <code>xxx.bak</code> in the original path.</p>
<p>These parameters can also be set by appending command-line arguments:</p>
<pre><code class="language-bash">python main.py -c paddlex/configs/multilabel_classification/PP-LCNet_x1_0_ML.yaml \
<pre><code class="language-bash">python main.py -c paddlex/configs/image_multilabel_classification/PP-LCNet_x1_0_ML.yaml \
-o Global.mode=check_dataset \
-o Global.dataset_dir=./dataset/det_coco_examples \
-o CheckDataset.split.enable=True \
Expand All @@ -224,7 +224,7 @@ CheckDataset:
### 4.2 Model Training
A single command can complete the model training. Taking the training of the image multi-label classification model PP-LCNet_x1_0_ML as an example:
```bash
python main.py -c paddlex/configs/multilabel_classification/PP-LCNet_x1_0_ML.yaml \
python main.py -c paddlex/configs/image_multilabel_classification/PP-LCNet_x1_0_ML.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/mlcls_nus_examples
```
Expand Down Expand Up @@ -257,7 +257,7 @@ the following steps are required:
After completing model training, you can evaluate the specified model weights file on the validation set to verify the model's accuracy. Using PaddleX for model evaluation can be done with a single command:
```bash
python main.py -c paddlex/configs/multilabel_classification/PP-LCNet_x1_0_ML.yaml \
python main.py -c paddlex/configs/image_multilabel_classification/PP-LCNet_x1_0_ML.yaml \
-o Global.mode=evaluate \
-o Global.dataset_dir=./dataset/mlcls_nus_examples
```
Expand All @@ -280,7 +280,7 @@ After completing model training and evaluation, you can use the trained model we
* Inference predictions can be performed through the command line with just one command. Before running the following code, please download the [demo image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/multilabel_classification_005.png) to your local machine.
```bash
python main.py -c paddlex/configs/multilabel_classification/PP-LCNet_x1_0_ML.yaml \
python main.py -c paddlex/configs/image_multilabel_classification/PP-LCNet_x1_0_ML.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./output/best_model/inference" \
-o Predict.input="multilabel_classification_005.png"
Expand Down
Loading

0 comments on commit 303f30d

Please sign in to comment.