diff --git a/contrib/MonocularDepthEstimation/README.md b/contrib/MonocularDepthEstimation/README.md index 73d326e9e5d5414de4f24a1d975d788c875203d1..8a06cb40bdbb14203dc78a270c54bdcd94293108 100644 --- a/contrib/MonocularDepthEstimation/README.md +++ b/contrib/MonocularDepthEstimation/README.md @@ -21,18 +21,22 @@ Atlas 300I pro、Atlas 300V pro ``` ## 3 准备模型 -**步骤1**:下载模型:[下载链接](https://mindx.sdk.obs.cn-north-4.myhuaweicloud.com/mindxsdk-referenceapps%20/contrib/MonocularDepthEstimation/AdaBins_nyu.onnx),将获取到的.onnx文件存放至本案例代码的MonocularDepthEstimation/model 目录下。 +**步骤1**:下载模型-[下载链接](https://mindx.sdk.obs.cn-north-4.myhuaweicloud.com/mindxsdk-referenceapps%20/contrib/MonocularDepthEstimation/AdaBins_nyu.onnx),将获取到的.onnx文件存放至本案例代码的MonocularDepthEstimation/model 目录下。 -**步骤2**:进入MonocularDepthEstimation/model目录执行以下命令。 +**步骤2**:进入MonocularDepthEstimation/model目录执行以下命令 ``` atc --model=./AdaBins_nyu.onnx --framework=5 --output=./AdaBins_nyu --soc_version=Ascend310P3 --insert_op_conf=./aipp_adabins_640_480.aippconfig --log=error ``` -## 4 编译与运行 -**步骤1**:准备输入图片:将输入图片命名为test.jpg放入项目根目录下 +## 4 运行 +**步骤1**:准备输入图片 -**步骤2**:运行: +将输入图片命名为test.jpg放入项目根目录下 + +**步骤2**:运行 ``` python3 main.py ``` -**步骤3**:查看结果:会在当前目录生成result.jpg \ No newline at end of file +**步骤3**:查看结果 + +在当前目录生成result.jpg \ No newline at end of file diff --git a/contrib/PassengerflowEstimation/README.md b/contrib/PassengerflowEstimation/README.md index a96f8218007f63bf99008a52025661dd502d9199..6b66599ff73c5d7ce88198a8c512920b0ebfe5b7 100644 --- a/contrib/PassengerflowEstimation/README.md +++ b/contrib/PassengerflowEstimation/README.md @@ -27,21 +27,22 @@ Atlas 300I pro、Atlas 300V pro ``` ## 3 准备模型 -**步骤1**:下载原始yolov4模型:[下载地址](https://mindx.sdk.obs.cn-north-4.myhuaweicloud.com/mindxsdk-referenceapps%20/contrib/PassengerflowEstimation/ATC%20Yolov4%28FP16%29%20from%20Pytorch.zip),并将解压后获取到的.onnx文件存放至本案例代码的PassengerflowEstimation/models 目录下。 +**步骤1**:下载原始yolov4模型-[下载地址](https://mindx.sdk.obs.cn-north-4.myhuaweicloud.com/mindxsdk-referenceapps%20/contrib/PassengerflowEstimation/ATC%20Yolov4%28FP16%29%20from%20Pytorch.zip),并将解压后获取到的.onnx文件存放至本案例代码的PassengerflowEstimation/models 目录下。 -**步骤2**: 进入PassengerflowEstimation/models目录执行以下命令。 +**步骤2**: 进入PassengerflowEstimation/models目录执行以下命令 ``` atc --model=./yolov4_dynamic_bs.onnx --framework=5 --output=yolov4 --input_format=NCHW --output_type=FP32 --soc_version=Ascend310P3 --input_shape="input:1,3,608,608" --log=info --insert_op_conf=./aipp_Passengerflowdetection.config ``` -**步骤3**: 转换opencvosd模型,执行以下命令: +**步骤3**: 转换opencvosd模型,执行以下命令 ``` cd ${SDK_INSTALL_PATH}/mxVision/operators/opencvosd #根据实际SDK安装路径修改 bash generate_osd_om.sh ``` ## 4 编译与运行 -**步骤1**:配置pipeline: +**步骤1**:配置pipeline + 根据实际的网络视频流,修改passengerflowestimation.pipeline文件第9行: ``` #将rtspUrl的值修改为实际的rtsp网络视频流地址 @@ -69,7 +70,9 @@ bash generate_osd_om.sh }, ``` -**步骤2**:编译后处理插件so:在项目根目录下执行 +**步骤2**:编译后处理插件so + +在项目根目录下执行 ``` bash build.sh #编译 chmod 440 ./plugins/mxpi_passengerflowestimation/build/libmxpi_passengerflowestimation.so #修改so权限 @@ -78,11 +81,13 @@ cp ./plugins/mxpi_passengerflowestimation/build/libmxpi_passengerflowestimation. cp ./plugins/mxpi_selectobject/build/libmxpi_selectobject.so ${SDK_INSTALL_PATH}/mxVision/lib/plugins #拷贝so到相应路径,${SDK_INSTALL_PATH}根据实际SDK安装路径修改 ``` -**步骤3**:拉起Live555服务:[Live555拉流教程](../../docs/参考资料/Live555离线视频转RTSP说明文档.md) +**步骤3**:拉起Live555服务-[Live555拉流教程](../../docs/参考资料/Live555离线视频转RTSP说明文档.md) -**步骤4**:在根目录下运行: +**步骤4**:在根目录下运行 ``` python3 main.py ``` -**步骤5**:查看结果:生成的结果保存在result.h264文件里面。 \ No newline at end of file +**步骤5**:查看结果 + +生成的结果保存在result.h264文件里面(每次运行前请手动删除该文件)。 \ No newline at end of file diff --git a/contrib/PassengerflowEstimation/pipeline/passengerflowestimation.pipeline b/contrib/PassengerflowEstimation/pipeline/passengerflowestimation.pipeline index d96f382dcc7918b5f857dfec33176b73f2a0cf97..de97dbbd165d05965ca36233ae34bde80ae5ba1b 100644 --- a/contrib/PassengerflowEstimation/pipeline/passengerflowestimation.pipeline +++ b/contrib/PassengerflowEstimation/pipeline/passengerflowestimation.pipeline @@ -90,6 +90,9 @@ "next": "mxpi_selectobject0" }, "mxpi_selectobject0": { + "props": { + "dataSource": "mxpi_objectpostprocessor0" + }, "factory": "mxpi_selectobject", "next": "motV2" }, diff --git a/contrib/PraNetSegmentation/README.md b/contrib/PraNetSegmentation/README.md index 2c2aa29cfa0f51e8a13eafade40f85dff038eed8..d0afb9cbdb134a8f97420613074d015e4fecf138 100644 --- a/contrib/PraNetSegmentation/README.md +++ b/contrib/PraNetSegmentation/README.md @@ -32,10 +32,8 @@ Atlas 300I pro、Atlas 300V pro ### 1.5 相关约束 在医疗图像处理领域,PraNet针对息肉识别需求而设计。Pranet网络能够对息肉图片进行语义分割,功能正常,且精度达标。但是在以下情况下,分割效果不够理想: - -1、当息肉相比整张图片面积很小时,分割效果不够理想,边缘会比较模糊。 - -2、当息肉大面具处于整张图片的边缘时,有一定概率分割失败,效果较差。 +- 当息肉相比整张图片面积很小时,分割效果不够理想,边缘会比较模糊。 +- 当息肉大面具处于整张图片的边缘时,有一定概率分割失败,效果较差。 ## 2 设置环境变量 ``` @@ -45,25 +43,33 @@ Atlas 300I pro、Atlas 300V pro ## 3 准备模型 -**步骤1:** 下载PraNet原始模型:[下载地址](https://mindx.sdk.obs.cn-north-4.myhuaweicloud.com/mindxsdk-referenceapps%20/contrib/PranetSegementation/ATC%20PraNet%28FP16%29%20from%20Pytorch%20-%20Ascend310.zip),并将获取到的PraNet-19.onnx文件存放至本案例代码的PraNetSegmentation/model目录下。 +**步骤1:** 下载PraNet原始模型-[下载地址](https://mindx.sdk.obs.cn-north-4.myhuaweicloud.com/mindxsdk-referenceapps%20/contrib/PranetSegementation/ATC%20PraNet%28FP16%29%20from%20Pytorch%20-%20Ascend310.zip),并将获取到的PraNet-19.onnx文件存放至本案例代码的PraNetSegmentation/model目录下。 -**步骤2:** 进入PraNetSegmentation/model目录执行以下命令: +**步骤2:** 进入PraNetSegmentation/model目录执行以下命令 ``` atc --model=PraNet-19.onnx --output=./PraNet-19_bs1 --framework=5 --input_shape="actual_input_1:1,3,352,352" --soc_version=Ascend310P3 --input_format=NCHW --output_type=FP32 --insert_op_conf=./pranet.aippconfig ``` ## 4 编译与运行 -**步骤1:** 编译后处理插件so:进入PraNetSegmentation/plugin/postprocess/目录,执行命令: +**步骤1:** 编译后处理插件so + +进入PraNetSegmentation/plugin/postprocess/目录,执行命令 ``` bash build.sh ``` -**步骤2:** 准备输入图片路径:输入图片命名为test.jpg放入根目录。 +**步骤2:** 准备输入图片路径 -**步骤3:** 运行:在根目录下执行 +输入图片命名为test.jpg放入根目录。 + +**步骤3:** 运行 + +在根目录下执行 ``` python3 main.py ``` -**步骤4:** 查看结果:在infer_result目录可以查看图片结果。 +**步骤4:** 查看结果 + +在infer_result目录可以查看图片结果。