Commit 8da6ff45 authored by xin.wang.waytous's avatar xin.wang.waytous

multi-w/hout

parent e1c4cc77
...@@ -22,8 +22,8 @@ units: ...@@ -22,8 +22,8 @@ units:
inputMean: [0, 0, 0] inputMean: [0, 0, 0]
inputStd: [1, 1, 1] inputStd: [1, 1, 1]
inferBatchSize: 1 inferBatchSize: 1
inputWidth: 640 inputWidth: 960 # 640
inputHeight: 640 inputHeight: 544 # 640
fixAspectRatio: false fixAspectRatio: false
useBGR: false useBGR: false
- -
...@@ -31,28 +31,30 @@ units: ...@@ -31,28 +31,30 @@ units:
inputNames: [resizeNormImages] inputNames: [resizeNormImages]
outputNames: [detections, seg_protos, depths, semantics] outputNames: [detections, seg_protos, depths, semantics]
runMode: 1 # 0-fp32 1-fp16 2-int8 (int8 not supported) runMode: 1 # 0-fp32 1-fp16 2-int8 (int8 not supported)
weightsPath: "configs/tasks/multi/isp_612m_best.onnx" # weightsPath: "configs/tasks/multi/isp_612m_best.onnx"
engineFile: "configs/tasks/multi/isp_612m_best_fp16.engine" # engineFile: "configs/tasks/multi/isp_612m_best_fp16.engine"
weightsPath: "configs/tasks/multi/isp_0718m_best.onnx"
engineFile: "configs/tasks/multi/isp_0718m_best_fp16.engine"
# calibImgPathFile: "configs/tasks/multi/isp_calib_imgs.txt" # calibImgPathFile: "configs/tasks/multi/isp_calib_imgs.txt"
# calibTableCache: "configs/tasks/multi/isp_calib_table.cache" # calibTableCache: "configs/tasks/multi/isp_calib_table.cache"
inferDynamic: false inferDynamic: false
inferBatchSize: 1 inferBatchSize: 1
inputWidth: 640 inputWidth: 960 # 640
inputHeight: 640 inputHeight: 544 # 640
maxBatchSize: 1 # used when build engine maxBatchSize: 1 # used when build engine
- -
name: MultiPostProcess name: MultiPostProcess
inputNames: [detections, seg_protos, depths, semantics, undistortVisImage] inputNames: [detections, seg_protos, depths, semantics, undistortVisImage]
outputNames: [out_instances, out_semantics, out_depths] outputNames: [out_instances, out_semantics, out_depths]
inputWidth: 640 inputWidth: 960 # 640
inputHeight: 640 inputHeight: 544 # 640
fixAspectRatio: false fixAspectRatio: false
# instance-seg # instance-seg
nmsThreshold: 0.45 nmsThreshold: 0.45
scoreThreshold: 0.2 # used when inference, can be modified scoreThreshold: 0.2 # used when inference, can be modified
truncatedThreshold: 0.05 truncatedThreshold: 0.05
maxOutputNum: 1000 maxOutputNum: 1000
rawDetectionLength: 25200 rawDetectionLength: 32130 #25200
keepTopK: 100 keepTopK: 100
segProtoDim: 32 segProtoDim: 32
instanceDownScale: 4 instanceDownScale: 4
......
...@@ -177,7 +177,7 @@ bool MultiPostProcess::Exec() { ...@@ -177,7 +177,7 @@ bool MultiPostProcess::Exec() {
auto seg = std::make_shared<ios::SemanticSeg>(); auto seg = std::make_shared<ios::SemanticSeg>();
seg->class_label = is; seg->class_label = is;
seg->class_name = semanticClassNames[is]; seg->class_name = semanticClassNames[is];
cv::Mat mask_mat = cv::Mat::zeros(inputWidth / semanticDownScale, inputHeight / semanticDownScale, CV_32FC1); cv::Mat mask_mat = cv::Mat::zeros(inputHeight / semanticDownScale, inputWidth / semanticDownScale, CV_32FC1);
for (int x = 0; x < inputWidth / semanticDownScale; x++) { for (int x = 0; x < inputWidth / semanticDownScale; x++) {
for (int y = 0; y < inputHeight / semanticDownScale; y++) { for (int y = 0; y < inputHeight / semanticDownScale; y++) {
float e = rawSemanticSegs[is * mask_mat.cols * mask_mat.rows + y * mask_mat.cols + x]; float e = rawSemanticSegs[is * mask_mat.cols * mask_mat.rows + y * mask_mat.cols + x];
...@@ -205,7 +205,7 @@ bool MultiPostProcess::Exec() { ...@@ -205,7 +205,7 @@ bool MultiPostProcess::Exec() {
// Depth // Depth
auto depth = std::make_shared<ios::Depth>(); auto depth = std::make_shared<ios::Depth>();
auto rawDepth = rawDepths->data_->mutable_cpu_data(); auto rawDepth = rawDepths->data_->mutable_cpu_data();
cv::Mat mask_mat = cv::Mat::zeros(inputWidth / depthDownScale, inputHeight / depthDownScale, CV_32FC1); cv::Mat mask_mat = cv::Mat::zeros(inputHeight / depthDownScale, inputWidth / depthDownScale, CV_32FC1);
for (int x = 0; x < inputWidth / depthDownScale; x++) { for (int x = 0; x < inputWidth / depthDownScale; x++) {
for (int y = 0; y < inputHeight / depthDownScale; y++) { for (int y = 0; y < inputHeight / depthDownScale; y++) {
float e = rawDepth[y * mask_mat.cols + x]; float e = rawDepth[y * mask_mat.cols + x];
......
test/multi_res.jpg

241 KB | W: | H:

test/multi_res.jpg

251 KB | W: | H:

test/multi_res.jpg
test/multi_res.jpg
test/multi_res.jpg
test/multi_res.jpg
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment