Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
d95857ff
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d95857ff
编写于
10月 17, 2018
作者:
C
Calvin Miao
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Perception: used log in cybertron log system
上级
447d2e8a
变更
9
展开全部
显示空白变更内容
内联
并排
Showing
9 changed file
with
170 addition
and
207 deletion
+170
-207
modules/perception/camera/common/util.cc
modules/perception/camera/common/util.cc
+1
-1
modules/perception/camera/lib/obstacle/tracker/common/BUILD
modules/perception/camera/lib/obstacle/tracker/common/BUILD
+1
-0
modules/perception/camera/lib/obstacle/tracker/common/similar.cu
.../perception/camera/lib/obstacle/tracker/common/similar.cu
+4
-1
modules/perception/fusion/common/dst_evidence_test.cc
modules/perception/fusion/common/dst_evidence_test.cc
+14
-14
modules/perception/inference/tensorrt/rt_utils.cc
modules/perception/inference/tensorrt/rt_utils.cc
+2
-2
modules/perception/inference/test/inference_util_test.cc
modules/perception/inference/test/inference_util_test.cc
+0
-2
modules/perception/inference/tools/lane_sample.cc
modules/perception/inference/tools/lane_sample.cc
+2
-2
modules/perception/inference/utils/resize.cu
modules/perception/inference/utils/resize.cu
+4
-3
modules/perception/onboard/component/fusion_camera_detection_component.cc
...on/onboard/component/fusion_camera_detection_component.cc
+142
-182
未找到文件。
modules/perception/camera/common/util.cc
浏览文件 @
d95857ff
...
...
@@ -97,7 +97,7 @@ bool ResizeCPU(const base::Blob<uint8_t> &src_blob,
int
origin_height
=
src_blob
.
shape
(
1
);
int
origin_width
=
src_blob
.
shape
(
2
);
if
(
origin_channel
!=
dst_blob
->
shape
(
3
))
{
LOG
(
ERROR
)
<<
"channel should be the same after resize."
;
AERROR
<<
"channel should be the same after resize."
;
return
false
;
}
float
fx
=
static_cast
<
float
>
(
origin_width
)
/
static_cast
<
float
>
(
width
);
...
...
modules/perception/camera/lib/obstacle/tracker/common/BUILD
浏览文件 @
d95857ff
...
...
@@ -13,6 +13,7 @@ cuda_library(
],
deps
=
[
"@cuda"
,
"//cybertron"
,
"//modules/perception/camera/common:common"
,
"//modules/perception/inference/utils:inference_util_lib"
,
"//modules/perception/inference/utils:inference_gemm_lib"
,
...
...
modules/perception/camera/lib/obstacle/tracker/common/similar.cu
浏览文件 @
d95857ff
...
...
@@ -14,8 +14,11 @@
* limitations under the License.
*****************************************************************************/
#include "modules/perception/camera/lib/obstacle/tracker/common/similar.h"
#include <cblas.h>
#include <memory>
#include "cybertron/common/log.h"
#include "modules/perception/camera/common/util.h"
#include "modules/perception/inference/utils/gemm.h"
...
...
@@ -34,7 +37,7 @@ bool GPUSimilar::Calc(CameraFrame *frame1,
sim
->
Reshape
({
n
,
m
});
if
(
frame1
->
track_feature_blob
==
nullptr
)
{
LOG
(
ERROR
)
<<
"No feature blob"
;
AERROR
<<
"No feature blob"
;
return
false
;
}
int
dim
=
frame1
->
track_feature_blob
->
count
(
1
);
...
...
modules/perception/fusion/common/dst_evidence_test.cc
浏览文件 @
d95857ff
...
...
@@ -102,19 +102,19 @@ class DSTEvidenceTest : public ::testing::Test {
for
(
size_t
i
=
0
;
i
<
fused_spt_gt
.
size
();
++
i
)
{
fused_uct_gt
[
i
]
=
fused_pls_gt
[
i
]
-
fused_spt_gt
[
i
];
}
LOG
(
INFO
)
<<
fused_dst_
.
PrintBba
();
AINFO
<<
fused_dst_
.
PrintBba
();
// double sum = std::accumulate(fused_dst__vec.begin(),
// fused_dst__vec.end(), 0.0);
//
LOG(INFO)
<< boost::format("fused dst sum: %lf") % sum;
LOG
(
INFO
)
<<
"check dst"
;
//
AINFO
<< boost::format("fused dst sum: %lf") % sum;
AINFO
<<
"check dst"
;
vec_equal_
(
fused_dst_vec_
,
fused_dst_gt
);
LOG
(
INFO
)
<<
"check spt"
;
AINFO
<<
"check spt"
;
vec_equal_
(
fused_spt_vec_
,
fused_spt_gt
);
LOG
(
INFO
)
<<
"check pls"
;
AINFO
<<
"check pls"
;
vec_equal_
(
fused_pls_vec_
,
fused_pls_gt
);
LOG
(
INFO
)
<<
"check uct"
;
AINFO
<<
"check uct"
;
vec_equal_
(
fused_uct_vec_
,
fused_uct_gt
);
LOG
(
INFO
)
<<
"check prob"
;
AINFO
<<
"check prob"
;
vec_equal_
(
fused_prob_vec_
,
fused_prob_gt
);
}
void
add_dst_test2
()
{
...
...
@@ -136,16 +136,16 @@ class DSTEvidenceTest : public ::testing::Test {
for
(
size_t
i
=
0
;
i
<
fused_spt_gt
.
size
();
++
i
)
{
fused_uct_gt
[
i
]
=
fused_pls_gt
[
i
]
-
fused_spt_gt
[
i
];
}
LOG
(
INFO
)
<<
fused_dst_
.
PrintBba
();
LOG
(
INFO
)
<<
"check dst"
;
AINFO
<<
fused_dst_
.
PrintBba
();
AINFO
<<
"check dst"
;
vec_equal_
(
fused_dst_vec_
,
fused_dst_gt
);
LOG
(
INFO
)
<<
"check spt"
;
AINFO
<<
"check spt"
;
vec_equal_
(
fused_spt_vec_
,
fused_spt_gt
);
LOG
(
INFO
)
<<
"check pls"
;
AINFO
<<
"check pls"
;
vec_equal_
(
fused_pls_vec_
,
fused_pls_gt
);
LOG
(
INFO
)
<<
"check uct"
;
AINFO
<<
"check uct"
;
vec_equal_
(
fused_uct_vec_
,
fused_uct_gt
);
LOG
(
INFO
)
<<
"check prob"
;
AINFO
<<
"check prob"
;
vec_equal_
(
fused_prob_vec_
,
fused_prob_gt
);
}
void
multipy_dst_test
()
{
...
...
@@ -157,7 +157,7 @@ class DSTEvidenceTest : public ::testing::Test {
dst
.
SetBbaVec
(
dst_data
);
Dst
res
(
"test"
);
res
=
dst
*
0.8
;
LOG
(
INFO
)
<<
res
.
PrintBba
();
AINFO
<<
res
.
PrintBba
();
vec_equal_
(
res
.
GetBbaVec
(),
gt
);
}
...
...
modules/perception/inference/tensorrt/rt_utils.cc
浏览文件 @
d95857ff
...
...
@@ -31,7 +31,7 @@ bool ReadProtoFromTextFile(const std::string &filename,
google
::
protobuf
::
Message
*
proto
)
{
int
fd
=
open
(
filename
.
c_str
(),
O_RDONLY
);
if
(
fd
<
0
)
{
LOG
(
INFO
)
<<
"cannot open file "
<<
filename
;
AERROR
<<
"cannot open file "
<<
filename
;
return
false
;
}
google
::
protobuf
::
io
::
FileInputStream
raw_input
(
fd
);
...
...
@@ -46,7 +46,7 @@ bool ReadProtoFromBinaryFile(const std::string &filename,
google
::
protobuf
::
Message
*
proto
)
{
int
fd
=
open
(
filename
.
c_str
(),
O_RDONLY
);
if
(
fd
<
0
)
{
LOG
(
INFO
)
<<
"cannot open file "
<<
filename
;
AERROR
<<
"cannot open file "
<<
filename
;
return
false
;
}
google
::
protobuf
::
io
::
FileInputStream
raw_input
(
fd
);
...
...
modules/perception/inference/test/inference_util_test.cc
浏览文件 @
d95857ff
...
...
@@ -26,7 +26,6 @@
#include "modules/perception/inference/utils/gemm.h"
#include "modules/perception/inference/utils/resize.h"
#include "modules/perception/inference/utils/util.h"
#include "modules/perception/perception_base/base/log.h"
namespace
apollo
{
namespace
perception
{
...
...
@@ -126,7 +125,6 @@ void CudaUtilFun(int gpu_count, int thread_id) {
EXPECT_TRUE
(
inference
::
CudaUtil
::
set_device_id
(
i
));
}
handlers
[
thread_id
]
=
inference
::
CudaUtil
::
get_handler
();
LOG_INFO
<<
"Thread "
<<
thread_id
<<
" exit"
;
}
TEST
(
UtilTest
,
CudaUtilTest
)
{
...
...
modules/perception/inference/tools/lane_sample.cc
浏览文件 @
d95857ff
...
...
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
apollo
::
perception
::
inference
::
load_data
<
std
::
string
>
(
FLAGS_names_file
,
&
outputs
);
for
(
auto
name
:
outputs
)
{
LOG
(
INFO
)
<<
name
;
ADEBUG
<<
name
;
}
if
(
FLAGS_int8
)
{
...
...
@@ -94,7 +94,7 @@ int main(int argc, char **argv) {
for
(
auto
image_file
:
image_lists
)
{
cv
::
Mat
img
=
cv
::
imread
(
FLAGS_image_root
+
image_file
+
FLAGS_image_ext
,
CV_8UC1
);
LOG
(
INFO
)
<<
img
.
channels
();
ADEBUG
<<
img
.
channels
();
cv
::
Rect
roi
(
0
,
offset_y
,
img
.
cols
,
img
.
rows
-
offset_y
);
cv
::
Mat
img_roi
=
img
(
roi
);
img_roi
.
copyTo
(
img
);
...
...
modules/perception/inference/utils/resize.cu
浏览文件 @
d95857ff
...
...
@@ -18,6 +18,7 @@
#include <algorithm>
#include "cybertron/common/log.h"
#include "modules/perception/inference/utils/util.h"
#include "modules/perception/inference/utils/cuda_util.h"
...
...
@@ -169,7 +170,7 @@ bool ResizeGPU(const base::Image8U &src,
int
origin_width
=
src
.
cols
();
if
(
origin_channel
!=
dst
->
shape
(
3
))
{
LOG
(
ERROR
)
<<
"channel should be the same after resize."
;
AERROR
<<
"channel should be the same after resize."
;
return
false
;
}
float
fx
=
static_cast
<
float
>
(
origin_width
)
/
static_cast
<
float
>
(
width
);
...
...
@@ -213,7 +214,7 @@ bool ResizeGPU(const apollo::perception::base::Blob<uint8_t> &src_gpu,
// SRC: 1 H W C
// DST: 1 H W C
if
(
origin_channel
!=
channel
)
{
LOG
(
ERROR
)
<<
"channel should be the same after resize."
;
AERROR
<<
"channel should be the same after resize."
;
return
false
;
}
...
...
@@ -259,7 +260,7 @@ bool ResizeGPU(const base::Image8U &src,
// SRC: 1 H W C
// DST: 1 H W C
if
(
origin_channel
!=
channel
)
{
LOG
(
ERROR
)
<<
"channel should be the same after resize."
;
AERROR
<<
"channel should be the same after resize."
;
return
false
;
}
...
...
modules/perception/onboard/component/fusion_camera_detection_component.cc
浏览文件 @
d95857ff
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录