pcod-common v1.0.0
Shared preprocessing and postprocessing for point-cloud object detection
Loading...
Searching...
No Matches
model_manifest.hpp
Go to the documentation of this file.
1// Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
2// SPDX-License-Identifier: Apache-2.0
3
4#pragma once
5
6#include <array>
7#include <string>
8#include <vector>
9
10namespace pcod_common {
11
16 std::string type;
17 float min_value = 0.0f;
18 float max_value = 0.0f;
19 float epsilon = 1e-6f;
20 };
21
24 std::array<float, 2> x_range{};
25 std::array<float, 2> y_range{};
26 std::array<float, 2> z_range{};
27 float voxel_x = 0.0f;
28 float voxel_y = 0.0f;
29 float voxel_z = 0.0f;
31};
32
35 int grid_x = 0;
36 int grid_y = 0;
37 int num_classes = 0;
38 std::vector<std::string> class_names;
39};
40
43 std::vector<int> stride;
44 std::vector<int> up_stride;
46 std::array<int, 2> pillar_map_size{};
47 std::array<std::array<float, 2>, 3> pillar_map_range{};
48};
49
73
77 struct Files {
78 std::string model;
79 std::string checkpoint;
81 std::string triton_repository;
82 std::string triton_config;
83 std::string triton_model;
84 };
85
88 bool enabled = false;
89 std::string model_name;
90 std::string model_version;
91 };
92
94 struct Tensor {
95 std::string name;
96 std::string dtype;
97 std::vector<std::string> shape;
98 };
99
100 std::string bundle_name;
101 std::string export_format;
102 std::string backend;
103 std::string precision;
104 std::string device;
105 std::string head_name;
109 std::vector<Tensor> inputs;
110 std::vector<Tensor> outputs;
111 std::vector<std::array<float, 3>> size_priors;
112 std::string size_priors_source;
113};
114
121
129
131ModelManifest LoadModelManifest(const std::string& path);
133void ValidateModelManifest(const ModelManifest& manifest);
134
135} // namespace pcod_common
void ValidateModelManifest(const ModelManifest &manifest)
ModelManifest LoadModelManifest(const std::string &path)
std::string triton_config
Triton model configuration path.
std::string triton_model
Triton model artifact path.
std::string model
Exported model path.
std::string checkpoint
Source checkpoint path.
std::string resolved_training_config
Resolved training configuration path.
std::string triton_repository
Triton repository path.
std::string dtype
Triton datatype name.
std::vector< std::string > shape
Dimensions, including symbolic values.
std::string model_version
Triton model version.
bool enabled
Whether Triton artifacts were exported.
std::string export_timestamp_utc
UTC export timestamp.
std::string head_name
Detection head identifier.
std::vector< Tensor > outputs
Ordered output tensor contracts.
std::string precision
Numeric precision.
std::string bundle_name
Human-readable bundle name.
std::string device
Export target device.
TritonDeployment triton
Triton deployment metadata.
std::string export_format
Model serialization format.
std::string backend
Runtime backend.
Files files
Bundle-relative files.
std::vector< std::array< float, 3 > > size_priors
Per-class length, width, and height priors.
std::vector< Tensor > inputs
Ordered input tensor contracts.
std::string size_priors_source
Provenance of the size priors.
FrozenModelConfig model
Model architecture contract.
FrozenPreprocessConfig preprocessing
Preprocessing contract.
FrozenPostprocessConfig postprocessing
Postprocessing contract.
std::array< std::array< float, 2 >, 3 > pillar_map_range
XYZ pillar-map ranges.
std::array< int, 2 > pillar_map_size
Base pillar-map dimensions.
int first_up_stride
First decoder upsampling factor.
std::vector< int > stride
Backbone strides.
std::vector< int > up_stride
Decoder upsampling strides.
std::vector< std::string > class_names
Class names in output order.
int grid_y
Output grid size along Y.
int grid_x
Output grid size along X.
int num_classes
Number of semantic classes.
float voxel_y
Voxel width along Y.
PointFeatureNormalizationContract point_feature_normalization
Scalar feature contract.
std::array< float, 2 > x_range
Accepted X range.
std::array< float, 2 > z_range
Accepted Z range.
int num_point_features
Features expected per point.
std::array< float, 2 > y_range
Accepted Y range.
float voxel_z
Voxel width along Z.
float voxel_x
Voxel width along X.
int max_num_points
Maximum input point count.
RuntimeDefaults runtime_defaults
Overridable runtime defaults.
std::string schema_version
Manifest schema version.
FrozenContract frozen_contract
Non-overridable inference contract.
ArtifactConfig artifact
Artifact metadata.
int max_detections
Maximum final detection count.
float nms_iou_threshold
Rotated NMS IoU threshold.
std::vector< float > nms_score_thresholds
NMS class score thresholds.
float class_score_threshold
Decoder confidence threshold.
float value_threshold
Value-threshold normalization divisor.
PointFeature point_feature
Additional point-feature defaults.
Postprocessing postprocessing
Postprocessing defaults.
Preprocessing preprocessing
Preprocessing defaults.