Compare commits
2 commits
ef764f2f84
...
f7a5497f0c
Author | SHA1 | Date | |
---|---|---|---|
|
f7a5497f0c | ||
|
d2f585af6c |
1 changed files with 8 additions and 3 deletions
11
src/main.zig
11
src/main.zig
|
@ -7,7 +7,7 @@ const hlo = @cImport({
|
|||
const Allocator = std.mem.Allocator;
|
||||
const assert = std.debug.assert;
|
||||
|
||||
const hef_file = "yolov3.hef";
|
||||
const hef_file = "yolov7.hef";
|
||||
const max_edge_layers = 32;
|
||||
|
||||
|
||||
|
@ -106,7 +106,7 @@ pub fn main() !void {
|
|||
status = hlo.hailo_get_input_vstream_info(input_vstreams[0], &stream_info);
|
||||
assert(status == hlo.HAILO_SUCCESS);
|
||||
|
||||
var output_info: hlo.hailo_output_vstream_info = undefined;
|
||||
var output_info: hlo.hailo_vstream_info_t = undefined;
|
||||
status = hlo.hailo_get_output_vstream_info(output_vstreams[0], &output_info);
|
||||
assert(status == hlo.HAILO_SUCCESS);
|
||||
std.debug.print("\nOutput info: {any}\n\n", .{ output_info });
|
||||
|
@ -120,8 +120,10 @@ pub fn main() !void {
|
|||
assert(status == hlo.HAILO_SUCCESS);
|
||||
std.debug.print("input flushed!\n", .{});
|
||||
|
||||
|
||||
|
||||
var output_frame_size: usize = 0;
|
||||
status = hlo.hailo_get_output_vstream_frame_size(input_vstreams[0], &output_frame_size);
|
||||
status = hlo.hailo_get_output_vstream_frame_size(output_vstreams[0], &output_frame_size);
|
||||
assert(status == hlo.HAILO_SUCCESS);
|
||||
std.debug.print("output frame size is: {d}\n", .{ output_frame_size });
|
||||
|
||||
|
@ -130,6 +132,9 @@ pub fn main() !void {
|
|||
|
||||
status = hlo.hailo_vstream_read_raw_buffer(output_vstreams[0], output_data.ptr, output_frame_size);
|
||||
assert(status == hlo.HAILO_SUCCESS);
|
||||
std.debug.print("Output finished reading! Cleanup time\n", .{});
|
||||
|
||||
std.debug.print("good luck\n\n{x}", .{ output_data });
|
||||
|
||||
|
||||
_ = hlo.hailo_release_output_vstreams(&output_vstreams, output_vstream_size);
|
||||
|
|
Loading…
Reference in a new issue