Program Listing for File holoinfer.hpp

Return to documentation for file (modules/holoinfer/src/include/holoinfer.hpp)

Copy
Copied!
            

/* * SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _HOLOSCAN_INFER_API_H #define _HOLOSCAN_INFER_API_H #include <iostream> #include <map> #include <memory> #include <string> #include <vector> #include "holoinfer_buffer.hpp" namespace holoscan { namespace inference { class _HOLOSCAN_EXTERNAL_API_ InferContext { public: InferContext(); ~InferContext(); InferStatus set_inference_params(std::shared_ptr<InferenceSpecs>& inference_specs); InferStatus execute_inference(DataMap& preprocess_data_map, DataMap& output_data_map); DimType get_output_dimensions() const; }; class _HOLOSCAN_EXTERNAL_API_ ProcessorContext { public: ProcessorContext(); InferStatus initialize(const MultiMappings& process_operations, const std::string config_path); InferStatus process(const MultiMappings& tensor_oper_map, const MultiMappings& in_out_tensor_map, DataMap& processed_result_map, const std::map<std::string, std::vector<int>>& dimension_map); DataMap get_processed_data() const; DimType get_processed_data_dims() const; }; } // namespace inference } // namespace holoscan #endif

© Copyright 2022-2023, NVIDIA. Last updated on Feb 9, 2024.