Przeglądaj źródła

update pipeline doc for tar input (#2991)

* update pipeline doc for tar input

* fix doc
zhuyipin 9 miesięcy temu
rodzic
commit
e8e33d82bd

+ 9 - 9
docs/pipeline_usage/tutorials/cv_pipelines/3d_bev_detection.en.md

@@ -55,18 +55,18 @@ tar -xf ./data/nuscenes_demo.tar -C ./data/
 
 #### 2.2.1 Command Line Experience
 
-You can quickly experience the 3D multi-modal fusion detection pipeline with a single command, replacing `--input` with the local path to the pkl file for prediction.
-
+You can quickly experience the 3D multi-modal fusion detection pipeline with a single command. Use the [test file](https://paddle-model-ecology.bj.bcebos.com/paddlex/det_3d/demo_det_3d/nuscenes_demo_infer.tar),and  `--input` replace with the local path for prediction.
 ```bash
-paddlex --pipeline 3d_bev_detection --input ./data/nuscenes_demo/nuscenes_infos_val.pkl --device gpu:0
+paddlex --pipeline 3d_bev_detection \
+        --input nuscenes_demo_infer.tar \
+        --device gpu:0
 ```
-
 Parameter description:
 
 ```
 --pipeline: The name of the pipeline, here it is the 3D multi-modal fusion detection pipeline.
 
---input: The local path to the pkl file to be processed.
+--input: The input path to the .tar file containing image and lidar data to be processed. 3D multi-modal fusion detection pipeline is a multi-input pipeline depending on images, pointclouds and transition matrix information. Tar file contains "samples" directory with all images and pointclouds data, "sweeps" directories with pointclouds data of relative frames and nuscnes_infos_val.pkl file containing relataive data path from "samples" and "sweeps" directories and transition matrix infomation.
 
 --device: The GPU index to be used (e.g., gpu:0 means using the 0th GPU, gpu:1,2 means using the 1st and 2nd GPUs), or you can choose to use CPU (--device cpu).
 ```
@@ -78,7 +78,7 @@ Parameter description:
 from paddlex import create_pipeline
 
 pipeline = create_pipeline(pipeline="3d_bev_detection")
-output = pipeline.predict("./data/nuscenes_demo/nuscenes_infos_val.pkl")
+output = pipeline.predict("nuscenes_demo_infer.tar")
 
 for res in output:
     res.print()  ## Print the structured output of the prediction
@@ -132,11 +132,11 @@ In the above Python script, the following steps are executed:
 <tbody>
 <tr>
 <td>str</td>
-<td><b>pkl file path</b>,e.g., <code>/root/data/anno_file.pkl</code></td>
+<td><b>tar file path</b>,e.g., <code>/root/data/nuscenes_demo_infer.tar</code></td>
 </tr>
 <tr>
 <td>list</td>
-<td><b>List</b>,list elements need to be data of the above type, e.g., <code>["/root/data/anno_file1.pkl", "/root/data/anno_file2.pkl"]</td>
+<td><b>List</b>,list elements need to be data of the above type, e.g., <code>["/root/data/nuscenes_demo_infer1.tar", "/root/data/nuscenes_demo_infer2.tar"]</td>
 </tr>
 </tbody>
 </table>
@@ -182,7 +182,7 @@ from paddlex import create_pipeline
 
 pipeline = create_pipeline(pipeline="./my_path/3d_bev_detection.yaml")
 
-output = pipeline.predict("./data/nuscenes_demo/nuscenes_infos_val.pkl")
+output = pipeline.predict("nuscenes_demo_infer.tar")
 
 for res in output:
     res.print()  ## Print the structured output of the prediction

+ 9 - 15
docs/pipeline_usage/tutorials/cv_pipelines/3d_bev_detection.md

@@ -45,27 +45,21 @@ PaddleX 所提供的预训练的模型产线均可以快速体验效果,你可
 ### 2.2 本地体验
 > ❗ 在本地使用3D多模态融合检测产线前,请确保您已经按照[PaddleX安装教程](../../../installation/installation.md)完成了PaddleX的wheel包安装。
 
-Demo数据集下载:您可以参考下面的命令将 Demo 数据集下载到指定文件夹:
-
-```bash
-wget https://paddle-model-ecology.bj.bcebos.com/paddlex/data/nuscenes_demo.tar -P ./data
-
-tar -xf ./data/nuscenes_demo.tar -C ./data/
-```
-
 #### 2.2.1 命令行方式体验
 
-一行命令即可快速体验3D多模态融合检测产线效果,并将 `--input` 替换为本地pkl文件路径,进行预测
+一行命令即可快速体验3D多模态融合检测产线效果,使用 [测试文件](https://paddle-model-ecology.bj.bcebos.com/paddlex/det_3d/demo_det_3d/nuscenes_demo_infer.tar),并将 `--input` 替换为本地路径,进行预测
 
 ```bash
-paddlex --pipeline 3d_bev_detection --input ./data/nuscenes_demo/nuscenes_infos_val.pkl --device gpu:0
+paddlex --pipeline 3d_bev_detection \
+        --input nuscenes_demo_infer.tar \
+        --device gpu:0
 ```
 
 参数说明:
 
 ```
 --pipeline:产线名称,此处为3D多模态融合检测产线
---input:待处理的pkl文件的本地路径
+--input:输入的包含点云图像文件的.tar压缩文件的本地路径。3D多模态融合检测为为多输入模型,输入依赖点云、图像以及转换矩阵等其他信息。tar解压文件包含samples路径,sweeps路径和nuscnes_infos_val.pkl文件,其中samples包含当前输入的所有图像和点云数据,sweeps包含关联帧点云数据,nuscnes_infos_val.pkl文件包含所有点云和图像在samples和sweeps下的相对路径以及转换矩阵等相关信息。
 --device 使用的GPU序号(例如gpu:0表示使用第0块GPU,gpu:1,2表示使用第1、2块GPU),也可选择使用CPU(--device cpu)
 ```
 
@@ -76,7 +70,7 @@ paddlex --pipeline 3d_bev_detection --input ./data/nuscenes_demo/nuscenes_infos_
 from paddlex import create_pipeline
 
 pipeline = create_pipeline(pipeline="3d_bev_detection")
-output = pipeline.predict("./data/nuscenes_demo/nuscenes_infos_val.pkl")
+output = pipeline.predict("nuscenes_demo_infer.tar")
 
 for res in output:
     res.print()  ## 打印预测的结构化输出
@@ -130,11 +124,11 @@ for res in output:
 <tbody>
 <tr>
 <td>str</td>
-<td><b>pkl文件路径</b>,例如:<code>/root/data/anno_file.pkl</code></td>
+<td><b>tar文件路径</b>,例如:<code>/root/data/nuscenes_demo_infer.tar</code></td>
 </tr>
 <tr>
 <td>list</td>
-<td><b>列表</b>,列表元素需为上述类型数据,如<code>["/root/data/anno_file1.pkl", "/root/data/anno_file2.pkl"]</td>
+<td><b>列表</b>,列表元素需为上述类型数据,如<code>["/root/data/nuscenes_demo_infer1.tar", "/root/data/nuscenes_demo_infer2.tar"]</td>
 </tr>
 </tbody>
 </table>
@@ -180,7 +174,7 @@ from paddlex import create_pipeline
 
 pipeline = create_pipeline(pipeline="./my_path/3d_bev_detection.yaml")
 
-output = pipeline.predict("./data/nuscenes_demo/nuscenes_infos_val.pkl")
+output = pipeline.predict("nuscenes_demo_infer.tar")
 
 for res in output:
     res.print()  ## 打印预测的结构化输出