Preproc.h File
SimaAI pre-processing node wrapper. More...
Included Headers
#include "builder/ConfigJsonOverride.h"
#include "builder/ConfigJsonProvider.h"
#include "builder/NextCpuConfigurable.h"
#include "builder/Node.h"
#include "builder/OutputSpec.h"
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <vector>
Namespaces Index
| namespace | simaai |
| namespace | neat |
| namespace | nodes |
Classes Index
| struct | PreprocOptions |
| class | Preproc |
Description
SimaAI pre-processing node wrapper.
File Listing
The file content with the documentation metadata removed is:
20namespace simaai::neat {
23struct PreprocOptions {
24 PreprocOptions() = default;
25 explicit PreprocOptions(const simaai::neat::Model& model);
27 int input_width = 1280;
28 int input_height = 720;
29 int output_width = 640;
30 int output_height = 640;
31 int scaled_width = 640;
32 int scaled_height = 640;
34 int input_channels = 3;
35 int output_channels = 3;
36 int batch_size = 1;
39 bool aspect_ratio = true;
40 bool tessellate = true;
41 bool dynamic_input_dims = true;
43 int tile_width = 128;
44 int tile_height = 32;
45 int tile_channels = 3;
47 int input_offset = 0;
48 int input_stride = 1;
49 int output_stride = 1;
54 std::vector<float> channel_mean = {0.0f, 0.0f, 0.0f};
55 std::vector<float> channel_stddev = {1.0f, 1.0f, 1.0f};
57 std::string input_img_type = "NV12";
58 std::string output_img_type = "RGB";
59 std::string output_dtype = "EVXX_INT8";
60 std::string scaling_type = "BILINEAR";
61 std::string padding_type = "CENTER";
63 std::string graph_name = "preproc";
65 std::string element_name;
70 std::string upstream_name = "decoder";
71 std::string graph_input_name = "input_image";
73 std::vector<std::string> output_memory_order;
75 int num_buffers = 0;
76 int num_buffers_model = 0;
77 bool num_buffers_locked = false;
79 std::string config_path;
80 std::string config_dir;
81 bool keep_config = false;
82 std::optional<nlohmann::json> config_json;
91 explicit Preproc(PreprocOptions opt = {});
96 NodeCapsBehavior caps_behavior() const override {
99 bool has_config_json() const override {
102 bool wire_input_names(const std::vector<std::string>& upstream_names,
104 std::string backend_fragment(int node_index) const override;
105 std::vector<std::string> element_names(int node_index) const override;
106 OutputSpec output_spec(const OutputSpec& input) const override;
107 bool set_next_cpu_if_auto(const std::string& next_cpu) override;
108 bool override_config_json(const std::function<void(nlohmann::json&)>& edit,
111 const PreprocOptions& options() const {
114 const std::string& config_path() const {
117 const std::string& config_snapshot_path() const {
120 const nlohmann::json* config_json() const override;
125 PreprocOptions opt_;
133namespace simaai::neat::nodes {
134std::shared_ptr<simaai::neat::Node> Preproc(PreprocOptions opt = {});
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.