-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New applications release preparation
- Loading branch information
1 parent
e562bcf
commit eb31839
Showing
82 changed files
with
176,165 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# RZV2L AI Library - Driver Monitoring System | ||
|
||
## Work in progress | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
all: headcount_top_cam \ | ||
|
||
OPENCV_LINK = -isystem ${SDKTARGETSYSROOT}/usr/include/opencv4 \ | ||
-lopencv_imgcodecs -lopencv_imgproc -lopencv_core -lopencv_highgui | ||
|
||
BSP_SDK_FLAG = \ | ||
-ljpeg -lwebp -ltiff -lz -ltbb -lgtk-3 -lpng16 -lgdk-3 -lcairo \ | ||
-llzma -lrt -lcairo-gobject \ | ||
-lxkbcommon -lwayland-cursor -lwayland-egl -lwayland-client -lepoxy \ | ||
-lfribidi -lharfbuzz -lfontconfig \ | ||
-lglib-2.0 -lgobject-2.0 -lgdk_pixbuf-2.0 -lgmodule-2.0 -lpangocairo-1.0 \ | ||
-latk-1.0 -lgio-2.0 -lpango-1.0 -lfreetype -lpixman-1 -luuid -lpcre \ | ||
-lmount -lresolv -lexpat -lpangoft2-1.0 -lblkid \ | ||
|
||
# List all the files | ||
SRC_HC_CAM = examples/headcount_top_cam_example.cpp \ | ||
src/ascii.cpp \ | ||
src/ascii.h \ | ||
src/box.cpp \ | ||
src/box.h \ | ||
src/image.cpp \ | ||
src/image.h \ | ||
src/define.h \ | ||
src/camera.cpp \ | ||
src/camera.h \ | ||
src/wayland.cpp \ | ||
src/wayland.h \ | ||
src/sample_app_headcount_top_cam.cpp \ | ||
src/sample_app_headcount_top_cam.h \ | ||
|
||
INC_DIR_HC_CAM = -I src/ | ||
CFLAGS_HC_CAM = ${INC_DIR_HC_CAM} | ||
|
||
headcount_top_cam: ${SRC_HC_CAM} | ||
${CXX} -std=c++14 $(filter %.cpp,${SRC_HC_CAM}) ${CFLAGS_HC_CAM} \ | ||
${OPENCV_LINK} ${BSP_SDK_FLAG} \ | ||
-lpthread -O2 -ldl ${LDFLAGS} \ | ||
-o exe/11_headcount_top_cam_app | ||
|
||
clean: | ||
rm -rf exe/11_headcount_top_cam_app |
13 changes: 13 additions & 0 deletions
13
11_Head_count_top/Head_count_top_cam/etc/addrmap_in_yolov3_headcount_top_cam.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- | ||
name: "ALL" | ||
addr: 0x80000000 | ||
lst_elemsp: | ||
- { name: "data_in"} | ||
- { name: "data"} | ||
- { name: "data_out"} | ||
- { name: "work"} | ||
- { name: "weight"} | ||
- { name: "drp_config"} | ||
- { name: "drp_param"} | ||
- { name: "desc_aimac"} | ||
- { name: "desc_drp"} |
144 changes: 144 additions & 0 deletions
144
11_Head_count_top/Head_count_top_cam/etc/prepost_yolov3_headcount_top_cam.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
####################################### | ||
# Input data | ||
####################################### | ||
input_to_pre: | ||
- | ||
name: "yuv_data" | ||
format: "YUY2" | ||
order: "HWC" | ||
shape: [480, 640, 2] | ||
type: "uint8" | ||
|
||
input_to_body: | ||
- | ||
name: "input1" # must match ONNX's input name | ||
format: "RGB" | ||
order: "HWC" # Inference part can handle only HWC order | ||
shape: [416, 416, 3] # must match ONNX's input shape | ||
type: "fp16" # Inference part can handle only FP16 data | ||
|
||
####################################### | ||
# Output data | ||
####################################### | ||
output_from_body: | ||
- | ||
name: "output1" | ||
shape: [13, 13, 18] | ||
order: "HWC" | ||
type: "fp16" | ||
- | ||
name: "output2" | ||
shape: [26, 26, 18] | ||
order: "HWC" | ||
type: "fp16" | ||
- | ||
name: "output3" | ||
shape: [52, 52, 18] | ||
order: "HWC" | ||
type: "fp16" | ||
|
||
output_from_post: | ||
- | ||
name: "post_out1" | ||
shape: [18, 13, 13] | ||
order: "CHW" | ||
type: "fp32" | ||
- | ||
name: "post_out2" | ||
shape: [18, 26, 26] | ||
order: "CHW" | ||
type: "fp32" | ||
- | ||
name: "post_out3" | ||
shape: [18, 52, 52] | ||
order: "CHW" | ||
type: "fp32" | ||
|
||
####################################### | ||
# Preprocess | ||
####################################### | ||
preprocess: | ||
- | ||
src : ["yuv_data"] | ||
|
||
dest : ["input1"] | ||
|
||
operations: | ||
- | ||
op: conv_yuv2rgb | ||
param: | ||
DOUT_RGB_FORMAT: 0 # "RGB" | ||
|
||
- | ||
op: resize_hwc | ||
param: | ||
RESIZE_ALG: 1 # "Bilinear" | ||
DATA_TYPE: 0 # "uint8" | ||
shape_out: [416, 416] | ||
|
||
- | ||
op: cast_any_to_fp16 | ||
param: | ||
DIN_FORMAT: 0 # "uint8" | ||
|
||
- | ||
op: normalize | ||
param: | ||
DOUT_RGB_ORDER: 1 | ||
cof_add: [0.0, 0.0, 0.0] | ||
cof_mul: [0.00392157, 0.00392157, 0.00392157] | ||
|
||
####################################### | ||
# Postprocess | ||
####################################### | ||
postprocess: | ||
- | ||
src: ["output1"] | ||
|
||
dest: ["post_out1"] | ||
|
||
operations: | ||
- | ||
op : transpose | ||
param: | ||
WORD_SIZE: 1 # 2Byte | ||
IS_CHW2HWC: 0 # HWC to CHW | ||
|
||
- | ||
op : cast_fp16_fp32 | ||
param: | ||
CAST_MODE: 0 # FP16 to FP32 | ||
|
||
- | ||
src: ["output2"] | ||
|
||
dest: ["post_out2"] | ||
|
||
operations: | ||
- | ||
op : transpose | ||
param: | ||
WORD_SIZE: 1 # 2Byte | ||
IS_CHW2HWC: 0 # HWC to CHW | ||
|
||
- | ||
op : cast_fp16_fp32 | ||
param: | ||
CAST_MODE: 0 # FP16 to FP32 | ||
|
||
- | ||
src: ["output3"] | ||
|
||
dest: ["post_out3"] | ||
|
||
operations: | ||
- | ||
op : transpose | ||
param: | ||
WORD_SIZE: 1 # 2Byte | ||
IS_CHW2HWC: 0 # HWC to CHW | ||
|
||
- | ||
op : cast_fp16_fp32 | ||
param: | ||
CAST_MODE: 0 # FP16 to FP32 |
17 changes: 17 additions & 0 deletions
17
11_Head_count_top/Head_count_top_cam/examples/headcount_top_cam_example.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <string> | ||
#include <iostream> | ||
#include "sample_app_headcount_top_cam.h" | ||
|
||
using namespace std; | ||
|
||
|
||
int32_t main(int32_t argc, char * argv[]) | ||
{ | ||
/* Initialize the head count object*/ | ||
HeadCountTop HC = HeadCountTop(); | ||
|
||
/* Start the camera inference */ | ||
HC.run_camera_inference(); | ||
|
||
return 0; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Head |
Binary file added
BIN
+509 KB
11_Head_count_top/Head_count_top_cam/exe/yolov3_headcount_top_cam/aimac_desc.bin
Binary file not shown.
Binary file added
BIN
+864 Bytes
11_Head_count_top/Head_count_top_cam/exe/yolov3_headcount_top_cam/drp_desc.bin
Binary file not shown.
52 changes: 52 additions & 0 deletions
52
11_Head_count_top/Head_count_top_cam/exe/yolov3_headcount_top_cam/drp_lib_info.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
11 # driver version v0.2 | ||
44 # driver version >v0.3 | ||
# conv_yuv2rgb [MASK : ON] | ||
# resize_hwc [MASK : ON] | ||
# imagescaler [MASK : ON] | ||
# resize_onnx [MASK : ON] | ||
# resize_onnx [MASK : ON] | ||
# transpose [MASK : ON] | ||
# cast_fp16_fp32 [MASK : ON] | ||
# transpose [MASK : ON] | ||
# cast_fp16_fp32 [MASK : ON] | ||
# transpose [MASK : ON] | ||
# cast_fp16_fp32 [MASK : ON] | ||
# ============================ | ||
# Address data in drp_param.bin | ||
# DRP LIB name[Layer Name] | ||
# [Start position], [Size(Byte)], [Param name], [Value] | ||
conv_yuv2rgb[post_0_0_conv_yuv2rgb] | ||
Start:0[Byte],Size:4[Byte],Param:raddr,Value:0x80000000 | ||
Start:4[Byte],Size:4[Byte],Param:waddr,Value:0x80096000 | ||
resize_hwc[post_0_1_resize_hwc] | ||
Start:56[Byte],Size:4[Byte],Param:raddr,Value:0x80096000 | ||
Start:60[Byte],Size:4[Byte],Param:waddr,Value:0x80177000 | ||
imagescaler[post_0_1_imagescaler] | ||
Start:112[Byte],Size:4[Byte],Param:raddr,Value:0x80177000 | ||
Start:116[Byte],Size:4[Byte],Param:waddr,Value:0x801f5c00 | ||
Start:160[Byte],Size:4[Byte],Param:ADD_ADDR,Value:0x86983a80 | ||
Start:164[Byte],Size:4[Byte],Param:MUL_ADDR,Value:0x86983a88 | ||
resize_onnx[/module_list.85/upsample_85/Resize_output_0] | ||
Start:176[Byte],Size:4[Byte],Param:raddr,Value:0x85c91000 | ||
Start:180[Byte],Size:4[Byte],Param:waddr,Value:0x85ca6200 | ||
resize_onnx[/module_list.97/upsample_97/Resize_output_0] | ||
Start:232[Byte],Size:4[Byte],Param:raddr,Value:0x8609c200 | ||
Start:236[Byte],Size:4[Byte],Param:waddr,Value:0x860c6600 | ||
transpose[post_0_0_transpose] | ||
Start:288[Byte],Size:4[Byte],Param:raddr,Value:0x868b2600 | ||
Start:292[Byte],Size:4[Byte],Param:waddr,Value:0x868d1914 | ||
cast_fp16_fp32[post_0_1_cast_fp16_fp32] | ||
Start:344[Byte],Size:4[Byte],Param:raddr,Value:0x868d1914 | ||
Start:348[Byte],Size:4[Byte],Param:waddr,Value:0x868f0c40 | ||
transpose[post_1_0_transpose] | ||
Start:400[Byte],Size:4[Byte],Param:raddr,Value:0x868b3dc4 | ||
Start:404[Byte],Size:4[Byte],Param:waddr,Value:0x868d30d8 | ||
cast_fp16_fp32[post_1_1_cast_fp16_fp32] | ||
Start:456[Byte],Size:4[Byte],Param:raddr,Value:0x868d30d8 | ||
Start:460[Byte],Size:4[Byte],Param:waddr,Value:0x868f3bc8 | ||
transpose[post_2_0_transpose] | ||
Start:512[Byte],Size:4[Byte],Param:raddr,Value:0x868b9cd4 | ||
Start:516[Byte],Size:4[Byte],Param:waddr,Value:0x868d8fe8 | ||
cast_fp16_fp32[post_2_1_cast_fp16_fp32] | ||
Start:568[Byte],Size:4[Byte],Param:raddr,Value:0x868d8fe8 | ||
Start:572[Byte],Size:4[Byte],Param:waddr,Value:0x868ff9e8 |
Binary file added
BIN
+624 Bytes
11_Head_count_top/Head_count_top_cam/exe/yolov3_headcount_top_cam/drp_param.bin
Binary file not shown.
Oops, something went wrong.