Compare commits
No commits in common. "f7a5497f0c3f5afd3aedfdf9a239dbff9fe99a6a" and "ef764f2f84aa24d562e84a542d9df6349ccf9dfb" have entirely different histories.
f7a5497f0c
...
ef764f2f84
1 changed files with 3 additions and 8 deletions
11
src/main.zig
11
src/main.zig
|
@ -7,7 +7,7 @@ const hlo = @cImport({
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
|
|
||||||
const hef_file = "yolov7.hef";
|
const hef_file = "yolov3.hef";
|
||||||
const max_edge_layers = 32;
|
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);
|
status = hlo.hailo_get_input_vstream_info(input_vstreams[0], &stream_info);
|
||||||
assert(status == hlo.HAILO_SUCCESS);
|
assert(status == hlo.HAILO_SUCCESS);
|
||||||
|
|
||||||
var output_info: hlo.hailo_vstream_info_t = undefined;
|
var output_info: hlo.hailo_output_vstream_info = undefined;
|
||||||
status = hlo.hailo_get_output_vstream_info(output_vstreams[0], &output_info);
|
status = hlo.hailo_get_output_vstream_info(output_vstreams[0], &output_info);
|
||||||
assert(status == hlo.HAILO_SUCCESS);
|
assert(status == hlo.HAILO_SUCCESS);
|
||||||
std.debug.print("\nOutput info: {any}\n\n", .{ output_info });
|
std.debug.print("\nOutput info: {any}\n\n", .{ output_info });
|
||||||
|
@ -120,10 +120,8 @@ pub fn main() !void {
|
||||||
assert(status == hlo.HAILO_SUCCESS);
|
assert(status == hlo.HAILO_SUCCESS);
|
||||||
std.debug.print("input flushed!\n", .{});
|
std.debug.print("input flushed!\n", .{});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var output_frame_size: usize = 0;
|
var output_frame_size: usize = 0;
|
||||||
status = hlo.hailo_get_output_vstream_frame_size(output_vstreams[0], &output_frame_size);
|
status = hlo.hailo_get_output_vstream_frame_size(input_vstreams[0], &output_frame_size);
|
||||||
assert(status == hlo.HAILO_SUCCESS);
|
assert(status == hlo.HAILO_SUCCESS);
|
||||||
std.debug.print("output frame size is: {d}\n", .{ output_frame_size });
|
std.debug.print("output frame size is: {d}\n", .{ output_frame_size });
|
||||||
|
|
||||||
|
@ -132,9 +130,6 @@ pub fn main() !void {
|
||||||
|
|
||||||
status = hlo.hailo_vstream_read_raw_buffer(output_vstreams[0], output_data.ptr, output_frame_size);
|
status = hlo.hailo_vstream_read_raw_buffer(output_vstreams[0], output_data.ptr, output_frame_size);
|
||||||
assert(status == hlo.HAILO_SUCCESS);
|
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);
|
_ = hlo.hailo_release_output_vstreams(&output_vstreams, output_vstream_size);
|
||||||
|
|
Loading…
Reference in a new issue