-
Notifications
You must be signed in to change notification settings - Fork 222
/
Copy pathvehicle_body_scan_sample.cpp
32 lines (26 loc) · 1.12 KB
/
vehicle_body_scan_sample.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "../nodes/vp_image_src_node.h"
#include "../nodes/infers/vp_trt_vehicle_scanner.h"
#include "../nodes/osd/vp_osd_node.h"
#include "../nodes/vp_screen_des_node.h"
#include "../utils/analysis_board/vp_analysis_board.h"
/*
* ## vehicle_body_scan_sample ##
* detect wheels and vehicle type based on side view of vehicle
*/
int main() {
VP_SET_LOG_LEVEL(vp_utils::vp_log_level::INFO);
VP_LOGGER_INIT();
// create nodes
auto image_src_0 = std::make_shared<vp_nodes::vp_image_src_node>("image_src_0", 0, "./vp_data/test_images/body/%d.jpg");
auto vehicle_scanner = std::make_shared<vp_nodes::vp_trt_vehicle_scanner>("vehicle_scanner", "./vp_data/models/trt/vehicle/vehicle_scan_v8.5.trt");
auto osd = std::make_shared<vp_nodes::vp_osd_node>("osd");
auto screen_des_0 = std::make_shared<vp_nodes::vp_screen_des_node>("screen_des_0", 0);
// construct pipeline
vehicle_scanner->attach_to({image_src_0});
osd->attach_to({vehicle_scanner});
screen_des_0->attach_to({osd});
image_src_0->start();
// for debug purpose
vp_utils::vp_analysis_board board({image_src_0});
board.display();
}