diff --git a/src/热成像识别/README.md b/src/热成像识别/README.md index 90a1c71d..3016c660 100644 --- a/src/热成像识别/README.md +++ b/src/热成像识别/README.md @@ -37,22 +37,54 @@ SAFE → CAUTION → WARNING → DANGER → CRITICAL → SUSPECTED_FIRE ``` 热成像识别/ -├── cpp/ C++ 实现 -│ ├── CMakeLists.txt 构建配置 +├── cpp/ C++ 检测器实现 +│ ├── CMakeLists.txt 构建配置 │ ├── include/ -│ │ ├── thermal_types.h 类型定义(威胁类型、等级、配置参数) -│ │ ├── thermal_preprocessor.h 预处理模块接口 -│ │ └── thermal_detector.h 检测模块接口 +│ │ ├── thermal_types.h 类型定义(威胁类型、等级、配置参数) +│ │ ├── thermal_preprocessor.h 预处理模块接口 +│ │ └── thermal_detector.h 检测模块接口 │ ├── src/ -│ │ ├── thermal_preprocessor.cpp 预处理实现 -│ │ ├── thermal_detector.cpp 检测实现 -│ │ └── main.cpp 命令行入口 -│ └── thermal_detector.exe 编译产物(Windows x64) +│ │ ├── thermal_preprocessor.cpp 预处理实现(自适应温度映射) +│ │ ├── thermal_detector.cpp 检测实现(三阶段检测) +│ │ └── main.cpp 命令行入口(classical / yolo 两种模式) +│ └── models/ +│ └── yolov8n_thermal.onnx ONNX 推理模型 │ -├── README.md 本文档 +├── HIT-UAV-Infrared-Thermal-Dataset-v1.2/ HIT-UAV 红外热成像数据集 (2898张) +│ ├── normal_json/ JSON 标注(train/val/test 划分) +│ ├── normal_xml/ VOC XML 标注 + JPEGImages +│ ├── rotate_json/ 旋转增强 JSON 标注 +│ ├── rotate_xml/ 旋转增强 VOC 标注 +│ └── tools/ 数据集工具 │ -└── test/ - └── test_images/ 12 张测试热成像图片 +├── hituav_dataset/ HIT-UAV 转换后的 YOLO 格式数据集 +│ ├── data.yaml YOLO 数据集配置(1 类: Person) +│ ├── images/{train,val}/ 训练/验证图像 +│ └── labels/{train,val}/ YOLO 格式标注 +│ +├── test/ 测试数据(手动标注) +│ ├── labels.json 24 条测试标注 +│ ├── test_images/ 18 张测试热成像图片(含无人机实拍 + 仿真截图) +│ └── yolo_dataset/ 手动标注转换的 YOLO 数据集(2 类: Person, Hotspot) +│ +├── runs/ YOLO 训练输出 +│ └── train/thermal_yolov8n/ YOLOv8n 训练结果 +│ +├── README.md 本文档 +│ +├── convert_hituav.py HIT-UAV → YOLO 格式转换 +├── convert_labels.py 手动标注 → YOLO 格式转换 +├── train_yolo.py YOLOv8 模型训练 +├── export_onnx.py PyTorch → ONNX 导出 +├── thermal_yolo_detect.py YOLO 检测脚本(支持 classical + yolo 对比) +├── yolo_detector.py YOLO 推理封装 +├── auto_tune.py 传统算法超参数自动调优 +├── label_tool.py 手动标注工具 +├── thermal_colorize.py 热成像伪彩色增强 +├── best_params.json 自动调优最优参数 +├── yolov8n_thermal.pt 微调后的 YOLOv8 权重 +├── yolov8n_thermal.onnx 导出的 ONNX 模型 +└── yolov8n.pt / yolov8n.onnx 预训练基线模型 ``` --- diff --git a/src/热成像识别/__pycache__/thermal_yolo_detect.cpython-311.pyc b/src/热成像识别/__pycache__/thermal_yolo_detect.cpython-311.pyc new file mode 100644 index 00000000..df9bf27b Binary files /dev/null and b/src/热成像识别/__pycache__/thermal_yolo_detect.cpython-311.pyc differ diff --git a/src/热成像识别/__pycache__/yolo_detector.cpython-311.pyc b/src/热成像识别/__pycache__/yolo_detector.cpython-311.pyc new file mode 100644 index 00000000..f6da8826 Binary files /dev/null and b/src/热成像识别/__pycache__/yolo_detector.cpython-311.pyc differ diff --git a/src/热成像识别/auto_tune.py b/src/热成像识别/auto_tune.py deleted file mode 100644 index 098c383f..00000000 --- a/src/热成像识别/auto_tune.py +++ /dev/null @@ -1,475 +0,0 @@ -""" -热成像检测参数自动优化 — 基于标注数据调优 C++ 检测器参数 - -通过调用 thermal_detector.exe (--json 模式) 运行检测, -将结果与手动标注的 ground truth 比对,搜索最优参数。 - -由于 C++ 参数在头文件中是编译时常量,本工具的优化策略是: - 1. 运行默认参数检测,计算 baseline F1 - 2. 生成候选参数值,逐个写入临时配置文件 - 3. 输出最优参数供用户手动更新到 thermal_types.h - -用法: - python auto_tune.py # 使用 labels.json + test/test_images/ - python auto_tune.py --label-file my_labels.json # 指定标注文件 - python auto_tune.py --image-dir path/to/images # 指定图片目录 - python auto_tune.py --metric precision # 优化目标改为精确率 - python auto_tune.py --export best_params.json # 导出最优参数 -""" - -import cv2 -import numpy as np -import json -import os -import sys -import glob -import subprocess -import re -import copy - -# 标注类型 → 检测器输出类型映射 -LABEL_TO_DETECT = { - 'Person': 'Person', - 'Barrel_Overheat': 'Barrel Overheat', - 'Cold_Weapon': 'Cold Weapon', - 'Flash_Residue': 'Flash Residue', - 'Hotspot': 'Hotspot', -} - - -def load_labels(label_path): - with open(label_path, 'r', encoding='utf-8') as f: - return json.load(f) - - -def iou(box_a, box_b): - """计算两个 bbox 的 IoU。box = [x, y, w, h]""" - ax1, ay1 = box_a[0], box_a[1] - ax2, ay2 = ax1 + box_a[2], ay1 + box_a[3] - bx1, by1 = box_b[0], box_b[1] - bx2, by2 = bx1 + box_b[2], by1 + box_b[3] - - ix1 = max(ax1, bx1) - iy1 = max(ay1, by1) - ix2 = min(ax2, bx2) - iy2 = min(ay2, by2) - - inter = max(0, ix2 - ix1) * max(0, iy2 - iy1) - area_a = box_a[2] * box_a[3] - area_b = box_b[2] * box_b[3] - union = area_a + area_b - inter - return inter / max(union, 1) - - -def match_detections(gt_labels, detections, iou_threshold=0.1): - """匹配 ground truth 和检测结果,返回 TP, FP, FN - - 使用混合匹配策略:先尝试 IoU,若 IoU < threshold 则用中心点距离匹配 - """ - gt_by_type = {} - for lb in gt_labels: - t = LABEL_TO_DETECT.get(lb['type'], lb['type']) - gt_by_type.setdefault(t, []).append(lb) - - det_by_type = {} - for d in detections: - t = d.get('type', '') - det_by_type.setdefault(t, []).append(d) - - tp, fp, fn = 0, 0, 0 - - all_types = set(list(gt_by_type.keys()) + list(det_by_type.keys())) - for t in all_types: - gts = gt_by_type.get(t, []) - dets = det_by_type.get(t, []) - - matched_gt = set() - matched_det = set() - - pairs = [] - for gi, g in enumerate(gts): - gx = g['bbox'][0] + g['bbox'][2] / 2 - gy = g['bbox'][1] + g['bbox'][3] / 2 - for di, d in enumerate(dets): - db = d.get('bbox', {}) - dbox = [db.get('x', 0), db.get('y', 0), db.get('w', 0), db.get('h', 0)] - dx = dbox[0] + dbox[2] / 2 - dy = dbox[1] + dbox[3] / 2 - - # IoU 匹配 - iou_score = iou(g['bbox'], dbox) - - # 中心点距离匹配(当 IoU 低时) - gt_size = max(g['bbox'][2], g['bbox'][3]) - det_size = max(dbox[2], dbox[3]) - max_size = max(gt_size, det_size, 1) - dist = ((gx - dx) ** 2 + (gy - dy) ** 2) ** 0.5 - dist_ratio = dist / max_size - - # 综合分数:IoU 优先,中心点距离兜底 - if iou_score >= iou_threshold: - score = iou_score - elif dist_ratio < 1.5: - score = iou_threshold * 0.5 # 给一个较低的匹配分数 - else: - continue - - pairs.append((score, gi, di)) - - pairs.sort(reverse=True) - for score, gi, di in pairs: - if gi not in matched_gt and di not in matched_det: - matched_gt.add(gi) - matched_det.add(di) - - tp += len(matched_gt) - fp += len(dets) - len(matched_det) - fn += len(gts) - len(matched_gt) - - return tp, fp, fn - - -def _get_env_with_opencv(): - """构建包含 OpenCV DLL 路径的环境变量""" - import copy - env = copy.deepcopy(os.environ) - # 常见 OpenCV 安装位置 - opencv_paths = [ - os.path.join(os.path.expanduser('~'), '.conda', 'envs', 'opencv-build', 'Library', 'bin'), - os.path.join(os.path.expanduser('~'), 'miniconda3', 'envs', 'opencv-build', 'Library', 'bin'), - os.path.join(os.path.expanduser('~'), 'anaconda3', 'envs', 'opencv-build', 'Library', 'bin'), - os.path.join(os.path.expanduser('~'), 'opencv', 'build', 'x64', 'vc16', 'bin'), - os.path.join(os.path.expanduser('~'), 'opencv', 'build', 'x64', 'vc17', 'bin'), - ] - extra = ';'.join(p for p in opencv_paths if os.path.isdir(p)) - if extra: - env['PATH'] = extra + ';' + env.get('PATH', '') - return env - - -def run_detector(exe_path, image_path): - """调用 C++ 检测器,返回 JSON 结果""" - try: - env = _get_env_with_opencv() - result = subprocess.run( - [exe_path, image_path, '--json', '--no-show'], - capture_output=True, text=True, timeout=30, - encoding='utf-8', errors='replace', - env=env, - ) - output = result.stdout.strip() - - # 找到 JSON 块 - start = output.find('{') - end = output.rfind('}') + 1 - if start >= 0 and end > start: - json_str = output[start:end] - # 移除 file 字段(中文路径含反斜杠会导致 JSON 解析失败) - import re - json_str = re.sub(r'"file"\s*:\s*"[^"]*"\s*,?', '', json_str) - # 修复尾部逗号 - json_str = re.sub(r',\s*}', '}', json_str) - json_str = re.sub(r',\s*]', ']', json_str) - return json.loads(json_str) - except Exception as e: - print(f" 检测器运行失败: {e}") - return None - - -def evaluate_default(exe_path, image_paths, all_labels): - """用默认参数评估所有图片""" - total_tp, total_fp, total_fn = 0, 0, 0 - - for path in image_paths: - fname = os.path.basename(path) - if fname not in all_labels: - continue - - result = run_detector(exe_path, path) - if result is None: - continue - - detections = result.get('detections', []) - tp, fp, fn = match_detections(all_labels[fname], detections) - total_tp += tp - total_fp += fp - total_fn += fn - - precision = total_tp / max(total_tp + total_fp, 1) - recall = total_tp / max(total_tp + total_fn, 1) - f1 = 2 * precision * recall / max(precision + recall, 1e-8) - - return { - 'f1': f1, 'precision': precision, 'recall': recall, - 'tp': total_tp, 'fp': total_fp, 'fn': total_fn, - } - - -def evaluate_with_filter(exe_path, image_paths, all_labels, filters): - """用默认参数运行检测器,但对结果做后处理过滤来模拟参数变化 - - 可以模拟的参数: - - confidence_threshold: 过滤低置信度检测 - - hotspot_max_count: 限制热点数量 - - 按类型过滤面积范围 - """ - total_tp, total_fp, total_fn = 0, 0, 0 - - conf_thresh = filters.get('confidence_threshold', 0.0) - hotspot_max = filters.get('hotspot_max_count', 999) - person_min_area = filters.get('person_min_area', 0) - - for path in image_paths: - fname = os.path.basename(path) - if fname not in all_labels: - continue - - result = run_detector(exe_path, path) - if result is None: - continue - - detections = result.get('detections', []) - - # 后处理过滤 - filtered = [] - hotspot_count = 0 - for d in detections: - # 置信度过滤 - if d.get('confidence', 1.0) < conf_thresh: - continue - # 面积过滤 (Person) - bbox = d.get('bbox', {}) - area = bbox.get('w', 0) * bbox.get('h', 0) - if d.get('type') == 'Person' and area < person_min_area: - continue - # 热点数量限制 - if d.get('type') == 'Hotspot': - hotspot_count += 1 - if hotspot_count > hotspot_max: - continue - filtered.append(d) - - tp, fp, fn = match_detections(all_labels[fname], filtered) - total_tp += tp - total_fp += fp - total_fn += fn - - precision = total_tp / max(total_tp + total_fp, 1) - recall = total_tp / max(total_tp + total_fn, 1) - f1 = 2 * precision * recall / max(precision + recall, 1e-8) - - return { - 'f1': f1, 'precision': precision, 'recall': recall, - 'tp': total_tp, 'fp': total_fp, 'fn': total_fn, - } - - -def search_best_params(exe_path, image_paths, all_labels, metric='f1'): - """搜索最优参数组合""" - print(f"\n{'='*60}") - print(f"参数优化 — 调用 C++ 检测器") - print(f"目标: {metric}") - print(f"标注图片: {len(all_labels)} 张, 标注数: {sum(len(v) for v in all_labels.values())}") - print(f"检测器: {exe_path}") - print(f"{'='*60}\n") - - # 基准评估 - print("基准参数评估...") - baseline = evaluate_default(exe_path, image_paths, all_labels) - print(f" 基准: F1={baseline['f1']:.3f} P={baseline['precision']:.3f} R={baseline['recall']:.3f}") - print(f" TP={baseline['tp']} FP={baseline['fp']} FN={baseline['fn']}\n") - - # 可搜索参数 (通过后处理模拟) - search_grid = { - 'confidence_threshold': [0.10, 0.20, 0.25, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80], - 'hotspot_max_count': [3, 5, 8, 10, 15, 20], - 'person_min_area': [100, 200, 300, 400, 500, 600, 800], - } - - best_params = {} - best_score = baseline[metric] - improved = True - iteration = 0 - - while improved: - improved = False - iteration += 1 - print(f"--- 第 {iteration} 轮搜索 ---") - - for param_name, values in search_grid.items(): - current_val = best_params.get(param_name, values[len(values)//2]) - for val in values: - test_params = dict(best_params) - test_params[param_name] = val - - result = evaluate_with_filter( - exe_path, image_paths, all_labels, test_params - ) - score = result[metric] - - if score > best_score + 0.001: - old_val = best_params.get(param_name, '?') - best_params[param_name] = val - best_score = score - improved = True - print(f" {param_name}: {old_val} -> {val} " - f"{metric}={score:.3f} " - f"(P={result['precision']:.3f} R={result['recall']:.3f} " - f"TP={result['tp']} FP={result['fp']} FN={result['fn']})") - - if not improved: - print(" 未找到更优参数,搜索结束") - - # 最终结果 - print(f"\n{'='*60}") - print(f"优化结果 — {metric}={best_score:.3f}") - print(f"{'='*60}") - - if best_params: - print("\n需要修改的参数 (在 cpp/include/thermal_types.h 中):") - param_map = { - 'confidence_threshold': ('confidence_threshold', '通用置信度下限'), - 'hotspot_max_count': ('hotspot_max_count', '最多保留热点数'), - 'person_min_area': ('person_min_area', '人员最小面积'), - } - for k, v in best_params.items(): - info = param_map.get(k, (k, '')) - cxx_name = info[0] - desc = info[1] - print(f" {cxx_name} = {v} // {desc}") - - if cxx_name == 'confidence_threshold': - print(f" -> 在 thermal_detector.cpp 的 detect() 中修改阈值判断") - elif cxx_name == 'person_min_area': - print(f" -> 在 DetectorConfig::person_min_area 中修改") - elif cxx_name == 'hotspot_max_count': - print(f" -> 在 DetectorConfig::hotspot_max_count 中修改") - else: - print("\n默认参数已经是最优的,无需修改。") - - final = evaluate_with_filter(exe_path, image_paths, all_labels, best_params) if best_params else baseline - print(f"\n最终指标: F1={final['f1']:.3f} P={final['precision']:.3f} R={final['recall']:.3f}") - print(f" TP={final['tp']} FP={final['fp']} FN={final['fn']}") - - # 对比 - if best_params: - print(f"\n对比:") - print(f" 优化前: F1={baseline['f1']:.3f} TP={baseline['tp']} FP={baseline['fp']} FN={baseline['fn']}") - print(f" 优化后: F1={final['f1']:.3f} TP={final['tp']} FP={final['fp']} FN={final['fn']}") - - return best_params, final - - -def export_params(params, metrics, output_path): - data = { - 'params': params, - 'metrics': metrics, - 'note': '由 auto_tune.py 自动优化生成,需手动更新到 cpp/include/thermal_types.h', - } - with open(output_path, 'w', encoding='utf-8') as f: - json.dump(data, f, ensure_ascii=False, indent=2) - print(f"\n参数已导出: {output_path}") - - -def find_exe(): - """查找 thermal_detector.exe""" - script_dir = os.path.dirname(os.path.abspath(__file__)) - # 同级 cpp 目录 - exe = os.path.join(script_dir, 'cpp', 'thermal_detector.exe') - if os.path.isfile(exe): - return exe - # build 目录 - exe = os.path.join(script_dir, 'cpp', 'build', 'Release', 'thermal_detector.exe') - if os.path.isfile(exe): - return exe - return None - - -def main(): - script_dir = os.path.dirname(os.path.abspath(__file__)) - - args = sys.argv[1:] - label_file = None - image_dir = os.path.join(script_dir, 'test', 'test_images') - metric = 'f1' - export_path = None - exe_path = None - - i = 0 - while i < len(args): - if args[i] == '--label-file' and i + 1 < len(args): - label_file = args[i + 1] - i += 2 - elif args[i] == '--image-dir' and i + 1 < len(args): - image_dir = args[i + 1] - i += 2 - elif args[i] == '--metric' and i + 1 < len(args): - metric = args[i + 1] - i += 2 - elif args[i] == '--export' and i + 1 < len(args): - export_path = args[i + 1] - i += 2 - elif args[i] == '--exe' and i + 1 < len(args): - exe_path = args[i + 1] - i += 2 - else: - i += 1 - - # 检测器 - if exe_path is None: - exe_path = find_exe() - if exe_path is None: - print("找不到 thermal_detector.exe") - print("用法: python auto_tune.py --exe path/to/thermal_detector.exe") - return - print(f"检测器: {exe_path}") - - # 标注 - if label_file is None: - label_file = os.path.join(script_dir, 'test', 'labels.json') - if not os.path.exists(label_file): - label_file_alt = os.path.join(script_dir, 'labels.json') - if os.path.exists(label_file_alt): - label_file = label_file_alt - else: - print(f"标注文件不存在: {label_file}") - print("请先运行 label_tool.py 创建标注:") - print(" python label_tool.py") - return - - all_labels = load_labels(label_file) - # 过滤掉 result_ 开头的图片(不对已标注的输出图做评估) - all_labels = {k: v for k, v in all_labels.items() if not os.path.basename(k).startswith('result_')} - print(f"标注文件: {label_file}") - print(f"标注图片数: {len(all_labels)} (已过滤 result_ 图像)") - - if not all_labels: - print("标注为空,请先标注图片") - return - - # 图片 - image_paths = [] - for ext in ['*.jpg', '*.jpeg', '*.png', '*.bmp', '*.tif']: - image_paths.extend(glob.glob(os.path.join(image_dir, ext))) - image_paths.sort() - labeled_images = [p for p in image_paths if os.path.basename(p) in all_labels] - print(f"图片目录: {image_dir}") - print(f"有标注的图片: {len(labeled_images)} / {len(image_paths)}") - - if not labeled_images: - print("没有匹配到有标注的图片") - return - - # 搜索 - best_params, metrics = search_best_params(exe_path, labeled_images, all_labels, metric) - - # 导出 - if export_path: - export_params(best_params, metrics, export_path) - else: - default_export = os.path.join(script_dir, 'best_params.json') - export_params(best_params, metrics, default_export) - - -if __name__ == '__main__': - main() diff --git a/src/热成像识别/best_params.json b/src/热成像识别/best_params.json deleted file mode 100644 index 98798ae0..00000000 --- a/src/热成像识别/best_params.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "params": { - "confidence_threshold": 0.5 - }, - "metrics": { - "f1": 0.13793103448275862, - "precision": 0.09900990099009901, - "recall": 0.22727272727272727, - "tp": 10, - "fp": 91, - "fn": 34 - }, - "note": "由 auto_tune.py 自动优化生成,需手动更新到 cpp/include/thermal_types.h" -} \ No newline at end of file diff --git a/src/热成像识别/cpp/CMakeLists.txt b/src/热成像识别/cpp/CMakeLists.txt index f1f29b01..30e49cd9 100644 --- a/src/热成像识别/cpp/CMakeLists.txt +++ b/src/热成像识别/cpp/CMakeLists.txt @@ -6,12 +6,54 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs highgui videoio) -add_executable(thermal_detector - src/main.cpp +# ── ONNX Runtime (bundled) ── +set(ONNXRuntime_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/onnxruntime" + CACHE PATH "ONNX Runtime root") +set(ONNXRuntime_INCLUDE_DIRS "${ONNXRuntime_DIR}/include") +set(ONNXRuntime_FOUND FALSE) + +if(WIN32) + set(ONNXRuntime_DLL "${ONNXRuntime_DIR}/lib/onnxruntime.dll") + set(ONNXRuntime_DEF "${ONNXRuntime_DIR}/lib/onnxruntime.def") + + if(EXISTS "${ONNXRuntime_DLL}" AND EXISTS "${ONNXRuntime_DEF}") + set(ONNXRuntime_LIB "${CMAKE_CURRENT_BINARY_DIR}/onnxruntime.lib") + add_custom_command( + OUTPUT ${ONNXRuntime_LIB} + COMMAND lib.exe /def:${ONNXRuntime_DEF} /out:${ONNXRuntime_LIB} /machine:x64 + DEPENDS ${ONNXRuntime_DEF} + COMMENT "Generating onnxruntime import library" + ) + add_custom_target(onnxruntime_imp_lib DEPENDS ${ONNXRuntime_LIB}) + set(ONNXRuntime_LIBS ${ONNXRuntime_LIB}) + set(ONNXRuntime_FOUND TRUE) + endif() +else() + find_library(ONNXRuntime_LIBS onnxruntime + PATHS "${ONNXRuntime_DIR}/lib" NO_DEFAULT_PATH) + if(NOT ONNXRuntime_LIBS) + find_library(ONNXRuntime_LIBS onnxruntime) + endif() + if(ONNXRuntime_LIBS) + set(ONNXRuntime_FOUND TRUE) + endif() +endif() + +# ── Source files ── +set(CORE_SOURCES src/thermal_preprocessor.cpp src/thermal_detector.cpp ) +set(YOLO_SOURCES + src/yolo_detector.cpp +) + +add_executable(thermal_detector + src/main.cpp + ${CORE_SOURCES} +) + target_include_directories(thermal_detector PRIVATE ${CMAKE_SOURCE_DIR}/include ${OpenCV_INCLUDE_DIRS} @@ -23,6 +65,36 @@ target_link_libraries(thermal_detector PRIVATE target_compile_options(thermal_detector PRIVATE /utf-8 /EHsc) +# YOLO 模式 (需要 ONNX Runtime) +if(ONNXRuntime_FOUND) + target_sources(thermal_detector PRIVATE ${YOLO_SOURCES}) + + if(WIN32) + add_dependencies(thermal_detector onnxruntime_imp_lib) + endif() + + target_include_directories(thermal_detector PRIVATE + ${ONNXRuntime_INCLUDE_DIRS} + ) + target_link_libraries(thermal_detector PRIVATE + ${ONNXRuntime_LIBS} + ) + target_compile_definitions(thermal_detector PRIVATE HAS_YOLO=1) + + # 复制 DLL 到输出目录 + if(WIN32 AND EXISTS "${ONNXRuntime_DLL}") + add_custom_command(TARGET thermal_detector POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${ONNXRuntime_DLL}" "$" + COMMENT "Copying onnxruntime.dll to output" + ) + endif() + + message(STATUS "YOLO mode: ENABLED (ONNX Runtime found)") +else() + message(STATUS "YOLO mode: DISABLED (ONNX Runtime not found at ${ONNXRuntime_DIR})") +endif() + # Windows: 输出到项目根目录方便测试 set_target_properties(thermal_detector PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}" diff --git a/src/热成像识别/cpp/build/ALL_BUILD.vcxproj b/src/热成像识别/cpp/build/ALL_BUILD.vcxproj index fc01f530..97671be3 100644 --- a/src/热成像识别/cpp/build/ALL_BUILD.vcxproj +++ b/src/热成像识别/cpp/build/ALL_BUILD.vcxproj @@ -112,7 +112,7 @@ Always Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -120,12 +120,12 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -133,12 +133,12 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -146,12 +146,12 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -159,7 +159,7 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false diff --git a/src/热成像识别/cpp/build/CMakeCache.txt b/src/热成像识别/cpp/build/CMakeCache.txt index 40db7476..868bef2c 100644 --- a/src/热成像识别/cpp/build/CMakeCache.txt +++ b/src/热成像识别/cpp/build/CMakeCache.txt @@ -1,6 +1,6 @@ # This is the CMakeCache file. # For build in directory: d:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build -# It was generated by CMake: C:/Users/29578/.conda/envs/opencv-build/Library/bin/cmake.exe +# It was generated by CMake: D:/cmake/bin/cmake.exe # You can edit this file to change values found and used by cmake. # If you do not want to change any of the values, simply exit the editor. # If you do want to change a value, simply edit, save, and exit the editor. @@ -87,9 +87,6 @@ CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL //Path to a program. CMAKE_MT:FILEPATH=CMAKE_MT-NOTFOUND -//No help, variable specified on the command line. -CMAKE_PREFIX_PATH:UNINITIALIZED=C:/Users/29578/.conda/envs/opencv-build/Library - //Value Computed by CMake CMAKE_PROJECT_COMPAT_VERSION:STATIC= @@ -176,6 +173,9 @@ CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE +//ONNX Runtime root +ONNXRuntime_DIR:PATH=D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime + //The directory containing a CMake configuration file for OpenCV. OpenCV_DIR:PATH=C:/Users/29578/.conda/envs/opencv-build/Library/cmake @@ -204,11 +204,11 @@ CMAKE_CACHE_MINOR_VERSION:INTERNAL=3 //Patch version of cmake used to create the current loaded cache CMAKE_CACHE_PATCH_VERSION:INTERNAL=2 //Path to CMake executable. -CMAKE_COMMAND:INTERNAL=C:/Users/29578/.conda/envs/opencv-build/Library/bin/cmake.exe +CMAKE_COMMAND:INTERNAL=D:/cmake/bin/cmake.exe //Path to cpack program executable. -CMAKE_CPACK_COMMAND:INTERNAL=C:/Users/29578/.conda/envs/opencv-build/Library/bin/cpack.exe +CMAKE_CPACK_COMMAND:INTERNAL=D:/cmake/bin/cpack.exe //Path to ctest program executable. -CMAKE_CTEST_COMMAND:INTERNAL=C:/Users/29578/.conda/envs/opencv-build/Library/bin/ctest.exe +CMAKE_CTEST_COMMAND:INTERNAL=D:/cmake/bin/ctest.exe //ADVANCED property for variable: CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG @@ -282,7 +282,7 @@ CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Path to CMake installation. -CMAKE_ROOT:INTERNAL=C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3 +CMAKE_ROOT:INTERNAL=D:/cmake/share/cmake-4.3 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG diff --git a/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CMakeDetermineCompilerABI_CXX.bin b/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CMakeDetermineCompilerABI_CXX.bin index 261d2a61..f3581d58 100644 Binary files a/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CMakeDetermineCompilerABI_CXX.bin and b/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CompilerIdCXX/CompilerIdCXX.exe b/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CompilerIdCXX/CompilerIdCXX.exe index d7c875fe..236877a9 100644 Binary files a/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CompilerIdCXX/CompilerIdCXX.exe and b/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CompilerIdCXX/CompilerIdCXX.exe differ diff --git a/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj b/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj index ee8f32ad..1d17e41f 100644 Binary files a/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj and b/src/热成像识别/cpp/build/CMakeFiles/4.3.2/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj differ diff --git a/src/热成像识别/cpp/build/CMakeFiles/56e5eca5e8f7b67eb6dc57ed2871d760/onnxruntime_imp_lib.rule b/src/热成像识别/cpp/build/CMakeFiles/56e5eca5e8f7b67eb6dc57ed2871d760/onnxruntime_imp_lib.rule new file mode 100644 index 00000000..2d3998c9 --- /dev/null +++ b/src/热成像识别/cpp/build/CMakeFiles/56e5eca5e8f7b67eb6dc57ed2871d760/onnxruntime_imp_lib.rule @@ -0,0 +1 @@ +# generated from CMake diff --git a/src/热成像识别/cpp/build/CMakeFiles/CMakeConfigureLog.yaml b/src/热成像识别/cpp/build/CMakeFiles/CMakeConfigureLog.yaml index 2bead2a3..25bfd780 100644 --- a/src/热成像识别/cpp/build/CMakeFiles/CMakeConfigureLog.yaml +++ b/src/热成像识别/cpp/build/CMakeFiles/CMakeConfigureLog.yaml @@ -34,10 +34,7 @@ events: - "C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/" found: "C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeCXXCompilerId.cpp.in" search_context: - CMAKE_PREFIX_PATH: - - "C:/Users/29578/.conda/envs/opencv-build/Library" ENV{PATH}: - - "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\bin" - "C:\\Users\\29578\\bin" - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\local\\bin" @@ -46,7 +43,6 @@ events: - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\bin" - "C:\\Users\\29578\\bin" - - "D:\\Microsoft VS Code" - "E:\\VWmare\\bin" - "C:\\Program Files\\Common Files\\Oracle\\Java\\javapath" - "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path" @@ -121,7 +117,7 @@ events: The output was: 0 閫傜敤浜?.NET Framework MSBuild 鐗堟湰 17.13.9+e0f243f1e - 鐢熸垚鍚姩鏃堕棿涓?2026/5/18 21:16:17銆? + 鐢熸垚鍚姩鏃堕棿涓?2026/5/24 10:05:14銆? 鑺傜偣 1 涓婄殑椤圭洰鈥淒:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\4.3.2\\CompilerIdCXX\\CompilerIdCXX.vcxproj鈥?榛樿鐩爣)銆? PrepareForBuild: @@ -150,7 +146,7 @@ events: 0 涓鍛? 0 涓敊璇? - 宸茬敤鏃堕棿 00:00:01.36 + 宸茬敤鏃堕棿 00:00:05.20 Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe" @@ -183,12 +179,10 @@ events: - "link" candidate_directories: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/" - "C:/Users/29578/bin/" - "D:/Git/git/Git/mingw64/bin/" - "D:/Git/git/Git/usr/local/bin/" - "D:/Git/git/Git/usr/bin/" - - "D:/Microsoft VS Code/" - "E:/VWmare/bin/" - "C:/Program Files/Common Files/Oracle/Java/javapath/" - "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/" @@ -245,10 +239,7 @@ events: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/link.com" found: "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/link.exe" search_context: - CMAKE_PREFIX_PATH: - - "C:/Users/29578/.conda/envs/opencv-build/Library" ENV{PATH}: - - "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\bin" - "C:\\Users\\29578\\bin" - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\local\\bin" @@ -257,7 +248,6 @@ events: - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\bin" - "C:\\Users\\29578\\bin" - - "D:\\Microsoft VS Code" - "E:\\VWmare\\bin" - "C:\\Program Files\\Common Files\\Oracle\\Java\\javapath" - "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path" @@ -339,12 +329,10 @@ events: - "lld-link" candidate_directories: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/" - "C:/Users/29578/bin/" - "D:/Git/git/Git/mingw64/bin/" - "D:/Git/git/Git/usr/local/bin/" - "D:/Git/git/Git/usr/bin/" - - "D:/Microsoft VS Code/" - "E:/VWmare/bin/" - "C:/Program Files/Common Files/Oracle/Java/javapath/" - "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/" @@ -401,9 +389,6 @@ events: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/lld-link.com" - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/lld-link.exe" - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/lld-link" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/lld-link.com" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/lld-link.exe" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/lld-link" - "C:/Users/29578/bin/lld-link.com" - "C:/Users/29578/bin/lld-link.exe" - "C:/Users/29578/bin/lld-link" @@ -416,9 +401,6 @@ events: - "D:/Git/git/Git/usr/bin/lld-link.com" - "D:/Git/git/Git/usr/bin/lld-link.exe" - "D:/Git/git/Git/usr/bin/lld-link" - - "D:/Microsoft VS Code/lld-link.com" - - "D:/Microsoft VS Code/lld-link.exe" - - "D:/Microsoft VS Code/lld-link" - "E:/VWmare/bin/lld-link.com" - "E:/VWmare/bin/lld-link.exe" - "E:/VWmare/bin/lld-link" @@ -577,10 +559,7 @@ events: - "D:/Git/git/Git/usr/bin/core_perl/lld-link" found: false search_context: - CMAKE_PREFIX_PATH: - - "C:/Users/29578/.conda/envs/opencv-build/Library" ENV{PATH}: - - "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\bin" - "C:\\Users\\29578\\bin" - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\local\\bin" @@ -589,7 +568,6 @@ events: - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\bin" - "C:\\Users\\29578\\bin" - - "D:\\Microsoft VS Code" - "E:\\VWmare\\bin" - "C:\\Program Files\\Common Files\\Oracle\\Java\\javapath" - "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path" @@ -669,12 +647,10 @@ events: - "link" candidate_directories: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/" - "C:/Users/29578/bin/" - "D:/Git/git/Git/mingw64/bin/" - "D:/Git/git/Git/usr/local/bin/" - "D:/Git/git/Git/usr/bin/" - - "D:/Microsoft VS Code/" - "E:/VWmare/bin/" - "C:/Program Files/Common Files/Oracle/Java/javapath/" - "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/" @@ -731,10 +707,7 @@ events: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/link.com" found: "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/link.exe" search_context: - CMAKE_PREFIX_PATH: - - "C:/Users/29578/.conda/envs/opencv-build/Library" ENV{PATH}: - - "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\bin" - "C:\\Users\\29578\\bin" - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\local\\bin" @@ -743,7 +716,6 @@ events: - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\bin" - "C:\\Users\\29578\\bin" - - "D:\\Microsoft VS Code" - "E:\\VWmare\\bin" - "C:\\Program Files\\Common Files\\Oracle\\Java\\javapath" - "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path" @@ -823,12 +795,10 @@ events: - "mt" candidate_directories: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/" - "C:/Users/29578/bin/" - "D:/Git/git/Git/mingw64/bin/" - "D:/Git/git/Git/usr/local/bin/" - "D:/Git/git/Git/usr/bin/" - - "D:/Microsoft VS Code/" - "E:/VWmare/bin/" - "C:/Program Files/Common Files/Oracle/Java/javapath/" - "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/" @@ -885,9 +855,6 @@ events: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/mt.com" - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/mt.exe" - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/mt" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/mt.com" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/mt.exe" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/mt" - "C:/Users/29578/bin/mt.com" - "C:/Users/29578/bin/mt.exe" - "C:/Users/29578/bin/mt" @@ -900,9 +867,6 @@ events: - "D:/Git/git/Git/usr/bin/mt.com" - "D:/Git/git/Git/usr/bin/mt.exe" - "D:/Git/git/Git/usr/bin/mt" - - "D:/Microsoft VS Code/mt.com" - - "D:/Microsoft VS Code/mt.exe" - - "D:/Microsoft VS Code/mt" - "E:/VWmare/bin/mt.com" - "E:/VWmare/bin/mt.exe" - "E:/VWmare/bin/mt" @@ -1061,10 +1025,7 @@ events: - "D:/Git/git/Git/usr/bin/core_perl/mt" found: false search_context: - CMAKE_PREFIX_PATH: - - "C:/Users/29578/.conda/envs/opencv-build/Library" ENV{PATH}: - - "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\bin" - "C:\\Users\\29578\\bin" - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\local\\bin" @@ -1073,7 +1034,6 @@ events: - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\bin" - "C:\\Users\\29578\\bin" - - "D:\\Microsoft VS Code" - "E:\\VWmare\\bin" - "C:\\Program Files\\Common Files\\Oracle\\Java\\javapath" - "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path" @@ -1153,12 +1113,10 @@ events: - "lib" candidate_directories: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/" - "C:/Users/29578/bin/" - "D:/Git/git/Git/mingw64/bin/" - "D:/Git/git/Git/usr/local/bin/" - "D:/Git/git/Git/usr/bin/" - - "D:/Microsoft VS Code/" - "E:/VWmare/bin/" - "C:/Program Files/Common Files/Oracle/Java/javapath/" - "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/" @@ -1215,10 +1173,7 @@ events: - "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/lib.com" found: "D:/vs/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/lib.exe" search_context: - CMAKE_PREFIX_PATH: - - "C:/Users/29578/.conda/envs/opencv-build/Library" ENV{PATH}: - - "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\bin" - "C:\\Users\\29578\\bin" - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\local\\bin" @@ -1227,7 +1182,6 @@ events: - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\bin" - "C:\\Users\\29578\\bin" - - "D:\\Microsoft VS Code" - "E:\\VWmare\\bin" - "C:\\Program Files\\Common Files\\Oracle\\Java\\javapath" - "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path" @@ -1309,15 +1263,10 @@ events: names: - "rc" candidate_directories: - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/" - - "C:/Users/29578/.conda/envs/opencv-build/Library/sbin/" - - "C:/Users/29578/.conda/envs/opencv-build/Library/" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/" - "C:/Users/29578/bin/" - "D:/Git/git/Git/mingw64/bin/" - "D:/Git/git/Git/usr/local/bin/" - "D:/Git/git/Git/usr/bin/" - - "D:/Microsoft VS Code/" - "E:/VWmare/bin/" - "C:/Program Files/Common Files/Oracle/Java/javapath/" - "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/" @@ -1376,22 +1325,13 @@ events: - "C:/Program Files (x86)/bin/" - "C:/Program Files (x86)/sbin/" - "C:/Program Files (x86)/" + - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/" + - "C:/Users/29578/.conda/envs/opencv-build/Library/sbin/" + - "C:/Users/29578/.conda/envs/opencv-build/Library/" - "C:/Program Files (x86)/thermal_detector/bin/" - "C:/Program Files (x86)/thermal_detector/sbin/" - "C:/Program Files (x86)/thermal_detector/" searched_directories: - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc.com" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc.exe" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc" - - "C:/Users/29578/.conda/envs/opencv-build/Library/sbin/rc.com" - - "C:/Users/29578/.conda/envs/opencv-build/Library/sbin/rc.exe" - - "C:/Users/29578/.conda/envs/opencv-build/Library/sbin/rc" - - "C:/Users/29578/.conda/envs/opencv-build/Library/rc.com" - - "C:/Users/29578/.conda/envs/opencv-build/Library/rc.exe" - - "C:/Users/29578/.conda/envs/opencv-build/Library/rc" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc.com" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc.exe" - - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc" - "C:/Users/29578/bin/rc.com" - "C:/Users/29578/bin/rc.exe" - "C:/Users/29578/bin/rc" @@ -1404,9 +1344,6 @@ events: - "D:/Git/git/Git/usr/bin/rc.com" - "D:/Git/git/Git/usr/bin/rc.exe" - "D:/Git/git/Git/usr/bin/rc" - - "D:/Microsoft VS Code/rc.com" - - "D:/Microsoft VS Code/rc.exe" - - "D:/Microsoft VS Code/rc" - "E:/VWmare/bin/rc.com" - "E:/VWmare/bin/rc.exe" - "E:/VWmare/bin/rc" @@ -1581,6 +1518,15 @@ events: - "C:/Program Files (x86)/rc.com" - "C:/Program Files (x86)/rc.exe" - "C:/Program Files (x86)/rc" + - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc.com" + - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc.exe" + - "C:/Users/29578/.conda/envs/opencv-build/Library/bin/rc" + - "C:/Users/29578/.conda/envs/opencv-build/Library/sbin/rc.com" + - "C:/Users/29578/.conda/envs/opencv-build/Library/sbin/rc.exe" + - "C:/Users/29578/.conda/envs/opencv-build/Library/sbin/rc" + - "C:/Users/29578/.conda/envs/opencv-build/Library/rc.com" + - "C:/Users/29578/.conda/envs/opencv-build/Library/rc.exe" + - "C:/Users/29578/.conda/envs/opencv-build/Library/rc" - "C:/Program Files (x86)/thermal_detector/bin/rc.com" - "C:/Program Files (x86)/thermal_detector/bin/rc.exe" - "C:/Program Files (x86)/thermal_detector/bin/rc" @@ -1592,10 +1538,7 @@ events: - "C:/Program Files (x86)/thermal_detector/rc" found: false search_context: - CMAKE_PREFIX_PATH: - - "C:/Users/29578/.conda/envs/opencv-build/Library" ENV{PATH}: - - "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\bin" - "C:\\Users\\29578\\bin" - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\local\\bin" @@ -1604,7 +1547,6 @@ events: - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\bin" - "C:\\Users\\29578\\bin" - - "D:\\Microsoft VS Code" - "E:\\VWmare\\bin" - "C:\\Program Files\\Common Files\\Oracle\\Java\\javapath" - "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path" @@ -1678,8 +1620,8 @@ events: checks: - "Detecting CXX compiler ABI info" directories: - source: "D:/29578/Documents/Study/computer/S_E/\u8f6f\u4ef6\u4f53\u7cfb\u7ed3\u6784\u4e0e\u8bbe\u8ba1/\u8f6f\u4ef6\u5f00\u53d1/\u70ed\u6210\u50cf\u8bc6\u522b/cpp/build/CMakeFiles/CMakeScratch/TryCompile-92wra3" - binary: "D:/29578/Documents/Study/computer/S_E/\u8f6f\u4ef6\u4f53\u7cfb\u7ed3\u6784\u4e0e\u8bbe\u8ba1/\u8f6f\u4ef6\u5f00\u53d1/\u70ed\u6210\u50cf\u8bc6\u522b/cpp/build/CMakeFiles/CMakeScratch/TryCompile-92wra3" + source: "D:/29578/Documents/Study/computer/S_E/\u8f6f\u4ef6\u4f53\u7cfb\u7ed3\u6784\u4e0e\u8bbe\u8ba1/\u8f6f\u4ef6\u5f00\u53d1/\u70ed\u6210\u50cf\u8bc6\u522b/cpp/build/CMakeFiles/CMakeScratch/TryCompile-xfcc11" + binary: "D:/29578/Documents/Study/computer/S_E/\u8f6f\u4ef6\u4f53\u7cfb\u7ed3\u6784\u4e0e\u8bbe\u8ba1/\u8f6f\u4ef6\u5f00\u53d1/\u70ed\u6210\u50cf\u8bc6\u522b/cpp/build/CMakeFiles/CMakeScratch/TryCompile-xfcc11" cmakeVariables: CMAKE_CXX_FLAGS: "/DWIN32 /D_WINDOWS /GR /EHsc" CMAKE_CXX_FLAGS_DEBUG: "/Zi /Ob0 /Od /RTC1" @@ -1690,39 +1632,39 @@ events: variable: "CMAKE_CXX_ABI_COMPILED" cached: true stdout: | - Change Dir: 'D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/CMakeScratch/TryCompile-92wra3' + Change Dir: 'D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/CMakeScratch/TryCompile-xfcc11' - Run Build Command(s): D:/vs/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_557a9.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n + Run Build Command(s): D:/vs/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_b414f.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n 閫傜敤浜?.NET Framework MSBuild 鐗堟湰 17.13.9+e0f243f1e - 鐢熸垚鍚姩鏃堕棿涓?2026/5/18 21:16:19銆? + 鐢熸垚鍚姩鏃堕棿涓?2026/5/24 10:05:20銆? - 鑺傜偣 1 涓婄殑椤圭洰鈥淒:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-92wra3\\cmTC_557a9.vcxproj鈥?榛樿鐩爣)銆? + 鑺傜偣 1 涓婄殑椤圭洰鈥淒:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-xfcc11\\cmTC_b414f.vcxproj鈥?榛樿鐩爣)銆? PrepareForBuild: 宸插惎鐢ㄧ粨鏋勫寲杈撳嚭銆傜紪璇戝櫒璇婃柇鐨勬牸寮忚缃皢鍙嶆槧閿欒灞傛缁撴瀯銆傛湁鍏宠缁嗕俊鎭紝璇峰弬闃?https://aka.ms/cpp/structured-output銆? - 姝e湪鍒涘缓鐩綍鈥淒:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-92wra3\\Debug\\鈥濄€? - 姝e湪鍒涘缓鐩綍鈥渃mTC_557a9.dir\\Debug\\cmTC_557a9.tlog\\鈥濄€? + 姝e湪鍒涘缓鐩綍鈥淒:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-xfcc11\\Debug\\鈥濄€? + 姝e湪鍒涘缓鐩綍鈥渃mTC_b414f.dir\\Debug\\cmTC_b414f.tlog\\鈥濄€? InitializeBuildStatus: - 姝e湪鍒涘缓鈥渃mTC_557a9.dir\\Debug\\cmTC_557a9.tlog\\unsuccessfulbuild鈥濓紝鍥犱负宸叉寚瀹氣€淎lwaysCreate鈥濄€? - 姝e湪瀵光€渃mTC_557a9.dir\\Debug\\cmTC_557a9.tlog\\unsuccessfulbuild鈥濇墽琛?Touch 浠诲姟銆? + 姝e湪鍒涘缓鈥渃mTC_b414f.dir\\Debug\\cmTC_b414f.tlog\\unsuccessfulbuild鈥濓紝鍥犱负宸叉寚瀹氣€淎lwaysCreate鈥濄€? + 姝e湪瀵光€渃mTC_b414f.dir\\Debug\\cmTC_b414f.tlog\\unsuccessfulbuild鈥濇墽琛?Touch 浠诲姟銆? ClCompile: - D:\\vs\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX64\\x64\\CL.exe /c /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D _MBCS /D "CMAKE_INTDIR=\\"Debug\\"" /EHsc /RTC1 /MDd /GR /Fo"cmTC_557a9.dir\\Debug\\\\" /Fd"cmTC_557a9.dir\\Debug\\vc143.pdb" /external:W1 /TP /errorReport:queue "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\share\\cmake-4.3\\Modules\\CMakeCXXCompilerABI.cpp" + D:\\vs\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX64\\x64\\CL.exe /c /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D _MBCS /D "CMAKE_INTDIR=\\"Debug\\"" /EHsc /RTC1 /MDd /GR /Fo"cmTC_b414f.dir\\Debug\\\\" /Fd"cmTC_b414f.dir\\Debug\\vc143.pdb" /external:W1 /TP /errorReport:queue "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\share\\cmake-4.3\\Modules\\CMakeCXXCompilerABI.cpp" 鐢ㄤ簬 x64 鐨?Microsoft (R) C/C++ 浼樺寲缂栬瘧鍣?19.43.34808 鐗? 鐗堟潈鎵€鏈?C) Microsoft Corporation銆備繚鐣欐墍鏈夋潈鍒┿€? - cl /c /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D _MBCS /D "CMAKE_INTDIR=\\"Debug\\"" /EHsc /RTC1 /MDd /GR /Fo"cmTC_557a9.dir\\Debug\\\\" /Fd"cmTC_557a9.dir\\Debug\\vc143.pdb" /external:W1 /TP /errorReport:queue "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\share\\cmake-4.3\\Modules\\CMakeCXXCompilerABI.cpp" + cl /c /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D _MBCS /D "CMAKE_INTDIR=\\"Debug\\"" /EHsc /RTC1 /MDd /GR /Fo"cmTC_b414f.dir\\Debug\\\\" /Fd"cmTC_b414f.dir\\Debug\\vc143.pdb" /external:W1 /TP /errorReport:queue "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\share\\cmake-4.3\\Modules\\CMakeCXXCompilerABI.cpp" CMakeCXXCompilerABI.cpp Link: - D:\\vs\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX64\\x64\\link.exe /OUT:"D:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-92wra3\\Debug\\cmTC_557a9.exe" /INCREMENTAL /ILK:"cmTC_557a9.dir\\Debug\\cmTC_557a9.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/29578/Documents/Study/computer/S_E/杞欢浣撶郴缁撴瀯涓庤璁?杞欢寮€鍙?鐑垚鍍忚瘑鍒?cpp/build/CMakeFiles/CMakeScratch/TryCompile-92wra3/Debug/cmTC_557a9.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /IMPLIB:"D:/29578/Documents/Study/computer/S_E/杞欢浣撶郴缁撴瀯涓庤璁?杞欢寮€鍙?鐑垚鍍忚瘑鍒?cpp/build/CMakeFiles/CMakeScratch/TryCompile-92wra3/Debug/cmTC_557a9.lib" /MACHINE:X64 /machine:x64 cmTC_557a9.dir\\Debug\\CMakeCXXCompilerABI.obj - cmTC_557a9.vcxproj -> D:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-92wra3\\Debug\\cmTC_557a9.exe + D:\\vs\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX64\\x64\\link.exe /OUT:"D:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-xfcc11\\Debug\\cmTC_b414f.exe" /INCREMENTAL /ILK:"cmTC_b414f.dir\\Debug\\cmTC_b414f.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/29578/Documents/Study/computer/S_E/杞欢浣撶郴缁撴瀯涓庤璁?杞欢寮€鍙?鐑垚鍍忚瘑鍒?cpp/build/CMakeFiles/CMakeScratch/TryCompile-xfcc11/Debug/cmTC_b414f.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /IMPLIB:"D:/29578/Documents/Study/computer/S_E/杞欢浣撶郴缁撴瀯涓庤璁?杞欢寮€鍙?鐑垚鍍忚瘑鍒?cpp/build/CMakeFiles/CMakeScratch/TryCompile-xfcc11/Debug/cmTC_b414f.lib" /MACHINE:X64 /machine:x64 cmTC_b414f.dir\\Debug\\CMakeCXXCompilerABI.obj + cmTC_b414f.vcxproj -> D:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-xfcc11\\Debug\\cmTC_b414f.exe FinalizeBuildStatus: - 姝e湪鍒犻櫎鏂囦欢鈥渃mTC_557a9.dir\\Debug\\cmTC_557a9.tlog\\unsuccessfulbuild鈥濄€? - 姝e湪瀵光€渃mTC_557a9.dir\\Debug\\cmTC_557a9.tlog\\cmTC_557a9.lastbuildstate鈥濇墽琛?Touch 浠诲姟銆? - 宸插畬鎴愮敓鎴愰」鐩€淒:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-92wra3\\cmTC_557a9.vcxproj鈥?榛樿鐩爣)鐨勬搷浣溿€? + 姝e湪鍒犻櫎鏂囦欢鈥渃mTC_b414f.dir\\Debug\\cmTC_b414f.tlog\\unsuccessfulbuild鈥濄€? + 姝e湪瀵光€渃mTC_b414f.dir\\Debug\\cmTC_b414f.tlog\\cmTC_b414f.lastbuildstate鈥濇墽琛?Touch 浠诲姟銆? + 宸插畬鎴愮敓鎴愰」鐩€淒:\\29578\\Documents\\Study\\computer\\S_E\\杞欢浣撶郴缁撴瀯涓庤璁杞欢寮€鍙慭鐑垚鍍忚瘑鍒玕cpp\\build\\CMakeFiles\\CMakeScratch\\TryCompile-xfcc11\\cmTC_b414f.vcxproj鈥?榛樿鐩爣)鐨勬搷浣溿€? 宸叉垚鍔熺敓鎴愩€? 0 涓鍛? 0 涓敊璇? - 宸茬敤鏃堕棿 00:00:01.01 + 宸茬敤鏃堕棿 00:00:00.71 exitCode: 0 - @@ -1840,22 +1782,1131 @@ events: mode: "cps" reason: "no_exist" - - path: "C:/Users/29578/.conda/envs/opencv-build/Library/OpenCVConfig.cmake" + path: "C:/Users/29578/OpenCVConfig.cmake" mode: "config" reason: "no_exist" - - path: "C:/Users/29578/.conda/envs/opencv-build/Library/opencv-config.cmake" + path: "C:/Users/29578/opencv-config.cmake" mode: "config" reason: "no_exist" - found: - path: "C:/Users/29578/.conda/envs/opencv-build/Library/cmake/OpenCVConfig.cmake" - mode: "config" - version: "4.13.0" - search_context: - CMAKE_PREFIX_PATH: - - "C:/Users/29578/.conda/envs/opencv-build/Library" + - + path: "C:/Users/29578/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/mingw64/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/mingw64/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/mingw64/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/mingw64/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/mingw64/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/mingw64/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/VWmare/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "E:/VWmare/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "E:/VWmare/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/VWmare/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/VWmare/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/VWmare/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/Common Files/Oracle/Java/javapath/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/Common Files/Oracle/Java/javapath/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/Common Files/Oracle/Java/javapath/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/Common Files/Oracle/Java/javapath/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/Common Files/Oracle/Java/javapath/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/Common Files/Oracle/Java/javapath/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Common Files/Oracle/Java/java8path/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/wbem/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/System32/wbem/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/System32/wbem/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/wbem/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/wbem/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/wbem/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/WindowsPowerShell/v1.0/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/System32/WindowsPowerShell/v1.0/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/System32/WindowsPowerShell/v1.0/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/WindowsPowerShell/v1.0/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/WindowsPowerShell/v1.0/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/WindowsPowerShell/v1.0/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/OpenSSH/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/System32/OpenSSH/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/System32/OpenSSH/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/OpenSSH/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/OpenSSH/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/OpenSSH/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/ffmpeg/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/ffmpeg/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/ffmpeg/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/ffmpeg/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/ffmpeg/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/ffmpeg/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/MySQL/MySQL Server 5.7/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/MySQL/MySQL Server 5.7/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/MySQL/MySQL Server 5.7/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/MySQL/MySQL Server 5.7/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/MySQL/MySQL Server 5.7/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/MySQL/MySQL Server 5.7/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/dotnet/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/dotnet/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/dotnet/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/dotnet/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/dotnet/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/dotnet/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/29578/matlab/runtime/win64/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/29578/matlab/runtime/win64/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/29578/matlab/runtime/win64/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/29578/matlab/runtime/win64/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/29578/matlab/runtime/win64/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/29578/matlab/runtime/win64/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/29578/matlab/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/29578/matlab/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/29578/matlab/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/29578/matlab/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/29578/matlab/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/29578/matlab/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/System32/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Windows/System32/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Windows/System32/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/NVIDIA Corporation/NVIDIA app/NvDLISR/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/NVIDIA Corporation/NVIDIA app/NvDLISR/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/NVIDIA Corporation/NVIDIA app/NvDLISR/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/NVIDIA Corporation/NVIDIA app/NvDLISR/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/NVIDIA Corporation/NVIDIA app/NvDLISR/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/NVIDIA Corporation/NVIDIA app/NvDLISR/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/JavaJDK/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/JavaJDK/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/JavaJDK/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/JavaJDK/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/JavaJDK/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/JavaJDK/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/ollama/Ollama/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "E:/ollama/Ollama/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "E:/ollama/Ollama/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/ollama/Ollama/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/ollama/Ollama/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/ollama/Ollama/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/cmd/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/cmd/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/cmd/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/cmd/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/cmd/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/cmd/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidSDk/platform-tools/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidSDk/platform-tools/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidSDk/platform-tools/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidSDk/platform-tools/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidSDk/platform-tools/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidSDk/platform-tools/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidGradle/gradle-8.13-bin/gradle-8.13/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidGradle/gradle-8.13-bin/gradle-8.13/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidGradle/gradle-8.13-bin/gradle-8.13/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidGradle/gradle-8.13-bin/gradle-8.13/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidGradle/gradle-8.13-bin/gradle-8.13/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/AndroidTools/AndroidGradle/gradle-8.13-bin/gradle-8.13/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/TortoiseGit/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/TortoiseGit/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/TortoiseGit/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/TortoiseGit/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/TortoiseGit/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/TortoiseGit/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/lib/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/lib/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/lib/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/lib/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/lib/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/tools/lib/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/runtime/lib/windows_x86_64_llvm/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/runtime/lib/windows_x86_64_llvm/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/runtime/lib/windows_x86_64_llvm/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/runtime/lib/windows_x86_64_llvm/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/runtime/lib/windows_x86_64_llvm/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/runtime/lib/windows_x86_64_llvm/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/lib/windows_x86_64_llvm/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/lib/windows_x86_64_llvm/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/lib/windows_x86_64_llvm/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/lib/windows_x86_64_llvm/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/lib/windows_x86_64_llvm/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/cangjie/cangjie/lib/windows_x86_64_llvm/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/node js/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/node js/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/node js/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/node js/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/node js/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/node js/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/Docker/Docker/resources/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/Docker/Docker/resources/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/Docker/Docker/resources/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/Docker/Docker/resources/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/Docker/Docker/resources/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/Docker/Docker/resources/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Local/Microsoft/WindowsApps/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Local/Microsoft/WindowsApps/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Local/Microsoft/WindowsApps/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Local/Microsoft/WindowsApps/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Local/Microsoft/WindowsApps/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Local/Microsoft/WindowsApps/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/Pycharm/PyCharm Community Edition 2024.3.1.1/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "E:/Pycharm/PyCharm Community Edition 2024.3.1.1/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "E:/Pycharm/PyCharm Community Edition 2024.3.1.1/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/Pycharm/PyCharm Community Edition 2024.3.1.1/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/Pycharm/PyCharm Community Edition 2024.3.1.1/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/Pycharm/PyCharm Community Edition 2024.3.1.1/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/.lmstudio/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Users/29578/.lmstudio/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Users/29578/.lmstudio/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/.lmstudio/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/.lmstudio/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/.lmstudio/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Microsoft VS Code/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Microsoft VS Code/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Microsoft VS Code/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Microsoft VS Code/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Microsoft VS Code/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Microsoft VS Code/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/LaTeX/texlive/2025/bin/windows/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "E:/LaTeX/texlive/2025/bin/windows/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "E:/LaTeX/texlive/2025/bin/windows/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/LaTeX/texlive/2025/bin/windows/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/LaTeX/texlive/2025/bin/windows/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "E:/LaTeX/texlive/2025/bin/windows/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Anaconda/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Anaconda/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/Scripts/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Anaconda/Scripts/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Anaconda/Scripts/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/Scripts/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/Scripts/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/Scripts/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/Library/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Anaconda/Library/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Anaconda/Library/cmake/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Anaconda/Library/cmake/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Anaconda/Library/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/Library/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/Library/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Anaconda/Library/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/SonarQube/sql/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/SonarQube/sql/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/SonarQube/sql/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/SonarQube/sql/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/SonarQube/sql/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/SonarQube/sql/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Roaming/npm/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Roaming/npm/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Roaming/npm/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Roaming/npm/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Roaming/npm/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/AppData/Roaming/npm/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/vendor_perl/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/vendor_perl/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/vendor_perl/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/vendor_perl/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/vendor_perl/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/vendor_perl/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/core_perl/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/core_perl/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/core_perl/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/core_perl/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/core_perl/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "D:/Git/git/Git/usr/bin/core_perl/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files (x86)/opencv-config.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Program Files (x86)/lib/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/lib/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/share/cps/OpenCV.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Program Files (x86)/share/cps/opencv.cps" + mode: "cps" + reason: "no_exist" + - + path: "C:/Users/29578/.conda/envs/opencv-build/Library/OpenCVConfig.cmake" + mode: "config" + reason: "no_exist" + - + path: "C:/Users/29578/.conda/envs/opencv-build/Library/opencv-config.cmake" + mode: "config" + reason: "no_exist" + found: + path: "C:/Users/29578/.conda/envs/opencv-build/Library/cmake/OpenCVConfig.cmake" + mode: "config" + version: "4.13.0" + search_context: ENV{PATH}: - - "C:\\Users\\29578\\.conda\\envs\\opencv-build\\Library\\bin" - "C:\\Users\\29578\\bin" - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\local\\bin" @@ -1864,7 +2915,6 @@ events: - "D:\\Git\\git\\Git\\mingw64\\bin" - "D:\\Git\\git\\Git\\usr\\bin" - "C:\\Users\\29578\\bin" - - "D:\\Microsoft VS Code" - "E:\\VWmare\\bin" - "C:\\Program Files\\Common Files\\Oracle\\Java\\javapath" - "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path" diff --git a/src/热成像识别/cpp/build/CMakeFiles/TargetDirectories.txt b/src/热成像识别/cpp/build/CMakeFiles/TargetDirectories.txt index 9f2fe04a..9d810c6d 100644 --- a/src/热成像识别/cpp/build/CMakeFiles/TargetDirectories.txt +++ b/src/热成像识别/cpp/build/CMakeFiles/TargetDirectories.txt @@ -1,3 +1,4 @@ +D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/onnxruntime_imp_lib.dir D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/thermal_detector.dir D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/ALL_BUILD.dir D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/ZERO_CHECK.dir diff --git a/src/热成像识别/cpp/build/CMakeFiles/e9bd87dd49c8a00a589935b380b13b97/onnxruntime.lib.rule b/src/热成像识别/cpp/build/CMakeFiles/e9bd87dd49c8a00a589935b380b13b97/onnxruntime.lib.rule new file mode 100644 index 00000000..2d3998c9 --- /dev/null +++ b/src/热成像识别/cpp/build/CMakeFiles/e9bd87dd49c8a00a589935b380b13b97/onnxruntime.lib.rule @@ -0,0 +1 @@ +# generated from CMake diff --git a/src/热成像识别/cpp/build/CMakeFiles/generate.stamp.depend b/src/热成像识别/cpp/build/CMakeFiles/generate.stamp.depend index 6157f9f1..304bb0b9 100644 --- a/src/热成像识别/cpp/build/CMakeFiles/generate.stamp.depend +++ b/src/热成像识别/cpp/build/CMakeFiles/generate.stamp.depend @@ -4,96 +4,31 @@ C:/Users/29578/.conda/envs/opencv-build/Library/cmake/OpenCVConfig.cmake C:/Users/29578/.conda/envs/opencv-build/Library/cmake/x64/vc17/lib/OpenCVConfig.cmake C:/Users/29578/.conda/envs/opencv-build/Library/cmake/x64/vc17/lib/OpenCVModules-release.cmake C:/Users/29578/.conda/envs/opencv-build/Library/cmake/x64/vc17/lib/OpenCVModules.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeCXXCompiler.cmake.in -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeCXXCompilerABI.cpp -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeCXXInformation.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeCommonLanguageInclude.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeCompilerIdDetection.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeDetermineCXXCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeDetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeDetermineCompilerABI.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeDetermineCompilerId.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeDetermineCompilerSupport.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeDetermineRCCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeDetermineSystem.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeFindBinUtils.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeGenericSystem.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeInitializeConfigs.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeLanguageInformation.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeParseImplicitIncludeInfo.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeParseImplicitLinkInfo.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeParseLibraryArchitecture.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeRCCompiler.cmake.in -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeRCInformation.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeSystem.cmake.in -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeSystemSpecificInformation.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeSystemSpecificInitialize.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeTestCXXCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeTestCompilerCommon.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CMakeTestRCCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/ADSP-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/ARMCC-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/ARMClang-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/AppleClang-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Borland-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/CMakeCommonCompilerMacros.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Clang-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Clang-DetermineCompilerInternal.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Cray-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/CrayClang-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Diab-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Embarcadero-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Fujitsu-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/GHS-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/HP-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/IAR-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Intel-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/MSVC-CXX.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/MSVC-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/MSVC.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/NVHPC-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/NVIDIA-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/OrangeC-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/PGI-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/PathScale-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Renesas-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/SCO-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/TI-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/TIClang-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Tasking-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/Watcom-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/XL-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/CompilerId/VS-10.vcxproj.in -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/FindPackageHandleStandardArgs.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/FindPackageMessage.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Internal/CMakeCXXLinkerInformation.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Internal/CMakeCommonLinkerInformation.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Internal/CMakeDetermineLinkerId.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Internal/CMakeInspectCXXLinker.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Internal/FeatureTesting.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Linker/MSVC-CXX.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Linker/MSVC.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Platform/Linker/Windows-MSVC-CXX.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Platform/Linker/Windows-MSVC.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Platform/Windows-Determine-CXX.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Platform/Windows-Initialize.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Platform/Windows-MSVC-CXX.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Platform/Windows-MSVC.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Platform/Windows.cmake -C:/Users/29578/.conda/envs/opencv-build/Library/share/cmake-4.3/Modules/Platform/WindowsPaths.cmake D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/4.3.2/CMakeCXXCompiler.cmake D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/4.3.2/CMakeRCCompiler.cmake D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/4.3.2/CMakeSystem.cmake +D:/cmake/share/cmake-4.3/Modules/CMakeCXXInformation.cmake +D:/cmake/share/cmake-4.3/Modules/CMakeCommonLanguageInclude.cmake +D:/cmake/share/cmake-4.3/Modules/CMakeGenericSystem.cmake +D:/cmake/share/cmake-4.3/Modules/CMakeInitializeConfigs.cmake +D:/cmake/share/cmake-4.3/Modules/CMakeLanguageInformation.cmake +D:/cmake/share/cmake-4.3/Modules/CMakeRCInformation.cmake +D:/cmake/share/cmake-4.3/Modules/CMakeSystemSpecificInformation.cmake +D:/cmake/share/cmake-4.3/Modules/CMakeSystemSpecificInitialize.cmake +D:/cmake/share/cmake-4.3/Modules/Compiler/CMakeCommonCompilerMacros.cmake +D:/cmake/share/cmake-4.3/Modules/Compiler/MSVC-CXX.cmake +D:/cmake/share/cmake-4.3/Modules/Compiler/MSVC.cmake +D:/cmake/share/cmake-4.3/Modules/FindPackageHandleStandardArgs.cmake +D:/cmake/share/cmake-4.3/Modules/FindPackageMessage.cmake +D:/cmake/share/cmake-4.3/Modules/Internal/CMakeCXXLinkerInformation.cmake +D:/cmake/share/cmake-4.3/Modules/Internal/CMakeCommonLinkerInformation.cmake +D:/cmake/share/cmake-4.3/Modules/Linker/MSVC-CXX.cmake +D:/cmake/share/cmake-4.3/Modules/Linker/MSVC.cmake +D:/cmake/share/cmake-4.3/Modules/Platform/Linker/Windows-MSVC-CXX.cmake +D:/cmake/share/cmake-4.3/Modules/Platform/Linker/Windows-MSVC.cmake +D:/cmake/share/cmake-4.3/Modules/Platform/Windows-Initialize.cmake +D:/cmake/share/cmake-4.3/Modules/Platform/Windows-MSVC-CXX.cmake +D:/cmake/share/cmake-4.3/Modules/Platform/Windows-MSVC.cmake +D:/cmake/share/cmake-4.3/Modules/Platform/Windows.cmake +D:/cmake/share/cmake-4.3/Modules/Platform/WindowsPaths.cmake diff --git a/src/热成像识别/cpp/build/ZERO_CHECK.vcxproj b/src/热成像识别/cpp/build/ZERO_CHECK.vcxproj index 06da4cc8..c3f5fd53 100644 --- a/src/热成像识别/cpp/build/ZERO_CHECK.vcxproj +++ b/src/热成像识别/cpp/build/ZERO_CHECK.vcxproj @@ -113,7 +113,7 @@ true Checking Build System setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -121,13 +121,13 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\CMakeLists.txt;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\CMakeLists.txt;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false true Checking Build System setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -135,13 +135,13 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\CMakeLists.txt;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\CMakeLists.txt;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false true Checking Build System setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -149,13 +149,13 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\CMakeLists.txt;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\CMakeLists.txt;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false true Checking Build System setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -163,7 +163,7 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\CMakeLists.txt;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\CMakeLists.txt;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false diff --git a/src/热成像识别/cpp/build/onnxruntime.exp b/src/热成像识别/cpp/build/onnxruntime.exp new file mode 100644 index 00000000..98d8a0e1 Binary files /dev/null and b/src/热成像识别/cpp/build/onnxruntime.exp differ diff --git a/src/热成像识别/cpp/build/onnxruntime.lib b/src/热成像识别/cpp/build/onnxruntime.lib new file mode 100644 index 00000000..1dbdfe21 Binary files /dev/null and b/src/热成像识别/cpp/build/onnxruntime.lib differ diff --git a/src/热成像识别/cpp/build/onnxruntime_imp_lib.vcxproj b/src/热成像识别/cpp/build/onnxruntime_imp_lib.vcxproj new file mode 100644 index 00000000..e806b076 --- /dev/null +++ b/src/热成像识别/cpp/build/onnxruntime_imp_lib.vcxproj @@ -0,0 +1,288 @@ + + + + x64 + + + + Debug + x64 + + + Release + x64 + + + MinSizeRel + x64 + + + RelWithDebInfo + x64 + + + + {84DC21BA-E13C-3E77-9EB5-4AD550232221} + Win32Proj + 10.0.22621.0 + x64 + onnxruntime_imp_lib + NoUpgrade + + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + + + + + + + + <_ProjectFileVersion>10.0.20506.1 + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + + + + %(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + %(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + %(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + %(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + Generating onnxruntime import library + setlocal +lib.exe /def:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.def /out:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/onnxruntime.lib /machine:x64 +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\lib\onnxruntime.def;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\onnxruntime.lib + false + Generating onnxruntime import library + setlocal +lib.exe /def:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.def /out:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/onnxruntime.lib /machine:x64 +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\lib\onnxruntime.def;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\onnxruntime.lib + false + Generating onnxruntime import library + setlocal +lib.exe /def:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.def /out:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/onnxruntime.lib /machine:x64 +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\lib\onnxruntime.def;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\onnxruntime.lib + false + Generating onnxruntime import library + setlocal +lib.exe /def:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.def /out:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/onnxruntime.lib /machine:x64 +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\lib\onnxruntime.def;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\onnxruntime.lib + false + + + + + + setlocal +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\onnxruntime.lib;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\onnxruntime_imp_lib + false + false + + setlocal +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\onnxruntime.lib;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\onnxruntime_imp_lib + false + false + + setlocal +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\onnxruntime.lib;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\onnxruntime_imp_lib + false + false + + setlocal +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\onnxruntime.lib;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\onnxruntime_imp_lib + false + false + + + + + Always + Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt + setlocal +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp + false + Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt + setlocal +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp + false + Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt + setlocal +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp + false + Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt + setlocal +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp + false + + + + + + + + + + {D587A172-BD31-3460-AB25-5A3362814065} + ZERO_CHECK + false + Never + + + + + + \ No newline at end of file diff --git a/src/热成像识别/cpp/build/onnxruntime_imp_lib.vcxproj.filters b/src/热成像识别/cpp/build/onnxruntime_imp_lib.vcxproj.filters new file mode 100644 index 00000000..af17b618 --- /dev/null +++ b/src/热成像识别/cpp/build/onnxruntime_imp_lib.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + CMake Rules + + + CMake Rules + + + + + + + + + {531032C3-567B-392F-8E3A-E279D9FF267E} + + + diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/main.obj b/src/热成像识别/cpp/build/thermal_detector.dir/Release/main.obj index 13fb28d3..f9bf3313 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/main.obj and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/main.obj differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.exe.recipe b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.exe.recipe index 746bae87..dbd56f87 100644 --- a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.exe.recipe +++ b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.exe.recipe @@ -4,6 +4,9 @@ D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\x64\Release\ZERO_CHECK + + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\x64\Release\onnxruntime_imp_lib + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\thermal_detector.exe diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.obj b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.obj index 2a91bc0c..bc93b665 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.obj and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.obj differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.command.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.command.1.tlog index c1437b4d..ecc603fa 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.command.1.tlog and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.command.1.tlog differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.read.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.read.1.tlog index f1fdb296..f2e7c23c 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.read.1.tlog and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.read.1.tlog differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.write.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.write.1.tlog index 39ae9f30..ce415b15 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.write.1.tlog and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CL.write.1.tlog differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/Cl.items.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/Cl.items.tlog index e012800c..d6e82018 100644 --- a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/Cl.items.tlog +++ b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/Cl.items.tlog @@ -1,3 +1,4 @@ D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\src\main.cpp;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\thermal_detector.dir\Release\main.obj D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\src\thermal_preprocessor.cpp;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\thermal_detector.dir\Release\thermal_preprocessor.obj D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\src\thermal_detector.cpp;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\thermal_detector.dir\Release\thermal_detector.obj +D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\src\yolo_detector.cpp;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\thermal_detector.dir\Release\yolo_detector.obj diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CustomBuild.command.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CustomBuild.command.1.tlog index 28b6ea4f..6ca5a6be 100644 --- a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CustomBuild.command.1.tlog +++ b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CustomBuild.command.1.tlog @@ -1,6 +1,6 @@ ^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\CMAKELISTS.TXT setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CustomBuild.read.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CustomBuild.read.1.tlog index ee4abe96..f118c472 100644 --- a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CustomBuild.read.1.tlog +++ b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/CustomBuild.read.1.tlog @@ -4,95 +4,30 @@ C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\OPENCVCONFIG.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVCONFIG.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVMODULES-RELEASE.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVMODULES.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXCOMPILER.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXCOMPILERABI.CPP -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECOMMONLANGUAGEINCLUDE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECOMPILERIDDETECTION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECXXCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERABI.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERID.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERSUPPORT.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINERCCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINESYSTEM.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEFINDBINUTILS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEGENERICSYSTEM.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEINITIALIZECONFIGS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKELANGUAGEINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSEIMPLICITINCLUDEINFO.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSEIMPLICITLINKINFO.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSELIBRARYARCHITECTURE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKERCCOMPILER.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKERCINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEM.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINITIALIZE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTCXXCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTCOMPILERCOMMON.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTRCCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ADSP-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ARMCC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ARMCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\APPLECLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\BORLAND-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CMAKECOMMONCOMPILERMACROS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CLANG-DETERMINECOMPILERINTERNAL.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\COMPAQ-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CRAY-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CRAYCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\DIAB-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\EMBARCADERO-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\FUJITSU-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\FUJITSUCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\GHS-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\GNU-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\HP-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IAR-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IBMCPP-CXX-DETERMINEVERSIONINTERNAL.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IBMCLANG-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\INTEL-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\INTELLLVM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\LCC-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\NVHPC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\NVIDIA-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\OPENWATCOM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ORANGEC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\PGI-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\PATHSCALE-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\RENESAS-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\SCO-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\SUNPRO-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TI-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TICLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TASKING-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\VISUALAGE-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\WATCOM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\XL-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\XLCLANG-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ZOS-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILERID\VS-10.VCXPROJ.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEHANDLESTANDARDARGS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEMESSAGE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECXXLINKERINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECOMMONLINKERINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKEDETERMINELINKERID.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKEINSPECTCXXLINKER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\FEATURETESTING.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-DETERMINE-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-INITIALIZE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWSPATHS.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKECXXCOMPILER.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKERCCOMPILER.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKESYSTEM.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKECXXINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKECOMMONLANGUAGEINCLUDE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKEGENERICSYSTEM.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKEINITIALIZECONFIGS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKELANGUAGEINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKERCINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINITIALIZE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\CMAKECOMMONCOMPILERMACROS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEHANDLESTANDARDARGS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEMESSAGE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECXXLINKERINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECOMMONLINKERINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-INITIALIZE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWSPATHS.CMAKE diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.command.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.command.1.tlog index 72b9583f..fbbe2bfd 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.command.1.tlog and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.command.1.tlog differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.read.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.read.1.tlog index 707c5978..a595d770 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.read.1.tlog and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.read.1.tlog differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.secondary.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.secondary.1.tlog index 851c495b..be6ba433 100644 --- a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.secondary.1.tlog +++ b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.secondary.1.tlog @@ -1 +1 @@ -^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\THERMAL_DETECTOR.DIR\RELEASE\MAIN.OBJ|D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\THERMAL_DETECTOR.DIR\RELEASE\THERMAL_DETECTOR.OBJ|D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\THERMAL_DETECTOR.DIR\RELEASE\THERMAL_PREPROCESSOR.OBJ +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\THERMAL_DETECTOR.DIR\RELEASE\MAIN.OBJ|D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\THERMAL_DETECTOR.DIR\RELEASE\THERMAL_DETECTOR.OBJ|D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\THERMAL_DETECTOR.DIR\RELEASE\THERMAL_PREPROCESSOR.OBJ|D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\THERMAL_DETECTOR.DIR\RELEASE\YOLO_DETECTOR.OBJ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.write.1.tlog b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.write.1.tlog index 31efef2c..664a839f 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.write.1.tlog and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_detector.tlog/link.write.1.tlog differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_preprocessor.obj b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_preprocessor.obj index 638123dc..d1ef4579 100644 Binary files a/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_preprocessor.obj and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/thermal_preprocessor.obj differ diff --git a/src/热成像识别/cpp/build/thermal_detector.dir/Release/yolo_detector.obj b/src/热成像识别/cpp/build/thermal_detector.dir/Release/yolo_detector.obj new file mode 100644 index 00000000..412e9a2a Binary files /dev/null and b/src/热成像识别/cpp/build/thermal_detector.dir/Release/yolo_detector.obj differ diff --git a/src/热成像识别/cpp/build/thermal_detector.sln b/src/热成像识别/cpp/build/thermal_detector.sln index 88083c98..5c917692 100644 --- a/src/热成像识别/cpp/build/thermal_detector.sln +++ b/src/热成像识别/cpp/build/thermal_detector.sln @@ -11,9 +11,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "ZERO_CHECK.vc ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "onnxruntime_imp_lib", "onnxruntime_imp_lib.vcxproj", "{84DC21BA-E13C-3E77-9EB5-4AD550232221}" + ProjectSection(ProjectDependencies) = postProject + {D587A172-BD31-3460-AB25-5A3362814065} = {D587A172-BD31-3460-AB25-5A3362814065} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thermal_detector", "thermal_detector.vcxproj", "{DF803312-3CFA-3263-AF8D-74A66844CD3A}" ProjectSection(ProjectDependencies) = postProject {D587A172-BD31-3460-AB25-5A3362814065} = {D587A172-BD31-3460-AB25-5A3362814065} + {84DC21BA-E13C-3E77-9EB5-4AD550232221} = {84DC21BA-E13C-3E77-9EB5-4AD550232221} EndProjectSection EndProject Global @@ -36,6 +42,14 @@ Global {D587A172-BD31-3460-AB25-5A3362814065}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 {D587A172-BD31-3460-AB25-5A3362814065}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {D587A172-BD31-3460-AB25-5A3362814065}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {84DC21BA-E13C-3E77-9EB5-4AD550232221}.Debug|x64.ActiveCfg = Debug|x64 + {84DC21BA-E13C-3E77-9EB5-4AD550232221}.Debug|x64.Build.0 = Debug|x64 + {84DC21BA-E13C-3E77-9EB5-4AD550232221}.Release|x64.ActiveCfg = Release|x64 + {84DC21BA-E13C-3E77-9EB5-4AD550232221}.Release|x64.Build.0 = Release|x64 + {84DC21BA-E13C-3E77-9EB5-4AD550232221}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {84DC21BA-E13C-3E77-9EB5-4AD550232221}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {84DC21BA-E13C-3E77-9EB5-4AD550232221}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {84DC21BA-E13C-3E77-9EB5-4AD550232221}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {DF803312-3CFA-3263-AF8D-74A66844CD3A}.Debug|x64.ActiveCfg = Debug|x64 {DF803312-3CFA-3263-AF8D-74A66844CD3A}.Debug|x64.Build.0 = Debug|x64 {DF803312-3CFA-3263-AF8D-74A66844CD3A}.Release|x64.ActiveCfg = Release|x64 diff --git a/src/热成像识别/cpp/build/thermal_detector.vcxproj b/src/热成像识别/cpp/build/thermal_detector.vcxproj index 7e51bb84..dca38fe7 100644 --- a/src/热成像识别/cpp/build/thermal_detector.vcxproj +++ b/src/热成像识别/cpp/build/thermal_detector.vcxproj @@ -86,7 +86,7 @@ - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;%(AdditionalIncludeDirectories) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;%(AdditionalIncludeDirectories) %(AdditionalOptions) /external:I "C:/Users/29578/.conda/envs/opencv-build/Library/include" /utf-8 $(IntDir) EnableFastChecks @@ -108,24 +108,36 @@ false - %(PreprocessorDefinitions);WIN32;_WINDOWS;CMAKE_INTDIR="Debug" + %(PreprocessorDefinitions);WIN32;_WINDOWS;HAS_YOLO=1;CMAKE_INTDIR="Debug" $(IntDir) false - %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;CMAKE_INTDIR=\"Debug\" - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;HAS_YOLO=1;CMAKE_INTDIR=\"Debug\" + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) $(ProjectDir)/$(IntDir) %(Filename).h %(Filename).tlb %(Filename)_i.c %(Filename)_p.c + + Copying onnxruntime.dll to output + setlocal +D:\cmake\bin\cmake.exe -E copy_if_different D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.dll D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + - C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_highgui4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_videoio4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgcodecs4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgproc4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_core4130.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_highgui4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_videoio4130.lib;onnxruntime.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgcodecs4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgproc4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_core4130.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib %(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 @@ -144,7 +156,7 @@ - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;%(AdditionalIncludeDirectories) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;%(AdditionalIncludeDirectories) %(AdditionalOptions) /external:I "C:/Users/29578/.conda/envs/opencv-build/Library/include" /utf-8 $(IntDir) Default @@ -165,26 +177,38 @@ false - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release" + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;HAS_YOLO=1;CMAKE_INTDIR="Release" $(IntDir) false - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\" - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;HAS_YOLO=1;CMAKE_INTDIR=\"Release\" + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) $(ProjectDir)/$(IntDir) %(Filename).h %(Filename).tlb %(Filename)_i.c %(Filename)_p.c + + Copying onnxruntime.dll to output + setlocal +D:\cmake\bin\cmake.exe -E copy_if_different D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.dll D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + - C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_highgui4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_videoio4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgcodecs4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgproc4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_core4130.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_highgui4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_videoio4130.lib;onnxruntime.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgcodecs4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgproc4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_core4130.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib %(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 @@ -203,7 +227,7 @@ - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;%(AdditionalIncludeDirectories) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;%(AdditionalIncludeDirectories) %(AdditionalOptions) /external:I "C:/Users/29578/.conda/envs/opencv-build/Library/include" /utf-8 $(IntDir) Default @@ -224,26 +248,38 @@ false - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="MinSizeRel" + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;HAS_YOLO=1;CMAKE_INTDIR="MinSizeRel" $(IntDir) false - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"MinSizeRel\" - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;HAS_YOLO=1;CMAKE_INTDIR=\"MinSizeRel\" + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) $(ProjectDir)/$(IntDir) %(Filename).h %(Filename).tlb %(Filename)_i.c %(Filename)_p.c + + Copying onnxruntime.dll to output + setlocal +D:\cmake\bin\cmake.exe -E copy_if_different D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.dll D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/MinSizeRel +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + - C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_highgui4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_videoio4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgcodecs4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgproc4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_core4130.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_highgui4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_videoio4130.lib;onnxruntime.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgcodecs4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgproc4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_core4130.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib %(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 @@ -262,7 +298,7 @@ - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;%(AdditionalIncludeDirectories) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;%(AdditionalIncludeDirectories) %(AdditionalOptions) /external:I "C:/Users/29578/.conda/envs/opencv-build/Library/include" /utf-8 $(IntDir) Default @@ -284,24 +320,36 @@ false - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="RelWithDebInfo" + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;HAS_YOLO=1;CMAKE_INTDIR="RelWithDebInfo" $(IntDir) false - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"RelWithDebInfo\" - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;HAS_YOLO=1;CMAKE_INTDIR=\"RelWithDebInfo\" + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) - D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\include;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\third_party\onnxruntime\include;C:\Users\29578\.conda\envs\opencv-build\Library\include;%(AdditionalIncludeDirectories) $(ProjectDir)/$(IntDir) %(Filename).h %(Filename).tlb %(Filename)_i.c %(Filename)_p.c + + Copying onnxruntime.dll to output + setlocal +D:\cmake\bin\cmake.exe -E copy_if_different D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.dll D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/RelWithDebInfo +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + - C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_highgui4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_videoio4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgcodecs4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgproc4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_core4130.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_highgui4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_videoio4130.lib;onnxruntime.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgcodecs4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_imgproc4130.lib;C:\Users\29578\.conda\envs\opencv-build\Library\lib\opencv_core4130.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib %(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 @@ -323,7 +371,7 @@ Always Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -331,12 +379,12 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -344,12 +392,12 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -357,12 +405,12 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false Building Custom Rule D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/CMakeLists.txt setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone @@ -370,7 +418,7 @@ endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd - C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXCompilerABI.cpp;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeCompilerIdDetection.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerABI.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineCompilerSupport.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeDetermineSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeFindBinUtils.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitIncludeInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseImplicitLinkInfo.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeParseLibraryArchitecture.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCCompiler.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeRCInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystem.cmake.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCXXCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestCompilerCommon.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CMakeTestRCCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ADSP-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMCC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\ARMClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\AppleClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Borland-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Cray-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\CrayClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Diab-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GHS-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IAR-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Intel-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVHPC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\OrangeC-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PGI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\PathScale-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Renesas-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SCO-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TI-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\TIClang-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Tasking-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\Watcom-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\CompilerId\VS-10.vcxproj.in;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\FindPackageMessage.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeDetermineLinkerId.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\CMakeInspectCXXLinker.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Internal\FeatureTesting.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Linker\MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Determine-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\Windows.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;%(AdditionalInputs) + C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig-version.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVConfig.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules-release.cmake;C:\Users\29578\.conda\envs\opencv-build\Library\cmake\x64\vc17\lib\OpenCVModules.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeCXXCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeRCCompiler.cmake;D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\4.3.2\CMakeSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCXXInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeCommonLanguageInclude.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeGenericSystem.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeInitializeConfigs.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeLanguageInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeRCInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInformation.cmake;D:\cmake\share\cmake-4.3\Modules\CMakeSystemSpecificInitialize.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\CMakeCommonCompilerMacros.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Compiler\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageHandleStandardArgs.cmake;D:\cmake\share\cmake-4.3\Modules\FindPackageMessage.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCXXLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Internal\CMakeCommonLinkerInformation.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Linker\MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Linker\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-Initialize.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC-CXX.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows-MSVC.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\Windows.cmake;D:\cmake\share\cmake-4.3\Modules\Platform\WindowsPaths.cmake;%(AdditionalInputs) D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\CMakeFiles\generate.stamp false @@ -379,6 +427,7 @@ if %errorlevel% neq 0 goto :VCEnd + @@ -388,6 +437,12 @@ if %errorlevel% neq 0 goto :VCEnd false Never + + {84DC21BA-E13C-3E77-9EB5-4AD550232221} + onnxruntime_imp_lib + false + Never + diff --git a/src/热成像识别/cpp/build/thermal_detector.vcxproj.filters b/src/热成像识别/cpp/build/thermal_detector.vcxproj.filters index 8cb810ad..2b269a9a 100644 --- a/src/热成像识别/cpp/build/thermal_detector.vcxproj.filters +++ b/src/热成像识别/cpp/build/thermal_detector.vcxproj.filters @@ -10,6 +10,9 @@ Source Files + + Source Files + diff --git a/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.recipe b/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.recipe index 692e1142..bf67c992 100644 --- a/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.recipe +++ b/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.recipe @@ -4,6 +4,9 @@ D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\x64\Release\ZERO_CHECK + + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\x64\Release\onnxruntime_imp_lib + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\thermal_detector.exe diff --git a/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.command.1.tlog b/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.command.1.tlog index 28b6ea4f..6ca5a6be 100644 --- a/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.command.1.tlog +++ b/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.command.1.tlog @@ -1,6 +1,6 @@ ^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\CMAKELISTS.TXT setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone diff --git a/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.read.1.tlog b/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.read.1.tlog index ee4abe96..f118c472 100644 --- a/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.read.1.tlog +++ b/src/热成像识别/cpp/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.read.1.tlog @@ -4,95 +4,30 @@ C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\OPENCVCONFIG.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVCONFIG.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVMODULES-RELEASE.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVMODULES.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXCOMPILER.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXCOMPILERABI.CPP -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECOMMONLANGUAGEINCLUDE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECOMPILERIDDETECTION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECXXCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERABI.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERID.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERSUPPORT.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINERCCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINESYSTEM.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEFINDBINUTILS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEGENERICSYSTEM.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEINITIALIZECONFIGS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKELANGUAGEINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSEIMPLICITINCLUDEINFO.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSEIMPLICITLINKINFO.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSELIBRARYARCHITECTURE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKERCCOMPILER.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKERCINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEM.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINITIALIZE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTCXXCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTCOMPILERCOMMON.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTRCCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ADSP-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ARMCC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ARMCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\APPLECLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\BORLAND-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CMAKECOMMONCOMPILERMACROS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CLANG-DETERMINECOMPILERINTERNAL.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\COMPAQ-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CRAY-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CRAYCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\DIAB-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\EMBARCADERO-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\FUJITSU-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\FUJITSUCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\GHS-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\GNU-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\HP-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IAR-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IBMCPP-CXX-DETERMINEVERSIONINTERNAL.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IBMCLANG-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\INTEL-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\INTELLLVM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\LCC-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\NVHPC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\NVIDIA-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\OPENWATCOM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ORANGEC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\PGI-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\PATHSCALE-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\RENESAS-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\SCO-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\SUNPRO-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TI-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TICLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TASKING-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\VISUALAGE-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\WATCOM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\XL-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\XLCLANG-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ZOS-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILERID\VS-10.VCXPROJ.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEHANDLESTANDARDARGS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEMESSAGE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECXXLINKERINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECOMMONLINKERINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKEDETERMINELINKERID.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKEINSPECTCXXLINKER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\FEATURETESTING.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-DETERMINE-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-INITIALIZE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWSPATHS.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKECXXCOMPILER.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKERCCOMPILER.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKESYSTEM.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKECXXINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKECOMMONLANGUAGEINCLUDE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKEGENERICSYSTEM.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKEINITIALIZECONFIGS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKELANGUAGEINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKERCINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINITIALIZE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\CMAKECOMMONCOMPILERMACROS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEHANDLESTANDARDARGS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEMESSAGE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECXXLINKERINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECOMMONLINKERINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-INITIALIZE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWSPATHS.CMAKE diff --git a/src/热成像识别/cpp/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.command.1.tlog b/src/热成像识别/cpp/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.command.1.tlog index 48d43fcc..9cfec1a3 100644 --- a/src/热成像识别/cpp/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.command.1.tlog +++ b/src/热成像识别/cpp/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.command.1.tlog @@ -1,6 +1,6 @@ ^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\56E5ECA5E8F7B67EB6DC57ED2871D760\GENERATE.STAMP.RULE setlocal -C:\Users\29578\.conda\envs\opencv-build\Library\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/thermal_detector.sln if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone diff --git a/src/热成像识别/cpp/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.read.1.tlog b/src/热成像识别/cpp/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.read.1.tlog index db05637c..84b340c6 100644 --- a/src/热成像识别/cpp/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.read.1.tlog +++ b/src/热成像识别/cpp/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.read.1.tlog @@ -4,96 +4,31 @@ C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\OPENCVCONFIG.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVCONFIG.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVMODULES-RELEASE.CMAKE C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVMODULES.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXCOMPILER.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXCOMPILERABI.CPP -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECXXINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECOMMONLANGUAGEINCLUDE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKECOMPILERIDDETECTION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECXXCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERABI.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERID.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINECOMPILERSUPPORT.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINERCCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEDETERMINESYSTEM.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEFINDBINUTILS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEGENERICSYSTEM.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEINITIALIZECONFIGS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKELANGUAGEINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSEIMPLICITINCLUDEINFO.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSEIMPLICITLINKINFO.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKEPARSELIBRARYARCHITECTURE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKERCCOMPILER.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKERCINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEM.CMAKE.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINITIALIZE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTCXXCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTCOMPILERCOMMON.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\CMAKETESTRCCOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ADSP-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ARMCC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ARMCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\APPLECLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\BORLAND-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CMAKECOMMONCOMPILERMACROS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CLANG-DETERMINECOMPILERINTERNAL.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\COMPAQ-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CRAY-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\CRAYCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\DIAB-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\EMBARCADERO-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\FUJITSU-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\FUJITSUCLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\GHS-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\GNU-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\HP-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IAR-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IBMCPP-CXX-DETERMINEVERSIONINTERNAL.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\IBMCLANG-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\INTEL-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\INTELLLVM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\LCC-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\NVHPC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\NVIDIA-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\OPENWATCOM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ORANGEC-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\PGI-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\PATHSCALE-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\RENESAS-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\SCO-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\SUNPRO-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TI-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TICLANG-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\TASKING-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\VISUALAGE-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\WATCOM-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\XL-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\XLCLANG-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILER\ZOS-CXX-DETERMINECOMPILER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\COMPILERID\VS-10.VCXPROJ.IN -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEHANDLESTANDARDARGS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEMESSAGE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECXXLINKERINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECOMMONLINKERINFORMATION.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKEDETERMINELINKERID.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKEINSPECTCXXLINKER.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\INTERNAL\FEATURETESTING.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-DETERMINE-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-INITIALIZE.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC-CXX.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS.CMAKE -C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWSPATHS.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\CMAKELISTS.TXT D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKECXXCOMPILER.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKERCCOMPILER.CMAKE D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKESYSTEM.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKECXXINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKECOMMONLANGUAGEINCLUDE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKEGENERICSYSTEM.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKEINITIALIZECONFIGS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKELANGUAGEINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKERCINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINITIALIZE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\CMAKECOMMONCOMPILERMACROS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEHANDLESTANDARDARGS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEMESSAGE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECXXLINKERINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECOMMONLINKERINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-INITIALIZE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWSPATHS.CMAKE diff --git a/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.command.1.tlog b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.command.1.tlog new file mode 100644 index 00000000..2b42e384 --- /dev/null +++ b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.command.1.tlog @@ -0,0 +1,28 @@ +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\E9BD87DD49C8A00A589935B380B13B97\ONNXRUNTIME.LIB.RULE +setlocal +lib.exe /def:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.def /out:D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/onnxruntime.lib /machine:x64 +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\56E5ECA5E8F7B67EB6DC57ED2871D760\ONNXRUNTIME_IMP_LIB.RULE +setlocal +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\CMAKELISTS.TXT +setlocal +D:\cmake\bin\cmake.exe -SD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp -BD:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build --check-stamp-file D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/cpp/build/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd diff --git a/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.read.1.tlog b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.read.1.tlog new file mode 100644 index 00000000..29fefe7d --- /dev/null +++ b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.read.1.tlog @@ -0,0 +1,37 @@ +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\E9BD87DD49C8A00A589935B380B13B97\ONNXRUNTIME.LIB.RULE +D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\THIRD_PARTY\ONNXRUNTIME\LIB\ONNXRUNTIME.DEF +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\56E5ECA5E8F7B67EB6DC57ED2871D760\ONNXRUNTIME_IMP_LIB.RULE +D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\ONNXRUNTIME.LIB +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\CMAKELISTS.TXT +C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\OPENCVCONFIG-VERSION.CMAKE +C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\OPENCVCONFIG.CMAKE +C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVCONFIG.CMAKE +C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVMODULES-RELEASE.CMAKE +C:\USERS\29578\.CONDA\ENVS\OPENCV-BUILD\LIBRARY\CMAKE\X64\VC17\LIB\OPENCVMODULES.CMAKE +D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKECXXCOMPILER.CMAKE +D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKERCCOMPILER.CMAKE +D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\4.3.2\CMAKESYSTEM.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKECXXINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKECOMMONLANGUAGEINCLUDE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKEGENERICSYSTEM.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKEINITIALIZECONFIGS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKELANGUAGEINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKERCINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\CMAKESYSTEMSPECIFICINITIALIZE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\CMAKECOMMONCOMPILERMACROS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\COMPILER\MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEHANDLESTANDARDARGS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\FINDPACKAGEMESSAGE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECXXLINKERINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\INTERNAL\CMAKECOMMONLINKERINFORMATION.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\LINKER\MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\LINKER\WINDOWS-MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-INITIALIZE.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC-CXX.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS-MSVC.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWS.CMAKE +D:\CMAKE\SHARE\CMAKE-4.3\MODULES\PLATFORM\WINDOWSPATHS.CMAKE diff --git a/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.write.1.tlog b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.write.1.tlog new file mode 100644 index 00000000..2cc55e6c --- /dev/null +++ b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/CustomBuild.write.1.tlog @@ -0,0 +1,6 @@ +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\E9BD87DD49C8A00A589935B380B13B97\ONNXRUNTIME.LIB.RULE +D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\ONNXRUNTIME.LIB +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\56E5ECA5E8F7B67EB6DC57ED2871D760\ONNXRUNTIME_IMP_LIB.RULE +D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\ONNXRUNTIME_IMP_LIB +^D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\CMAKELISTS.TXT +D:\29578\DOCUMENTS\STUDY\COMPUTER\S_E\软件体系结构与设计\软件开发\热成像识别\CPP\BUILD\CMAKEFILES\GENERATE.STAMP diff --git a/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/onnxruntime_imp_lib.lastbuildstate b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/onnxruntime_imp_lib.lastbuildstate new file mode 100644 index 00000000..c0934f87 --- /dev/null +++ b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxrunt.84DC21BA.tlog/onnxruntime_imp_lib.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.43.34808:TargetPlatformVersion=10.0.22621.0: +Release|x64|D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\| diff --git a/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxruntime_imp_lib.recipe b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxruntime_imp_lib.recipe new file mode 100644 index 00000000..4c3dd3d0 --- /dev/null +++ b/src/热成像识别/cpp/build/x64/Release/onnxruntime_imp_lib/onnxruntime_imp_lib.recipe @@ -0,0 +1,14 @@ + + + + + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\x64\Release\ZERO_CHECK + + + D:\29578\Documents\Study\computer\S_E\软件体系结构与设计\软件开发\热成像识别\cpp\build\x64\Release\onnxruntime_imp_lib + + + + + + \ No newline at end of file diff --git a/src/热成像识别/cpp/include/thermal_detector.h b/src/热成像识别/cpp/include/thermal_detector.h index 7acbb3ab..6925900d 100644 --- a/src/热成像识别/cpp/include/thermal_detector.h +++ b/src/热成像识别/cpp/include/thermal_detector.h @@ -13,12 +13,12 @@ public: // 可视化 static cv::Mat draw_detections(const cv::Mat& image, const Assessment& assessment); -private: - DetectorConfig cfg_; - // 环境温度估计 static double estimate_ambient(const cv::Mat& temp_map); +private: + DetectorConfig cfg_; + // Pass 1: 人员检测 (体温段) std::vector detect_persons(const cv::Mat& bands, const cv::Mat& temp_map, diff --git a/src/热成像识别/cpp/include/yolo_detector.h b/src/热成像识别/cpp/include/yolo_detector.h new file mode 100644 index 00000000..6ca75646 --- /dev/null +++ b/src/热成像识别/cpp/include/yolo_detector.h @@ -0,0 +1,34 @@ +#pragma once + +#include "thermal_types.h" +#include +#include +#include +#include + +struct YoloConfig { + std::string model_path; + int input_size = 640; + float conf_threshold = 0.25f; + float nms_threshold = 0.45f; + int max_detections = 100; + int intra_threads = 1; +}; + +class YoloDetector { +public: + explicit YoloDetector(const YoloConfig& config); + ~YoloDetector(); + + YoloDetector(const YoloDetector&) = delete; + YoloDetector& operator=(const YoloDetector&) = delete; + YoloDetector(YoloDetector&&) noexcept; + YoloDetector& operator=(YoloDetector&&) noexcept; + + std::vector detect(const cv::Mat& image); + bool is_loaded() const noexcept; + +private: + struct Impl; + std::unique_ptr impl_; +}; diff --git a/src/热成像识别/cpp/models/yolov8n.onnx b/src/热成像识别/cpp/models/yolov8n.onnx new file mode 100644 index 00000000..aa08e57f Binary files /dev/null and b/src/热成像识别/cpp/models/yolov8n.onnx differ diff --git a/src/热成像识别/cpp/models/yolov8n_thermal.onnx b/src/热成像识别/cpp/models/yolov8n_thermal.onnx new file mode 100644 index 00000000..f04bbdc4 Binary files /dev/null and b/src/热成像识别/cpp/models/yolov8n_thermal.onnx differ diff --git a/src/热成像识别/cpp/onnxruntime.dll b/src/热成像识别/cpp/onnxruntime.dll new file mode 100644 index 00000000..76764755 Binary files /dev/null and b/src/热成像识别/cpp/onnxruntime.dll differ diff --git a/src/热成像识别/cpp/opencv_core4130.dll b/src/热成像识别/cpp/opencv_core4130.dll new file mode 100644 index 00000000..e1f0b52e Binary files /dev/null and b/src/热成像识别/cpp/opencv_core4130.dll differ diff --git a/src/热成像识别/cpp/opencv_highgui4130.dll b/src/热成像识别/cpp/opencv_highgui4130.dll new file mode 100644 index 00000000..72568975 Binary files /dev/null and b/src/热成像识别/cpp/opencv_highgui4130.dll differ diff --git a/src/热成像识别/cpp/opencv_imgcodecs4130.dll b/src/热成像识别/cpp/opencv_imgcodecs4130.dll new file mode 100644 index 00000000..1dc91f05 Binary files /dev/null and b/src/热成像识别/cpp/opencv_imgcodecs4130.dll differ diff --git a/src/热成像识别/cpp/opencv_imgproc4130.dll b/src/热成像识别/cpp/opencv_imgproc4130.dll new file mode 100644 index 00000000..d093568b Binary files /dev/null and b/src/热成像识别/cpp/opencv_imgproc4130.dll differ diff --git a/src/热成像识别/cpp/opencv_videoio4130.dll b/src/热成像识别/cpp/opencv_videoio4130.dll new file mode 100644 index 00000000..fe87402d Binary files /dev/null and b/src/热成像识别/cpp/opencv_videoio4130.dll differ diff --git a/src/热成像识别/cpp/src/main.cpp b/src/热成像识别/cpp/src/main.cpp index f1ce4664..0a452c41 100644 --- a/src/热成像识别/cpp/src/main.cpp +++ b/src/热成像识别/cpp/src/main.cpp @@ -1,5 +1,10 @@ #include "thermal_preprocessor.h" #include "thermal_detector.h" + +#ifdef HAS_YOLO +#include "yolo_detector.h" +#endif + #include #include #include @@ -10,12 +15,14 @@ static void print_usage(const char* prog) { std::cout << "Usage: " << prog << " [options]\n" << " " << prog << " [options]\n\n" << "Options:\n" - << " --no-show Don't display results (save only)\n" - << " --json Output JSON format result\n" - << " --help Show this help\n\n" + << " --mode Detection mode: classical (default), yolo\n" + << " --model YOLO ONNX model path\n" + << " --no-show Don't display results (save only)\n" + << " --json Output JSON format result\n" + << " --help Show this help\n\n" << "Examples:\n" << " thermal_detector test_images/photo.jpg\n" - << " thermal_detector test_images/ --no-show\n"; + << " thermal_detector test_images/photo.jpg --mode yolo --model models/yolov8n_thermal.onnx\n"; } static std::string threat_type_str(ThreatType t) { @@ -83,28 +90,95 @@ static std::string get_output_path(const std::string& input_path) { return dir + "result_" + fname; } -static bool has_image_ext(const std::string& path) { - std::string ext; - auto pos = path.rfind('.'); - if (pos != std::string::npos) ext = path.substr(pos); - return ext == ".jpg" || ext == ".jpeg" || ext == ".png" || ext == ".bmp" || ext == ".tif"; +#ifdef HAS_YOLO +static Assessment detect_with_yolo( + const cv::Mat& img, + YoloDetector& yolo, + ThermalPreprocessor& preprocessor) +{ + auto yolo_dets = yolo.detect(img); + + // 运行预处理获取温度信息 + auto preprocessed = preprocessor.preprocess(img); + double ambient = ThermalDetector::estimate_ambient(preprocessed.temperature_map); + + // 用温度图补充 YOLO 检测结果 + for (auto& det : yolo_dets) { + if (!preprocessed.temperature_map.empty()) { + cv::Rect safe = det.bbox & cv::Rect(0, 0, + preprocessed.temperature_map.cols, + preprocessed.temperature_map.rows); + if (!safe.empty()) { + cv::Mat roi = preprocessed.temperature_map(safe); + double min_t, max_t; + cv::minMaxLoc(roi, &min_t, &max_t); + det.max_temp = max_t; + det.mean_temp = cv::mean(roi)[0]; + } + } + det.area = det.bbox.width * det.bbox.height; + det.aspect_ratio = (double)std::max(det.bbox.width, det.bbox.height) + / std::max(std::min(det.bbox.width, det.bbox.height), 1); + } + + Assessment assessment; + assessment.detections = yolo_dets; + assessment.ambient_temp = ambient; + + for (const auto& d : yolo_dets) { + switch (d.type) { + case ThreatType::PERSON: assessment.persons.push_back(d); break; + case ThreatType::ANOMALY_HOTSPOT: assessment.hotspots.push_back(d); break; + default: break; + } + } + return assessment; } +#endif int main(int argc, char* argv[]) { if (argc < 2) { print_usage(argv[0]); return 1; } std::string source = argv[1]; bool show = true, json_out = false; + std::string mode = "classical"; + std::string model_path = "models/yolov8n_thermal.onnx"; for (int i = 2; i < argc; i++) { if (std::strcmp(argv[i], "--no-show") == 0) show = false; else if (std::strcmp(argv[i], "--json") == 0) json_out = true; else if (std::strcmp(argv[i], "--help") == 0) { print_usage(argv[0]); return 0; } + else if (std::strcmp(argv[i], "--mode") == 0 && i + 1 < argc) { + mode = argv[++i]; + } + else if (std::strcmp(argv[i], "--model") == 0 && i + 1 < argc) { + model_path = argv[++i]; + } } ThermalPreprocessor preprocessor; ThermalDetector detector; +#ifdef HAS_YOLO + std::unique_ptr yolo_detector; + if (mode == "yolo") { + YoloConfig yolo_cfg; + yolo_cfg.model_path = model_path; + yolo_detector = std::make_unique(yolo_cfg); + if (!yolo_detector->is_loaded()) { + std::cerr << "[WARN] Failed to load YOLO model, falling back to classical\n"; + mode = "classical"; + } else { + std::cerr << "[INFO] YOLO mode: " << model_path << "\n"; + } + } +#else + if (mode == "yolo") { + std::cerr << "[WARN] YOLO mode not available (built without ONNX Runtime)\n"; + mode = "classical"; + } +#endif + auto process_one = [&](const std::string& path) { cv::Mat img = cv::imread(path, cv::IMREAD_COLOR); if (img.empty()) @@ -115,18 +189,27 @@ int main(int argc, char* argv[]) { } auto t0 = std::chrono::high_resolution_clock::now(); - auto preprocessed = preprocessor.preprocess(img); - auto assessment = detector.detect(preprocessed); + + Assessment assessment; + if (mode == "yolo") { +#ifdef HAS_YOLO + assessment = detect_with_yolo(img, *yolo_detector, preprocessor); +#endif + } else { + auto preprocessed = preprocessor.preprocess(img); + assessment = detector.detect(preprocessed); + } + auto t1 = std::chrono::high_resolution_clock::now(); double ms = std::chrono::duration(t1 - t0).count(); if (json_out) { print_json(assessment, path); } else { + std::cout << "[" << mode << " mode]\n"; print_assessment(assessment, path, ms); } - // 保存标注图 cv::Mat vis = ThermalDetector::draw_detections(img, assessment); std::string out_path = get_output_path(path); cv::imwrite(out_path, vis); diff --git a/src/热成像识别/cpp/src/yolo_detector.cpp b/src/热成像识别/cpp/src/yolo_detector.cpp new file mode 100644 index 00000000..6a756bf5 --- /dev/null +++ b/src/热成像识别/cpp/src/yolo_detector.cpp @@ -0,0 +1,255 @@ +#include "yolo_detector.h" +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include +#endif + +struct YoloDetector::Impl { + YoloConfig config; + Ort::Env env; + std::unique_ptr session; + std::unique_ptr session_options; + bool loaded = false; + int num_classes = 0; + int input_size = 640; + + explicit Impl(const YoloConfig& cfg) + : config(cfg), env(ORT_LOGGING_LEVEL_WARNING, "thermal-yolo"), + input_size(cfg.input_size) { + session_options = std::make_unique(); + session_options->SetIntraOpNumThreads(config.intra_threads); + session_options->SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_EXTENDED); + } + + bool load_model(const std::string& path) { + std::ifstream check(path, std::ios::binary); + if (!check) { + std::cerr << "[YOLO] Model file not found: " << path << std::endl; + return false; + } + check.close(); + + try { +#ifdef _WIN32 + int wlen = MultiByteToWideChar(CP_UTF8, 0, path.c_str(), -1, nullptr, 0); + std::wstring wpath; + if (wlen > 0) { + wpath.resize(static_cast(wlen)); + MultiByteToWideChar(CP_UTF8, 0, path.c_str(), -1, &wpath[0], wlen); + } + session = std::make_unique(env, wpath.c_str(), *session_options); +#else + session = std::make_unique(env, path.c_str(), *session_options); +#endif + } catch (const Ort::Exception& e) { + std::cerr << "[YOLO] ONNX Runtime load failed: " << e.what() << std::endl; + return false; + } + + // 从输出形状推断类别数 + auto output_count = session->GetOutputCount(); + if (output_count > 0) { + auto type_info = session->GetOutputTypeInfo(0); + auto tensor_info = type_info.GetTensorTypeAndShapeInfo(); + auto shape = tensor_info.GetShape(); + // YOLOv8 输出: [1, 4+nc, 8400] + if (shape.size() == 3 && shape[1] > 4) { + num_classes = static_cast(shape[1]) - 4; + } + } + + loaded = session != nullptr; + return loaded; + } + + std::vector preprocess(const cv::Mat& image, int& orig_w, int& orig_h) { + cv::Mat bgr; + if (image.channels() == 1) + cv::cvtColor(image, bgr, cv::COLOR_GRAY2BGR); + else + bgr = image; + + orig_w = bgr.cols; + orig_h = bgr.rows; + + cv::Mat resized; + cv::resize(bgr, resized, cv::Size(input_size, input_size)); + + cv::Mat rgb; + cv::cvtColor(resized, rgb, cv::COLOR_BGR2RGB); + + cv::Mat f32; + rgb.convertTo(f32, CV_32F, 1.0 / 255.0); + + std::vector channels(3); + cv::split(f32, channels); + + int channel_size = input_size * input_size; + std::vector input_data(3 * channel_size); + for (int c = 0; c < 3; c++) { + std::memcpy(input_data.data() + c * channel_size, + channels[c].data, channel_size * sizeof(float)); + } + return input_data; + } + + struct RawDet { + float cx, cy, w, h; + int class_id; + float score; + }; + + static double compute_iou(const cv::Rect& a, const cv::Rect& b) { + int ix1 = std::max(a.x, b.x); + int iy1 = std::max(a.y, b.y); + int ix2 = std::min(a.x + a.width, b.x + b.width); + int iy2 = std::min(a.y + a.height, b.y + b.height); + int inter = std::max(0, ix2 - ix1) * std::max(0, iy2 - iy1); + int area_a = a.width * a.height; + int area_b = b.width * b.height; + int union_area = area_a + area_b - inter; + return static_cast(inter) / std::max(union_area, 1); + } + + ThreatType map_class(int class_id) { + if (num_classes == 80) { + return (class_id == 0) ? ThreatType::PERSON : ThreatType::PERSON; + } + if (class_id == 0) return ThreatType::PERSON; + if (class_id == 1) return ThreatType::ANOMALY_HOTSPOT; + return ThreatType::PERSON; + } + + std::vector postprocess( + std::vector& outputs, + int orig_w, int orig_h) + { + if (outputs.empty()) return {}; + + float* data = outputs[0].GetTensorMutableData(); + auto shape = outputs[0].GetTensorTypeAndShapeInfo().GetShape(); + int nc = static_cast(shape[1]) - 4; + int num_preds = static_cast(shape[2]); + + std::vector raw; + for (int i = 0; i < num_preds; i++) { + float best_score = 0; + int best_class = 0; + for (int c = 0; c < nc; c++) { + float s = data[(4 + c) * num_preds + i]; + if (s > best_score) { best_score = s; best_class = c; } + } + if (best_score < config.conf_threshold) continue; + + raw.push_back({ + data[0 * num_preds + i], + data[1 * num_preds + i], + data[2 * num_preds + i], + data[3 * num_preds + i], + best_class, best_score + }); + } + + // NMS + std::sort(raw.begin(), raw.end(), + [](const RawDet& a, const RawDet& b) { return a.score > b.score; }); + + float scale_x = static_cast(orig_w) / input_size; + float scale_y = static_cast(orig_h) / input_size; + + // 转换为 cv::Rect 并做 NMS + std::vector> boxed; + for (const auto& d : raw) { + int x = static_cast((d.cx - d.w / 2) * scale_x); + int y = static_cast((d.cy - d.h / 2) * scale_y); + int w = static_cast(d.w * scale_x); + int h = static_cast(d.h * scale_y); + boxed.push_back({d, cv::Rect(x, y, w, h)}); + } + + std::vector keep; + for (int i = 0; i < static_cast(boxed.size()); i++) { + bool suppressed = false; + for (int j : keep) { + if (compute_iou(boxed[i].second, boxed[j].second) > config.nms_threshold) { + suppressed = true; + break; + } + } + if (!suppressed) keep.push_back(i); + if (static_cast(keep.size()) >= config.max_detections) break; + } + + std::vector results; + for (int idx : keep) { + const auto& det = boxed[idx].first; + const auto& box = boxed[idx].second; + results.push_back({ + map_class(det.class_id), + static_cast(det.score), + box, + cv::Point2d(box.x + box.width / 2.0, box.y + box.height / 2.0), + 0, 0, + box.width * box.height, + static_cast(std::max(box.width, box.height)) / + std::max(std::min(box.width, box.height), 1) + }); + } + return results; + } + + std::vector detect(const cv::Mat& image) { + if (!loaded) return {}; + + int orig_w, orig_h; + auto input_data = preprocess(image, orig_w, orig_h); + + auto memory_info = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + std::vector input_shape = {1, 3, input_size, input_size}; + Ort::Value input_tensor = Ort::Value::CreateTensor( + memory_info, input_data.data(), input_data.size(), + input_shape.data(), input_shape.size()); + + // 动态获取 I/O 名称 + auto allocator = Ort::AllocatorWithDefaultOptions(); + auto input_name = session->GetInputNameAllocated(0, allocator); + auto output_name = session->GetOutputNameAllocated(0, allocator); + const char* input_names[] = {input_name.get()}; + const char* output_names[] = {output_name.get()}; + + auto outputs = session->Run( + Ort::RunOptions{nullptr}, + input_names, &input_tensor, 1, + output_names, 1); + + return postprocess(outputs, orig_w, orig_h); + } +}; + +YoloDetector::YoloDetector(const YoloConfig& config) + : impl_(std::make_unique(config)) { + if (!config.model_path.empty()) { + impl_->load_model(config.model_path); + } +} + +YoloDetector::~YoloDetector() = default; +YoloDetector::YoloDetector(YoloDetector&&) noexcept = default; +YoloDetector& YoloDetector::operator=(YoloDetector&&) noexcept = default; + +std::vector YoloDetector::detect(const cv::Mat& image) { + return impl_->detect(image); +} + +bool YoloDetector::is_loaded() const noexcept { + return impl_->loaded; +} diff --git a/src/热成像识别/cpp/thermal_detector.exe b/src/热成像识别/cpp/thermal_detector.exe index 850c5760..49cf71f1 100644 Binary files a/src/热成像识别/cpp/thermal_detector.exe and b/src/热成像识别/cpp/thermal_detector.exe differ diff --git a/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_c_api.h b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_c_api.h new file mode 100644 index 00000000..584aec3f --- /dev/null +++ b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_c_api.h @@ -0,0 +1,4917 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// See docs\c_cxx\README.md on generating the Doxygen documentation from this file + +/** \mainpage ONNX Runtime + * + * ONNX Runtime is a high-performance inference and training graph execution engine for deep learning models. + * + * ONNX Runtime's C, C++ APIs offer an easy to use interface to onboard and execute onnx models. + * - \subpage c_cpp_api "Core C, C++ APIs" + * - \subpage training_c_cpp_api "Training C, C++ APIs for on-device training" + * + * \page c_cpp_api Core C, C++ APIs + *

C

+ * + * ::OrtApi - Click here to go to the structure with all C API functions. + * + *

C++

+ * + * ::Ort - Click here to go to the namespace holding all of the C++ wrapper classes + * + * It is a set of header only wrapper classes around the C API. The goal is to turn the C style return value error codes into C++ exceptions, and to + * automate memory management through standard C++ RAII principles. + * + * \addtogroup Global + * ONNX Runtime C API + * @{ + */ + +#pragma once +#include +#include +#include +#include + +/** \brief The API version defined in this header + * + * This value is used by some API functions to behave as this version of the header expects. + */ +#define ORT_API_VERSION 17 + +#ifdef __cplusplus +extern "C" { +#endif + +//! @} +// SAL2 Definitions +#ifndef _WIN32 +#define _In_ +#define _In_z_ +#define _In_opt_ +#define _In_opt_z_ +#define _Out_ +#define _Outptr_ +#define _Out_opt_ +#define _Inout_ +#define _Inout_opt_ +#define _Frees_ptr_opt_ +#define _Ret_maybenull_ +#define _Ret_notnull_ +#define _Check_return_ +#define _Outptr_result_maybenull_ +#define _In_reads_(X) +#define _Inout_updates_(X) +#define _Out_writes_(X) +#define _Inout_updates_all_(X) +#define _Out_writes_bytes_all_(X) +#define _Out_writes_all_(X) +#define _Success_(X) +#define _Outptr_result_buffer_maybenull_(X) +#define ORT_ALL_ARGS_NONNULL __attribute__((nonnull)) +#else +#include +#define ORT_ALL_ARGS_NONNULL +#endif + +#ifdef _WIN32 +// Define ORT_DLL_IMPORT if your program is dynamically linked to Ort. +// dllexport is not used, we use a .def file. +#ifdef ORT_DLL_IMPORT +#define ORT_EXPORT __declspec(dllimport) +#else +#define ORT_EXPORT +#endif +#define ORT_API_CALL _stdcall +#define ORT_MUST_USE_RESULT +#define ORTCHAR_T wchar_t +#else +// To make symbols visible on macOS/iOS +#ifdef __APPLE__ +#define ORT_EXPORT __attribute__((visibility("default"))) +#else +#define ORT_EXPORT +#endif +#define ORT_API_CALL +#define ORT_MUST_USE_RESULT __attribute__((warn_unused_result)) +#define ORTCHAR_T char +#endif + +/// ORTCHAR_T, ORT_TSTR are reserved specifically for path handling. +/// All other strings are UTF-8 encoded, use char and std::string +#ifndef ORT_TSTR +#ifdef _WIN32 +#define ORT_TSTR(X) L##X +// When X is a macro, L##X is not defined. In this case, we need to use ORT_TSTR_ON_MACRO. +#define ORT_TSTR_ON_MACRO(X) L"" X +#else +#define ORT_TSTR(X) X +#define ORT_TSTR_ON_MACRO(X) X +#endif +#endif + +// On Windows, ORT_FILE is a wchar_t version of the __FILE__ macro. +// Otherwise, ORT_FILE is equivalent to __FILE__. +#ifndef ORT_FILE +#define ORT_FILE_INTERNAL(x) ORT_TSTR(x) +#define ORT_FILE ORT_FILE_INTERNAL(__FILE__) +#endif + +// Any pointer marked with _In_ or _Out_, cannot be NULL. + +// Windows users should use unicode paths when possible to bypass the MAX_PATH limitation +// Every pointer marked with _In_ or _Out_, cannot be NULL. Caller should ensure that. +// for ReleaseXXX(...) functions, they can accept NULL pointer. + +#ifdef __cplusplus +// For any compiler with C++11 support, MSVC 2015 and greater, or Clang version supporting noexcept. +// Such complex condition is needed because compilers set __cplusplus value differently. +#ifndef __has_feature +#define __has_feature(x) 0 +#endif +#if ((__cplusplus >= 201103L) || (_MSC_VER >= 1900) || (defined(__has_feature) && __has_feature(cxx_noexcept))) +#define NO_EXCEPTION noexcept +#else +#define NO_EXCEPTION throw() +#endif +#else +#define NO_EXCEPTION +#endif + +// __VA_ARGS__ on Windows and Linux are different +#define ORT_API(RETURN_TYPE, NAME, ...) RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION + +#define ORT_API_STATUS(NAME, ...) \ + _Success_(return == 0) _Check_return_ _Ret_maybenull_ OrtStatusPtr ORT_API_CALL NAME(__VA_ARGS__) \ + NO_EXCEPTION ORT_MUST_USE_RESULT + +// XXX: Unfortunately, SAL annotations are known to not work with function pointers +#define ORT_API2_STATUS(NAME, ...) \ + _Check_return_ _Ret_maybenull_ OrtStatusPtr(ORT_API_CALL* NAME)(__VA_ARGS__) NO_EXCEPTION ORT_MUST_USE_RESULT + +// Used in *.cc files. Almost as same as ORT_API_STATUS, except without ORT_MUST_USE_RESULT and ORT_EXPORT +#define ORT_API_STATUS_IMPL(NAME, ...) \ + _Success_(return == 0) _Check_return_ _Ret_maybenull_ OrtStatusPtr ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION + +#define ORT_CLASS_RELEASE(X) void(ORT_API_CALL * Release##X)(_Frees_ptr_opt_ Ort##X * input) + +#ifdef __DOXYGEN__ +#undef ORT_API_STATUS +#define ORT_API_STATUS(NAME, ...) OrtStatus* NAME(__VA_ARGS__) +#undef ORT_API2_STATUS +#define ORT_API2_STATUS(NAME, ...) OrtStatus* NAME(__VA_ARGS__) +#undef ORT_CLASS_RELEASE +#define ORT_CLASS_RELEASE(X) void Release##X(Ort##X* input) +#undef NO_EXCEPTION +#define NO_EXCEPTION +#endif +/** \addtogroup Global + * ONNX Runtime C API + * @{ + */ + +/** Copied from TensorProto::DataType + * Currently, Ort doesn't support complex64, complex128 + */ +typedef enum ONNXTensorElementDataType { + ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED, + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT, // maps to c type float + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8, // maps to c type uint8_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8, // maps to c type int8_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16, // maps to c type uint16_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16, // maps to c type int16_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32, // maps to c type int32_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64, // maps to c type int64_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING, // maps to c++ type std::string + ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL, + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16, + ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE, // maps to c type double + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32, // maps to c type uint32_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64, // maps to c type uint64_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64, // complex with float32 real and imaginary components + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128, // complex with float64 real and imaginary components + ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16, // Non-IEEE floating-point format based on IEEE754 single-precision + // float 8 types were introduced in onnx 1.14, see https://onnx.ai/onnx/technical/float8.html + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN, // Non-IEEE floating-point format based on IEEE754 single-precision + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ, // Non-IEEE floating-point format based on IEEE754 single-precision + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2, // Non-IEEE floating-point format based on IEEE754 single-precision + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ, // Non-IEEE floating-point format based on IEEE754 single-precision + // Int4 types were introduced in ONNX 1.16. See https://onnx.ai/onnx/technical/int4.html + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT4, // maps to a pair of packed uint4 values (size == 1 byte) + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT4 // maps to a pair of packed int4 values (size == 1 byte) +} ONNXTensorElementDataType; + +// Synced with onnx TypeProto oneof +typedef enum ONNXType { + ONNX_TYPE_UNKNOWN, + ONNX_TYPE_TENSOR, + ONNX_TYPE_SEQUENCE, + ONNX_TYPE_MAP, + ONNX_TYPE_OPAQUE, + ONNX_TYPE_SPARSETENSOR, + ONNX_TYPE_OPTIONAL +} ONNXType; + +// These types are synced with internal +// SparseFormatFlags +typedef enum OrtSparseFormat { + ORT_SPARSE_UNDEFINED = 0, + ORT_SPARSE_COO = 0x1, + ORT_SPARSE_CSRC = 0x2, + ORT_SPARSE_BLOCK_SPARSE = 0x4 +} OrtSparseFormat; + +// Enum allows to query sparse tensor indices +enum OrtSparseIndicesFormat { + ORT_SPARSE_COO_INDICES, + ORT_SPARSE_CSR_INNER_INDICES, + ORT_SPARSE_CSR_OUTER_INDICES, + ORT_SPARSE_BLOCK_SPARSE_INDICES +}; + +/** \brief Logging severity levels + * + * In typical API usage, specifying a logging severity level specifies the minimum severity of log messages to show. + */ +typedef enum OrtLoggingLevel { + ORT_LOGGING_LEVEL_VERBOSE, ///< Verbose informational messages (least severe). + ORT_LOGGING_LEVEL_INFO, ///< Informational messages. + ORT_LOGGING_LEVEL_WARNING, ///< Warning messages. + ORT_LOGGING_LEVEL_ERROR, ///< Error messages. + ORT_LOGGING_LEVEL_FATAL, ///< Fatal error messages (most severe). +} OrtLoggingLevel; + +typedef enum OrtErrorCode { + ORT_OK, + ORT_FAIL, + ORT_INVALID_ARGUMENT, + ORT_NO_SUCHFILE, + ORT_NO_MODEL, + ORT_ENGINE_ERROR, + ORT_RUNTIME_EXCEPTION, + ORT_INVALID_PROTOBUF, + ORT_MODEL_LOADED, + ORT_NOT_IMPLEMENTED, + ORT_INVALID_GRAPH, + ORT_EP_FAIL, +} OrtErrorCode; + +typedef enum OrtOpAttrType { + ORT_OP_ATTR_UNDEFINED = 0, + ORT_OP_ATTR_INT, + ORT_OP_ATTR_INTS, + ORT_OP_ATTR_FLOAT, + ORT_OP_ATTR_FLOATS, + ORT_OP_ATTR_STRING, + ORT_OP_ATTR_STRINGS, +} OrtOpAttrType; + +//! @} +#define ORT_RUNTIME_CLASS(X) \ + struct Ort##X; \ + typedef struct Ort##X Ort##X + +/** \addtogroup Global + * ONNX Runtime C API + * @{ + */ +// The actual types defined have an Ort prefix +ORT_RUNTIME_CLASS(Env); +ORT_RUNTIME_CLASS(Status); // nullptr for Status* indicates success +ORT_RUNTIME_CLASS(MemoryInfo); +ORT_RUNTIME_CLASS(IoBinding); +ORT_RUNTIME_CLASS(Session); // Don't call ReleaseSession from Dllmain (because session owns a thread pool) +ORT_RUNTIME_CLASS(Value); +ORT_RUNTIME_CLASS(RunOptions); +ORT_RUNTIME_CLASS(TypeInfo); +ORT_RUNTIME_CLASS(TensorTypeAndShapeInfo); +ORT_RUNTIME_CLASS(MapTypeInfo); +ORT_RUNTIME_CLASS(SequenceTypeInfo); +ORT_RUNTIME_CLASS(OptionalTypeInfo); +ORT_RUNTIME_CLASS(SessionOptions); +ORT_RUNTIME_CLASS(CustomOpDomain); +ORT_RUNTIME_CLASS(ModelMetadata); +ORT_RUNTIME_CLASS(ThreadPoolParams); +ORT_RUNTIME_CLASS(ThreadingOptions); +ORT_RUNTIME_CLASS(ArenaCfg); +ORT_RUNTIME_CLASS(PrepackedWeightsContainer); +ORT_RUNTIME_CLASS(TensorRTProviderOptionsV2); +ORT_RUNTIME_CLASS(CUDAProviderOptionsV2); +ORT_RUNTIME_CLASS(CANNProviderOptions); +ORT_RUNTIME_CLASS(DnnlProviderOptions); +ORT_RUNTIME_CLASS(Op); +ORT_RUNTIME_CLASS(OpAttr); +ORT_RUNTIME_CLASS(Logger); +ORT_RUNTIME_CLASS(ShapeInferContext); +ORT_RUNTIME_CLASS(LoraAdapter); + +#ifdef _WIN32 +typedef _Return_type_success_(return == 0) OrtStatus* OrtStatusPtr; +#else +typedef OrtStatus* OrtStatusPtr; +#endif + +/** \brief Memory allocation interface + * + * Structure of function pointers that defines a memory allocator. This can be created and filled in by the user for custom allocators. + * + * When an allocator is passed to any function, be sure that the allocator object is not destroyed until the last allocated object using it is freed. + */ +typedef struct OrtAllocator { + uint32_t version; ///< Must be initialized to ORT_API_VERSION + void*(ORT_API_CALL* Alloc)(struct OrtAllocator* this_, size_t size); ///< Returns a pointer to an allocated block of `size` bytes + void(ORT_API_CALL* Free)(struct OrtAllocator* this_, void* p); ///< Free a block of memory previously allocated with OrtAllocator::Alloc + const struct OrtMemoryInfo*(ORT_API_CALL* Info)(const struct OrtAllocator* this_); ///< Return a pointer to an ::OrtMemoryInfo that describes this allocator + /** + * @brief Optional allocation function to use for memory allocations made during session initialization. + * Use this function if you want to separate allocations made by ORT during Run() calls from + * those made during session initialization. This allows for separate memory management strategies for these allocations. + */ + void*(ORT_API_CALL* Reserve)(struct OrtAllocator* this_, size_t size); ///< Returns a pointer to an allocated block of `size` bytes +} OrtAllocator; + +typedef void(ORT_API_CALL* OrtLoggingFunction)( + void* param, OrtLoggingLevel severity, const char* category, const char* logid, const char* code_location, + const char* message); + +/** \brief Graph optimization level + * + * Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels + * for an in-depth understanding of the Graph Optimization Levels. + */ +typedef enum GraphOptimizationLevel { + ORT_DISABLE_ALL = 0, + ORT_ENABLE_BASIC = 1, + ORT_ENABLE_EXTENDED = 2, + ORT_ENABLE_ALL = 99 +} GraphOptimizationLevel; + +typedef enum ExecutionMode { + ORT_SEQUENTIAL = 0, + ORT_PARALLEL = 1, +} ExecutionMode; + +/** \brief Language projection identifiers + * /see OrtApi::SetLanguageProjection + */ +typedef enum OrtLanguageProjection { + ORT_PROJECTION_C = 0, + ORT_PROJECTION_CPLUSPLUS = 1, + ORT_PROJECTION_CSHARP = 2, + ORT_PROJECTION_PYTHON = 3, + ORT_PROJECTION_JAVA = 4, + ORT_PROJECTION_WINML = 5, + ORT_PROJECTION_NODEJS = 6, +} OrtLanguageProjection; + +struct OrtKernelInfo; +typedef struct OrtKernelInfo OrtKernelInfo; +struct OrtKernelContext; +typedef struct OrtKernelContext OrtKernelContext; +struct OrtCustomOp; +typedef struct OrtCustomOp OrtCustomOp; + +typedef enum OrtAllocatorType { + OrtInvalidAllocator = -1, + OrtDeviceAllocator = 0, + OrtArenaAllocator = 1 +} OrtAllocatorType; + +/** \brief Memory types for allocated memory, execution provider specific types should be extended in each provider. + */ +// Whenever this struct is updated, please also update the MakeKey function in onnxruntime / core / framework / execution_provider.cc +typedef enum OrtMemType { + OrtMemTypeCPUInput = -2, ///< Any CPU memory used by non-CPU execution provider + OrtMemTypeCPUOutput = -1, ///< CPU accessible memory outputted by non-CPU execution provider, i.e. CUDA_PINNED + OrtMemTypeCPU = OrtMemTypeCPUOutput, ///< Temporary CPU accessible memory allocated by non-CPU execution provider, i.e. CUDA_PINNED + OrtMemTypeDefault = 0, ///< The default allocator for execution provider +} OrtMemType; + +/** \brief This mimics OrtDevice type constants so they can be returned in the API + */ +typedef enum OrtMemoryInfoDeviceType { + OrtMemoryInfoDeviceType_CPU = 0, + OrtMemoryInfoDeviceType_GPU = 1, + OrtMemoryInfoDeviceType_FPGA = 2 +} OrtMemoryInfoDeviceType; + +/** \brief Algorithm to use for cuDNN Convolution Op + */ +typedef enum OrtCudnnConvAlgoSearch { + OrtCudnnConvAlgoSearchExhaustive, // expensive exhaustive benchmarking using cudnnFindConvolutionForwardAlgorithmEx + OrtCudnnConvAlgoSearchHeuristic, // lightweight heuristic based search using cudnnGetConvolutionForwardAlgorithm_v7 + OrtCudnnConvAlgoSearchDefault, // default algorithm using CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM +} OrtCudnnConvAlgoSearch; + +/** \brief CUDA Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_CUDA + */ +typedef struct OrtCUDAProviderOptions { +#ifdef __cplusplus + OrtCUDAProviderOptions() + : device_id{}, + cudnn_conv_algo_search{OrtCudnnConvAlgoSearchExhaustive}, + gpu_mem_limit{SIZE_MAX}, + arena_extend_strategy{}, + do_copy_in_default_stream{1}, + has_user_compute_stream{}, + user_compute_stream{}, + default_memory_arena_cfg{}, + tunable_op_enable{false}, + tunable_op_tuning_enable{false}, + tunable_op_max_tuning_duration_ms{} {} +#endif + + /** \brief CUDA device Id + * Defaults to 0. + */ + int device_id; + + /** \brief CUDA Convolution algorithm search configuration. + * See enum OrtCudnnConvAlgoSearch for more details. + * Defaults to OrtCudnnConvAlgoSearchExhaustive. + */ + OrtCudnnConvAlgoSearch cudnn_conv_algo_search; + + /** \brief CUDA memory limit (To use all possible memory pass in maximum size_t) + * Defaults to SIZE_MAX. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + size_t gpu_mem_limit; + + /** \brief Strategy used to grow the memory arena + * 0 = kNextPowerOfTwo
+ * 1 = kSameAsRequested
+ * Defaults to 0. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + int arena_extend_strategy; + + /** \brief Flag indicating if copying needs to take place on the same stream as the compute stream in the CUDA EP + * 0 = Use separate streams for copying and compute. + * 1 = Use the same stream for copying and compute. + * Defaults to 1. + * WARNING: Setting this to 0 may result in data races for some models. + * Please see issue #4829 for more details. + */ + int do_copy_in_default_stream; + + /** \brief Flag indicating if there is a user provided compute stream + * Defaults to 0. + */ + int has_user_compute_stream; + + /** \brief User provided compute stream. + * If provided, please set `has_user_compute_stream` to 1. + */ + void* user_compute_stream; + + /** \brief CUDA memory arena configuration parameters + */ + OrtArenaCfg* default_memory_arena_cfg; + + /** \brief Enable TunableOp for using. + * Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default. + * This option can be overridden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE. + */ + int tunable_op_enable; + + /** \brief Enable TunableOp for tuning. + * Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default. + * This option can be overridden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE. + */ + int tunable_op_tuning_enable; + + /** \brief Max tuning duration time limit for each instance of TunableOp. + * Defaults to 0 to disable the limit. + */ + int tunable_op_max_tuning_duration_ms; + +} OrtCUDAProviderOptions; + +/** \brief ROCM Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_ROCM + */ +typedef struct OrtROCMProviderOptions { +#ifdef __cplusplus + OrtROCMProviderOptions() + : device_id{}, + miopen_conv_exhaustive_search{0}, + gpu_mem_limit{SIZE_MAX}, + arena_extend_strategy{}, + do_copy_in_default_stream{1}, + has_user_compute_stream{}, + user_compute_stream{}, + default_memory_arena_cfg{}, + enable_hip_graph{false}, + tunable_op_enable{false}, + tunable_op_tuning_enable{false}, + tunable_op_max_tuning_duration_ms{} {} +#endif + + /** \brief ROCM device Id + * Defaults to 0. + */ + int device_id; + + /** \brief ROCM MIOpen Convolution algorithm exaustive search option. + * Defaults to 0 (false). + */ + int miopen_conv_exhaustive_search; + + /** \brief ROCM memory limit (To use all possible memory pass in maximum size_t) + * Defaults to SIZE_MAX. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + size_t gpu_mem_limit; + + /** \brief Strategy used to grow the memory arena + * 0 = kNextPowerOfTwo
+ * 1 = kSameAsRequested
+ * Defaults to 0. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + int arena_extend_strategy; + + /** \brief Flag indicating if copying needs to take place on the same stream as the compute stream in the ROCM EP + * 0 = Use separate streams for copying and compute. + * 1 = Use the same stream for copying and compute. + * Defaults to 1. + * WARNING: Setting this to 0 may result in data races for some models. + * Please see issue #4829 for more details. + */ + int do_copy_in_default_stream; + + /** \brief Flag indicating if there is a user provided compute stream + * Defaults to 0. + */ + int has_user_compute_stream; + + /** \brief User provided compute stream. + * If provided, please set `has_user_compute_stream` to 1. + */ + void* user_compute_stream; + + /** \brief ROCM memory arena configuration parameters + */ + OrtArenaCfg* default_memory_arena_cfg; + + int enable_hip_graph; + + /** \brief Enable TunableOp for using. + * Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default. + * This option can be overridden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE. + */ + int tunable_op_enable; + + /** \brief Enable TunableOp for tuning. + * Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default. + * This option can be overridden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE. + */ + int tunable_op_tuning_enable; + + /** \brief Max tuning duration time limit for each instance of TunableOp. + * Defaults to 0 to disable the limit. + */ + int tunable_op_max_tuning_duration_ms; + +} OrtROCMProviderOptions; + +/** \brief TensorRT Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + */ +typedef struct OrtTensorRTProviderOptions { + int device_id; ///< CUDA device id (0 = default device) + int has_user_compute_stream; // indicator of user specified CUDA compute stream. + void* user_compute_stream; // user specified CUDA compute stream. + int trt_max_partition_iterations; // maximum iterations for TensorRT parser to get capability + int trt_min_subgraph_size; // minimum size of TensorRT subgraphs + size_t trt_max_workspace_size; // maximum workspace size for TensorRT. + int trt_fp16_enable; // enable TensorRT FP16 precision. Default 0 = false, nonzero = true + int trt_int8_enable; // enable TensorRT INT8 precision. Default 0 = false, nonzero = true + const char* trt_int8_calibration_table_name; // TensorRT INT8 calibration table name. + int trt_int8_use_native_calibration_table; // use native TensorRT generated calibration table. Default 0 = false, nonzero = true + int trt_dla_enable; // enable DLA. Default 0 = false, nonzero = true + int trt_dla_core; // DLA core number. Default 0 + int trt_dump_subgraphs; // dump TRT subgraph. Default 0 = false, nonzero = true + int trt_engine_cache_enable; // enable engine caching. Default 0 = false, nonzero = true + const char* trt_engine_cache_path; // specify engine cache path + int trt_engine_decryption_enable; // enable engine decryption. Default 0 = false, nonzero = true + const char* trt_engine_decryption_lib_path; // specify engine decryption library path + int trt_force_sequential_engine_build; // force building TensorRT engine sequentially. Default 0 = false, nonzero = true + // This is the legacy struct and don't add new fields here. + // For new field that can be represented by string, please add it in include/onnxruntime/core/providers/tensorrt/tensorrt_provider_options.h + // For non-string field, need to create a new separate api to handle it. +} OrtTensorRTProviderOptions; + +/** \brief MIGraphX Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX + */ +typedef struct OrtMIGraphXProviderOptions { + int device_id; // hip device id. + int migraphx_fp16_enable; // MIGraphX FP16 precision. Default 0 = false, nonzero = true + int migraphx_int8_enable; // MIGraphX INT8 precision. Default 0 = false, nonzero = true + int migraphx_use_native_calibration_table; // MIGraphx INT8 cal table. Default 0 = false, noznero = true + const char* migraphx_int8_calibration_table_name; // MIGraphx INT8 calibration table name + int migraphx_save_compiled_model; // migraphx save compiled model. Default 0 = false, noznero = true + const char* migraphx_save_model_path; // migraphx model path name + int migraphx_load_compiled_model; // migraphx int8 cal table. Default 0 = false, noznero = true + const char* migraphx_load_model_path; // migraphx model path name + bool migraphx_exhaustive_tune; // migraphx tuned compile Default = false +} OrtMIGraphXProviderOptions; + +/** \brief OpenVINO Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO + */ +typedef struct OrtOpenVINOProviderOptions { +#ifdef __cplusplus + OrtOpenVINOProviderOptions() : device_type{}, + enable_npu_fast_compile{}, + device_id{}, + num_of_threads{}, + cache_dir{}, + context{}, + enable_opencl_throttling{}, + enable_dynamic_shapes{} {} +#endif + /** \brief Device type string + * + * Valid settings are one of: "CPU_FP32", "CPU_FP16", "GPU_FP32", "GPU_FP16" + */ + const char* device_type; + unsigned char enable_npu_fast_compile; + const char* device_id; + size_t num_of_threads; ///< 0 = Use default number of threads + const char* cache_dir; // path is set to empty by default + void* context; + unsigned char enable_opencl_throttling; ///< 0 = disabled, nonzero = enabled + unsigned char enable_dynamic_shapes; ///< 0 = disabled, nonzero = enabled +} OrtOpenVINOProviderOptions; + +struct OrtApi; +typedef struct OrtApi OrtApi; + +struct OrtTrainingApi; +typedef struct OrtTrainingApi OrtTrainingApi; + +/** \brief The helper interface to get the right version of OrtApi + * + * Get a pointer to this structure through ::OrtGetApiBase + */ +struct OrtApiBase { + /** \brief Get a pointer to the requested version of the ::OrtApi + * + * \param[in] version Must be ::ORT_API_VERSION + * \return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime + * older than the version created with this header file. + * + * One can call GetVersionString() to get the version of the Onnxruntime library for logging + * and error reporting purposes. + */ + const OrtApi*(ORT_API_CALL* GetApi)(uint32_t version)NO_EXCEPTION; + + /** \brief Returns a null terminated string of the version of the Onnxruntime library (eg: "1.8.1") + * + * \return UTF-8 encoded version string. Do not deallocate the returned buffer. + */ + const char*(ORT_API_CALL* GetVersionString)(void)NO_EXCEPTION; +}; + +typedef struct OrtApiBase OrtApiBase; + +/** \brief The Onnxruntime library's entry point to access the C API + * + * Call this to get the a pointer to an ::OrtApiBase + */ +ORT_EXPORT const OrtApiBase* ORT_API_CALL OrtGetApiBase(void) NO_EXCEPTION; + +/** \brief Thread work loop function + * + * Onnxruntime will provide the working loop on custom thread creation + * Argument is an onnxruntime built-in type which will be provided when thread pool calls OrtCustomCreateThreadFn + */ +typedef void (*OrtThreadWorkerFn)(void* ort_worker_fn_param); + +typedef const struct OrtCustomHandleType { + char __place_holder; +}* OrtCustomThreadHandle; + +/** \brief Ort custom thread creation function + * + * The function should return a thread handle to be used in onnxruntime thread pools + * Onnxruntime will throw exception on return value of nullptr or 0, indicating that the function failed to create a thread + */ +typedef OrtCustomThreadHandle (*OrtCustomCreateThreadFn)(void* ort_custom_thread_creation_options, OrtThreadWorkerFn ort_thread_worker_fn, void* ort_worker_fn_param); + +/** \brief Custom thread join function + * + * Onnxruntime thread pool destructor will call the function to join a custom thread. + * Argument ort_custom_thread_handle is the value returned by OrtCustomCreateThreadFn + */ +typedef void (*OrtCustomJoinThreadFn)(OrtCustomThreadHandle ort_custom_thread_handle); + +typedef OrtStatus*(ORT_API_CALL* RegisterCustomOpsFn)(OrtSessionOptions* options, const OrtApiBase* api); + +/** \brief Callback function for RunAsync + * + * \param[in] user_data User specific data that passed back to the callback + * \param[out] outputs On succeed, outputs host inference results, on error, the value will be nullptr + * \param[out] num_outputs Number of outputs, on error, the value will be zero + * \param[out] status On error, status will provide details + */ +typedef void (*RunAsyncCallbackFn)(void* user_data, OrtValue** outputs, size_t num_outputs, OrtStatusPtr status); + +/** \brief The C API + * + * All C API functions are defined inside this structure as pointers to functions. + * Call OrtApiBase::GetApi to get a pointer to it + * + * \nosubgrouping + */ +struct OrtApi { + /// \name OrtStatus + /// @{ + + /** + * \brief Create an OrtStatus from a null terminated string + * + * \param[in] code + * \param[in] msg A null-terminated string. Its contents will be copied. + * \return A new OrtStatus object, must be destroyed with OrtApi::ReleaseStatus + */ + OrtStatus*(ORT_API_CALL* CreateStatus)(OrtErrorCode code, _In_ const char* msg)NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Get OrtErrorCode from OrtStatus + * + * \param[in] status + * \return OrtErrorCode that \p status was created with + */ + OrtErrorCode(ORT_API_CALL* GetErrorCode)(_In_ const OrtStatus* status) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Get error string from OrtStatus + * + * \param[in] status + * \return The error message inside the `status`. Do not free the returned value. + */ + const char*(ORT_API_CALL* GetErrorMessage)(_In_ const OrtStatus* status)NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an OrtEnv + * + * \note Invoking this function will return the same instance of the environment as that returned by a previous call + * to another env creation function; all arguments to this function will be ignored. + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnv, OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out); + + /** \brief Create an OrtEnv + * + * \note Invoking this function will return the same instance of the environment as that returned by a previous call + * to another env creation function; all arguments to this function will be ignored. If you want to provide your + * own logging function, consider setting it using the SetUserLoggingFunction API instead. + * \param[in] logging_function A pointer to a logging function. + * \param[in] logger_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to + * `logging_function`. This parameter is optional. + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithCustomLogger, _In_ OrtLoggingFunction logging_function, _In_opt_ void* logger_param, + _In_ OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out); + + /** \brief Enable Telemetry + * + * \note Telemetry events are on by default since they are lightweight + * \param[in] env + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableTelemetryEvents, _In_ const OrtEnv* env); + /** \brief Disable Telemetry + * + * \see OrtApi::EnableTelemetryEvents + * \param[in] env + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableTelemetryEvents, _In_ const OrtEnv* env); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Create an OrtSession from a model file + * + * \param[in] env + * \param[in] model_path + * \param[in] options + * \param[out] out Returned newly created OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + // TODO: document the path separator convention? '/' vs '\' + // TODO: should specify the access characteristics of model_path. Is this read only during the + // execution of CreateSession, or does the OrtSession retain a handle to the file/directory + // and continue to access throughout the OrtSession lifetime? + // What sort of access is needed to model_path : read or read/write? + ORT_API2_STATUS(CreateSession, _In_ const OrtEnv* env, _In_ const ORTCHAR_T* model_path, + _In_ const OrtSessionOptions* options, _Outptr_ OrtSession** out); + + /** \brief Create an OrtSession from memory + * + * \param[in] env + * \param[in] model_data + * \param[in] model_data_length + * \param[in] options + * \param[out] out Returned newly created OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionFromArray, _In_ const OrtEnv* env, _In_ const void* model_data, size_t model_data_length, + _In_ const OrtSessionOptions* options, _Outptr_ OrtSession** out); + + /** \brief Run the model in an ::OrtSession + * + * Will not return until the model run has completed. Multiple threads might be used to run the model based on + * the options in the ::OrtSession and settings used when creating the ::OrtEnv + * + * \param[in] session + * \param[in] run_options If nullptr, will use a default ::OrtRunOptions + * \param[in] input_names Array of null terminated UTF8 encoded strings of the input names + * \param[in] inputs Array of ::OrtValue%s of the input values + * \param[in] input_len Number of elements in the input_names and inputs arrays + * \param[in] output_names Array of null terminated UTF8 encoded strings of the output names + * \param[in] output_names_len Number of elements in the output_names and outputs array + * \param[out] outputs Array of ::OrtValue%s that the outputs are stored in. This can also be + * an array of nullptr values, in this case ::OrtValue objects will be allocated and pointers + * to them will be set into the `outputs` array. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(Run, _Inout_ OrtSession* session, _In_opt_ const OrtRunOptions* run_options, + _In_reads_(input_len) const char* const* input_names, + _In_reads_(input_len) const OrtValue* const* inputs, size_t input_len, + _In_reads_(output_names_len) const char* const* output_names, size_t output_names_len, + _Inout_updates_all_(output_names_len) OrtValue** outputs); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Create an ::OrtSessionOptions object + * + * To use additional providers, you must build ORT with the extra providers enabled. Then call one of these + * functions to enable them in the session:
+ * OrtSessionOptionsAppendExecutionProvider_CPU
+ * OrtSessionOptionsAppendExecutionProvider_CUDA
+ * OrtSessionOptionsAppendExecutionProvider_(remaining providers...)
+ * The order they are called indicates the preference order as well. In other words call this method + * on your most preferred execution provider first followed by the less preferred ones. + * If none are called Ort will use its internal CPU execution provider. + * + * \param[out] options The newly created OrtSessionOptions. Must be freed with OrtApi::ReleaseSessionOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionOptions, _Outptr_ OrtSessionOptions** options); + + /** \brief Set filepath to save optimized model after graph level transformations + * + * \param[in] options + * \param[in] optimized_model_filepath + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetOptimizedModelFilePath, _Inout_ OrtSessionOptions* options, + _In_ const ORTCHAR_T* optimized_model_filepath); + + /** \brief Create a copy of an existing ::OrtSessionOptions + * + * \param[in] in_options OrtSessionOptions to copy + * \param[out] out_options Returned newly created ::OrtSessionOptions. Must be freed with OrtApi::ReleaseSessionOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CloneSessionOptions, _In_ const OrtSessionOptions* in_options, + _Outptr_ OrtSessionOptions** out_options); + + /** \brief Set execution mode + * + * Controls whether you want to execute operators in your graph sequentially or in parallel. Usually when the model + * has many branches, setting this option to ExecutionMode.ORT_PARALLEL will give you better performance. + * See [docs/ONNX_Runtime_Perf_Tuning.md] for more details. + * + * \param[in] options + * \param[in] execution_mode + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionExecutionMode, _Inout_ OrtSessionOptions* options, ExecutionMode execution_mode); + + /** \brief Enable profiling for a session + * + * \param[in] options + * \param[in] profile_file_prefix + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableProfiling, _Inout_ OrtSessionOptions* options, _In_ const ORTCHAR_T* profile_file_prefix); + + /** \brief Disable profiling for a session + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableProfiling, _Inout_ OrtSessionOptions* options); + + /** \brief Enable the memory pattern optimization + * + * The idea is if the input shapes are the same, we could trace the internal memory allocation + * and generate a memory pattern for future request. So next time we could just do one allocation + * with a big chunk for all the internal memory allocation. + * \note Memory pattern optimization is only available when Sequential Execution mode is enabled (see OrtApi::SetSessionExecutionMode) + * + * \see OrtApi::DisableMemPattern + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableMemPattern, _Inout_ OrtSessionOptions* options); + + /** \brief Disable the memory pattern optimization + * + * \see OrtApi::EnableMemPattern + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableMemPattern, _Inout_ OrtSessionOptions* options); + + /** \brief Enable the memory arena on CPU + * + * Arena may pre-allocate memory for future usage. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableCpuMemArena, _Inout_ OrtSessionOptions* options); + + /** \brief Disable the memory arena on CPU + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableCpuMemArena, _Inout_ OrtSessionOptions* options); + + /** \brief Set session log id + * + * \param[in] options + * \param[in] logid The log identifier. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogId, _Inout_ OrtSessionOptions* options, const char* logid); + + /** \brief Set session log verbosity level + * + * Applies to session load, initialization, etc + * + * \param[in] options + * \param[in] session_log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogVerbosityLevel, _Inout_ OrtSessionOptions* options, int session_log_verbosity_level); + + /** \brief Set session log severity level + * + * \param[in] options + * \param[in] session_log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogSeverityLevel, _Inout_ OrtSessionOptions* options, int session_log_severity_level); + + /** \brief Set the optimization level to apply when loading a graph + * + * Please see https://onnxruntime.ai/docs/performance/model-optimizations/graph-optimizations.html for an in-depth explanation + * \param[in,out] options The session options object + * \param[in] graph_optimization_level The optimization level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionGraphOptimizationLevel, _Inout_ OrtSessionOptions* options, + GraphOptimizationLevel graph_optimization_level); + + /** \brief Sets the number of threads used to parallelize the execution within nodes + * + * When running a single node operation, ex. add, this sets the maximum number of threads to use. + * + * \note If built with OpenMP, this has no effect on the number of threads used. In this case + * use the OpenMP env variables to configure the number of intra op num threads. + * + * \param[in] options + * \param[in] intra_op_num_threads Number of threads to use
+ * A value of 0 will use the default number of threads
+ * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetIntraOpNumThreads, _Inout_ OrtSessionOptions* options, int intra_op_num_threads); + + /** \brief Sets the number of threads used to parallelize the execution of the graph + * + * If nodes can be run in parallel, this sets the maximum number of threads to use to run them in parallel. + * + * \note If sequential execution is enabled this value is ignored, it acts as if it was set to 1. + * + * \param[in] options + * \param[in] inter_op_num_threads Number of threads to use
+ * A value of 0 will use the default number of threads
+ * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetInterOpNumThreads, _Inout_ OrtSessionOptions* options, int inter_op_num_threads); + + /// @} + /// \name OrtCustomOpDomain + /// @{ + + /** \brief Create a custom op domain + * + * \param[in] domain + * \param[out] out Newly created domain. Must be freed with OrtApi::ReleaseCustomOpDomain + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateCustomOpDomain, _In_ const char* domain, _Outptr_ OrtCustomOpDomain** out); + + /** \brief Add a custom op to a custom op domain + * + * \note The OrtCustomOp* pointer must remain valid until the ::OrtCustomOpDomain using it is released + * + * \param[in] custom_op_domain + * \param[in] op + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CustomOpDomain_Add, _Inout_ OrtCustomOpDomain* custom_op_domain, _In_ const OrtCustomOp* op); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Add custom op domain to a session options + * + * \note The OrtCustomOpDomain* must not be deleted until all sessions using it are released + * + * \param[in] options + * \param[in] custom_op_domain + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddCustomOpDomain, _Inout_ OrtSessionOptions* options, _In_ OrtCustomOpDomain* custom_op_domain); + + /** \deprecated Use OrtApi::RegisterCustomOpsLibrary_V2. + * + * Registers custom ops from a shared library. + * + * Loads a shared library (dll on windows, so on linux, etc) named 'library_path' and looks for this entry point: + * OrtStatus* RegisterCustomOps(OrtSessionOptions * options, const OrtApiBase* api); + * It then passes in the provided session options to this function along with the api base. + * The handle to the loaded library is returned in library_handle. It can be freed by the caller after all sessions using the passed in + * session options are destroyed, or if an error occurs and it is non null. + * + * \param[in] options + * \param[in] library_path + * \param[out] library_handle OS specific handle to the loaded library (Use FreeLibrary on Windows, dlclose on Linux, etc.. to unload) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RegisterCustomOpsLibrary, _Inout_ OrtSessionOptions* options, _In_ const char* library_path, _Outptr_ void** library_handle); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Get input count for a session + * + * This number must also match the number of inputs passed to OrtApi::Run + * + * \see OrtApi::SessionGetInputTypeInfo, OrtApi::SessionGetInputName, OrtApi::Session + * + * \param[in] session + * \param[out] out Number of inputs + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get output count for a session + * + * This number must also match the number of outputs returned by OrtApi::Run + * + * \see OrtApi::SessionGetOutputTypeInfo, OrtApi::SessionGetOutputName, OrtApi::Session + * + * \param[in] session + * \param[out] out Number of outputs + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get overridable initializer count + * + * \see OrtApi::SessionGetOverridableInitializerTypeInfo, OrtApi::SessionGetOverridableInitializerName + * + * \param[in] session + * \param[in] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get input type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetInputCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get output type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOutputCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get overridable initializer type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOverridableInitializerCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get input name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetInputCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputName, _In_ const OrtSession* session, size_t index, _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get output name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOutputCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputName, _In_ const OrtSession* session, size_t index, _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get overridable initializer name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOverridableInitializerCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerName, _In_ const OrtSession* session, size_t index, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /// @} + /// \name OrtRunOptions + /// @{ + + /** \brief Create an OrtRunOptions + * + * \param[out] out Returned newly created ::OrtRunOptions. Must be freed with OrtApi::ReleaseRunOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateRunOptions, _Outptr_ OrtRunOptions** out); + + /** \brief Set per-run log verbosity level + * + * \see OrtApi::RunOptionsGetRunLogVerbosityLevel + * + * \param[in] options + * \param[in] log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsSetRunLogVerbosityLevel, _Inout_ OrtRunOptions* options, int log_verbosity_level); + + /** \brief Set per-run log severity level + * + * \see OrtApi::RunOptionsGetRunLogSeverityLevel + * + * \param[in] options + * \param[in] log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + */ + ORT_API2_STATUS(RunOptionsSetRunLogSeverityLevel, _Inout_ OrtRunOptions* options, int log_severity_level); + + /** \brief Set per-run tag + * + * This is used in a per-run log identifier. + * + * \see OrtApi::RunOptionsGetRunTag + * + * \param[in] options + * \param[in] run_tag The run tag. + */ + ORT_API2_STATUS(RunOptionsSetRunTag, _Inout_ OrtRunOptions* options, _In_ const char* run_tag); + + /** \brief Get per-run log verbosity level + * + * \see OrtApi::RunOptionsSetRunLogVerbosityLevel + * + * \param[in] options + * \param[out] log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsGetRunLogVerbosityLevel, _In_ const OrtRunOptions* options, + _Out_ int* log_verbosity_level); + + /** \brief Get per-run log severity level + * + * \see OrtApi::RunOptionsSetRunLogSeverityLevel + * + * \param[in] options + * \param[out] log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + */ + ORT_API2_STATUS(RunOptionsGetRunLogSeverityLevel, _In_ const OrtRunOptions* options, _Out_ int* log_severity_level); + + /** \brief Get per-run tag + * + * This is used in a per-run log identifier. + * + * \see OrtApi::RunOptionsSetRunTag + * + * \param[in] options + * \param[out] run_tag The run tag. + * Do not free this value, it is owned by `options`. It will be invalidated if the run tag + * changes (i.e., with OrtApi::RunOptionsSetRunTag) or `options` is freed. + */ + ORT_API2_STATUS(RunOptionsGetRunTag, _In_ const OrtRunOptions* options, _Out_ const char** run_tag); + + /** \brief Set terminate flag + * + * If a currently executing session needs to be force terminated, this can be called from another thread to force it to fail with an error. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsSetTerminate, _Inout_ OrtRunOptions* options); + + /** \brief Clears the terminate flag + * + * Used so the OrtRunOptions instance can be used in a new OrtApi::Run call without it instantly terminating + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsUnsetTerminate, _Inout_ OrtRunOptions* options); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Create a tensor + * + * Create a tensor using a supplied ::OrtAllocator + * + * \param[in] allocator + * \param[in] shape Pointer to the tensor shape dimensions. + * \param[in] shape_len The number of tensor shape dimensions. + * \param[in] type + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorAsOrtValue, _Inout_ OrtAllocator* allocator, _In_ const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** \brief Create a tensor backed by a user supplied buffer + * + * Create a tensor with user's buffer. You can fill the buffer either before calling this function or after. + * p_data is owned by caller. ReleaseValue won't release p_data. + * + * \param[in] info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param[in] p_data Pointer to the data buffer. + * \param[in] p_data_len The number of bytes in the data buffer. + * \param[in] shape Pointer to the tensor shape dimensions. + * \param[in] shape_len The number of tensor shape dimensions. + * \param[in] type The data type. + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorWithDataAsOrtValue, _In_ const OrtMemoryInfo* info, _Inout_ void* p_data, + size_t p_data_len, _In_ const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type, + _Outptr_ OrtValue** out); + + /** \brief Return if an ::OrtValue is a tensor type + * + * \param[in] value A tensor type (string tensors are not supported) + * \param[out] out Set to 1 iff ::OrtValue is a tensor, 0 otherwise + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(IsTensor, _In_ const OrtValue* value, _Out_ int* out); + + /** \brief Get a pointer to the raw data inside a tensor + * + * Used to read/write/modify the internal tensor data directly. + * \note The returned pointer is valid until the \p value is destroyed. + * + * \param[in] value A tensor type (string tensors are not supported) + * \param[out] out Filled in with a pointer to the internal storage + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorMutableData, _In_ OrtValue* value, _Outptr_ void** out); + + /** \brief Set all strings at once in a string tensor + * + * \param[in,out] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[in] s An array of strings. Each string in this array must be null terminated. + * \param[in] s_len Count of strings in s (Must match the size of \p value's tensor shape) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillStringTensor, _Inout_ OrtValue* value, _In_ const char* const* s, size_t s_len); + + /** \brief Get total byte length for all strings in a string tensor + * + * Typically used with OrtApi::GetStringTensorContent + * + * \param[in] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[out] len Total byte length of all strings (does not include trailing nulls) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorDataLength, _In_ const OrtValue* value, _Out_ size_t* len); + + /** \brief Get all strings from a string tensor + * + * An example of the results:
+ * Given \p value is a string tensor with the strings { "This" "is" "a" "test" }
+ * \p s must have a size of 11 bytes
+ * \p offsets must have 4 elements
+ * After the call, these values will be filled in:
+ * \p s will contain "Thisisatest"
+ * \p offsets will contain { 0, 4, 6, 7 }
+ * The length of the last string is just s_len - offsets[last] + * + * \param[in] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[in] s Buffer to sequentially write all tensor strings to. Each string is NOT null-terminated. + * \param[in] s_len Number of bytes of buffer pointed to by \p s (Get it from OrtApi::GetStringTensorDataLength) + * \param[out] offsets Array of start offsets into the strings written to \p s + * \param[in] offsets_len Number of elements in offsets + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorContent, _In_ const OrtValue* value, _Out_writes_bytes_all_(s_len) void* s, + size_t s_len, _Out_writes_all_(offsets_len) size_t* offsets, size_t offsets_len); + + /// @} + /// \name OrtTypeInfo + /// @{ + + /** \brief Get ::OrtTensorTypeAndShapeInfo from an ::OrtTypeInfo + * + * \param[in] type_info + * \param[out] out Do not free this value, it will be valid until type_info is freed. + * If type_info does not represent tensor, this value will be set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToTensorInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtTensorTypeAndShapeInfo** out); + + /** \brief Get ::ONNXType from ::OrtTypeInfo + * + * \param[in] type_info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetOnnxTypeFromTypeInfo, _In_ const OrtTypeInfo* type_info, _Out_ enum ONNXType* out); + + /// @} + /// \name OrtTensorTypeAndShapeInfo + /// @{ + + /** \brief Create an ::OrtTensorTypeAndShapeInfo object + * + * \param[out] out Returns newly created ::OrtTensorTypeAndShapeInfo. Must be freed with OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorTypeAndShapeInfo, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Set element type in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] type + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetTensorElementType, _Inout_ OrtTensorTypeAndShapeInfo* info, enum ONNXTensorElementDataType type); + + /** \brief Set shape information in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] dim_values Array with `dim_count` elements. Can contain negative values. + * \param[in] dim_count Number of elements in `dim_values` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetDimensions, OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count); + + /** \brief Get element type in ::OrtTensorTypeAndShapeInfo + * + * \see OrtApi::SetTensorElementType + * + * \param[in] info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorElementType, _In_ const OrtTensorTypeAndShapeInfo* info, + _Out_ enum ONNXTensorElementDataType* out); + + /** \brief Get dimension count in ::OrtTensorTypeAndShapeInfo + * + * \see OrtApi::GetDimensions + * + * \param[in] info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDimensionsCount, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ size_t* out); + + /** \brief Get dimensions in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[out] dim_values Array with `dim_values_length` elements. On return, filled with the dimensions stored in the ::OrtTensorTypeAndShapeInfo + * \param[in] dim_values_length Number of elements in `dim_values`. Use OrtApi::GetDimensionsCount to get this value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDimensions, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, + size_t dim_values_length); + + /** \brief Get symbolic dimension names in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] dim_params Array with `dim_params_length` elements. On return filled with pointers to null terminated strings of the dimension names + * \param[in] dim_params_length Number of elements in `dim_params`. Use OrtApi::GetDimensionsCount to get this value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSymbolicDimensions, _In_ const OrtTensorTypeAndShapeInfo* info, + _Out_writes_all_(dim_params_length) const char* dim_params[], size_t dim_params_length); + + /** \brief Get total number of elements in a tensor shape from an ::OrtTensorTypeAndShapeInfo + * + * Return the number of elements specified by the tensor shape (all dimensions multiplied by each other). + * For 0 dimensions, 1 is returned. If any dimension is less than 0, the result is always -1. + * + * Examples:
+ * [] = 1
+ * [1,3,4] = 12
+ * [2,0,4] = 0
+ * [-1,3,4] = -1
+ * + * \param[in] info + * \param[out] out Number of elements + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorShapeElementCount, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ size_t* out); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Get type and shape information from a tensor ::OrtValue + * + * \param[in] value Must be a tensor (not a map/sequence/etc) or will return failure + * \param[out] out Newly created ::OrtTensorTypeAndShapeInfo. Must be freed with OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorTypeAndShape, _In_ const OrtValue* value, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Get type information of an OrtValue + * + * \param[in] value + * \param[out] out Newly created ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTypeInfo, _In_ const OrtValue* value, _Outptr_result_maybenull_ OrtTypeInfo** out); + + /** \brief Get ONNXType of an ::OrtValue + * + * \param[in] value + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValueType, _In_ const OrtValue* value, _Out_ enum ONNXType* out); + + /// @} + /// \name OrtMemoryInfo + /// @{ + + /** \brief Create an ::OrtMemoryInfo + * + * \param[in] name + * \param[in] type + * \param[in] id + * \param[in] mem_type + * \param[out] out Newly created ::OrtMemoryInfo. Must be freed with OrtAPi::ReleaseMemoryInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateMemoryInfo, _In_ const char* name, enum OrtAllocatorType type, int id, + enum OrtMemType mem_type, _Outptr_ OrtMemoryInfo** out); + + /** \brief Create an ::OrtMemoryInfo for CPU memory + * + * Special case version of OrtApi::CreateMemoryInfo for CPU based memory. Same as using OrtApi::CreateMemoryInfo with name = "Cpu" and id = 0. + * + * \param[in] type + * \param[in] mem_type + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateCpuMemoryInfo, enum OrtAllocatorType type, enum OrtMemType mem_type, + _Outptr_ OrtMemoryInfo** out); + + /** \brief Compare ::OrtMemoryInfo objects for equality + * + * Compares all settings of each ::OrtMemoryInfo for equality + * + * \param[in] info1 + * \param[in] info2 + * \param[out] out Set to 0 if equal, -1 if not equal + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CompareMemoryInfo, _In_ const OrtMemoryInfo* info1, _In_ const OrtMemoryInfo* info2, _Out_ int* out); + + /** \brief Get name from ::OrtMemoryInfo + * + * \param[in] ptr + * \param[out] out Writes null terminated string to this pointer. Do NOT free the returned pointer. It is valid for the lifetime of the ::OrtMemoryInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(MemoryInfoGetName, _In_ const OrtMemoryInfo* ptr, _Out_ const char** out); + + /** \brief Get the id from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetId, _In_ const OrtMemoryInfo* ptr, _Out_ int* out); + + /** \brief Get the ::OrtMemType from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetMemType, _In_ const OrtMemoryInfo* ptr, _Out_ OrtMemType* out); + + /** \brief Get the ::OrtAllocatorType from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetType, _In_ const OrtMemoryInfo* ptr, _Out_ OrtAllocatorType* out); + + /// @} + /// \name OrtAllocator + /// @{ + + /// \brief Calls OrtAllocator::Alloc function + ORT_API2_STATUS(AllocatorAlloc, _Inout_ OrtAllocator* ort_allocator, size_t size, _Outptr_ void** out); + /// \brief Calls OrtAllocator::Free function + ORT_API2_STATUS(AllocatorFree, _Inout_ OrtAllocator* ort_allocator, void* p); + /// \brief Calls OrtAllocator::Info function + ORT_API2_STATUS(AllocatorGetInfo, _In_ const OrtAllocator* ort_allocator, _Outptr_ const struct OrtMemoryInfo** out); + + /** \brief Get the default allocator + * + * The default allocator is a CPU based, non-arena. Always returns the same pointer to the same default allocator. + * + * \param[out] out Returned value should NOT be freed + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetAllocatorWithDefaultOptions, _Outptr_ OrtAllocator** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Override session symbolic dimensions + * + * Override symbolic dimensions (by specific denotation strings) with actual values if known at session initialization time to enable + * optimizations that can take advantage of fixed values (such as memory planning, etc) + * + * \param[in] options + * \param[in] dim_denotation + * \param[in] dim_value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddFreeDimensionOverride, _Inout_ OrtSessionOptions* options, _In_ const char* dim_denotation, + _In_ int64_t dim_value); + + /// @} + /// \name OrtValue + /// @{ + + /* Internal information (not seen in Doxygen) + * + * APIs to support non-tensor types - map and sequence. + * Currently only the following types are supported + * Note: the following types should be kept in sync with data_types.h + * Map types + * ========= + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * + * Sequence types + * ============== + * std::vector + * std::vector + * std::vector + * std::vector + * std::vector> + * std::vector + */ + + /** \brief Get non tensor data from an ::OrtValue + * + * If `value` is of type ONNX_TYPE_MAP, you need to retrieve the keys and values + * separately. Use index=0 to retrieve keys and index=1 to retrieve values. + * If `value` is of type ONNX_TYPE_SEQUENCE, use index to retrieve the index'th element + * of the sequence. + * + * \param[in] value + * \param[in] index See above for usage based on `value` type + * \param[in] allocator Allocator used to allocate ::OrtValue + * \param[out] out Created ::OrtValue that holds the element requested. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValue, _In_ const OrtValue* value, int index, _Inout_ OrtAllocator* allocator, + _Outptr_ OrtValue** out); + + /** \brief Get non tensor value count from an ::OrtValue + * + * If `value` is of type ONNX_TYPE_MAP 2 will always be returned. For ONNX_TYPE_SEQUENCE + * the number of elements in the sequence will be returned + * + * \param[in] value + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValueCount, _In_ const OrtValue* value, _Out_ size_t* out); + + /** \brief Create a map or sequence ::OrtValue + * + * To construct a map (ONNX_TYPE_MAP), use num_values = 2 and `in` should be an array of 2 ::OrtValue%s + * representing keys and values.
+ * + * To construct a sequence (ONNX_TYPE_SEQUENCE), use num_values = N where N is the number of the elements in the + * sequence. 'in' should be an array of N ::OrtValue%s. + * + * \param[in] in See above for details + * \param[in] num_values + * \param[in] value_type Must be either ONNX_TYPE_MAP or ONNX_TYPE_SEQUENCE + * \param[out] out Newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateValue, _In_reads_(num_values) const OrtValue* const* in, size_t num_values, + enum ONNXType value_type, _Outptr_ OrtValue** out); + + /** \brief Create an opaque (custom user defined type) ::OrtValue + * + * Constructs an ::OrtValue that contains a value of non-standard type created for + * experiments or while awaiting standardization. ::OrtValue in this case would contain + * an internal representation of the Opaque type. Opaque types are distinguished from + * each other by two strings 1) domain and 2) type name. The combination of the two + * must be unique, so the type representation is properly identified internally. The combination + * must be properly registered from within ORT at both compile/run time or by another API. + * + * To construct the ::OrtValue pass domain and type names, also a pointer to a data container + * the type of which must be known to both ORT and the client program. That data container may or may + * not match the internal representation of the Opaque type. The sizeof(data_container) is passed for + * verification purposes. + * + * \param[in] domain_name Null terminated string of the domain name + * \param[in] type_name Null terminated string of the type name + * \param[in] data_container User pointer Data to populate ::OrtValue + * \param[in] data_container_size Size in bytes of what `data_container` points to + * \param[out] out Newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateOpaqueValue, _In_z_ const char* domain_name, _In_z_ const char* type_name, + _In_ const void* data_container, size_t data_container_size, _Outptr_ OrtValue** out); + + /** \brief Get internal data from an opaque (custom user defined type) ::OrtValue + * + * Copies internal data from an opaque value into a user provided buffer + * + * \see OrtApi::CreateOpaqueValue + * + * \param[in] domain_name Null terminated string of the domain name + * \param[in] type_name Null terminated string of the type name + * \param[in] in The opaque ::OrtValue + * \param[out] data_container Buffer to copy data into + * \param[out] data_container_size Size in bytes of the buffer pointed to by data_container. Must match the size of the internal buffer. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetOpaqueValue, _In_ const char* domain_name, _In_ const char* type_name, _In_ const OrtValue* in, + _Out_ void* data_container, size_t data_container_size); + + /// @} + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Get a float stored as an attribute in the graph node + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_float, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ float* out); + + /** \brief Fetch a 64-bit int stored as an attribute in the graph node + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_int64, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ int64_t* out); + + /** \brief Fetch a string stored as an attribute in the graph node + * + * If `out` is nullptr, the value of `size` is set to the true size of the string + * attribute, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual string attribute's size, + * the value of `size` is set to the true size of the string attribute, the provided memory + * is filled with the attribute's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string attribute's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string attribute + * and a failure status is returned.) + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * \param[in,out] size See above comments for details + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_string, _In_ const OrtKernelInfo* info, _In_ const char* name, _Out_ char* out, + _Inout_ size_t* size); + + /// @} + /// \name OrtKernelContext + /// Custom operator APIs. + /// @{ + + /** \brief Used for custom operators, get the input count of a kernel + * + * \see ::OrtCustomOp + */ + ORT_API2_STATUS(KernelContext_GetInputCount, _In_ const OrtKernelContext* context, _Out_ size_t* out); + + /** \brief Used for custom operators, get the output count of a kernel + * + * \see ::OrtCustomOp + */ + ORT_API2_STATUS(KernelContext_GetOutputCount, _In_ const OrtKernelContext* context, _Out_ size_t* out); + + /** \brief Used for custom operators, get an input of a kernel + * + * The function attempts fetches the input of the kernel. If the input is optional + * and not present, the function returns success and out is set to nullptr. + * + * \param[in] context ::OrtKernelContext instance + * \param[in] index See KernelContext_GetInputCount for boundaries check. + * \param[out] out OrtValue if the input is present otherwise is set nullptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetInput, _In_ const OrtKernelContext* context, _In_ size_t index, + _Out_ const OrtValue** out); + + /** \brief Used for custom operators, get an output of a kernel + * + * The function attempts fetches the output of the kernel. If the output is optional + * and not present, the function returns success and out is set to nullptr. + * + * \param[in] context ::OrtKernelContext instance + * \param[in] index See KernelContext_GetOutputCount for boundaries check. + * \param[in] dim_values output dimensions + * \param[in] dim_count number of dimensions + * \param[out] out a ptr to OrtValue to output otherwise set to nullptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetOutput, _Inout_ OrtKernelContext* context, _In_ size_t index, + _In_ const int64_t* dim_values, size_t dim_count, _Outptr_ OrtValue** out); + + /// @} + /// \name OrtEnv + /// @{ + ORT_CLASS_RELEASE(Env); + /// @} + /// \name OrtStatus + /// @{ + ORT_CLASS_RELEASE(Status); + /// @} + /// \name OrtMemoryInfo + /// @{ + ORT_CLASS_RELEASE(MemoryInfo); + /// @} + /// \name OrtSession + /// @{ + ORT_CLASS_RELEASE(Session); // Don't call ReleaseSession from Dllmain (because session owns a thread pool) + /// @} + /// \name OrtValue + /// @{ + ORT_CLASS_RELEASE(Value); + /// @} + /// \name OrtRunOptions + /// @{ + ORT_CLASS_RELEASE(RunOptions); + /// @} + /// \name OrtTypeInfo + /// @{ + ORT_CLASS_RELEASE(TypeInfo); + /// @} + /// \name OrtTensorTypeAndShapeInfo + /// @{ + ORT_CLASS_RELEASE(TensorTypeAndShapeInfo); + /// @} + /// \name OrtSessionOptions + /// @{ + ORT_CLASS_RELEASE(SessionOptions); + /// @} + /// \name OrtCustomOpDomain + /// @{ + ORT_CLASS_RELEASE(CustomOpDomain); + + /// @} + /// \name OrtTypeInfo + /// @{ + + /** \brief Get denotation from type information + * + * Augments ::OrtTypeInfo to return denotations on the type. + * + * This is used by WinML to determine if an input/output is intended to be an Image or a Tensor. + * + * \param[in] type_info + * \param[out] denotation Pointer to the null terminated denotation string is written to this pointer. This pointer is valid until the object is destroyed or the name is changed, do not free. + * \param[out] len Length in bytes of the string returned in `denotation` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDenotationFromTypeInfo, _In_ const OrtTypeInfo* type_info, _Out_ const char** const denotation, + _Out_ size_t* len); + + /** \brief Get detailed map information from an ::OrtTypeInfo + * + * This augments ::OrtTypeInfo to return an ::OrtMapTypeInfo when the type is a map. + * The OrtMapTypeInfo has additional information about the map's key type and value type. + * + * This is used by WinML to support model reflection APIs. + * + * \param[out] type_info + * \param[out] out A pointer to the ::OrtMapTypeInfo. Do not free this value. If type_info + * does not contain a map, this value will be set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToMapTypeInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtMapTypeInfo** out); + + /** \brief Cast ::OrtTypeInfo to an ::OrtSequenceTypeInfo + * + * This api augments ::OrtTypeInfo to return an ::OrtSequenceTypeInfo when the type is a sequence. + * The ::OrtSequenceTypeInfo has additional information about the sequence's element type. + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] type_info + * \param[out] out A pointer to the OrtSequenceTypeInfo. Do not free this value. If type_info + * doesn not contain a sequence, this value will be set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToSequenceTypeInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtSequenceTypeInfo** out); + + /// @} + /// \name OrtMapTypeInfo + /// @{ + + /** \brief Get key type from an ::OrtMapTypeInfo + * + * Key types are restricted to being scalar types. + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] map_type_info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetMapKeyType, _In_ const OrtMapTypeInfo* map_type_info, _Out_ enum ONNXTensorElementDataType* out); + + /** \brief Get the value type from an ::OrtMapTypeInfo + * + * \param[in] map_type_info + * \param[out] type_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetMapValueType, _In_ const OrtMapTypeInfo* map_type_info, _Outptr_ OrtTypeInfo** type_info); + + /// @} + /// \name OrtSequenceTypeInfo + /// @{ + + /** \brief Get element type from an ::OrtSequenceTypeInfo + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] sequence_type_info + * \param[out] type_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSequenceElementType, _In_ const OrtSequenceTypeInfo* sequence_type_info, + _Outptr_ OrtTypeInfo** type_info); + + /// @} + /// \name OrtMapTypeInfo + /// @{ + ORT_CLASS_RELEASE(MapTypeInfo); + /// @} + /// \name OrtSequenceTypeInfo + /// @{ + ORT_CLASS_RELEASE(SequenceTypeInfo); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief End profiling and return filename of the profile data + * + * Profiling is turned on through OrtApi::EnableProfiling + * + * \param[in] session + * \param[in] allocator + * \param[out] out Null terminated string of the filename, allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionEndProfiling, _In_ OrtSession* session, _Inout_ OrtAllocator* allocator, _Outptr_ char** out); + + /** \brief Get ::OrtModelMetadata from an ::OrtSession + * + * \param[in] session + * \param[out] out Newly created ::OrtModelMetadata. Must be freed using OrtApi::ReleaseModelMetadata + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetModelMetadata, _In_ const OrtSession* session, _Outptr_ OrtModelMetadata** out); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** \brief Get `producer name` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetProducerName, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get `graph name` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetGraphName, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get `domain` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetDomain, _In_ const OrtModelMetadata* model_metadata, _Inout_ OrtAllocator* allocator, + _Outptr_ char** value); + + /** \brief Get `description` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetDescription, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Return data for a key in the custom metadata map in an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[in] key Null terminated string + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * `value` will be set to nullptr if the given key is not found in the custom metadata map. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataLookupCustomMetadataMap, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _In_ const char* key, _Outptr_result_maybenull_ char** value); + + /** \brief Get version number from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[out] value Set to the version number + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetVersion, _In_ const OrtModelMetadata* model_metadata, _Out_ int64_t* value); + + ORT_CLASS_RELEASE(ModelMetadata); + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an OrtEnv + * + * Create an environment with global threadpools that will be shared across sessions. + * Use this in conjunction with OrtApi::DisablePerSessionThreads or else the session will use + * its own thread pools. + * + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[in] tp_options + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithGlobalThreadPools, OrtLoggingLevel log_severity_level, _In_ const char* logid, + _In_ const OrtThreadingOptions* tp_options, _Outptr_ OrtEnv** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Use global thread pool on a session + * + * Disable using per session thread pool and use the shared global threadpool. + * This should be used in conjunction with OrtApi::CreateEnvWithGlobalThreadPools. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisablePerSessionThreads, _Inout_ OrtSessionOptions* options); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Create an ::OrtThreadingOptions + * + * \param[out] out Newly created ::OrtThreadingOptions. Must be freed with OrtApi::ReleaseThreadingOptions + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateThreadingOptions, _Outptr_ OrtThreadingOptions** out); + + ORT_CLASS_RELEASE(ThreadingOptions); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] keys Array of null terminated strings (array count = num_keys) allocated using `allocator`. + * The strings and the pointer array must be freed using `allocator` + * `keys` will be set to nullptr if the custom metadata map is empty. + * \param[out] num_keys Set to the number of elements in the `keys` array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetCustomMetadataMapKeys, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_result_buffer_maybenull_(*num_keys) char*** keys, _Out_ int64_t* num_keys); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** + * + * Override symbolic dimensions (by specific name strings) with actual values + * if known at session initialization time to enable optimizations that can + * take advantage of fixed values (such as memory planning, etc) + * + */ + ORT_API2_STATUS(AddFreeDimensionOverrideByName, + _Inout_ OrtSessionOptions* options, _In_ const char* dim_name, + _In_ int64_t dim_value); + + /// @} + /// \name Misc + /// @{ + + /** \brief Get the names of all available providers + * + * \note The providers in the list are not guaranteed to be usable. They may fail to load due to missing system dependencies. + * For example, if the CUDA/cuDNN libraries are not installed, the CUDA provider will report an error when it is added to the session options. + * + * \param[out] out_ptr Set to a pointer to an array of null terminated strings of the available providers. The entries and the + * array itself must be freed using OrtApi::ReleaseAvailableProviders + * \param[out] provider_length Set to the number of entries in the `out_ptr` array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetAvailableProviders, _Outptr_ char*** out_ptr, _Out_ int* provider_length); + + /** \brief Release data from OrtApi::GetAvailableProviders. This API will never fail + * so you can rely on it in a noexcept code. + * + * \param[in] ptr The `out_ptr` result from OrtApi::GetAvailableProviders. + * \param[in] providers_length The `provider_length` result from OrtApi::GetAvailableProviders + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ReleaseAvailableProviders, _In_ char** ptr, + _In_ int providers_length); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Get the length of a single string in a string tensor + * + * \param[in] value A string tensor + * \param[in] index Index of the string in the tensor + * \param[out] out Set to number of bytes of the string element + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorElementLength, _In_ const OrtValue* value, size_t index, _Out_ size_t* out); + + /** \brief Get a single string from a string tensor + * + * \param[in] value A string tensor + * \param[in] s_len Number of bytes in the `s` buffer. Must match the value returned by OrtApi::GetStringTensorElementLength. + * \param[in] index Index of the string in the tensor + * \param[out] s The string element contents in UTF-8 encoding. The string is NOT null-terminated. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorElement, _In_ const OrtValue* value, size_t s_len, size_t index, _Out_writes_bytes_all_(s_len) void* s); + + /** \brief Set a single string in a string tensor + * + * \param[in] value A string tensor + * \param[in] s A null terminated UTF-8 encoded string + * \param[in] index Index of the string in the tensor to set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillStringTensorElement, _Inout_ OrtValue* value, _In_ const char* s, size_t index); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Set a session configuration entry as a pair of strings + * + * If a configuration with same key exists, this will overwrite the configuration with the given config_value. + * + * The config_key and the format of config_value are defined in onnxruntime_session_options_config_keys.h + * + * \param[in] options + * \param[in] config_key A null terminated string representation of the config key + * \param[in] config_value A null terminated string representation of the config value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddSessionConfigEntry, _Inout_ OrtSessionOptions* options, + _In_z_ const char* config_key, _In_z_ const char* config_value); + + /// @} + /// \name OrtAllocator + /// @{ + + /** \brief Create an allocator for an ::OrtSession following an ::OrtMemoryInfo + * + * \param[in] session + * \param[in] mem_info valid ::OrtMemoryInfo instance + * \param[out] out Newly created ::OrtAllocator. Must be freed with OrtApi::ReleaseAllocator + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateAllocator, _In_ const OrtSession* session, _In_ const OrtMemoryInfo* mem_info, + _Outptr_ OrtAllocator** out); + + /** \brief Release an ::OrtAllocator obtained from OrtApi::CreateAllocator + */ + ORT_CLASS_RELEASE(Allocator); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Run a model using Io Bindings for the inputs & outputs + * + * \see OrtApi::Run + * + * \param[in] session + * \param[in] run_options + * \param[in] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunWithBinding, _Inout_ OrtSession* session, _In_ const OrtRunOptions* run_options, _In_ const OrtIoBinding* binding_ptr); + + /** \brief Create an ::OrtIoBinding instance + * + * An IoBinding object allows one to bind pre-allocated ::OrtValue%s to input names. + * Thus if you want to use a raw on device buffer as input or output you can avoid + * extra copy during runtime. + * + * \param[in] session + * \param[out] out Newly created ::OrtIoBinding. Must be freed with OrtApi::ReleaseIoBinding + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateIoBinding, _Inout_ OrtSession* session, _Outptr_ OrtIoBinding** out); + + /// @} + /// \name OrtIoBinding + /// @{ + + /** \brief Release an ::OrtIoBinding obtained from OrtApi::CreateIoBinding + */ + ORT_CLASS_RELEASE(IoBinding); + + /** \brief Bind an ::OrtValue to an ::OrtIoBinding input + * + * When using OrtApi::RunWithBinding this value is used for the named input + * + * \param[in] binding_ptr + * \param[in] name Name for the model input + * \param[in] val_ptr ::OrtValue of Tensor type. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindInput, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtValue* val_ptr); + + /** \brief Bind an ::OrtValue to an ::OrtIoBinding output + * + * When using OrtApi::RunWithBinding this value is used for the named output + * + * \param[in] binding_ptr + * \param[in] name Null terminated string of the model output name + * \param[in] val_ptr ::OrtValue of Tensor type. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindOutput, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtValue* val_ptr); + + /** \brief Bind an ::OrtIoBinding output to a device + * + * Binds the ::OrtValue to a device which is specified by ::OrtMemoryInfo. + * You can either create an instance of ::OrtMemoryInfo with a device id or obtain one from the allocator that you have created/are using + * This is useful when one or more outputs have dynamic shapes and, it is hard to pre-allocate and bind a chunk of + * memory within ::OrtValue ahead of time. + * + * \see OrtApi::RunWithBinding + * + * \param[in] binding_ptr + * \param[in] name Null terminated string of the device name + * \param[in] mem_info_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindOutputToDevice, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtMemoryInfo* mem_info_ptr); + + /** \brief Get the names of an ::OrtIoBinding's outputs + * + * Returns the names of the outputs in the order they were bound. This is useful after running the model + * with bound outputs because the returned names are in order in which output ::OrtValue are returned. This is useful if + * the order of outputs and their names is not known. + * + * \param[in] binding_ptr + * \param[in] allocator Allocator used to allocate continuous buffers for output strings and lengths. + * \param[out] buffer Returns an array of non-null terminated UTF-8 strings. The number of strings stored is returned in the count parameter. + * This buffer is allocated using `allocator` and must be freed using it. + * \param[out] lengths Returns an array of `count` lengths of the strings returned in `buffer` + * This buffer is allocated using `allocator` and must be freed using it. + * \param[out] count Number of strings returned. If `binding_ptr` has no bound outputs, zero is returned, + * no memory allocation is performed and buffer and lengths are set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetBoundOutputNames, _In_ const OrtIoBinding* binding_ptr, _In_ OrtAllocator* allocator, + _Out_ char** buffer, _Out_writes_all_(count) size_t** lengths, _Out_ size_t* count); + + /** \brief Get the output ::OrtValue objects from an ::OrtIoBinding + * + * Returns an array of pointers to individually allocated ::OrtValue%s that contain results of a model execution with OrtApi::RunWithBinding + * The array contains the same number of ::OrtValue%s and they are in the same order as they were bound with OrtApi::BindOutput + * or OrtApi::BindOutputToDevice. + * + * The returned ::OrtValue%s must be released using OrtApi::ReleaseValue after they are no longer needed. + * The array is allocated using the specified instance of the allocator and must be freed using the same allocator after + * all the ::OrtValue%s contained therein are individually released. + * + * \param[in] binding_ptr + * \param[in] allocator Allocator used to allocate output array + * \param[out] output Set to the allocated array of allocated ::OrtValue outputs. Set to nullptr if there are 0 outputs. + * \param[out] output_count Set to number of ::OrtValue%s returned + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetBoundOutputValues, _In_ const OrtIoBinding* binding_ptr, _In_ OrtAllocator* allocator, + _Out_writes_all_(output_count) OrtValue*** output, _Out_ size_t* output_count); + + /** \brief Clears any previously set Inputs for an ::OrtIoBinding + */ + void(ORT_API_CALL* ClearBoundInputs)(_Inout_ OrtIoBinding* binding_ptr) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Clears any previously set Outputs for an ::OrtIoBinding + */ + void(ORT_API_CALL* ClearBoundOutputs)(_Inout_ OrtIoBinding* binding_ptr) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Direct memory access to a specified tensor element + * + * For example, given a tensor with shape of [3,224,224], a pointer to the element at location [2,150,128] can be retrieved + * + * This function only works for numeric type tensors (No strings, etc). + * This is a no-copy method whose returned pointer is valid until the passed in ::OrtValue is free'd. + * + * \param[in] value + * \param[in] location_values Pointer to an array of index values that specify an element's location relative to its shape + * \param[in] location_values_count Number of elements in location_values. Must match the number of elements in the tensor's shape. + * \param[out] out Set to a pointer to the element specified + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(TensorAt, _Inout_ OrtValue* value, const int64_t* location_values, size_t location_values_count, _Outptr_ void** out); + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an allocator and register it with the ::OrtEnv + * + * Enables sharing the allocator between multiple sessions that use the same env instance. + * Lifetime of the created allocator will be valid for the duration of the environment. + * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered. + * + * See https://onnxruntime.ai/docs/get-started/with-c.html for details. + * + * \param[in] env ::OrtEnv instance + * \param[in] mem_info + * \param[in] arena_cfg Pass nullptr for defaults + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateAndRegisterAllocator, _Inout_ OrtEnv* env, _In_ const OrtMemoryInfo* mem_info, + _In_ const OrtArenaCfg* arena_cfg); + + /** \brief Set language projection + * + * Set the language projection for collecting telemetry data when Env is created. + * + * The default is ORT_PROJECTION_C, which means it will classify the language not in the list to C also. + * + * \param[in] ort_env + * \param[in] projection + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetLanguageProjection, _In_ const OrtEnv* ort_env, _In_ OrtLanguageProjection projection); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Return the time that profiling was started + * + * \note The timer precision varies per platform. On Windows and MacOS, the precision will be ~100ns + * + * \param[in] session + * \param[out] out nanoseconds of profiling's start time + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetProfilingStartTimeNs, _In_ const OrtSession* session, _Outptr_ uint64_t* out); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Set global intra-op thread count + * + * This configures the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools + * + * \param[in] tp_options + * \param[in] intra_op_num_threads Number of threads, special values:
+ * 0 = Use default thread count
+ * 1 = The invoking thread will be used; no threads will be created in the thread pool. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalIntraOpNumThreads, _Inout_ OrtThreadingOptions* tp_options, int intra_op_num_threads); + + /** \brief Set global inter-op thread count + * + * This configures the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools + * + * \param[in] tp_options + * \param[in] inter_op_num_threads Number of threads, special values:
+ * 0 = Use default thread count
+ * 1 = The invoking thread will be used; no threads will be created in the thread pool. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalInterOpNumThreads, _Inout_ OrtThreadingOptions* tp_options, int inter_op_num_threads); + + /** \brief Set global spin control options + * + * This will configure the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools. + * Allow spinning of thread pools when their queues are empty. This will set the value for both + * inter_op and intra_op threadpools. + * + * \param[in] tp_options + * \param[in] allow_spinning Valid values are 0 or 1.
+ * 0 = It won't spin (recommended if CPU usage is high)
+ * 1 = Threadpool will spin to wait for queue to become non-empty + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalSpinControl, _Inout_ OrtThreadingOptions* tp_options, int allow_spinning); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Add a pre-allocated initializer to a session + * + * If a model contains an initializer with a name that is same as the name passed to this call, + * ORT will use this initializer instance instead of deserializing one from the model file. This + * is useful when you want to share the same initializer across sessions. + * + * \param[in] options + * \param[in] name Null terminated string of the initializer name + * \param[in] val ::OrtValue containing the initializer. Its lifetime and the underlying initializer buffer must be + * managed by the user (created using the OrtApi::CreateTensorWithDataAsOrtValue) and it must outlive the session object + * to which it is added. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddInitializer, _Inout_ OrtSessionOptions* options, _In_z_ const char* name, + _In_ const OrtValue* val); + + /// @} + /// \name OrtEnv + /// @{ + + /** + * Create a custom environment with global threadpools and logger that will be shared across sessions. + * Use this in conjunction with OrtApi::DisablePerSessionThreads or else the session will use + * its own thread pools. + * + * \param[in] logging_function A pointer to a logging function. + * \param[in] logger_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to + * `logging_function`. + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[in] tp_options + * \param[out] out Newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithCustomLoggerAndGlobalThreadPools, OrtLoggingFunction logging_function, _In_opt_ void* logger_param, OrtLoggingLevel log_severity_level, + _In_ const char* logid, _In_ const struct OrtThreadingOptions* tp_options, _Outptr_ OrtEnv** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append CUDA provider to session options + * + * If CUDA is not available (due to a non CUDA enabled build, or if CUDA is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] cuda_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CUDA, + _In_ OrtSessionOptions* options, _In_ const OrtCUDAProviderOptions* cuda_options); + + /** \brief Append ROCM execution provider to the session options + * + * If ROCM is not available (due to a non ROCM enabled build, or if ROCM is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] rocm_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_ROCM, + _In_ OrtSessionOptions* options, _In_ const OrtROCMProviderOptions* rocm_options); + + /** \brief Append OpenVINO execution provider to the session options + * + * If OpenVINO is not available (due to a non OpenVINO enabled build, or if OpenVINO is not installed on the system), this function will fail. + * + * \param[in] options + * \param[in] provider_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_OpenVINO, + _In_ OrtSessionOptions* options, _In_ const OrtOpenVINOProviderOptions* provider_options); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Set threading flush-to-zero and denormal-as-zero + * + * Sets global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools. + * Flush-to-zero and denormal-as-zero are applied to threads in both intra and inter global thread pool. + * \note This option is not needed if the models used have no denormals. Having no denormals is recommended as this option may hurt model accuracy. + * + * \param[in] tp_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalDenormalAsZero, _Inout_ OrtThreadingOptions* tp_options); + + /// @} + /// \name OrtArenaCfg + /// @{ + + /** \deprecated Use OrtApi::CreateArenaCfgV2 + * + * This will create the configuration of an arena that can eventually be used to define an arena based allocator's behavior + * + * \param[in] max_mem Use 0 to allow ORT to choose the default + * \param[in] arena_extend_strategy Use -1 to allow ORT to choose the default, 0 = kNextPowerOfTwo, 1 = kSameAsRequested + * \param[in] initial_chunk_size_bytes Use -1 to allow ORT to choose the default + * \param[in] max_dead_bytes_per_chunk Use -1 to allow ORT to choose the default + * \param[in] out A pointer to an OrtArenaCfg instance + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateArenaCfg, _In_ size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, + int max_dead_bytes_per_chunk, _Outptr_ OrtArenaCfg** out); + + ORT_CLASS_RELEASE(ArenaCfg); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** + * Use this to obtain the description of the graph present in the model + * (doc_string field of the GraphProto message within the ModelProto message). + * If it doesn't exist, an empty string will be returned. + * + * \param[in] model_metadata An instance of ::OrtModelMetadata + * \param[in] allocator Allocator used to allocate the string that will be returned back + * \param[out] value Set to a null terminated string allocated using `allocator`. The caller is responsible for freeing it using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetGraphDescription, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append TensorRT provider to session options + * + * If TensorRT is not available (due to a non TensorRT enabled build, or if TensorRT is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] tensorrt_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_TensorRT, + _In_ OrtSessionOptions* options, _In_ const OrtTensorRTProviderOptions* tensorrt_options); + + /// @} + /// \name Misc + /// @{ + + /** \brief Set current GPU device ID + * + * Set the current device id of the GPU execution provider (CUDA/tensorrt/rocm). The device id should be less + * than the total number of devices available. This is only useful when multiple-GPUs are installed and it is + * required to restrict execution to a single GPU. + * + * \param[in] device_id + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetCurrentGpuDeviceId, _In_ int device_id); + + /** \brief Get current GPU device ID + * + * Get the current device id of the GPU execution provider (CUDA/tensorrt/rocm). + * + * \see OrtApi::SetCurrentGpuDeviceId + * + * \param[out] device_id + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetCurrentGpuDeviceId, _In_ int* device_id); + + /// @} + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Fetch an array of int64_t values stored as an attribute in the graph node + * + * + * If `out` is nullptr, the value of `size` is set to the true size of the attribute + * array's size, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual attribute array's size, + * the value of `size` is set to the true size of the attribute array's size, + * the provided memory is filled with the attribute's contents, + * and a success status is returned. + * + * If the `size` parameter is less than the actual attribute array's size and `out` + * is not nullptr, the value of `size` is set to the true size of the attribute array's size + * and a failure status is returned.) + * + * \param[in] info instance + * \param[in] name name of the attribute to be parsed + * \param[out] out pointer to memory where the attribute's contents are to be stored + * \param[in, out] size actual size of attribute array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttributeArray_float, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ float* out, _Inout_ size_t* size); + + /** \brief Fetch an array of int64_t values stored as an attribute in the graph node + * + * If `out` is nullptr, the value of `size` is set to the true size of the attribute + * array's size, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual attribute array's size, + * the value of `size` is set to the true size of the attribute array's size, + * the provided memory is filled with the attribute's contents, + * and a success status is returned. + * + * If the `size` parameter is less than the actual attribute array's size and `out` + * is not nullptr, the value of `size` is set to the true size of the attribute array's size + * and a failure status is returned.) + * + * \param[in] info instance + * \param[in] name name of the attribute to be parsed + * \param[out] out pointer to memory where the attribute's contents are to be stored + * \param[in, out] size actual size of attribute array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttributeArray_int64, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ int64_t* out, _Inout_ size_t* size); + + /// @} + /// \name OrtArenaCfg + /// @{ + + /** \brief Create an ::OrtArenaCfg + * + * Create the configuration of an arena that can eventually be used to define an arena based allocator's behavior. + * + * Supported keys are (See https://onnxruntime.ai/docs/get-started/with-c.html for details on what the + * following parameters mean and how to choose these values.): + * "max_mem": Maximum memory that can be allocated by the arena based allocator. + * Use 0 for ORT to pick the best value. Default is 0. + * "arena_extend_strategy": 0 = kNextPowerOfTwo, 1 = kSameAsRequested. + * Use -1 to allow ORT to choose the default. + * "initial_chunk_size_bytes": (Possible) Size of the first allocation in the arena. + * Only relevant if arena strategy is `kNextPowerOfTwo`. Use -1 to allow ORT to choose the default. + * Ultimately, the first allocation size is determined by the allocation memory request. + * "max_dead_bytes_per_chunk": Threshold of unused memory in an allocated chunk of arena memory after + * crossing which the current chunk is chunked into 2. + * "initial_growth_chunk_size_bytes": (Possible) Size of the second allocation in the arena. + * Only relevant if arena strategy is `kNextPowerOfTwo`. Use -1 to allow ORT to choose the default. + * "max_power_of_two_extend_bytes": The maximum enxtend size if arena strategy is `kNextPowerOfTwo`. + * It is not an allocation limit, it is only a limit for extension when requested byte is less than the limit. + * When requested bytes is more than the limit, allocator will still return as requested. + * Use -1 to allow ORT to choose the default 1GB for max_power_of_two_extend_bytes. + * Ultimately, the allocation size is determined by the allocation memory request. + * Further allocation sizes are governed by the arena extend strategy. + * + * \param[in] arena_config_keys Keys to configure the arena + * \param[in] arena_config_values Values to configure the arena + * \param[in] num_keys Number of keys in `arena_config_keys` and `arena_config_values` + * \param[out] out Newly created ::OrtArenaCfg. Must be freed with OrtApi::ReleaseArenaCfg + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateArenaCfgV2, _In_reads_(num_keys) const char* const* arena_config_keys, + _In_reads_(num_keys) const size_t* arena_config_values, _In_ size_t num_keys, + _Outptr_ OrtArenaCfg** out); + + /// @} + /// \name OrtRunOptions + /// @{ + + /** \brief Set a single run configuration entry as a pair of strings + * + * If a configuration with same key exists, this will overwrite the configuration with the given config_value + * + * The config_key and the format of config_value are defined in onnxruntime_run_options_config_keys.h + * + * \param[in] options + * \param[in] config_key A null terminated string representation of the config key + * \param[in] config_value A null terminated string representation of the config value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddRunConfigEntry, _Inout_ OrtRunOptions* options, + _In_z_ const char* config_key, _In_z_ const char* config_value); + + /// @} + /// \name OrtPrepackedWeightsContainer + /// @{ + + /** \brief Create an ::OrtPrepackedWeightsContainer + * + * This container will hold pre-packed buffers of shared initializers for sharing between sessions + * (i.e.) if there are shared initializers that can be shared between sessions, the pre-packed buffers + * of these (if any) may possibly be shared to provide memory footprint savings. Pass this container + * to sessions that you would like to share pre-packed buffers of shared initializers at session + * creation time. + * + * \param[out] out Newly created ::OrtPrepackedWeightsContainer. Must be freed with OrtApi::ReleasePrepackedWeightsContainer + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreatePrepackedWeightsContainer, _Outptr_ OrtPrepackedWeightsContainer** out); + + /** \brief Release OrtPrepackedWeightsContainer instance + * + * \note instance must not be released until the sessions using it are released + */ + ORT_CLASS_RELEASE(PrepackedWeightsContainer); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Create session with prepacked weights container + * + * Same functionality offered by OrtApi::CreateSession except that a container that contains + * pre-packed weights' buffers is written into/read from by the created session. + * This is useful when used in conjunction with OrtApi::AddInitializer which injects + * shared initializer info into sessions. Wherever possible, the pre-packed versions of these + * shared initializers are cached in this container so that multiple sessions can just re-use + * these instead of duplicating these in memory. + * + * \param[in] env OrtEnv instance instance + * \param[in] model_path Null terminated string of the path (wchar on Windows, char otherwise) + * \param[in] options + * \param[in] prepacked_weights_container + * \param[out] out Newly created ::OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionWithPrepackedWeightsContainer, _In_ const OrtEnv* env, _In_ const ORTCHAR_T* model_path, + _In_ const OrtSessionOptions* options, _Inout_ OrtPrepackedWeightsContainer* prepacked_weights_container, + _Outptr_ OrtSession** out); + + /** \brief Create session from memory with prepacked weights container + * + * Same functionality offered by OrtApi::CreateSessionFromArray except that a container that contains + * pre-packed weights' buffers is written into/read from by the created session. + * This is useful when used in conjunction with OrtApi::AddInitializer which injects + * shared initializer info into sessions. Wherever possible, the pre-packed versions of these + * shared initializers are cached in this container so that multiple sessions can just re-use + * these instead of duplicating these in memory. + * + * \param[in] env + * \param[in] model_data Array of bytes holding the model + * \param[in] model_data_length Number of bytes in `model_data_model` + * \param[in] options + * \param[in] prepacked_weights_container + * \param[out] out Newly created ::OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionFromArrayWithPrepackedWeightsContainer, _In_ const OrtEnv* env, + _In_ const void* model_data, size_t model_data_length, + _In_ const OrtSessionOptions* options, _Inout_ OrtPrepackedWeightsContainer* prepacked_weights_container, + _Outptr_ OrtSession** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append TensorRT execution provider to the session options + * + * If TensorRT is not available (due to a non TensorRT enabled build), this function will return failure. + * + * This is slightly different from OrtApi::SessionOptionsAppendExecutionProvider_TensorRT, it takes an + * ::OrtTensorRTProviderOptions which is publicly defined. This takes an opaque ::OrtTensorRTProviderOptionsV2 + * which must be created with OrtApi::CreateTensorRTProviderOptions. + * + * For OrtApi::SessionOptionsAppendExecutionProvider_TensorRT, the user needs to instantiate ::OrtTensorRTProviderOptions + * as well as allocate/release buffers for some members of ::OrtTensorRTProviderOptions. + * Here, OrtApi::CreateTensorRTProviderOptions and Ortapi::ReleaseTensorRTProviderOptions will do the memory management for you. + * + * \param[in] options + * \param[in] tensorrt_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_TensorRT_V2, + _In_ OrtSessionOptions* options, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options); + + /// @} + /// \name OrtTensorRTProviderOptionsV2 + /// @{ + + /** \brief Create an OrtTensorRTProviderOptionsV2 + * + * \param[out] out Newly created ::OrtTensorRTProviderOptionsV2. Must be released with OrtApi::ReleaseTensorRTProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorRTProviderOptions, _Outptr_ OrtTensorRTProviderOptionsV2** out); + + /** \brief Set options in a TensorRT Execution Provider. + * + * Please refer to https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html#cc + * to know the available keys and values. Key should be in null terminated string format of the member of ::OrtTensorRTProviderOptionsV2 + * and value should be its related range. Recreates the options and only sets the supplied values. + * + * For example, key="trt_max_workspace_size" and value="2147483648" + * + * \param[in] tensorrt_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UpdateTensorRTProviderOptions, _Inout_ OrtTensorRTProviderOptionsV2* tensorrt_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Get serialized TensorRT provider options string. + * + * For example, "trt_max_workspace_size=2147483648;trt_max_partition_iterations=10;trt_int8_enable=1;......" + * + * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with OrtApi::CreateAllocator or OrtApi::GetAllocatorWithDefaultOptions + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorRTProviderOptionsAsString, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtTensorRTProviderOptionsV2 + * + * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does + */ + void(ORT_API_CALL* ReleaseTensorRTProviderOptions)(_Frees_ptr_opt_ OrtTensorRTProviderOptionsV2* input); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Enable custom operators + * + * See onnxruntime-extensions: https://github.com/microsoft/onnxruntime-extensions.git + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableOrtCustomOps, _Inout_ OrtSessionOptions* options); + + /// @} + /// \name OrtAllocator + /// @{ + + /** \brief Register a custom allocator + * + * Enables sharing between multiple sessions that use the same env instance. + * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered. + * + * The behavior of this is exactly the same as OrtApi::CreateAndRegisterAllocator except + * instead of ORT creating an allocator based on provided info, in this case + * ORT uses the user-provided custom allocator. + * See https://onnxruntime.ai/docs/get-started/with-c.html for details. + * + * \param[in] env + * \param[in] allocator User provided allocator + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RegisterAllocator, _Inout_ OrtEnv* env, _In_ OrtAllocator* allocator); + + /** \brief Unregister a custom allocator + * + * It is an error if you provide an ::OrtMemoryInfo not corresponding to any + * registered allocators for sharing. + * + * \param[in] env + * \param[in] mem_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UnregisterAllocator, _Inout_ OrtEnv* env, + _In_ const OrtMemoryInfo* mem_info); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Sets *out to 1 iff an ::OrtValue is a SparseTensor, and 0 otherwise + * + * \param[in] value existing ::OrtValue + * \param[out] out unless an error occurs, contains 1 iff the value contains an instance + * of sparse tensor or 0 otherwise. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(IsSparseTensor, _In_ const OrtValue* value, _Out_ int* out); + + /** \brief Create an ::OrtValue with a sparse tensor that is empty. + * + * Use FillSparseTensor() functions to populate sparse tensor with non-zero values and + * format specific indices data. + * Use ReleaseValue to destroy the sparse tensor, this will also release the buffer inside the output value + * if any was allocated. + * \param[in,out] allocator allocator to use when performing an allocation. Allocation will be performed + * by FillSparseTensor() APIs. The lifespan of the allocator instance must eclipse the lifespan + * this sparse tensor instance as the same allocator will be used to free memory. + * \param[in] dense_shape shape of the original dense tensor + * \param[in] dense_shape_len number of shape dimensions being passed + * \param[in] type must be one of TENSOR_ELEMENT_DATA_TYPE_xxxx + * \param[out] out Should be freed by calling ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSparseTensorAsOrtValue, _Inout_ OrtAllocator* allocator, _In_ const int64_t* dense_shape, + size_t dense_shape_len, ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and COO indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape pointer to values shape array + * \param[in] values_shape_len length of the values_shape + * \param[in] values pointer to an array of values. For strings, pass const char**. + * \param[in] indices_data pointer to a location of COO indices + * \param[in] indices_num number of COO indices + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorCoo, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* indices_data, size_t indices_num); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and CSR indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape pointer to values shape array + * \param[in] values_shape_len length of the values_shape + * \param[in] values - pointer to an array of values. For strings, pass const char**. + * \param[in] inner_indices_data pointer to a location of CSR inner indices + * \param[in] inner_indices_num number of CSR inner indices + * \param[in] outer_indices_data pointer to a location of CSR outer indices + * \param[in] outer_indices_num number of CSR outer indices + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorCsr, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* inner_indices_data, size_t inner_indices_num, + _In_ const int64_t* outer_indices_data, size_t outer_indices_num); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and BlockSparse indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape + * \param[in] values_shape_len + * \param[in] values structure with values information + * \param[in] indices_shape_data pointer to a location of indices shape + * \param[in] indices_shape_len length of the block sparse indices shape + * \param[in] indices_data pointer to a location of indices data. Shape will determine the length of the indices data. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorBlockSparse, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* indices_shape_data, size_t indices_shape_len, + _In_ const int32_t* indices_data); + + /** + * Create an ::OrtValue with a sparse tensor. This is the first step. + * Next, use UseIndices() functions to supply sparse tensor with + * format specific indices data and set its sparse format to a specific enum value. + * This will not perform memory allocations. It will + * use supplied user buffer which should outlive the created sparse tensor. + * Use OrtApi::ReleaseValue to destroy the sparse tensor. It would not release the supplied values buffer. + * This function can not be used to map strings from the user allocated memory. Strings must always be copied + * and have UTF-8 encoding. Therefore, use OrtApi::CreateSparseTensorAsOrtValue above and then fill it with data + * using appropriate Make*() function. + * + * \param[in] info memory info where sparse values reside. + * \param[in,out] p_data pointer to a user allocated buffer with values. To create a full sparse tensor with no non-zero + * values, pass nullptr + * \param[in] dense_shape shape of the original dense tensor + * \param[in] dense_shape_len number of shape dimensions being passed + * \param[in] values_shape shape of the values data. To create a fully sparse tensor with no non-zero values, + * pass {0} shape. + * \param[in] values_shape_len number of values shape dimensions + * \param[in] type must be one of TENSOR_ELEMENT_DATA_TYPE_xxxx + * \param[out] out Should be freed by calling ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSparseTensorWithValuesAsOrtValue, _In_ const OrtMemoryInfo* info, _Inout_ void* p_data, + _In_ const int64_t* dense_shape, size_t dense_shape_len, + _In_ const int64_t* values_shape, size_t values_shape_len, + ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** + * This assigns Coo format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_COO. This will not allocate any additional memory for data. The life span of + * indices_data buffer should eclipse the life span of this ::OrtValue. + * + * \param[in,out] ort_value ::OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in,out] indices_data pointer to a user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] indices_num number of COO indices. Should either be 0 for fully sparse tensors, be equal + * to the number of nnz values specified to OrtApi::CreateSparseTensorWithValuesAsOrtValue for 1-D {nnz} indices or + * be twice as number of nnz values for a 2-D indices {nnz, 2} + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseCooIndices, _Inout_ OrtValue* ort_value, _Inout_ int64_t* indices_data, size_t indices_num); + + /** + * The assigns CSR format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_CSRC. This will not allocate any additional memory for data. The life spans of + * inner_data and outer_data buffers should eclipse the life span of this ::OrtValue. + * + * \param[in,out] ort_value ::OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in,out] inner_data pointer to a user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] inner_num number of inner CSR indices. Should either be 0 for fully sparse tensors or be equal + * to the number of nnz values specified to OrtApi::CreateSparseTensorWithValuesAsOrtValue. + * \param[in,out] outer_data pointer to user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] outer_num number of CSR outer indices. Should either be 0 for fully sparse tensors or + * equal to rows + 1 of the dense shape. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseCsrIndices, _Inout_ OrtValue* ort_value, _Inout_ int64_t* inner_data, size_t inner_num, + _Inout_ int64_t* outer_data, size_t outer_num); + + /** + * The assigns BlockSparse format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_BLOCK_SPARSE. This will not allocate any additional memory for data. The life span of + * indices_data buffer must eclipse the lifespan of this ::OrtValue. + * + * \param[in,out] ort_value OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in] indices_shape pointer to indices shape. Use {0} for fully sparse tensors + * \param[in] indices_shape_len length of the indices shape + * \param[in,out] indices_data pointer to user pre-allocated buffer or nullptr for fully sparse tensors. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseBlockSparseIndices, _Inout_ OrtValue* ort_value, const int64_t* indices_shape, size_t indices_shape_len, _Inout_ int32_t* indices_data); + + /** \brief Returns sparse tensor format enum iff a given ort value contains an instance of sparse tensor. + * + * \param[in] ort_value ::OrtValue that contains an instance of sparse tensor + * \param[out] out pointer to out parameter + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorFormat, _In_ const OrtValue* ort_value, _Out_ enum OrtSparseFormat* out); + + /** \brief Returns data type and shape of sparse tensor values (nnz) iff ::OrtValue contains a SparseTensor. + * + * \param[in] ort_value An ::OrtValue that contains a fully constructed sparse tensor + * \param[out] out Must be freed by OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorValuesTypeAndShape, _In_ const OrtValue* ort_value, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Returns numeric data for sparse tensor values (nnz). For string values use GetStringTensor*(). + * + * \param[in] ort_value an instance of ::OrtValue containing sparse tensor + * \param[out] out returns a pointer to values data. Do not attempt to free this ptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorValues, _In_ const OrtValue* ort_value, _Outptr_ const void** out); + + /** \brief Returns data type, shape for the type of indices specified by indices_format. + * + * \param[in] ort_value ::OrtValue containing sparse tensor. + * \param[in] indices_format One of the indices formats. It is an error to request a format that the sparse + * tensor does not contain. + * \param[out] out an instance of ::OrtTensorTypeAndShapeInfo. Must be freed by OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorIndicesTypeShape, _In_ const OrtValue* ort_value, enum OrtSparseIndicesFormat indices_format, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Returns indices data for the type of the indices specified by indices_format + * + * \param[in] ort_value ::OrtValue containing sparse tensor. + * \param[in] indices_format One of the indices formats. It is an error to request a format that the sparse tensor does not contain. + * \param[out] num_indices Pointer to where the number of indices entries is returned + * \param[out] indices Returned pointer to the indices data. Do not free the returned pointer as it refers to internal data owned by the ::OrtValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorIndices, _In_ const OrtValue* ort_value, enum OrtSparseIndicesFormat indices_format, _Out_ size_t* num_indices, _Outptr_ const void** indices); + /// @} + /// \name OrtSessionOptions + /// @{ + + /** + * \brief Sets out to 1 iff an optional type OrtValue has an element, 0 otherwise (OrtValue is None) + * Use this API to find if the optional type OrtValue is None or not. + * If the optional type OrtValue is not None, use the OrtValue just like any other OrtValue. + * For example, if you get an OrtValue that corresponds to Optional(tensor) and + * if HasValue() returns true, use it as tensor and so on. + + * \param[in] value Input OrtValue. + * \param[out] out indicating if the input OrtValue contains data (1) or if it is a None (0) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(HasValue, _In_ const OrtValue* value, _Out_ int* out); + + /// @} + /// \name OrtKernelContext + /// Custom operator APIs. + /// @{ + + /** \brief Used for custom operators, gets the GPU compute stream to use to launch the custom a GPU kernel + * \see ::OrtCustomOp + * \param[in] context OrtKernelContext instance + * \param[out] out Returns pointer to a GPU compute stream that can be used to launch the custom GPU kernel. + * If retrieving the GPU compute stream is not relevant (GPU not enabled in the build, kernel partitioned to + * some other EP), then a nullptr is returned as the output param. + * Do not free or mutate the returned pointer as it refers to internal data owned by the underlying session. + * Only use it for custom kernel launching. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetGPUComputeStream, _In_ const OrtKernelContext* context, _Outptr_ void** out); + + /// @} + /// \name GetTensorMemoryInfo + /// @{ + /** \brief Returns a pointer to the ::OrtMemoryInfo of a Tensor + * \param[in] value ::OrtValue containing tensor. + * \param[out] mem_info ::OrtMemoryInfo of the tensor. Do NOT free the returned pointer. It is valid for the lifetime of the ::OrtValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorMemoryInfo, _In_ const OrtValue* value, _Out_ const OrtMemoryInfo** mem_info); + + /// @} + /// \name GetExecutionProviderApi + /// @{ + /** \brief Get a pointer to the requested version of the Execution Provider specific + * API extensions to the OrtApi + * \param[in] provider_name The name of the execution provider name. Currently only the following + * values are supported: "DML". + * \param[in] version Must be ::ORT_API_VERSION. + * \param[out] provider_api A void pointer containing a reference to the execution provider versioned api structure. + * For example, the provider_api pointer can be cast to the OrtDmlApi* when the provider_name is "DML". + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetExecutionProviderApi, _In_ const char* provider_name, _In_ uint32_t version, _Outptr_ const void** provider_api); + + /// @} + + /// \name SessionOptions + /// @{ + /** \brief Set custom thread creation function + * + * \param[in] options Session options + * \param[in] ort_custom_create_thread_fn Custom thread creation function + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomCreateThreadFn, _Inout_ OrtSessionOptions* options, _In_ OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /** \brief Set creation options for custom thread + * + * \param[in] options Session options + * \param[in] ort_custom_thread_creation_options Custom thread creation options (can be nullptr) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomThreadCreationOptions, _Inout_ OrtSessionOptions* options, _In_ void* ort_custom_thread_creation_options); + + /** \brief Set custom thread join function + * + * \param[in] options Session options + * \param[in] ort_custom_join_thread_fn Custom join thread function, must not be nullptr when ort_custom_create_thread_fn is set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomJoinThreadFn, _Inout_ OrtSessionOptions* options, _In_ OrtCustomJoinThreadFn ort_custom_join_thread_fn); + /// @} + + /// \name OrtThreadingOptions + /// @{ + /** \brief Set custom thread creation function for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_create_thread_fn Custom thread creation function + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomCreateThreadFn, _Inout_ OrtThreadingOptions* tp_options, _In_ OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /** \brief Set custom thread creation options for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_thread_creation_options Custom thread creation options (can be nullptr) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomThreadCreationOptions, _Inout_ OrtThreadingOptions* tp_options, _In_ void* ort_custom_thread_creation_options); + + /** \brief Set custom thread join function for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_join_thread_fn Custom thread join function, must not be nullptr when global ort_custom_create_thread_fn is set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomJoinThreadFn, _Inout_ OrtThreadingOptions* tp_options, _In_ OrtCustomJoinThreadFn ort_custom_join_thread_fn); + /// @} + + /** \brief Synchronize bound inputs. The call may be necessary for some providers, such as cuda, + * in case the system that allocated bound memory operated on a different stream. However, the + * operation is provider specific and could be a no-op. + * + * \param[inout] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SynchronizeBoundInputs, _Inout_ OrtIoBinding* binding_ptr); + + /** \brief Synchronize bound outputs. The call may be necessary for some providers, such as cuda, + * in case the system that allocated bound memory operated on a different stream. However, the + * operation is provider specific and could be a no-op. + * + * \param[inout] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SynchronizeBoundOutputs, _Inout_ OrtIoBinding* binding_ptr); + + /// \name OrtSessionOptions + /// @{ + + /** \brief Append CUDA execution provider to the session options + * + * If CUDA is not available (due to a non CUDA enabled build), this function will return failure. + * + * This is slightly different from OrtApi::SessionOptionsAppendExecutionProvider_CUDA, it takes an + * ::OrtCUDAProviderOptions which is publicly defined. This takes an opaque ::OrtCUDAProviderOptionsV2 + * which must be created with OrtApi::CreateCUDAProviderOptions. + * + * For OrtApi::SessionOptionsAppendExecutionProvider_CUDA, the user needs to instantiate ::OrtCUDAProviderOptions + * as well as allocate/release buffers for some members of ::OrtCUDAProviderOptions. + * Here, OrtApi::CreateCUDAProviderOptions and Ortapi::ReleaseCUDAProviderOptions will do the memory management for you. + * + * \param[in] options + * \param[in] cuda_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CUDA_V2, + _In_ OrtSessionOptions* options, _In_ const OrtCUDAProviderOptionsV2* cuda_options); + + /// @} + /// \name OrtCUDAProviderOptionsV2 + /// @{ + + /** \brief Create an OrtCUDAProviderOptionsV2 + * + * \param[out] out Newly created ::OrtCUDAProviderOptionsV2. Must be released with OrtApi::ReleaseCudaProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(CreateCUDAProviderOptions, _Outptr_ OrtCUDAProviderOptionsV2** out); + + /** \brief Set options in a CUDA Execution Provider. + * + * Please refer to https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#configuration-options + * to know the available keys and values. Key should be in null terminated string format of the member of ::OrtCUDAProviderOptionsV2 + * and value should be its related range. Recreates the options and only sets the supplied values. + * + * For example, key="device_id" and value="0" + * + * \param[in] cuda_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(UpdateCUDAProviderOptions, _Inout_ OrtCUDAProviderOptionsV2* cuda_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** + * Get serialized CUDA provider options string. + * + * For example, "device_id=0;arena_extend_strategy=0;......" + * + * \param cuda_options - OrtCUDAProviderOptionsV2 instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions() + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(GetCUDAProviderOptionsAsString, _In_ const OrtCUDAProviderOptionsV2* cuda_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtCUDAProviderOptionsV2 + * + * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does + * + * \since Version 1.11. + */ + void(ORT_API_CALL* ReleaseCUDAProviderOptions)(_Frees_ptr_opt_ OrtCUDAProviderOptionsV2* input); + + /// @} + + /** \brief Append MIGraphX provider to session options + * + * If MIGraphX is not available (due to a non MIGraphX enabled build, or if MIGraphX is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] migraphx_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_MIGraphX, + _In_ OrtSessionOptions* options, _In_ const OrtMIGraphXProviderOptions* migraphx_options); + + /** \brief Replace initialized Tensors with external data with the data provided in initializers. + * + * The function will find the initialized TensorProtos with external data in the graph with the provided names and + * replace them with the provided tensors. The API verifies that the TensorProto being replaced + * has an external data reference and has the same name, dimensions and data type as its replacement. The replacement + * will occur before any of the optimizations take place. The data will be copied into the graph + * since TensorProto can't refer to the user provided buffers. + * + * Once the model has been loaded, the OrtValue(s) added to SessionOptions instance will be removed + * from the internal SessionOptions copy to save memory, the user provided buffers can then be deallocated + * and the SessionOptions instance that refers to them can be destroyed. + * + * \param[in] options + * \param[in] initializer_names Array of null terminated UTF-8 encoded strings of the initializers names. + * \param[in] initializers Array of ::OrtValue type + * \param[in] num_initializers Number of elements in the initializer_names and initializers + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.12. + */ + ORT_API2_STATUS(AddExternalInitializers, _In_ OrtSessionOptions* options, + _In_reads_(num_initializers) const char* const* initializer_names, + _In_reads_(num_initializers) const OrtValue* const* initializers, size_t num_initializers); + + /** \brief: Create attribute of onnxruntime operator + * + * \param[in] name Name of the attribute + * \param[in] data Data content of the attribute + * \param[in] len Number of bytes stored in data + * \param[in] type Data type + * \param[out] op_attr Attribute that has been created, which must be released by OrtApi::ReleaseOpAttr + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CreateOpAttr, + _In_ const char* name, + _In_ const void* data, + _In_ int len, + _In_ OrtOpAttrType type, + _Outptr_ OrtOpAttr** op_attr); + + /* \brief: Release op attribute + * + * \param[in] opAttr Attribute created by OrtApi::CreateOpAttr + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(OpAttr); + + /** \brief: Create onnxruntime native operator + * + * \param[in] info Kernel info + * \param[in] op_name Operator name + * \param[in] domain Operator domain + * \param[in] version Operator opset version + * \param[in] type_constraint_names Name of the type contraints, such as "T" or "T1" + * \param[in] type_constraint_values Type of each contraints + * \param[in] type_constraint_count Number of contraints + * \param[in] attr_values Attributes used to initialize the operator + * \param[in] attr_count Number of the attributes + * \param[in] input_count Number of inputs + * \param[in] output_count Number of outputs + * \param[out] ort_op Operator that has been created + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CreateOp, + _In_ const OrtKernelInfo* info, + _In_z_ const char* op_name, + _In_z_ const char* domain, + int version, + _In_reads_(type_constraint_count) const char** type_constraint_names, + _In_reads_(type_constraint_count) const ONNXTensorElementDataType* type_constraint_values, + int type_constraint_count, + _In_reads_(attr_count) const OrtOpAttr* const* attr_values, + int attr_count, + int input_count, + int output_count, + _Outptr_ OrtOp** ort_op); + + /** \brief: Invoke the operator created by OrtApi::CreateOp + * The inputs must follow the order as specified in onnx specification + * + * \param[in] context Kernel context + * \param[in] ort_op Operator that has been created + * \param[in] input_values Array of inputs + * \param[in] input_count Number of inputs + * \param[in] output_values Array of outputs + * \param[in] output_count Number of outputs + * + * \since Version 1.12. + */ + ORT_API2_STATUS(InvokeOp, + _In_ const OrtKernelContext* context, + _In_ const OrtOp* ort_op, + _In_ const OrtValue* const* input_values, + _In_ int input_count, + _Inout_ OrtValue* const* output_values, + _In_ int output_count); + + /* \brief: Release an onnxruntime operator + * + * \param[in] Op Operator created by OrtApi::CreateOp + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(Op); + + /** \brief: Append execution provider to the session options. + * \param[in] options + * \param[in] provider_name - provider to add. + * \param[in] provider_options_keys - keys to configure the provider options + * \param[in] provider_options_values - values to configure the provider options + * \param[in] num_keys - number of keys passed in + * + * Currently supported providers: + * QNN + * SNPE + * XNNPACK + * + * Note: If an execution provider has a dedicated SessionOptionsAppendExecutionProvider_ function + * that should be used to add it. + * + * QNN supported keys: + * "backend_path": file path to QNN backend library. + * "profiling_level": QNN profiling level, options: "off", "basic", "detailed". Default to off. + * "profiling_file_path": QNN profiling file path if ETW not enabled. + * "rpc_control_latency": QNN RPC control latency. + * "vtcm_mb": QNN VTCM size in MB. default to 0(not set). + * "htp_performance_mode": QNN performance mode, options: "burst", "balanced", "default", "high_performance", + * "high_power_saver", "low_balanced", "extreme_power_saver", "low_power_saver", "power_saver", "sustained_high_performance". Default to "default". + * "qnn_saver_path": File path to the QNN Saver backend library. If specified, QNN Saver will be enabled and will + * dump QNN API calls to disk for replay/debugging. QNN Saver produces incorrect model inference results and + * may alter model/EP partitioning. Use only for debugging. + * "qnn_context_priority": QNN context priority, options: "low", "normal", "normal_high", "high". Default to "normal". + * "htp_graph_finalization_optimization_mode": Set the optimization mode for graph finalization on the HTP backend. Available options: + * - "0": Default. + * - "1": Faster preparation time, less optimal graph. + * - "2": Longer preparation time, more optimal graph. + * - "3": Longest preparation time, most likely even more optimal graph. See QNN SDK documentation for specific details. + * "soc_model": The SoC model number. Refer to the QNN SDK documentation for valid values. Defaults to "0" (unknown). + * "htp_arch": The minimum HTP architecture the driver will use to select compatible QNN operators. Available options: + * - "0": Default (none). + * - "68" + * - "69" + * - "73" + * - "75" + * "device_id": The ID of the device to use when setting 'htp_arch'. Defaults to "0" (for single device). + * "enable_htp_fp16_precision": Used for float32 model for HTP backend. + * Enable the float32 model to be inferenced with fp16 precision. Otherwise, it will be fp32 precision. + * - "0": With fp32 precision. + * - "1": Default. With fp16 precision. + * "enable_htp_weight_sharing": Enable QNN weight sharing feature while compiling multiple graphs into one QNN context. + * - "0": Default. Disabled. + * - "1": Enabled. + * "offload_graph_io_quantization": Offload graph input quantization and graph output dequantization to another + * execution provider (typically CPU EP). + * - "0": Default. Disabled. QNN EP will handle quantization and dequantization of graph I/O. + * - "1": Enabled. + * + * SNPE supported keys: + * "runtime": SNPE runtime engine, options: "CPU", "CPU_FLOAT32", "GPU", "GPU_FLOAT32_16_HYBRID", "GPU_FLOAT16", + * "DSP", "DSP_FIXED8_TF", "AIP_FIXED_TF", "AIP_FIXED8_TF". + * Mapping to SNPE Runtime_t definition: CPU, CPU_FLOAT32 => zdl::DlSystem::Runtime_t::CPU; + * GPU, GPU_FLOAT32_16_HYBRID => zdl::DlSystem::Runtime_t::GPU; + * GPU_FLOAT16 => zdl::DlSystem::Runtime_t::GPU_FLOAT16; + * DSP, DSP_FIXED8_TF => zdl::DlSystem::Runtime_t::DSP. + * AIP_FIXED_TF, AIP_FIXED8_TF => zdl::DlSystem::Runtime_t::AIP_FIXED_TF. + * "priority": execution priority, options: "low", "normal". + * "buffer_type": ITensor or user buffers, options: "ITENSOR", user buffer with different types - "TF8", "TF16", "UINT8", "FLOAT". + * "ITENSOR" -- default, ITensor which is float only. + * "TF8" -- quantized model required, "FLOAT" -- for both quantized or non-quantized model + * "enable_init_cache": enable SNPE init caching feature, set to 1 to enabled it. Disabled by default. + * If SNPE is not available (due to a non Snpe enabled build or its dependencies not being installed), this function will fail. + * + * XNNPACK supported keys: + * "intra_op_num_threads": number of thread-pool size to use for XNNPACK execution provider. + * default value is 0, which means to use the session thread-pool size. + * + * \since Version 1.12. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider, _In_ OrtSessionOptions* options, + _In_ const char* provider_name, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /* \brief: Get a copy of kernel info + * + * \param[in] info Kernel info + * \param[out] info_copy Copy of kernel info + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CopyKernelInfo, + _In_ const OrtKernelInfo* info, + _Outptr_ OrtKernelInfo** info_copy); + + /* \brief: Release kernel info + * + * \param[in] KernelInfo A copy of kernel info returned by CopyKernelInfo + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(KernelInfo); + + /// \name Ort Training + /// @{ + /** \brief Gets the Training C Api struct + * + * Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable + * training with onnxruntime. + * \note A NULL pointer will be returned and no error message will be printed if the training api + * is not supported with this build. A NULL pointer will be returned and an error message will be + * printed if the provided version is unsupported, for example when using a runtime older than the + * version created with this header file. + * + * \param[in] version Must be ::ORT_API_VERSION + * \return The ::OrtTrainingApi struct for the version requested. + * + * \since Version 1.13 + */ + const OrtTrainingApi*(ORT_API_CALL* GetTrainingApi)(uint32_t version)NO_EXCEPTION; + + /// @} + + /** \brief Append CANN provider to session options + * + * If CANN is not available (due to a non CANN enabled build, or if CANN is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] cann_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CANN, + _In_ OrtSessionOptions* options, _In_ const OrtCANNProviderOptions* cann_options); + + /** \brief Create an OrtCANNProviderOptions + * + * \param[out] out created ::OrtCANNProviderOptions. Must be released with OrtApi::ReleaseCANNProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(CreateCANNProviderOptions, _Outptr_ OrtCANNProviderOptions** out); + + /** \brief Set options in a CANN Execution Provider. + * + * \param[in] cann_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(UpdateCANNProviderOptions, _Inout_ OrtCANNProviderOptions* cann_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Get serialized CANN provider options string. + * + * \param[in] cann_options OrtCANNProviderOptions instance + * \param[in] allocator a ptr to an instance of OrtAllocator obtained with CreateAllocator() + * or GetAllocatorWithDefaultOptions(), the specified allocator will be used to allocate + * continuous buffers for output strings and lengths. + * \param[out] ptr is a UTF-8 null terminated string allocated using 'allocator'. + * The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(GetCANNProviderOptionsAsString, _In_ const OrtCANNProviderOptions* cann_options, + _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an OrtCANNProviderOptions + * + * \param[in] input The pointer of OrtCANNProviderOptions which will been deleted + * + * \since Version 1.13. + */ + void(ORT_API_CALL* ReleaseCANNProviderOptions)(_Frees_ptr_opt_ OrtCANNProviderOptions* input); + + /* \brief Get OrtDevice type from MemoryInfo + * + * \since Version 1.14 + */ + void(ORT_API_CALL* MemoryInfoGetDeviceType)(_In_ const OrtMemoryInfo* ptr, _Out_ OrtMemoryInfoDeviceType* out); + + /* \brief Update the OrtEnv instance with custom log severity level + * + * \param[in] ort_env The OrtEnv instance being used + * \param[in] log_severity_level The log severity level. + * + * \since Version 1.14. + */ + ORT_API2_STATUS(UpdateEnvWithCustomLogLevel, _In_ OrtEnv* ort_env, OrtLoggingLevel log_severity_level); + + /* \brief Set affinities for intra op threads + * + * Affinity string follows format: + * logical_processor_id,logical_processor_id;logical_processor_id,logical_processor_id + * Semicolon isolates configurations among threads, while comma split processors where ith thread expected to attach to. + * e.g. 1,2,3;4,5 + * specifies affinities for two threads, with the 1st thread attach to the 1st, 2nd, and 3rd processor, and 2nd thread to the 4th and 5th. + * To ease the configuration, an "interval" is also allowed: + * e.g. 1-8;8-16;17-24 + * orders that the 1st thread runs on first eight processors, 2nd thread runs on next eight processors, and so forth. + * Note: + * 1. Once set, the number of thread affinities must equal to intra_op_num_threads - 1, + * ort does not set affinity on the main thread which is started and managed by the calling app; + * 2. For windows, ort will infer the group id from a logical processor id, for example, assuming there are two groups with each has 64 logical processors, + * an id of 64 will be inferred as the last processor of the 1st group, while 65 will be interpreted as the 1st processor of the second group. + * Hence 64-65 is an invalid configuration, because a windows thread cannot be attached to processors across group boundary. + * + * \since Version 1.14 + */ + ORT_API2_STATUS(SetGlobalIntraOpThreadAffinity, _Inout_ OrtThreadingOptions* tp_options, const char* affinity_string); + + /** \brief Register custom ops from a shared library. + * + * Loads a shared library (.dll on windows, .so on linux, etc) named 'library_name' and looks for this entry point: + * OrtStatus* RegisterCustomOps(OrtSessionOptions * options, const OrtApiBase* api); + * It then passes in the provided session options to this function along with the api base. + * + * The handle to the loaded library is automatically released by ORT when the last OrtSession that references the + * library handle is released. If no OrtSession is created, then the library handle is released when the provided + * OrtSessionOptions is released. + * + * \param[in] options The session options. + * \param[in] library_name The name of the shared library to load and register. Refer to OS-specific dynamic library + * loading utilities (e.g., LoadLibraryEx on Windows or dlopen on Linux/MacOS) for information + * on the format of library names and search paths. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(RegisterCustomOpsLibrary_V2, _Inout_ OrtSessionOptions* options, _In_ const ORTCHAR_T* library_name); + + /** \brief Register custom ops by calling a RegisterCustomOpsFn function. + * + * Searches for registration_func_name and if found calls it. + * + * The library containing the function must either be linked against or previously loaded by the executable. + * + * If you want ONNX Runtime to load the library and manage its lifetime, use RegisterCustomOpsLibrary_V2. + * + * RegisterCustomOpsUsingFunction can be used in scenarios where it may not be possible for ONNX Runtime to load + * the library from a path. e.g. mobile platforms where the library must be linked into the app. + * + * The registration function must have the signature of RegisterCustomOpsFn: + * OrtStatus* (*fn)(OrtSessionOptions* options, const OrtApiBase* api); + * + * See https://onnxruntime.ai/docs/reference/operators/add-custom-op.html for details on how the registration + * function should be implemented. + * + * \param[in] options OrtSessionOptions that is passed through as the first argument in the call to the + * registration function. + * \param[in] registration_func_name Name of registration function to use. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(RegisterCustomOpsUsingFunction, _Inout_ OrtSessionOptions* options, + _In_ const char* registration_func_name); + + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Get the number of inputs from ::OrtKernelInfo. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the number of inputs + * during kernel/session creation. + * + * \param[in] info Instance of ::OrtKernelInfo. + * \param[out] out Pointer to variable assigned with the result on success. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputCount, _In_ const OrtKernelInfo* info, _Out_ size_t* out); + + /** \brief Get the number of outputs from ::OrtKernelInfo. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the number of outputs + * during kernel/session creation. + * + * \param[in] info Instance of ::OrtKernelInfo. + * \param[out] out Pointer to variable assigned with the result on success. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputCount, _In_ const OrtKernelInfo* info, _Out_ size_t* out); + + /** \brief Get the name of a ::OrtKernelInfo's input. + * + * Used in the CreateKernel callback of an OrtCustomOp to query an input's name + * during kernel/session creation. + * + * If `out` is nullptr, the value of `size` is set to the size of the name + * string (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the name string's size, + * the value of `size` is set to the true size of the string (including null-terminator), + * the provided memory is filled with the string's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string + * and a failure status is returned. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index The index of the input name to get. Returns a failure status if out-of-bounds. + * \param[out] out Memory location into which to write the UTF-8 null-terminated string representing the input's name. + * \param[in,out] size Pointer to the size of the `out` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputName, _In_ const OrtKernelInfo* info, size_t index, _Out_ char* out, + _Inout_ size_t* size); + + /** \brief Get the name of a ::OrtKernelInfo's output. + * + * Used in the CreateKernel callback of an OrtCustomOp to query an output's name + * during kernel/session creation. + * + * If `out` is nullptr, the value of `size` is set to the size of the name + * string (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the name string's size, + * the value of `size` is set to the true size of the string (including null-terminator), + * the provided memory is filled with the string's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string + * and a failure status is returned. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index The index of the output name to get. Returns a failure status if out-of-bounds. + * \param[out] out Memory location into which to write the UTF-8 null-terminated string representing the output's + * name. + * \param[in,out] size Pointer to the size of the `out` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputName, _In_ const OrtKernelInfo* info, size_t index, _Out_ char* out, + _Inout_ size_t* size); + + /** \brief Get the type information for a ::OrtKernelInfo's input. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the shape and type information + * of an input during kernel/session creation. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index Which input to get the type information for + * \param[out] type_info Pointer set to the resulting ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputTypeInfo, _In_ const OrtKernelInfo* info, size_t index, + _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get the type information for a ::OrtKernelInfo's output. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the shape and type information + * of an output during kernel/session creation. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index Which input to get the type information for + * \param[out] type_info Pointer set to the resulting ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputTypeInfo, _In_ const OrtKernelInfo* info, size_t index, + _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get a ::OrtValue tensor stored as an attribute in the graph node. + * + * Used in the CreateKernel callback of an OrtCustomOp to get a tensor attribute. + * + * \param[in] info ::OrtKernelInfo instance. + * \param[in] name UTF-8 null-terminated string representing the attribute's name. + * \param[in] allocator Allocator used to allocate the internal tensor state. + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue, + * which will also free internal tensor state allocated with the provided allocator. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_tensor, _In_ const OrtKernelInfo* info, _In_z_ const char* name, + _Inout_ OrtAllocator* allocator, _Outptr_ OrtValue** out); + + /// @} + /// \name OrtSessionOptions + /// Custom operator APIs + /// @{ + + /** \brief Checks if the given session configuration entry exists. + * + * The config_key formats are defined in onnxruntime_session_options_config_keys.h + * + * Can be used in a custom operator library to check for session configuration entries + * that target one or more custom operators in the library. Example: The config entry + * custom_op.myop.some_key targets a custom op named "myop". + * + * \param[in] options The ::OrtSessionOptions instance. + * \param[in] config_key A null-terminated UTF-8 string representation of the configuration key. + * \param[out] out Pointer set to 1 if the entry exists and 0 otherwise. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(HasSessionConfigEntry, _In_ const OrtSessionOptions* options, + _In_z_ const char* config_key, _Out_ int* out); + + /** \brief Get a session configuration value. + * + * Returns a failure status if the configuration key does not exist. + * The config_key and the format of config_value are defined in onnxruntime_session_options_config_keys.h + * + * If `config_value` is nullptr, the value of `size` is set to the true size of the string + * value (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual string value's size, + * the value of `size` is set to the true size of the string value, the provided memory + * is filled with the value's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string value's size and `config_value` + * is not nullptr, the value of `size` is set to the true size of the string value + * and a failure status is returned. + * + * Can be used in a custom operator library to get session configuration entries + * that target one or more custom operators in the library. Example: The config entry + * custom_op.myop.some_key targets a custom op named "myop". + * + * \param[in] options The session options. + * \param[in] config_key A null-terminated UTF-8 string representation of the config key. + * \param[in] config_value Pointer to memory where the null-terminated UTF-8 string value will be stored. + * \param[in,out] size Pointer to the size of the `config_value` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(GetSessionConfigEntry, _In_ const OrtSessionOptions* options, + _In_z_ const char* config_key, _Out_ char* config_value, _Inout_ size_t* size); + + /// @} + + /** \brief Append dnnl provider to session options + * + * If oneDNN is not available, this function will return failure. + * + * \param[in] options + * \param[in] dnnl_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_Dnnl, + _In_ OrtSessionOptions* options, _In_ const OrtDnnlProviderOptions* dnnl_options); + + /** \brief Create an OrtDnnlProviderOptions + * + * \param[out] out Newly created ::OrtDnnlProviderOptions. Must be released with OrtApi::ReleaseDnnlProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(CreateDnnlProviderOptions, _Outptr_ OrtDnnlProviderOptions** out); + + /** \brief Set options in a oneDNN Execution Provider. + * + * Key should be in null terminated string format of the member of ::OrtDnnlProviderOptions + * and value should be its related range. + * + * For example, key="use_arena" and value="1" + * + * \param[in] dnnl_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(UpdateDnnlProviderOptions, _Inout_ OrtDnnlProviderOptions* dnnl_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** + * Get serialized oneDNN provider options string. + * + * For example, "use_arena=1;......" + * + * \param dnnl_options - OrtDnnlProviderOptions instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions() + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(GetDnnlProviderOptionsAsString, _In_ const OrtDnnlProviderOptions* dnnl_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtDnnlProviderOptions + * + * \since Version 1.15. + */ + void(ORT_API_CALL* ReleaseDnnlProviderOptions)(_Frees_ptr_opt_ OrtDnnlProviderOptions* input); + + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Get the graph node name from ::OrtKernelInfo. + * + * If `out` is nullptr, the value of `size` is set to the size of the name + * string (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the name string's size, + * the value of `size` is set to the true size of the string (including null-terminator), + * the provided memory is filled with the string's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string + * and a failure status is returned. + * + * Can be used in a custom operator's CreateKernel callback to get the name of the operator's node name in the graph. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[out] out Memory location into which to write the UTF-8 null-terminated string representing the name. + * \param[in,out] size Pointer to the size of the `out` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(KernelInfo_GetNodeName, _In_ const OrtKernelInfo* info, _Out_ char* out, _Inout_ size_t* size); + + /** \brief Get the session logger from ::OrtKernelInfo. + * + * Used in the CreateKernel callback of an OrtCustomOp to get a logger that can be used to log + * messages. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[out] logger Pointer set to the session's ::OrtLogger. Owned by ONNX Runtime, so do not free. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(KernelInfo_GetLogger, _In_ const OrtKernelInfo* info, _Outptr_ const OrtLogger** logger); + + /// @} + /// \name OrtKernelContext + /// Custom operator APIs. + /// @{ + + /** \brief Get the runtime logger from ::OrtKernelContext. + * + * Used in the KernelCompute callback of an OrtCustomOp to get a logger that can be used to log + * messages during inference. + * + * \param[in] context An instance of ::OrtKernelContext. + * \param[out] logger Pointer set to the kernel context's ::OrtLogger. Owned by ONNX Runtime, so do not free. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(KernelContext_GetLogger, _In_ const OrtKernelContext* context, _Outptr_ const OrtLogger** logger); + + /// @} + /// \name OrtLogger + /// Custom operator APIs. + /// @{ + + /** \brief Logs a message at the given severity level using the provided ::OrtLogger. + * + * Only messages with a severity level equal or greater than the ::OrtLogger's logging severity level + * are logged. Use OrtApi::Logger_GetLoggingSeverityLevel to get the ::OrtLogger's logging severity + * level. + * + * Can be used in custom operators to log messages with the logger retrieved via OrtApi::KernelInfo_GetLogger. + * + * \param[in] logger The ::OrtLogger instance. + * \param[in] log_severity_level The message's severity level. + * \param[in] message The message to log. + * \param[in] file_path The filepath of the file in which the message is logged. Usually the value of ORT_FILE. + * \param[in] line_number The file line number in which the message is logged. Usually the value of __LINE__. + * \param[in] func_name The name of the function in which the message is logged. Usually the value of __FUNCTION__. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(Logger_LogMessage, _In_ const OrtLogger* logger, OrtLoggingLevel log_severity_level, + _In_z_ const char* message, _In_z_ const ORTCHAR_T* file_path, int line_number, + _In_z_ const char* func_name); + + /** \brief Get the logging severity level of the ::OrtLogger. + * + * Can be used in a custom operator to get the logging serverity level of the ::OrtLogger associated with + * the ::OrtKernelInfo. + * + * \param[in] logger The ::OrtLogger instance. + * \param[out] out Pointer to variable assigned with the logging severity level on success. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(Logger_GetLoggingSeverityLevel, _In_ const OrtLogger* logger, _Out_ OrtLoggingLevel* out); + + /// @} + + /** \brief Get a ::OrtValue tensor stored as a constant initializer in the graph node. + * + * Used in the CreateKernel callback of an OrtCustomOp to get a tensor value. + * + * \param[in] info ::OrtKernelInfo instance. + * \param[in] index The node index. + * \param[out] is_constant Is it a constant node input or not. + * \param[out] out The OrtValue tensor value. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(KernelInfoGetConstantInput_tensor, _In_ const OrtKernelInfo* info, size_t index, _Out_ int* is_constant, _Outptr_ const OrtValue** out); + + /** \brief Get Optional Type information from an ::OrtTypeInfo + * + * This augments ::OrtTypeInfo to return an ::OrtOptionalTypeInfo when the type is optional. + * The OrtOptionalTypeInfo also has a nested ::OrtTypeInfo that describes the type of the optional value. + * ::OrtOptionalTypeInfo type can only appear within model metadata to describe inputs/outputs. + * The actual OrtValues that are supplied in place of optional type inputs should contain + * specific type that is described by ::OrtOptionalTypeInfo. + * + * So the picture: ::OrtTypeInfo -> ::OrtOptionalTypeInfo -> ::OrtTypeInfo (describes the type that can be supplied + * in place of the optional type when creating the actual ::OrtValue). + * + * \param[in] type_info + * \param[out] out A pointer to the ::OrtOptionalTypeInfo. Do not free this value, + * it is owned by OrtTypeInfo instance. When the type_info does not represent + * optional type, nullptr is returned in out. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(CastTypeInfoToOptionalTypeInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtOptionalTypeInfo** out); + + /** \brief Get OrtTypeInfo for the allowed contained type from an ::OrtOptionalTypeInfo. + * + * This augments ::OrtOptionalTypeInfo to return an ::OrtTypeInfo for the contained type. + * The OrtOptionalTypeInfo has a nested ::OrtTypeInfo that describes the type of the optional value. + * ::OrtOptionalTypeInfo type can only appear within model metadata to describe inputs/outputs. + * The actual OrtValues that are supplied in place of optional type inputs should contain + * specific type that is described by the returned ::OrtTypeInfo. + * + * \param[in] optional_type_info + * \param[out] out A pointer to the ::OrtTypeInfo for what the optional value could be. + * it is owned by OrtOptionalTypeInfo instance. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(GetOptionalContainedTypeInfo, _In_ const OrtOptionalTypeInfo* optional_type_info, + _Outptr_ OrtTypeInfo** out); + + /** \brief Set a single string in a string tensor + * Do not zero terminate the string data. + * + * \param[in] value A string tensor + * \param[in] index - flat index of the element + * \param[in] length_in_bytes length of the buffer in utf-8 bytes (without the null terminator) + * \param[inout] buffer - address of return value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetResizedStringTensorElementBuffer, _Inout_ OrtValue* value, _In_ size_t index, _In_ size_t length_in_bytes, _Inout_ char** buffer); + + /** \brief Get Allocator from KernelContext for a specific memoryInfo. Please use C API ReleaseAllocator to release out object + * + * \param[in] context OrtKernelContext instance + * \param[in] mem_info OrtMemoryInfo instance + * \param[out] out A pointer to OrtAllocator. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(KernelContext_GetAllocator, _In_ const OrtKernelContext* context, _In_ const OrtMemoryInfo* mem_info, _Outptr_ OrtAllocator** out); + + /** \brief Returns a null terminated string of the build info including git info and cxx flags + * + * \return UTF-8 encoded version string. Do not deallocate the returned buffer. + * + * \since Version 1.15. + */ + const char*(ORT_API_CALL* GetBuildInfoString)(void); + + /// \name OrtROCMProviderOptions + /// @{ + + /** \brief Create an OrtROCMProviderOptions + * + * \param[out] out Newly created ::OrtROCMProviderOptions. Must be released with OrtApi::ReleaseROCMProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.16. + */ + ORT_API2_STATUS(CreateROCMProviderOptions, _Outptr_ OrtROCMProviderOptions** out); + + /** \brief Set options in a ROCm Execution Provider. + * + * Please refer to https://onnxruntime.ai/docs/execution-providers/ROCm-ExecutionProvider.html + * to know the available keys and values. Key should be in null terminated string format of the member of + * ::OrtROCMProviderOptions and value should be its related range. + * + * For example, key="device_id" and value="0" + * + * \param[in] rocm_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.16. + */ + ORT_API2_STATUS(UpdateROCMProviderOptions, _Inout_ OrtROCMProviderOptions* rocm_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** + * Get serialized ROCm provider options string. + * + * For example, "device_id=0;arena_extend_strategy=0;......" + * + * \param rocm_options - OrtROCMProviderOptions instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions() + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.16. + */ + ORT_API2_STATUS(GetROCMProviderOptionsAsString, _In_ const OrtROCMProviderOptions* rocm_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtROCMProviderOptions + * + * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does + * + * \since Version 1.16. + */ + void(ORT_API_CALL* ReleaseROCMProviderOptions)(_Frees_ptr_opt_ OrtROCMProviderOptions* input); + + /** \brief Create an allocator with specific type and register it with the ::OrtEnv + * This API enhance CreateAndRegisterAllocator that it can create an allocator with specific type, not just CPU allocator + * Enables sharing the allocator between multiple sessions that use the same env instance. + * Lifetime of the created allocator will be valid for the duration of the environment. + * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered. + * \param[in] env OrtEnv instance + * \param[in] provider_type ExecutionProvider type + * \param[in] mem_info OrtMemoryInfo instance + * \param[in] arena_cfg Arena configuration + * \param[in] provider_options_keys key of the provider options map + * \param[in] provider_options_values value of the provider options map + * \param[in] num_keys Length of the provider options map + */ + ORT_API2_STATUS(CreateAndRegisterAllocatorV2, _Inout_ OrtEnv* env, _In_ const char* provider_type, _In_ const OrtMemoryInfo* mem_info, _In_ const OrtArenaCfg* arena_cfg, + _In_reads_(num_keys) const char* const* provider_options_keys, _In_reads_(num_keys) const char* const* provider_options_values, _In_ size_t num_keys); + + /** \brief Run the model asynchronously in a thread owned by intra op thread pool + * + * \param[in] session + * \param[in] run_options If nullptr, will use a default ::OrtRunOptions + * \param[in] input_names Array of null terminated UTF8 encoded strings of the input names + * \param[in] input Array of ::OrtValue%s of the input values + * \param[in] input_len Number of elements in the input_names and inputs arrays + * \param[in] output_names Array of null terminated UTF8 encoded strings of the output names + * \param[in] output_names_len Number of elements in the output_names and outputs array + * \param[out] output OrtValue* array of size output_names_len. + * On calling RunAsync, output[i] could either be a null or a pointer to a preallocated OrtValue. + * Later, the output array will be passed to run_async_callback with all null(s) filled with valid + * OrtValue pointer(s) allocated by onnxruntime. + * NOTE: it is customer's duty to finally release the output array and each of its member, + * regardless of whether the member (OrtValue*) is allocated by onnxruntime or preallocated by the customer. + * \param[in] run_async_callback Callback function on model run completion + * \param[in] user_data User data that pass back to run_async_callback + */ + ORT_API2_STATUS(RunAsync, _Inout_ OrtSession* session, _In_opt_ const OrtRunOptions* run_options, + _In_reads_(input_len) const char* const* input_names, + _In_reads_(input_len) const OrtValue* const* input, size_t input_len, + _In_reads_(output_names_len) const char* const* output_names, size_t output_names_len, + _Inout_updates_all_(output_names_len) OrtValue** output, + _In_ RunAsyncCallbackFn run_async_callback, _In_opt_ void* user_data); + + /** + * Update TensorRT EP provider option where its data type is pointer, for example 'user_compute_stream'. + * If the data type of the provider option can be represented by string please use UpdateTensorRTProviderOptions. + * + * Note: It's caller's responsibility to properly manage the lifetime of the instance pointed by this pointer. + * + * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance + * \param key - Name of the provider option + * \param value - A pointer to the instance that will be assigned to this provider option + * + * \since Version 1.16. + */ + ORT_API2_STATUS(UpdateTensorRTProviderOptionsWithValue, _Inout_ OrtTensorRTProviderOptionsV2* tensorrt_options, _In_ const char* key, _In_ void* value); + + /** + * Get TensorRT EP provider option where its data type is pointer. + * If the data type of the provider option can be represented by string please use GetTensorRTProviderOptionsAsString. + * + * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance + * \param key - Name of the provider option + * \param ptr - A pointer to the instance that is kept by the provider option + * + * \since Version 1.16. + */ + ORT_API2_STATUS(GetTensorRTProviderOptionsByName, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options, _In_ const char* key, _Outptr_ void** ptr); + + /** + * Update CUDA EP provider option where its data type is pointer, for example 'user_compute_stream'. + * If the data type of the provider option can be represented by string please use UpdateCUDAProviderOptions. + * + * Note: It's caller's responsibility to properly manage the lifetime of the instance pointed by this pointer. + * + * \param cuda_options - OrtCUDAProviderOptionsV2 instance + * \param key - Name of the provider option + * \param value - A pointer to the instance that will be assigned to this provider option + * + * \since Version 1.16. + */ + ORT_API2_STATUS(UpdateCUDAProviderOptionsWithValue, _Inout_ OrtCUDAProviderOptionsV2* cuda_options, _In_ const char* key, _In_ void* value); + + /** + * Get CUDA EP provider option where its data type is pointer. + * If the data type of the provider option can be represented by string please use GetCUDAProviderOptionsAsString. + * + * \param cuda_options - OrtCUDAProviderOptionsV2 instance + * \param key - Name of the provider option + * \param ptr - A pointer to the instance that is kept by the provider option + * + * \since Version 1.16. + */ + ORT_API2_STATUS(GetCUDAProviderOptionsByName, _In_ const OrtCUDAProviderOptionsV2* cuda_options, _In_ const char* key, _Outptr_ void** ptr); + + /** + * Get a EP resource. + * E.g. a cuda stream or a cublas handle + * + * \param context - Kernel context + * \param resource_version - Version of the resource + * \param resource_id - Type of resource + * \param resource - A pointer to returned resource + * + * \since Version 1.16. + */ + ORT_API2_STATUS(KernelContext_GetResource, _In_ const OrtKernelContext* context, _In_ int resource_version, + _In_ int resource_id, _Outptr_ void** resource); + + /** \brief Set user logging function + * + * By default the logger created by the CreateEnv* functions is used to create the session logger as well. + * This function allows a user to override this default session logger with a logger of their own choosing. This way + * the user doesn't have to create a separate environment with a custom logger. This addresses the problem when + * the user already created an env but now wants to use a different logger for a specific session (for debugging or + * other reasons). + * + * \param[in] options + * \param[in] user_logging_function A pointer to a logging function. + * \param[in] user_logging_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to + * `user_logging_function`. This parameter is optional. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.17. + */ + ORT_API2_STATUS(SetUserLoggingFunction, _Inout_ OrtSessionOptions* options, + _In_ OrtLoggingFunction user_logging_function, _In_opt_ void* user_logging_param); + + /** + * Get number of input from OrtShapeInferContext + * + * \param[in] context + * \param[out] out The number of inputs + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ShapeInferContext_GetInputCount, _In_ const OrtShapeInferContext* context, _Out_ size_t* out); + + /** + * Get type and shape info of an input + * + * \param[in] context + * \param[in] index The index of the input + * \param[out] info Type shape info of the input + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ShapeInferContext_GetInputTypeShape, _In_ const OrtShapeInferContext* context, _In_ size_t index, _Outptr_ OrtTensorTypeAndShapeInfo** info); + + /** + * Get attribute from OrtShapeInferContext. Note that OrtShapeInferContext is a per-node context, one could only read attribute from current node. + * + * \param[in] context + * \param[in] attr_name Name of the attribute + * \param[out] attr Handle of the attribute fetched + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ShapeInferContext_GetAttribute, _In_ const OrtShapeInferContext* context, _In_ const char* attr_name, _Outptr_ const OrtOpAttr** attr); + + /** + * Set type and shape info of an output + * + * \param[in] context + * \param[in] index The index of the output + * \param[out] info Type shape info of the output + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ShapeInferContext_SetOutputTypeShape, _In_ const OrtShapeInferContext* context, _In_ size_t index, _In_ const OrtTensorTypeAndShapeInfo* info); + + /** + * Set symbolic shape to type shape info + * + * \param[in] info Type shape info + * \param[in] dim_params Symbolic strings + * \param[in] dim_params_length Number of strings + * + * \since Version 1.17. + */ + ORT_API2_STATUS(SetSymbolicDimensions, _In_ OrtTensorTypeAndShapeInfo* info, _In_ const char* dim_params[], _In_ size_t dim_params_length); + + /** + * Read contents of an attribute to data + * + * \param[in] op_attr + * \param[in] type Attribute type + * \param[out] data Memory address to save raw content of the attribute + * \param[in] len Number of bytes allowed to store in data + * \param[out] out Number of bytes required to save the data when the call failed, or the real number of bytes saved to data on success + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ReadOpAttr, _In_ const OrtOpAttr* op_attr, _In_ OrtOpAttrType type, _Inout_ void* data, _In_ size_t len, _Out_ size_t* out); + + /** \brief Set whether to use deterministic compute. + * + * Default is false. If set to true, this will enable deterministic compute for GPU kernels where possible. + * Note that this most likely will have a performance cost. + * + * \param[in] options + * \param[in] value + * + * \since Version 1.17. + */ + ORT_API2_STATUS(SetDeterministicCompute, _Inout_ OrtSessionOptions* options, bool value); + + /** + * Run fn in parallel + * + * \param[in] context + * \param[in] fn Function accepting usr_data and an integer as iterator + * \param[in] total The number of times fn is to be invoked + * \param[in] num_batch Number of batches by which the "total" is to be divided in maximum. When zero, there is no limit + * \param[in] usr_data User data to be passed back to fn + * + * \since Version 1.17. + */ + ORT_API2_STATUS(KernelContext_ParallelFor, _In_ const OrtKernelContext* context, _In_ void (*fn)(void*, size_t), _In_ size_t total, _In_ size_t num_batch, _In_ void* usr_data); + + /** \brief Append OpenVINO execution provider to the session options + * + * If OpenVINO is not available (due to a non OpenVINO enabled build, or if OpenVINO is not installed on the system), this function will fail. + * + * \param[in] options + * \param[in] provider_options_keys + * \param[in] provider_options_values + * \param[in] num_keys + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_OpenVINO_V2, + _In_ OrtSessionOptions* options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Append VitisAI provider to session options + * + * If VitisAI is not available (due to a non VitisAI enabled build, or if VitisAI is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] provider_options_keys + * \param[in] provider_options_values + * \param[in] num_keys + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_VitisAI, + _In_ OrtSessionOptions* options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Get scratch buffer from the corresponding allocator under the sepcific OrtMemoryInfo object. + * NOTE: callers are responsible to release this scratch buffer from the corresponding allocator + * \param[in] context OrtKernelContext instance + * \param[in] mem_info OrtMemoryInfo instance + * \param[in] count_or_bytes How many bytes is this scratch buffer + * \param[out] out A pointer to the scrach buffer + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetScratchBuffer, _In_ const OrtKernelContext* context, _In_ const OrtMemoryInfo* mem_info, _In_ size_t count_or_bytes, _Outptr_ void** out); + + /** \brief Get allocator from KernelInfo for a specific memory type. Please use C API ReleaseAllocator to release out object + * + * \param[in] info OrtKernelInfo instance + * \param[in] mem_type OrtMemType object + * \param[out] out A pointer to OrtAllocator + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAllocator, _In_ const OrtKernelInfo* info, _In_ OrtMemType mem_type, _Outptr_ OrtAllocator** out); + + /** \brief Replace initialized Tensors with external data with the provided files in memory + * + * The function will find the initialized TensorProtos with external data in the graph with the provided + * external file names and the file content in memory. The API gets the external file name, offset, data length + * from TensorProto, and locate the tensor data from the file in memory buffer. + * It creates a Tensor to replace the existing Tensor in graph. The replacement + * will occur before any of the optimizations take place. The data will be copied into the graph + * since TensorProto can't refer to the user provided buffers. + * + * \param[in] options + * \param[in] external_initializer_file_names Array of null terminated UTF-8 encoded strings of the file names + * which holds the external initializers. + * \param[in] external_initializer_file_buffer_array Array of pointers to the buffer of the file content. + * The buffer can be freed after session creation. + * \param[in] external_initializer_file_lengths Array of size_t to indicate the length of file content + * \param[in] num_external_initializer_files Number of external files + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddExternalInitializersFromFilesInMemory, _In_ OrtSessionOptions* options, + _In_reads_(num_external_initializer_files) const ORTCHAR_T* const* external_initializer_file_names, + _In_reads_(num_external_initializer_files) char* const* external_initializer_file_buffer_array, + _In_reads_(num_external_initializer_files) const size_t* external_initializer_file_lengths, + size_t num_external_initializer_files); + + /** \brief Create an OrtLoraAdapter + * + * The function attempts to locate file specified by adapter_file_path, read it and create an OrtLoraAdapter + * instance. The adapter_file_path should be a valid path to a file that contains a valid Lora Adapter + * format. The function attempts to validate the format at load time. The file will always be memory mapped, unless + * the platform does not support memory mapping, in which case the file will be read into memory. + * + * \param[in] adapter_file_path adapter file path. + * \param[in] allocator optional pointer to a device allocator. If specified + * data is copied to the device at some point before Run() is invoked. If nullptr, data stays on CPU. + * The data would still be copied to device if required by the model at inference time. + * \param[out] out A pointer to a newly created OrtLoraAdapter instance. Must be released with + * OrtApi::ReleaseLoraAdapter. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateLoraAdapter, const ORTCHAR_T* adapter_file_path, _In_ OrtAllocator* allocator, + _Outptr_ OrtLoraAdapter** out); + + /** \brief Create an OrtLoraAdapter + * + * The function copies the bytes from the array and creates an OrtLoraAdapter instance. + * + * + * \param[in] bytes pointer to a valid Lora Adapter format buffer. + * \param[in] num_bytes length of bytes buffer. + * \param[in] allocator optional pointer to a device allocator. If specified + * data is copied to the device at some point before Run() is invoked. If nullptr, data stays on CPU. + * The data would still be copied to device if required by the model at inference time. + * \param[out] out A pointer to a newly created OrtLoraAdapter instance. Must be released with + * OrtApi::ReleaseLoraAdapter. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateLoraAdapterFromArray, _In_ const void* bytes, size_t num_bytes, _In_ OrtAllocator* allocator, + _Outptr_ OrtLoraAdapter** out); + + /** \brief Release an ::OrtLoraAdapter obtained from OrtApi::CreateLoraAdapter + */ + ORT_CLASS_RELEASE(LoraAdapter); + + /** \brief Add the Lora Adapter to the list of active adapters. + * + * The function adds the Lora Adapter to the list of active adapters. The Lora Adapter must be created with + * OrtApi::CreateLoraAdapter or FromArray. The Lora Adapter will be used by the session to run the model. + * The instance of the OrtRunOptions can then be used to customize the Run() calls. + * More than one OrtLoraAdapter can be active at the same time. Lora Parameters that belong to different + * Lora adapters that will be active at the same time must not overlap. + * This setting does not affect RunWithBinding. + * + * \param[in] options OrtRunOptions instance + * \param[in] adapter OrtLoraAdapter instance + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsAddActiveLoraAdapter, _Inout_ OrtRunOptions* options, _In_ const OrtLoraAdapter* adapter); + + /// @} + /// \name OrtEpDynamicOptions + /// @{ + + /** \brief Set DynamicOptions for EPs (Execution Providers) + * + * Valid options can be found in `include\onnxruntime\core\session\onnxruntime_session_options_config_keys.h` + * Look for `kOrtEpDynamicOptions` + * + * \param[in] sess OrtSession + * \param[in] keys Array of null terminated UTF8 encoded strings of EP dynamic option keys + * \param[in] values Array of null terminated UTF8 encoded string of EP dynamic option values + * \param[in] kv_len Number of elements in the keys and values arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetEpDynamicOptions, _Inout_ OrtSession* sess, _In_reads_(kv_len) const char* const* keys, + _In_reads_(kv_len) const char* const* values, _In_ size_t kv_len); +}; + +/* + * Steps to use a custom op: + * 1 Create an OrtCustomOpDomain with the domain name used by the custom ops + * 2 Create an OrtCustomOp structure for each op and add them to the domain + * 3 Call OrtAddCustomOpDomain to add the custom domain of ops to the session options + */ + +// Specifies some characteristics of inputs/outputs of custom ops: +// Specify if the inputs/outputs are one of: +// 1) Non-optional (input/output must be present in the node) +// 2) Optional (input/output may be absent in the node) +// 3) Variadic: A variadic input or output specifies N (i.e., the minimum arity) or more operands. +// Only the last input or output of a custom op may be marked as variadic. +// The homogeneity of the variadic input or output determines whether all operands must be of the same +// tensor element type. +typedef enum OrtCustomOpInputOutputCharacteristic { + INPUT_OUTPUT_REQUIRED = 0, + INPUT_OUTPUT_OPTIONAL, + INPUT_OUTPUT_VARIADIC, +} OrtCustomOpInputOutputCharacteristic; + +/* + * The OrtCustomOp structure defines a custom op's schema and its kernel callbacks. The callbacks are filled in by + * the implementor of the custom op. + */ +struct OrtCustomOp { + uint32_t version; // Must be initialized to ORT_API_VERSION + + // This callback creates the kernel, which is a user defined + // parameter that is passed to the Kernel* callbacks below. It is + // recommended to use CreateKernelV2 which allows for a safe error + // propagation by returning an OrtStatusPtr. + void*(ORT_API_CALL* CreateKernel)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api, + _In_ const OrtKernelInfo* info); + + // Returns the name of the op + const char*(ORT_API_CALL* GetName)(_In_ const struct OrtCustomOp* op); + + // Returns the type of the execution provider, return nullptr to use CPU execution provider + const char*(ORT_API_CALL* GetExecutionProviderType)(_In_ const struct OrtCustomOp* op); + + // Returns the count and types of the input & output tensors + ONNXTensorElementDataType(ORT_API_CALL* GetInputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + size_t(ORT_API_CALL* GetInputTypeCount)(_In_ const struct OrtCustomOp* op); + ONNXTensorElementDataType(ORT_API_CALL* GetOutputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + size_t(ORT_API_CALL* GetOutputTypeCount)(_In_ const struct OrtCustomOp* op); + + // Perform a computation step. It is recommended to use + // KernelComputeV2 which allows for a safe error propagation by + // returning an OrtStatusPtr. + void(ORT_API_CALL* KernelCompute)(_In_ void* op_kernel, _In_ OrtKernelContext* context); + void(ORT_API_CALL* KernelDestroy)(_In_ void* op_kernel); + + // Returns the characteristics of the input & output tensors + OrtCustomOpInputOutputCharacteristic(ORT_API_CALL* GetInputCharacteristic)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + OrtCustomOpInputOutputCharacteristic(ORT_API_CALL* GetOutputCharacteristic)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + + // Returns the memory type of the input tensors. This API allows the custom op + // to place the inputs on specific devices. By default, it returns + // OrtMemTypeDefault, which means the input is placed on the default device for + // the execution provider. If the inputs need to be with different memory tyeps, + // this function can be overridden to return the specific memory types. + OrtMemType(ORT_API_CALL* GetInputMemoryType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + + // Returns the minimum number of input arguments expected for the variadic input. + // Applicable only for custom ops that have a variadic input. + int(ORT_API_CALL* GetVariadicInputMinArity)(_In_ const struct OrtCustomOp* op); + + // Returns true (non-zero) if all arguments of a variadic input have to be of the same type (homogeneous), + // and false (zero) otherwise. + // Applicable only for custom ops that have a variadic input. + int(ORT_API_CALL* GetVariadicInputHomogeneity)(_In_ const struct OrtCustomOp* op); + + // Returns the minimum number of output values expected for the variadic output. + // Applicable only for custom ops that have a variadic output. + int(ORT_API_CALL* GetVariadicOutputMinArity)(_In_ const struct OrtCustomOp* op); + + // Returns true (non-zero) if all outputs values of a variadic output have to be of the same type (homogeneous), + // and false (zero) otherwise. + // Applicable only for custom ops that have a variadic output. + int(ORT_API_CALL* GetVariadicOutputHomogeneity)(_In_ const struct OrtCustomOp* op); + + // Create the kernel state which is passed to each compute call. + OrtStatusPtr(ORT_API_CALL* CreateKernelV2)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api, + _In_ const OrtKernelInfo* info, + _Out_ void** kernel); + + // Perform the computation step. + OrtStatusPtr(ORT_API_CALL* KernelComputeV2)(_In_ void* op_kernel, _In_ OrtKernelContext* context); + + OrtStatusPtr(ORT_API_CALL* InferOutputShapeFn)(_In_ const struct OrtCustomOp* op, _In_ OrtShapeInferContext*); + + // Get start range + int(ORT_API_CALL* GetStartVersion)(_In_ const struct OrtCustomOp* op); + int(ORT_API_CALL* GetEndVersion)(_In_ const struct OrtCustomOp* op); + + // Get the inplace_map that defines which output can reuse which input + // Callers will provide 2 raw int* and pass in their address, this function will fill these 2 arrays + // when return, output (*output_index)[i] may reuse the input (*input_index[i]). + // The return value is the size of these 2 arrays. + // Callers are responsible to delete these 2 arrays after use by calling OrtCustomOp::ReleaseMayInplace(). + size_t(ORT_API_CALL* GetMayInplace)(_Out_ int** input_index, _Out_ int** output_index); + + // Release the pointer input_index and output_index allocated from GetMayInplace() function. + // If GetMayInplace() is defined, this function MUST be defined as well. + void(ORT_API_CALL* ReleaseMayInplace)(_Frees_ptr_opt_ int* input_index, _Frees_ptr_opt_ int* output_index); + + // Same as GetMayInplace() and ReleaseMayInplace() + size_t(ORT_API_CALL* GetAliasMap)(_Out_ int** input_index, _Out_ int** output_index); + void(ORT_API_CALL* ReleaseAliasMap)(_Frees_ptr_opt_ int* input_index, _Frees_ptr_opt_ int* output_index); +}; + +/* + * This is the old way to add the CUDA provider to the session, please use SessionOptionsAppendExecutionProvider_CUDA above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with CUDA support and the CUDA provider shared library exists + * + * \param device_id CUDA device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CUDA, _In_ OrtSessionOptions* options, int device_id); + +/* + * This is the old way to add the ROCm provider to the session, please use + * SessionOptionsAppendExecutionProvider_ROCM above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with + * HIP support and the ROCm provider shared library exists + * + * \param device_id HIP device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_ROCM, _In_ OrtSessionOptions* options, int device_id); + +/* + * This is the old way to add the MIGraphX provider to the session, please use + * SessionOptionsAppendExecutionProvider_MIGraphX above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with + * HIP support and the MIGraphX provider shared library exists + * + * \param device_id HIP device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_MIGraphX, _In_ OrtSessionOptions* options, int device_id); + +/* + * This is the old way to add the oneDNN provider to the session, please use + * SessionOptionsAppendExecutionProvider_oneDNN above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with + * oneDNN support and the oneDNN provider shared library exists + * + * \param use_arena zero: false. non-zero: true. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Dnnl, _In_ OrtSessionOptions* options, int use_arena); + +/* + * This is the old way to add the TensorRT provider to the session, please use SessionOptionsAppendExecutionProvider_TensorRT_V2 above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with TensorRT support and the TensorRT provider shared library exists + * + * \param device_id CUDA device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Tensorrt, _In_ OrtSessionOptions* options, int device_id); + +#ifdef __cplusplus +} +#endif +/// @} diff --git a/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_cxx_api.h b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_cxx_api.h new file mode 100644 index 00000000..406ca3ea --- /dev/null +++ b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_cxx_api.h @@ -0,0 +1,2435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// Summary: The Ort C++ API is a header only wrapper around the Ort C API. +// +// The C++ API simplifies usage by returning values directly instead of error codes, throwing exceptions on errors +// and automatically releasing resources in the destructors. The primary purpose of C++ API is exception safety so +// all the resources follow RAII and do not leak memory. +// +// Each of the C++ wrapper classes holds only a pointer to the C internal object. Treat them like smart pointers. +// To create an empty object, pass 'nullptr' to the constructor (for example, Env e{nullptr};). However, you can't use them +// until you assign an instance that actually holds an underlying object. +// +// For Ort objects only move assignment between objects is allowed, there are no copy constructors. +// Some objects have explicit 'Clone' methods for this purpose. +// +// ConstXXXX types are copyable since they do not own the underlying C object, so you can pass them to functions as arguments +// by value or by reference. ConstXXXX types are restricted to const only interfaces. +// +// UnownedXXXX are similar to ConstXXXX but also allow non-const interfaces. +// +// The lifetime of the corresponding owning object must eclipse the lifetimes of the ConstXXXX/UnownedXXXX types. They exists so you do not +// have to fallback to C types and the API with the usual pitfalls. In general, do not use C API from your C++ code. + +#pragma once +#include "onnxruntime_c_api.h" +#include "onnxruntime_float16.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ORT_NO_EXCEPTIONS +#include +#endif + +/** \brief All C++ Onnxruntime APIs are defined inside this namespace + * + */ +namespace Ort { + +/** \brief All C++ methods that can fail will throw an exception of this type + * + * If ORT_NO_EXCEPTIONS is defined, then any error will result in a call to abort() + */ +struct Exception : std::exception { + Exception(std::string&& string, OrtErrorCode code) : message_{std::move(string)}, code_{code} {} + + OrtErrorCode GetOrtErrorCode() const { return code_; } + const char* what() const noexcept override { return message_.c_str(); } + + private: + std::string message_; + OrtErrorCode code_; +}; + +#ifdef ORT_NO_EXCEPTIONS +// The #ifndef is for the very special case where the user of this library wants to define their own way of handling errors. +// NOTE: This header expects control flow to not continue after calling ORT_CXX_API_THROW +#ifndef ORT_CXX_API_THROW +#define ORT_CXX_API_THROW(string, code) \ + do { \ + std::cerr << Ort::Exception(string, code) \ + .what() \ + << std::endl; \ + abort(); \ + } while (false) +#endif +#else +#define ORT_CXX_API_THROW(string, code) \ + throw Ort::Exception(string, code) +#endif + +// This is used internally by the C++ API. This class holds the global variable that points to the OrtApi, +// it's in a template so that we can define a global variable in a header and make +// it transparent to the users of the API. +template +struct Global { + static const OrtApi* api_; +}; + +// If macro ORT_API_MANUAL_INIT is defined, no static initialization will be performed. Instead, user must call InitApi() before using it. +template +#ifdef ORT_API_MANUAL_INIT +const OrtApi* Global::api_{}; +inline void InitApi() noexcept { Global::api_ = OrtGetApiBase()->GetApi(ORT_API_VERSION); } + +// Used by custom operator libraries that are not linked to onnxruntime. Sets the global API object, which is +// required by C++ APIs. +// +// Example mycustomop.cc: +// +// #define ORT_API_MANUAL_INIT +// #include +// #undef ORT_API_MANUAL_INIT +// +// OrtStatus* ORT_API_CALL RegisterCustomOps(OrtSessionOptions* options, const OrtApiBase* api_base) { +// Ort::InitApi(api_base->GetApi(ORT_API_VERSION)); +// // ... +// } +// +inline void InitApi(const OrtApi* api) noexcept { Global::api_ = api; } +#else +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(push) +// "Global initializer calls a non-constexpr function." Therefore you can't use ORT APIs in the other global initializers. +// Please define ORT_API_MANUAL_INIT if it conerns you. +#pragma warning(disable : 26426) +#endif +const OrtApi* Global::api_ = OrtGetApiBase()->GetApi(ORT_API_VERSION); +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(pop) +#endif +#endif + +/// This returns a reference to the OrtApi interface in use +inline const OrtApi& GetApi() noexcept { return *Global::api_; } + +/// +/// This function returns the onnxruntime version string +/// +/// version string major.minor.rev +std::string GetVersionString(); + +/// +/// This function returns the onnxruntime build information: including git branch, +/// git commit id, build type(Debug/Release/RelWithDebInfo) and cmake cpp flags. +/// +/// string +std::string GetBuildInfoString(); + +/// +/// This is a C++ wrapper for OrtApi::GetAvailableProviders() and +/// returns a vector of strings representing the available execution providers. +/// +/// vector of strings +std::vector GetAvailableProviders(); + +/** \brief IEEE 754 half-precision floating point data type + * + * \details This struct is used for converting float to float16 and back + * so the user could feed inputs and fetch outputs using these type. + * + * The size of the structure should align with uint16_t and one can freely cast + * uint16_t buffers to/from Ort::Float16_t to feed and retrieve data. + * + * \code{.unparsed} + * // This example demonstrates converion from float to float16 + * constexpr float values[] = {1.f, 2.f, 3.f, 4.f, 5.f}; + * std::vector fp16_values; + * fp16_values.reserve(std::size(values)); + * std::transform(std::begin(values), std::end(values), std::back_inserter(fp16_values), + * [](float value) { return Ort::Float16_t(value); }); + * + * \endcode + */ +struct Float16_t : onnxruntime_float16::Float16Impl { + private: + /// + /// Constructor from a 16-bit representation of a float16 value + /// No conversion is done here. + /// + /// 16-bit representation + constexpr explicit Float16_t(uint16_t v) noexcept { val = v; } + + public: + using Base = onnxruntime_float16::Float16Impl; + + /// + /// Default constructor + /// + Float16_t() = default; + + /// + /// Explicit conversion to uint16_t representation of float16. + /// + /// uint16_t bit representation of float16 + /// new instance of Float16_t + constexpr static Float16_t FromBits(uint16_t v) noexcept { return Float16_t(v); } + + /// + /// __ctor from float. Float is converted into float16 16-bit representation. + /// + /// float value + explicit Float16_t(float v) noexcept { val = Base::ToUint16Impl(v); } + + /// + /// Converts float16 to float + /// + /// float representation of float16 value + float ToFloat() const noexcept { return Base::ToFloatImpl(); } + + /// + /// Checks if the value is negative + /// + /// true if negative + using Base::IsNegative; + + /// + /// Tests if the value is NaN + /// + /// true if NaN + using Base::IsNaN; + + /// + /// Tests if the value is finite + /// + /// true if finite + using Base::IsFinite; + + /// + /// Tests if the value represents positive infinity. + /// + /// true if positive infinity + using Base::IsPositiveInfinity; + + /// + /// Tests if the value represents negative infinity + /// + /// true if negative infinity + using Base::IsNegativeInfinity; + + /// + /// Tests if the value is either positive or negative infinity. + /// + /// True if absolute value is infinity + using Base::IsInfinity; + + /// + /// Tests if the value is NaN or zero. Useful for comparisons. + /// + /// True if NaN or zero. + using Base::IsNaNOrZero; + + /// + /// Tests if the value is normal (not zero, subnormal, infinite, or NaN). + /// + /// True if so + using Base::IsNormal; + + /// + /// Tests if the value is subnormal (denormal). + /// + /// True if so + using Base::IsSubnormal; + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + using Base::Abs; + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + using Base::Negate; + + /// + /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check + /// for two values by or'ing the private bits together and stripping the sign. They are both zero, + /// and therefore equivalent, if the resulting value is still zero. + /// + /// first value + /// second value + /// True if both arguments represent zero + using Base::AreZero; + + /// + /// User defined conversion operator. Converts Float16_t to float. + /// + explicit operator float() const noexcept { return ToFloat(); } + + using Base::operator==; + using Base::operator!=; + using Base::operator<; +}; + +static_assert(sizeof(Float16_t) == sizeof(uint16_t), "Sizes must match"); + +/** \brief bfloat16 (Brain Floating Point) data type + * + * \details This struct is used for converting float to bfloat16 and back + * so the user could feed inputs and fetch outputs using these type. + * + * The size of the structure should align with uint16_t and one can freely cast + * uint16_t buffers to/from Ort::BFloat16_t to feed and retrieve data. + * + * \code{.unparsed} + * // This example demonstrates converion from float to float16 + * constexpr float values[] = {1.f, 2.f, 3.f, 4.f, 5.f}; + * std::vector bfp16_values; + * bfp16_values.reserve(std::size(values)); + * std::transform(std::begin(values), std::end(values), std::back_inserter(bfp16_values), + * [](float value) { return Ort::BFloat16_t(value); }); + * + * \endcode + */ +struct BFloat16_t : onnxruntime_float16::BFloat16Impl { + private: + /// + /// Constructor from a uint16_t representation of bfloat16 + /// used in FromBits() to escape overload resolution issue with + /// constructor from float. + /// No conversion is done. + /// + /// 16-bit bfloat16 value + constexpr explicit BFloat16_t(uint16_t v) noexcept { val = v; } + + public: + using Base = onnxruntime_float16::BFloat16Impl; + + BFloat16_t() = default; + + /// + /// Explicit conversion to uint16_t representation of bfloat16. + /// + /// uint16_t bit representation of bfloat16 + /// new instance of BFloat16_t + static constexpr BFloat16_t FromBits(uint16_t v) noexcept { return BFloat16_t(v); } + + /// + /// __ctor from float. Float is converted into bfloat16 16-bit representation. + /// + /// float value + explicit BFloat16_t(float v) noexcept { val = Base::ToUint16Impl(v); } + + /// + /// Converts bfloat16 to float + /// + /// float representation of bfloat16 value + float ToFloat() const noexcept { return Base::ToFloatImpl(); } + + /// + /// Checks if the value is negative + /// + /// true if negative + using Base::IsNegative; + + /// + /// Tests if the value is NaN + /// + /// true if NaN + using Base::IsNaN; + + /// + /// Tests if the value is finite + /// + /// true if finite + using Base::IsFinite; + + /// + /// Tests if the value represents positive infinity. + /// + /// true if positive infinity + using Base::IsPositiveInfinity; + + /// + /// Tests if the value represents negative infinity + /// + /// true if negative infinity + using Base::IsNegativeInfinity; + + /// + /// Tests if the value is either positive or negative infinity. + /// + /// True if absolute value is infinity + using Base::IsInfinity; + + /// + /// Tests if the value is NaN or zero. Useful for comparisons. + /// + /// True if NaN or zero. + using Base::IsNaNOrZero; + + /// + /// Tests if the value is normal (not zero, subnormal, infinite, or NaN). + /// + /// True if so + using Base::IsNormal; + + /// + /// Tests if the value is subnormal (denormal). + /// + /// True if so + using Base::IsSubnormal; + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + using Base::Abs; + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + using Base::Negate; + + /// + /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check + /// for two values by or'ing the private bits together and stripping the sign. They are both zero, + /// and therefore equivalent, if the resulting value is still zero. + /// + /// first value + /// second value + /// True if both arguments represent zero + using Base::AreZero; + + /// + /// User defined conversion operator. Converts BFloat16_t to float. + /// + explicit operator float() const noexcept { return ToFloat(); } + + // We do not have an inherited impl for the below operators + // as the internal class implements them a little differently + bool operator==(const BFloat16_t& rhs) const noexcept; + bool operator!=(const BFloat16_t& rhs) const noexcept { return !(*this == rhs); } + bool operator<(const BFloat16_t& rhs) const noexcept; +}; + +static_assert(sizeof(BFloat16_t) == sizeof(uint16_t), "Sizes must match"); + +/** \brief float8e4m3fn (Float8 Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint8_t. + * See https://onnx.ai/onnx/technical/float8.html for further details. + */ +struct Float8E4M3FN_t { + uint8_t value; + constexpr Float8E4M3FN_t() noexcept : value(0) {} + constexpr Float8E4M3FN_t(uint8_t v) noexcept : value(v) {} + constexpr operator uint8_t() const noexcept { return value; } + // nan values are treated like any other value for operator ==, != + constexpr bool operator==(const Float8E4M3FN_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float8E4M3FN_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float8E4M3FN_t) == sizeof(uint8_t), "Sizes must match"); + +/** \brief float8e4m3fnuz (Float8 Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint8_t. + * See https://onnx.ai/onnx/technical/float8.html for further details. + */ +struct Float8E4M3FNUZ_t { + uint8_t value; + constexpr Float8E4M3FNUZ_t() noexcept : value(0) {} + constexpr Float8E4M3FNUZ_t(uint8_t v) noexcept : value(v) {} + constexpr operator uint8_t() const noexcept { return value; } + // nan values are treated like any other value for operator ==, != + constexpr bool operator==(const Float8E4M3FNUZ_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float8E4M3FNUZ_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float8E4M3FNUZ_t) == sizeof(uint8_t), "Sizes must match"); + +/** \brief float8e5m2 (Float8 Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint8_t. + * See https://onnx.ai/onnx/technical/float8.html for further details. + */ +struct Float8E5M2_t { + uint8_t value; + constexpr Float8E5M2_t() noexcept : value(0) {} + constexpr Float8E5M2_t(uint8_t v) noexcept : value(v) {} + constexpr operator uint8_t() const noexcept { return value; } + // nan values are treated like any other value for operator ==, != + constexpr bool operator==(const Float8E5M2_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float8E5M2_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float8E5M2_t) == sizeof(uint8_t), "Sizes must match"); + +/** \brief float8e5m2fnuz (Float8 Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint8_t. + * See https://onnx.ai/onnx/technical/float8.html for further details. + */ +struct Float8E5M2FNUZ_t { + uint8_t value; + constexpr Float8E5M2FNUZ_t() noexcept : value(0) {} + constexpr Float8E5M2FNUZ_t(uint8_t v) noexcept : value(v) {} + constexpr operator uint8_t() const noexcept { return value; } + // nan values are treated like any other value for operator ==, != + constexpr bool operator==(const Float8E5M2FNUZ_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float8E5M2FNUZ_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float8E5M2FNUZ_t) == sizeof(uint8_t), "Sizes must match"); + +namespace detail { +// This is used internally by the C++ API. This macro is to make it easy to generate overloaded methods for all of the various OrtRelease* functions for every Ort* type +// This can't be done in the C API since C doesn't have function overloading. +#define ORT_DEFINE_RELEASE(NAME) \ + inline void OrtRelease(Ort##NAME* ptr) { GetApi().Release##NAME(ptr); } + +ORT_DEFINE_RELEASE(Allocator); +ORT_DEFINE_RELEASE(MemoryInfo); +ORT_DEFINE_RELEASE(CustomOpDomain); +ORT_DEFINE_RELEASE(ThreadingOptions); +ORT_DEFINE_RELEASE(Env); +ORT_DEFINE_RELEASE(RunOptions); +ORT_DEFINE_RELEASE(LoraAdapter); +ORT_DEFINE_RELEASE(Session); +ORT_DEFINE_RELEASE(SessionOptions); +ORT_DEFINE_RELEASE(TensorTypeAndShapeInfo); +ORT_DEFINE_RELEASE(SequenceTypeInfo); +ORT_DEFINE_RELEASE(MapTypeInfo); +ORT_DEFINE_RELEASE(TypeInfo); +ORT_DEFINE_RELEASE(Value); +ORT_DEFINE_RELEASE(ModelMetadata); +ORT_DEFINE_RELEASE(IoBinding); +ORT_DEFINE_RELEASE(ArenaCfg); +ORT_DEFINE_RELEASE(Status); +ORT_DEFINE_RELEASE(OpAttr); +ORT_DEFINE_RELEASE(Op); +ORT_DEFINE_RELEASE(KernelInfo); + +#undef ORT_DEFINE_RELEASE + +/** \brief This is a tagging template type. Use it with Base to indicate that the C++ interface object + * has no ownership of the underlying C object. + */ +template +struct Unowned { + using Type = T; +}; + +/** \brief Used internally by the C++ API. C++ wrapper types inherit from this. + * This is a zero cost abstraction to wrap the C API objects and delete them on destruction. + * + * All of the C++ classes + * a) serve as containers for pointers to objects that are created by the underlying C API. + * Their size is just a pointer size, no need to dynamically allocate them. Use them by value. + * b) Each of struct XXXX, XXX instances function as smart pointers to the underlying C API objects. + * they would release objects owned automatically when going out of scope, they are move-only. + * c) ConstXXXX and UnownedXXX structs function as non-owning, copyable containers for the above pointers. + * ConstXXXX allow calling const interfaces only. They give access to objects that are owned by somebody else + * such as Onnxruntime or instances of XXXX classes. + * d) serve convenient interfaces that return C++ objects and further enhance exception and type safety so they can be used + * in C++ code. + * + */ + +/// +/// This is a non-const pointer holder that is move-only. Disposes of the pointer on destruction. +/// +template +struct Base { + using contained_type = T; + + constexpr Base() = default; + constexpr explicit Base(contained_type* p) noexcept : p_{p} {} + ~Base() { OrtRelease(p_); } + + Base(const Base&) = delete; + Base& operator=(const Base&) = delete; + + Base(Base&& v) noexcept : p_{v.p_} { v.p_ = nullptr; } + Base& operator=(Base&& v) noexcept { + OrtRelease(p_); + p_ = v.release(); + return *this; + } + + constexpr operator contained_type*() const noexcept { return p_; } + + /// \brief Relinquishes ownership of the contained C object pointer + /// The underlying object is not destroyed + contained_type* release() { + T* p = p_; + p_ = nullptr; + return p; + } + + protected: + contained_type* p_{}; +}; + +// Undefined. For const types use Base> +template +struct Base; + +/// +/// Covers unowned pointers owned by either the ORT +/// or some other instance of CPP wrappers. +/// Used for ConstXXX and UnownedXXXX types that are copyable. +/// Also convenient to wrap raw OrtXX pointers . +/// +/// +template +struct Base> { + using contained_type = typename Unowned::Type; + + constexpr Base() = default; + constexpr explicit Base(contained_type* p) noexcept : p_{p} {} + + ~Base() = default; + + Base(const Base&) = default; + Base& operator=(const Base&) = default; + + Base(Base&& v) noexcept : p_{v.p_} { v.p_ = nullptr; } + Base& operator=(Base&& v) noexcept { + p_ = nullptr; + std::swap(p_, v.p_); + return *this; + } + + constexpr operator contained_type*() const noexcept { return p_; } + + protected: + contained_type* p_{}; +}; + +// Light functor to release memory with OrtAllocator +struct AllocatedFree { + OrtAllocator* allocator_; + explicit AllocatedFree(OrtAllocator* allocator) + : allocator_(allocator) {} + void operator()(void* ptr) const { + if (ptr) allocator_->Free(allocator_, ptr); + } +}; + +} // namespace detail + +struct AllocatorWithDefaultOptions; +struct Env; +struct TypeInfo; +struct Value; +struct ModelMetadata; + +/** \brief unique_ptr typedef used to own strings allocated by OrtAllocators + * and release them at the end of the scope. The lifespan of the given allocator + * must eclipse the lifespan of AllocatedStringPtr instance + */ +using AllocatedStringPtr = std::unique_ptr; + +/** \brief The Status that holds ownership of OrtStatus received from C API + * Use it to safely destroy OrtStatus* returned from the C API. Use appropriate + * constructors to construct an instance of a Status object from exceptions. + */ +struct Status : detail::Base { + explicit Status(std::nullptr_t) noexcept {} ///< Create an empty object, must be assigned a valid one to be used + explicit Status(OrtStatus* status) noexcept; ///< Takes ownership of OrtStatus instance returned from the C API. + explicit Status(const Exception&) noexcept; ///< Creates status instance out of exception + explicit Status(const std::exception&) noexcept; ///< Creates status instance out of exception + Status(const char* message, OrtErrorCode code) noexcept; ///< Creates status instance out of null-terminated string message. + std::string GetErrorMessage() const; + OrtErrorCode GetErrorCode() const; + bool IsOK() const noexcept; ///< Returns true if instance represents an OK (non-error) status. +}; + +/** \brief The ThreadingOptions + * + * The ThreadingOptions used for set global threadpools' options of The Env. + */ +struct ThreadingOptions : detail::Base { + /// \brief Wraps OrtApi::CreateThreadingOptions + ThreadingOptions(); + + /// \brief Wraps OrtApi::SetGlobalIntraOpNumThreads + ThreadingOptions& SetGlobalIntraOpNumThreads(int intra_op_num_threads); + + /// \brief Wraps OrtApi::SetGlobalInterOpNumThreads + ThreadingOptions& SetGlobalInterOpNumThreads(int inter_op_num_threads); + + /// \brief Wraps OrtApi::SetGlobalSpinControl + ThreadingOptions& SetGlobalSpinControl(int allow_spinning); + + /// \brief Wraps OrtApi::SetGlobalDenormalAsZero + ThreadingOptions& SetGlobalDenormalAsZero(); + + /// \brief Wraps OrtApi::SetGlobalCustomCreateThreadFn + ThreadingOptions& SetGlobalCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /// \brief Wraps OrtApi::SetGlobalCustomThreadCreationOptions + ThreadingOptions& SetGlobalCustomThreadCreationOptions(void* ort_custom_thread_creation_options); + + /// \brief Wraps OrtApi::SetGlobalCustomJoinThreadFn + ThreadingOptions& SetGlobalCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn); +}; + +/** \brief The Env (Environment) + * + * The Env holds the logging state used by all other objects. + * Note: One Env must be created before using any other Onnxruntime functionality + */ +struct Env : detail::Base { + explicit Env(std::nullptr_t) {} ///< Create an empty Env object, must be assigned a valid one to be used + + /// \brief Wraps OrtApi::CreateEnv + Env(OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief Wraps OrtApi::CreateEnvWithCustomLogger + Env(OrtLoggingLevel logging_level, const char* logid, OrtLoggingFunction logging_function, void* logger_param); + + /// \brief Wraps OrtApi::CreateEnvWithGlobalThreadPools + Env(const OrtThreadingOptions* tp_options, OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief Wraps OrtApi::CreateEnvWithCustomLoggerAndGlobalThreadPools + Env(const OrtThreadingOptions* tp_options, OrtLoggingFunction logging_function, void* logger_param, + OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief C Interop Helper + explicit Env(OrtEnv* p) : Base{p} {} + + Env& EnableTelemetryEvents(); ///< Wraps OrtApi::EnableTelemetryEvents + Env& DisableTelemetryEvents(); ///< Wraps OrtApi::DisableTelemetryEvents + + Env& UpdateEnvWithCustomLogLevel(OrtLoggingLevel log_severity_level); ///< Wraps OrtApi::UpdateEnvWithCustomLogLevel + + Env& CreateAndRegisterAllocator(const OrtMemoryInfo* mem_info, const OrtArenaCfg* arena_cfg); ///< Wraps OrtApi::CreateAndRegisterAllocator + + Env& CreateAndRegisterAllocatorV2(const std::string& provider_type, const OrtMemoryInfo* mem_info, const std::unordered_map& options, const OrtArenaCfg* arena_cfg); ///< Wraps OrtApi::CreateAndRegisterAllocatorV2 +}; + +/** \brief Custom Op Domain + * + */ +struct CustomOpDomain : detail::Base { + explicit CustomOpDomain(std::nullptr_t) {} ///< Create an empty CustomOpDomain object, must be assigned a valid one to be used + + /// \brief Wraps OrtApi::CreateCustomOpDomain + explicit CustomOpDomain(const char* domain); + + // This does not take ownership of the op, simply registers it. + void Add(const OrtCustomOp* op); ///< Wraps CustomOpDomain_Add +}; + +/// \brief LoraAdapter holds a set of Lora Parameters loaded from a single file +struct LoraAdapter : detail::Base { + using Base = detail::Base; + using Base::Base; + + explicit LoraAdapter(std::nullptr_t) {} ///< Create an empty LoraAdapter object, must be assigned a valid one to be used + /// \brief Wraps OrtApi::CreateLoraAdapter + /// + /// The function attempts to load the adapter from the specified file + /// \param adapter_path The path to the Lora adapter + /// \param allocator optional pointer to a device allocator. If nullptr, the data stays on CPU. It would still + /// be copied to device if required by the model at inference time. + static LoraAdapter CreateLoraAdapter(const std::basic_string& adapter_path, + OrtAllocator* allocator); + + /// \brief Wraps OrtApi::CreateLoraAdapterFromArray + /// + /// The function attempts to load the adapter from the specified byte array. + /// \param bytes The byte array containing file LoraAdapter format + /// \param num_bytes The number of bytes in the byte array + /// \param allocator optional pointer to a device allocator. If nullptr, the data stays on CPU. It would still + /// be copied to device if required by the model at inference time. + static LoraAdapter CreateLoraAdapterFromArray(const void* bytes, size_t num_bytes, + OrtAllocator* allocator); +}; + +/** \brief RunOptions + * + */ +struct RunOptions : detail::Base { + explicit RunOptions(std::nullptr_t) {} ///< Create an empty RunOptions object, must be assigned a valid one to be used + RunOptions(); ///< Wraps OrtApi::CreateRunOptions + + RunOptions& SetRunLogVerbosityLevel(int); ///< Wraps OrtApi::RunOptionsSetRunLogVerbosityLevel + int GetRunLogVerbosityLevel() const; ///< Wraps OrtApi::RunOptionsGetRunLogVerbosityLevel + + RunOptions& SetRunLogSeverityLevel(int); ///< Wraps OrtApi::RunOptionsSetRunLogSeverityLevel + int GetRunLogSeverityLevel() const; ///< Wraps OrtApi::RunOptionsGetRunLogSeverityLevel + + RunOptions& SetRunTag(const char* run_tag); ///< wraps OrtApi::RunOptionsSetRunTag + const char* GetRunTag() const; ///< Wraps OrtApi::RunOptionsGetRunTag + + RunOptions& AddConfigEntry(const char* config_key, const char* config_value); ///< Wraps OrtApi::AddRunConfigEntry + + /** \brief Terminates all currently executing Session::Run calls that were made using this RunOptions instance + * + * If a currently executing session needs to be force terminated, this can be called from another thread to force it to fail with an error + * Wraps OrtApi::RunOptionsSetTerminate + */ + RunOptions& SetTerminate(); + + /** \brief Clears the terminate flag so this RunOptions instance can be used in a new Session::Run call without it instantly terminating + * + * Wraps OrtApi::RunOptionsUnsetTerminate + */ + RunOptions& UnsetTerminate(); + + /** \brief Add the LoraAdapter to the list of active adapters. + * The setting does not affect RunWithBinding() calls. + * + * Wraps OrtApi::RunOptionsAddActiveLoraAdapter + * \param adapter The LoraAdapter to be used as the active adapter + */ + RunOptions& AddActiveLoraAdapter(const LoraAdapter& adapter); +}; + +namespace detail { +// Utility function that returns a SessionOption config entry key for a specific custom operator. +// Ex: custom_op.[custom_op_name].[config] +std::string MakeCustomOpConfigEntryKey(const char* custom_op_name, const char* config); +} // namespace detail + +/// +/// Class that represents session configuration entries for one or more custom operators. +/// +/// Example: +/// Ort::CustomOpConfigs op_configs; +/// op_configs.AddConfig("my_custom_op", "device_type", "CPU"); +/// +/// Passed to Ort::SessionOptions::RegisterCustomOpsLibrary. +/// +struct CustomOpConfigs { + CustomOpConfigs() = default; + ~CustomOpConfigs() = default; + CustomOpConfigs(const CustomOpConfigs&) = default; + CustomOpConfigs& operator=(const CustomOpConfigs&) = default; + CustomOpConfigs(CustomOpConfigs&& o) = default; + CustomOpConfigs& operator=(CustomOpConfigs&& o) = default; + + /** \brief Adds a session configuration entry/value for a specific custom operator. + * + * \param custom_op_name The name of the custom operator for which to add a configuration entry. + * Must match the name returned by the CustomOp's GetName() method. + * \param config_key The name of the configuration entry. + * \param config_value The value of the configuration entry. + * \return A reference to this object to enable call chaining. + */ + CustomOpConfigs& AddConfig(const char* custom_op_name, const char* config_key, const char* config_value); + + /** \brief Returns a flattened map of custom operator configuration entries and their values. + * + * The keys has been flattened to include both the custom operator name and the configuration entry key name. + * For example, a prior call to AddConfig("my_op", "key", "value") corresponds to the flattened key/value pair + * {"my_op.key", "value"}. + * + * \return An unordered map of flattened configurations. + */ + const std::unordered_map& GetFlattenedConfigs() const; + + private: + std::unordered_map flat_configs_; +}; + +/** \brief Options object used when creating a new Session object + * + * Wraps ::OrtSessionOptions object and methods + */ + +struct SessionOptions; + +namespace detail { +// we separate const-only methods because passing const ptr to non-const methods +// is only discovered when inline methods are compiled which is counter-intuitive +template +struct ConstSessionOptionsImpl : Base { + using B = Base; + using B::B; + + SessionOptions Clone() const; ///< Creates and returns a copy of this SessionOptions object. Wraps OrtApi::CloneSessionOptions + + std::string GetConfigEntry(const char* config_key) const; ///< Wraps OrtApi::GetSessionConfigEntry + bool HasConfigEntry(const char* config_key) const; ///< Wraps OrtApi::HasSessionConfigEntry + std::string GetConfigEntryOrDefault(const char* config_key, const std::string& def); +}; + +template +struct SessionOptionsImpl : ConstSessionOptionsImpl { + using B = ConstSessionOptionsImpl; + using B::B; + + SessionOptionsImpl& SetIntraOpNumThreads(int intra_op_num_threads); ///< Wraps OrtApi::SetIntraOpNumThreads + SessionOptionsImpl& SetInterOpNumThreads(int inter_op_num_threads); ///< Wraps OrtApi::SetInterOpNumThreads + SessionOptionsImpl& SetGraphOptimizationLevel(GraphOptimizationLevel graph_optimization_level); ///< Wraps OrtApi::SetSessionGraphOptimizationLevel + SessionOptionsImpl& SetDeterministicCompute(bool value); ///< Wraps OrtApi::SetDeterministicCompute + + SessionOptionsImpl& EnableCpuMemArena(); ///< Wraps OrtApi::EnableCpuMemArena + SessionOptionsImpl& DisableCpuMemArena(); ///< Wraps OrtApi::DisableCpuMemArena + + SessionOptionsImpl& SetOptimizedModelFilePath(const ORTCHAR_T* optimized_model_file); ///< Wraps OrtApi::SetOptimizedModelFilePath + + SessionOptionsImpl& EnableProfiling(const ORTCHAR_T* profile_file_prefix); ///< Wraps OrtApi::EnableProfiling + SessionOptionsImpl& DisableProfiling(); ///< Wraps OrtApi::DisableProfiling + + SessionOptionsImpl& EnableOrtCustomOps(); ///< Wraps OrtApi::EnableOrtCustomOps + + SessionOptionsImpl& EnableMemPattern(); ///< Wraps OrtApi::EnableMemPattern + SessionOptionsImpl& DisableMemPattern(); ///< Wraps OrtApi::DisableMemPattern + + SessionOptionsImpl& SetExecutionMode(ExecutionMode execution_mode); ///< Wraps OrtApi::SetSessionExecutionMode + + SessionOptionsImpl& SetLogId(const char* logid); ///< Wraps OrtApi::SetSessionLogId + SessionOptionsImpl& SetLogSeverityLevel(int level); ///< Wraps OrtApi::SetSessionLogSeverityLevel + + SessionOptionsImpl& Add(OrtCustomOpDomain* custom_op_domain); ///< Wraps OrtApi::AddCustomOpDomain + + SessionOptionsImpl& DisablePerSessionThreads(); ///< Wraps OrtApi::DisablePerSessionThreads + + SessionOptionsImpl& AddConfigEntry(const char* config_key, const char* config_value); ///< Wraps OrtApi::AddSessionConfigEntry + + SessionOptionsImpl& AddInitializer(const char* name, const OrtValue* ort_val); ///< Wraps OrtApi::AddInitializer + SessionOptionsImpl& AddExternalInitializers(const std::vector& names, const std::vector& ort_values); ///< Wraps OrtApi::AddExternalInitializers + SessionOptionsImpl& AddExternalInitializersFromFilesInMemory(const std::vector>& external_initializer_file_names, + const std::vector& external_initializer_file_buffer_array, + const std::vector& external_initializer_file_lengths); ///< Wraps OrtApi::AddExternalInitializersFromFilesInMemory + + SessionOptionsImpl& AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA + SessionOptionsImpl& AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2 + SessionOptionsImpl& AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM + SessionOptionsImpl& AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO_V2 + SessionOptionsImpl& AppendExecutionProvider_OpenVINO_V2(const std::unordered_map& provider_options = {}); + SessionOptionsImpl& AppendExecutionProvider_TensorRT(const OrtTensorRTProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + SessionOptionsImpl& AppendExecutionProvider_TensorRT_V2(const OrtTensorRTProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + SessionOptionsImpl& AppendExecutionProvider_MIGraphX(const OrtMIGraphXProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CANN + SessionOptionsImpl& AppendExecutionProvider_CANN(const OrtCANNProviderOptions& provider_options); + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_Dnnl + SessionOptionsImpl& AppendExecutionProvider_Dnnl(const OrtDnnlProviderOptions& provider_options); + /// Wraps OrtApi::SessionOptionsAppendExecutionProvider. Currently supports QNN, SNPE and XNNPACK. + SessionOptionsImpl& AppendExecutionProvider(const std::string& provider_name, + const std::unordered_map& provider_options = {}); + + SessionOptionsImpl& SetCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn); ///< Wraps OrtApi::SessionOptionsSetCustomCreateThreadFn + SessionOptionsImpl& SetCustomThreadCreationOptions(void* ort_custom_thread_creation_options); ///< Wraps OrtApi::SessionOptionsSetCustomThreadCreationOptions + SessionOptionsImpl& SetCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn); ///< Wraps OrtApi::SessionOptionsSetCustomJoinThreadFn + + ///< Registers the custom operator from the specified shared library via OrtApi::RegisterCustomOpsLibrary_V2. + ///< The custom operator configurations are optional. If provided, custom operator configs are set via + ///< OrtApi::AddSessionConfigEntry. + SessionOptionsImpl& RegisterCustomOpsLibrary(const ORTCHAR_T* library_name, const CustomOpConfigs& custom_op_configs = {}); + + SessionOptionsImpl& RegisterCustomOpsUsingFunction(const char* function_name); ///< Wraps OrtApi::RegisterCustomOpsUsingFunction + + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_VitisAI + SessionOptionsImpl& AppendExecutionProvider_VitisAI(const std::unordered_map& provider_options = {}); +}; +} // namespace detail + +using UnownedSessionOptions = detail::SessionOptionsImpl>; +using ConstSessionOptions = detail::ConstSessionOptionsImpl>; + +/** \brief Wrapper around ::OrtSessionOptions + * + */ +struct SessionOptions : detail::SessionOptionsImpl { + explicit SessionOptions(std::nullptr_t) {} ///< Create an empty SessionOptions object, must be assigned a valid one to be used + SessionOptions(); ///< Wraps OrtApi::CreateSessionOptions + explicit SessionOptions(OrtSessionOptions* p) : SessionOptionsImpl{p} {} ///< Used for interop with the C API + UnownedSessionOptions GetUnowned() const { return UnownedSessionOptions{this->p_}; } + ConstSessionOptions GetConst() const { return ConstSessionOptions{this->p_}; } +}; + +/** \brief Wrapper around ::OrtModelMetadata + * + */ +struct ModelMetadata : detail::Base { + explicit ModelMetadata(std::nullptr_t) {} ///< Create an empty ModelMetadata object, must be assigned a valid one to be used + explicit ModelMetadata(OrtModelMetadata* p) : Base{p} {} ///< Used for interop with the C API + + /** \brief Returns a copy of the producer name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetProducerNameAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetProducerName + + /** \brief Returns a copy of the graph name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetGraphNameAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetGraphName + + /** \brief Returns a copy of the domain name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetDomainAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetDomain + + /** \brief Returns a copy of the description. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetDescriptionAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetDescription + + /** \brief Returns a copy of the graph description. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetGraphDescriptionAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetGraphDescription + + /** \brief Returns a vector of copies of the custom metadata keys. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance std::vector of smart pointers that would deallocate the buffers when out of scope. + * The OrtAllocator instance must be valid at the point of memory release. + */ + std::vector GetCustomMetadataMapKeysAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetCustomMetadataMapKeys + + /** \brief Looks up a value by a key in the Custom Metadata map + * + * \param key zero terminated string key to lookup + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * maybe nullptr if key is not found. + * + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr LookupCustomMetadataMapAllocated(const char* key, OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataLookupCustomMetadataMap + + int64_t GetVersion() const; ///< Wraps OrtApi::ModelMetadataGetVersion +}; + +struct IoBinding; + +namespace detail { + +// we separate const-only methods because passing const ptr to non-const methods +// is only discovered when inline methods are compiled which is counter-intuitive +template +struct ConstSessionImpl : Base { + using B = Base; + using B::B; + + size_t GetInputCount() const; ///< Returns the number of model inputs + size_t GetOutputCount() const; ///< Returns the number of model outputs + size_t GetOverridableInitializerCount() const; ///< Returns the number of inputs that have defaults that can be overridden + + /** \brief Returns a copy of input name at the specified index. + * + * \param index must less than the value returned by GetInputCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetInputNameAllocated(size_t index, OrtAllocator* allocator) const; + + /** \brief Returns a copy of output name at then specified index. + * + * \param index must less than the value returned by GetOutputCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetOutputNameAllocated(size_t index, OrtAllocator* allocator) const; + + /** \brief Returns a copy of the overridable initializer name at then specified index. + * + * \param index must less than the value returned by GetOverridableInitializerCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetOverridableInitializerNameAllocated(size_t index, OrtAllocator* allocator) const; ///< Wraps OrtApi::SessionGetOverridableInitializerName + + uint64_t GetProfilingStartTimeNs() const; ///< Wraps OrtApi::SessionGetProfilingStartTimeNs + ModelMetadata GetModelMetadata() const; ///< Wraps OrtApi::SessionGetModelMetadata + + TypeInfo GetInputTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetInputTypeInfo + TypeInfo GetOutputTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetOutputTypeInfo + TypeInfo GetOverridableInitializerTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetOverridableInitializerTypeInfo +}; + +template +struct SessionImpl : ConstSessionImpl { + using B = ConstSessionImpl; + using B::B; + + /** \brief Run the model returning results in an Ort allocated vector. + * + * Wraps OrtApi::Run + * + * The caller provides a list of inputs and a list of the desired outputs to return. + * + * See the output logs for more information on warnings/errors that occur while processing the model. + * Common errors are.. (TODO) + * + * \param[in] run_options + * \param[in] input_names Array of null terminated strings of length input_count that is the list of input names + * \param[in] input_values Array of Value objects of length input_count that is the list of input values + * \param[in] input_count Number of inputs (the size of the input_names & input_values arrays) + * \param[in] output_names Array of C style strings of length output_count that is the list of output names + * \param[in] output_count Number of outputs (the size of the output_names array) + * \return A std::vector of Value objects that directly maps to the output_names array (eg. output_name[0] is the first entry of the returned vector) + */ + std::vector Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, size_t output_count); + + /** \brief Run the model returning results in user provided outputs + * Same as Run(const RunOptions&, const char* const*, const Value*, size_t,const char* const*, size_t) + */ + void Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count); + + void Run(const RunOptions& run_options, const IoBinding&); ///< Wraps OrtApi::RunWithBinding + + /** \brief Run the model asynchronously in a thread owned by intra op thread pool + * + * Wraps OrtApi::RunAsync + * + * \param[in] run_options + * \param[in] input_names Array of null terminated UTF8 encoded strings of the input names + * \param[in] input_values Array of Value objects of length input_count + * \param[in] input_count Number of elements in the input_names and inputs arrays + * \param[in] output_names Array of null terminated UTF8 encoded strings of the output names + * \param[out] output_values Array of provided Values to be filled with outputs. + * On calling RunAsync, output_values[i] could either be initialized by a null pointer or a preallocated OrtValue*. + * Later, on invoking the callback, each output_values[i] of null will be filled with an OrtValue* allocated by onnxruntime. + * Then, an OrtValue** pointer will be casted from output_values, and pass to the callback. + * NOTE: it is customer's duty to finally release output_values and each of its member, + * regardless of whether the member (Ort::Value) is allocated by onnxruntime or preallocated by the customer. + * \param[in] output_count Number of elements in the output_names and outputs array + * \param[in] callback Callback function on model run completion + * \param[in] user_data User data that pass back to the callback + */ + void RunAsync(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count, RunAsyncCallbackFn callback, void* user_data); + + /** \brief End profiling and return a copy of the profiling file name. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr EndProfilingAllocated(OrtAllocator* allocator); ///< Wraps OrtApi::SessionEndProfiling + + /** \brief Set DynamicOptions for EPs (Execution Providers) + * + * Wraps OrtApi::SetEpDynamicOptions + * + * Valid options can be found in `include\onnxruntime\core\session\onnxruntime_session_options_config_keys.h` + * Look for `kOrtEpDynamicOptions` + * + * \param[in] keys Array of null terminated UTF8 encoded strings of EP dynamic option keys + * \param[in] values Array of null terminated UTF8 encoded string of EP dynamic option values + * \param[in] kv_len Number of elements in the keys and values arrays + */ + void SetEpDynamicOptions(const char* const* keys, const char* const* values, size_t kv_len); +}; + +} // namespace detail + +using ConstSession = detail::ConstSessionImpl>; +using UnownedSession = detail::SessionImpl>; + +/** \brief Wrapper around ::OrtSession + * + */ +struct Session : detail::SessionImpl { + explicit Session(std::nullptr_t) {} ///< Create an empty Session object, must be assigned a valid one to be used + Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options); ///< Wraps OrtApi::CreateSession + Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container); ///< Wraps OrtApi::CreateSessionWithPrepackedWeightsContainer + Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options); ///< Wraps OrtApi::CreateSessionFromArray + Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container); ///< Wraps OrtApi::CreateSessionFromArrayWithPrepackedWeightsContainer + + ConstSession GetConst() const { return ConstSession{this->p_}; } + UnownedSession GetUnowned() const { return UnownedSession{this->p_}; } +}; + +namespace detail { +template +struct MemoryInfoImpl : Base { + using B = Base; + using B::B; + + std::string GetAllocatorName() const; + OrtAllocatorType GetAllocatorType() const; + int GetDeviceId() const; + OrtMemoryInfoDeviceType GetDeviceType() const; + OrtMemType GetMemoryType() const; + + template + bool operator==(const MemoryInfoImpl& o) const; +}; +} // namespace detail + +// Const object holder that does not own the underlying object +using ConstMemoryInfo = detail::MemoryInfoImpl>; + +/** \brief Wrapper around ::OrtMemoryInfo + * + */ +struct MemoryInfo : detail::MemoryInfoImpl { + static MemoryInfo CreateCpu(OrtAllocatorType type, OrtMemType mem_type1); + explicit MemoryInfo(std::nullptr_t) {} ///< No instance is created + explicit MemoryInfo(OrtMemoryInfo* p) : MemoryInfoImpl{p} {} ///< Take ownership of a pointer created by C Api + MemoryInfo(const char* name, OrtAllocatorType type, int id, OrtMemType mem_type); + ConstMemoryInfo GetConst() const { return ConstMemoryInfo{this->p_}; } +}; + +namespace detail { +template +struct TensorTypeAndShapeInfoImpl : Base { + using B = Base; + using B::B; + + ONNXTensorElementDataType GetElementType() const; ///< Wraps OrtApi::GetTensorElementType + size_t GetElementCount() const; ///< Wraps OrtApi::GetTensorShapeElementCount + + size_t GetDimensionsCount() const; ///< Wraps OrtApi::GetDimensionsCount + + /** \deprecated use GetShape() returning std::vector + * [[deprecated]] + * This interface is unsafe to use + */ + [[deprecated("use GetShape()")]] void GetDimensions(int64_t* values, size_t values_count) const; ///< Wraps OrtApi::GetDimensions + + void GetSymbolicDimensions(const char** values, size_t values_count) const; ///< Wraps OrtApi::GetSymbolicDimensions + + std::vector GetShape() const; ///< Uses GetDimensionsCount & GetDimensions to return a std::vector of the shape +}; + +} // namespace detail + +using ConstTensorTypeAndShapeInfo = detail::TensorTypeAndShapeInfoImpl>; + +/** \brief Wrapper around ::OrtTensorTypeAndShapeInfo + * + */ +struct TensorTypeAndShapeInfo : detail::TensorTypeAndShapeInfoImpl { + explicit TensorTypeAndShapeInfo(std::nullptr_t) {} ///< Create an empty TensorTypeAndShapeInfo object, must be assigned a valid one to be used + explicit TensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* p) : TensorTypeAndShapeInfoImpl{p} {} ///< Used for interop with the C API + ConstTensorTypeAndShapeInfo GetConst() const { return ConstTensorTypeAndShapeInfo{this->p_}; } +}; + +namespace detail { +template +struct SequenceTypeInfoImpl : Base { + using B = Base; + using B::B; + TypeInfo GetSequenceElementType() const; ///< Wraps OrtApi::GetSequenceElementType +}; + +} // namespace detail + +using ConstSequenceTypeInfo = detail::SequenceTypeInfoImpl>; + +/** \brief Wrapper around ::OrtSequenceTypeInfo + * + */ +struct SequenceTypeInfo : detail::SequenceTypeInfoImpl { + explicit SequenceTypeInfo(std::nullptr_t) {} ///< Create an empty SequenceTypeInfo object, must be assigned a valid one to be used + explicit SequenceTypeInfo(OrtSequenceTypeInfo* p) : SequenceTypeInfoImpl{p} {} ///< Used for interop with the C API + ConstSequenceTypeInfo GetConst() const { return ConstSequenceTypeInfo{this->p_}; } +}; + +namespace detail { +template +struct OptionalTypeInfoImpl : Base { + using B = Base; + using B::B; + TypeInfo GetOptionalElementType() const; ///< Wraps OrtApi::CastOptionalTypeToContainedTypeInfo +}; + +} // namespace detail + +// This is always owned by the TypeInfo and can only be obtained from it. +using ConstOptionalTypeInfo = detail::OptionalTypeInfoImpl>; + +namespace detail { +template +struct MapTypeInfoImpl : detail::Base { + using B = Base; + using B::B; + ONNXTensorElementDataType GetMapKeyType() const; ///< Wraps OrtApi::GetMapKeyType + TypeInfo GetMapValueType() const; ///< Wraps OrtApi::GetMapValueType +}; + +} // namespace detail + +using ConstMapTypeInfo = detail::MapTypeInfoImpl>; + +/** \brief Wrapper around ::OrtMapTypeInfo + * + */ +struct MapTypeInfo : detail::MapTypeInfoImpl { + explicit MapTypeInfo(std::nullptr_t) {} ///< Create an empty MapTypeInfo object, must be assigned a valid one to be used + explicit MapTypeInfo(OrtMapTypeInfo* p) : MapTypeInfoImpl{p} {} ///< Used for interop with the C API + ConstMapTypeInfo GetConst() const { return ConstMapTypeInfo{this->p_}; } +}; + +namespace detail { +template +struct TypeInfoImpl : detail::Base { + using B = Base; + using B::B; + + ConstTensorTypeAndShapeInfo GetTensorTypeAndShapeInfo() const; ///< Wraps OrtApi::CastTypeInfoToTensorInfo + ConstSequenceTypeInfo GetSequenceTypeInfo() const; ///< Wraps OrtApi::CastTypeInfoToSequenceTypeInfo + ConstMapTypeInfo GetMapTypeInfo() const; ///< Wraps OrtApi::CastTypeInfoToMapTypeInfo + ConstOptionalTypeInfo GetOptionalTypeInfo() const; ///< wraps OrtApi::CastTypeInfoToOptionalTypeInfo + + ONNXType GetONNXType() const; +}; +} // namespace detail + +/// +/// Contains a constant, unowned OrtTypeInfo that can be copied and passed around by value. +/// Provides access to const OrtTypeInfo APIs. +/// +using ConstTypeInfo = detail::TypeInfoImpl>; + +/// +/// Type information that may contain either TensorTypeAndShapeInfo or +/// the information about contained sequence or map depending on the ONNXType. +/// +struct TypeInfo : detail::TypeInfoImpl { + explicit TypeInfo(std::nullptr_t) {} ///< Create an empty TypeInfo object, must be assigned a valid one to be used + explicit TypeInfo(OrtTypeInfo* p) : TypeInfoImpl{p} {} ///< C API Interop + + ConstTypeInfo GetConst() const { return ConstTypeInfo{this->p_}; } +}; + +namespace detail { +// This structure is used to feed sparse tensor values +// information for use with FillSparseTensor() API +// if the data type for the sparse tensor values is numeric +// use data.p_data, otherwise, use data.str pointer to feed +// values. data.str is an array of const char* that are zero terminated. +// number of strings in the array must match shape size. +// For fully sparse tensors use shape {0} and set p_data/str +// to nullptr. +struct OrtSparseValuesParam { + const int64_t* values_shape; + size_t values_shape_len; + union { + const void* p_data; + const char** str; + } data; +}; + +// Provides a way to pass shape in a single +// argument +struct Shape { + const int64_t* shape; + size_t shape_len; +}; + +template +struct ConstValueImpl : Base { + using B = Base; + using B::B; + + /// + /// Obtains a pointer to a user defined data for experimental purposes + /// + template + void GetOpaqueData(const char* domain, const char* type_name, R&) const; ///< Wraps OrtApi::GetOpaqueValue + + bool IsTensor() const; ///< Returns true if Value is a tensor, false for other types like map/sequence/etc + bool HasValue() const; /// < Return true if OrtValue contains data and returns false if the OrtValue is a None + + size_t GetCount() const; // If a non tensor, returns 2 for map and N for sequence, where N is the number of elements + Value GetValue(int index, OrtAllocator* allocator) const; + + /// + /// This API returns a full length of string data contained within either a tensor or a sparse Tensor. + /// For sparse tensor it returns a full length of stored non-empty strings (values). The API is useful + /// for allocating necessary memory and calling GetStringTensorContent(). + /// + /// total length of UTF-8 encoded bytes contained. No zero terminators counted. + size_t GetStringTensorDataLength() const; + + /// + /// The API copies all of the UTF-8 encoded string data contained within a tensor or a sparse tensor + /// into a supplied buffer. Use GetStringTensorDataLength() to find out the length of the buffer to allocate. + /// The user must also allocate offsets buffer with the number of entries equal to that of the contained + /// strings. + /// + /// Strings are always assumed to be on CPU, no X-device copy. + /// + /// user allocated buffer + /// length in bytes of the allocated buffer + /// a pointer to the offsets user allocated buffer + /// count of offsets, must be equal to the number of strings contained. + /// that can be obtained from the shape of the tensor or from GetSparseTensorValuesTypeAndShapeInfo() + /// for sparse tensors + void GetStringTensorContent(void* buffer, size_t buffer_length, size_t* offsets, size_t offsets_count) const; + + /// + /// Returns a const typed pointer to the tensor contained data. + /// No type checking is performed, the caller must ensure the type matches the tensor type. + /// + /// + /// const pointer to data, no copies made + template + const R* GetTensorData() const; ///< Wraps OrtApi::GetTensorMutableData /// + + /// + /// Returns a non-typed pointer to a tensor contained data. + /// + /// const pointer to data, no copies made + const void* GetTensorRawData() const; + + /// + /// The API returns type information for data contained in a tensor. For sparse + /// tensors it returns type information for contained non-zero values. + /// It returns dense shape for sparse tensors. + /// + /// TypeInfo + TypeInfo GetTypeInfo() const; + + /// + /// The API returns type information for data contained in a tensor. For sparse + /// tensors it returns type information for contained non-zero values. + /// It returns dense shape for sparse tensors. + /// + /// TensorTypeAndShapeInfo + TensorTypeAndShapeInfo GetTensorTypeAndShapeInfo() const; + + /// + /// This API returns information about the memory allocation used to hold data. + /// + /// Non owning instance of MemoryInfo + ConstMemoryInfo GetTensorMemoryInfo() const; + + /// + /// The API copies UTF-8 encoded bytes for the requested string element + /// contained within a tensor or a sparse tensor into a provided buffer. + /// Use GetStringTensorElementLength() to obtain the length of the buffer to allocate. + /// + /// + /// + /// + void GetStringTensorElement(size_t buffer_length, size_t element_index, void* buffer) const; + + /// + /// Returns string tensor UTF-8 encoded string element. + /// Use of this API is recommended over GetStringTensorElement() that takes void* buffer pointer. + /// + /// + /// std::string + std::string GetStringTensorElement(size_t element_index) const; + + /// + /// The API returns a byte length of UTF-8 encoded string element + /// contained in either a tensor or a spare tensor values. + /// + /// + /// byte length for the specified string element + size_t GetStringTensorElementLength(size_t element_index) const; + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// The API returns the sparse data format this OrtValue holds in a sparse tensor. + /// If the sparse tensor was not fully constructed, i.e. Use*() or Fill*() API were not used + /// the value returned is ORT_SPARSE_UNDEFINED. + /// + /// Format enum + OrtSparseFormat GetSparseFormat() const; + + /// + /// The API returns type and shape information for stored non-zero values of the + /// sparse tensor. Use GetSparseTensorValues() to obtain values buffer pointer. + /// + /// TensorTypeAndShapeInfo values information + TensorTypeAndShapeInfo GetSparseTensorValuesTypeAndShapeInfo() const; + + /// + /// The API returns type and shape information for the specified indices. Each supported + /// indices have their own enum values even if a give format has more than one kind of indices. + /// Use GetSparseTensorIndicesData() to obtain pointer to indices buffer. + /// + /// enum requested + /// type and shape information + TensorTypeAndShapeInfo GetSparseTensorIndicesTypeShapeInfo(OrtSparseIndicesFormat format) const; + + /// + /// The API retrieves a pointer to the internal indices buffer. The API merely performs + /// a convenience data type casting on the return type pointer. Make sure you are requesting + /// the right type, use GetSparseTensorIndicesTypeShapeInfo(); + /// + /// type to cast to + /// requested indices kind + /// number of indices entries + /// Pinter to the internal sparse tensor buffer containing indices. Do not free this pointer. + template + const R* GetSparseTensorIndicesData(OrtSparseIndicesFormat indices_format, size_t& num_indices) const; + + /// + /// Returns true if the OrtValue contains a sparse tensor + /// + /// + bool IsSparseTensor() const; + + /// + /// The API returns a pointer to an internal buffer of the sparse tensor + /// containing non-zero values. The API merely does casting. Make sure you + /// are requesting the right data type by calling GetSparseTensorValuesTypeAndShapeInfo() + /// first. + /// + /// numeric data types only. Use GetStringTensor*() to retrieve strings. + /// a pointer to the internal values buffer. Do not free this pointer. + template + const R* GetSparseTensorValues() const; + +#endif +}; + +template +struct ValueImpl : ConstValueImpl { + using B = ConstValueImpl; + using B::B; + + /// + /// Returns a non-const typed pointer to an OrtValue/Tensor contained buffer + /// No type checking is performed, the caller must ensure the type matches the tensor type. + /// + /// non-const pointer to data, no copies made + template + R* GetTensorMutableData(); + + /// + /// Returns a non-typed non-const pointer to a tensor contained data. + /// + /// pointer to data, no copies made + void* GetTensorMutableRawData(); + + /// + // Obtain a reference to an element of data at the location specified + /// by the vector of dims. + /// + /// + /// [in] expressed by a vecotr of dimensions offsets + /// + template + R& At(const std::vector& location); + + /// + /// Set all strings at once in a string tensor + /// + /// [in] An array of strings. Each string in this array must be null terminated. + /// [in] Count of strings in s (Must match the size of \p value's tensor shape) + void FillStringTensor(const char* const* s, size_t s_len); + + /// + /// Set a single string in a string tensor + /// + /// [in] A null terminated UTF-8 encoded string + /// [in] Index of the string in the tensor to set + void FillStringTensorElement(const char* s, size_t index); + + /// + /// Allocate if necessary and obtain a pointer to a UTF-8 + /// encoded string element buffer indexed by the flat element index, + /// of the specified length. + /// + /// This API is for advanced usage. It avoids a need to construct + /// an auxiliary array of string pointers, and allows to write data directly + /// (do not zero terminate). + /// + /// + /// + /// a pointer to a writable buffer + char* GetResizedStringTensorElementBuffer(size_t index, size_t buffer_length); + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// Supplies COO format specific indices and marks the contained sparse tensor as being a COO format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// pointer to the user allocated buffer with indices. Use nullptr for fully sparse tensors. + /// number of indices entries. Use 0 for fully sparse tensors + void UseCooIndices(int64_t* indices_data, size_t indices_num); + + /// + /// Supplies CSR format specific indices and marks the contained sparse tensor as being a CSR format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// pointer to the user allocated buffer with inner indices or nullptr for fully sparse tensors + /// number of csr inner indices or 0 for fully sparse tensors + /// pointer to the user allocated buffer with outer indices or nullptr for fully sparse tensors + /// number of csr outer indices or 0 for fully sparse tensors + void UseCsrIndices(int64_t* inner_data, size_t inner_num, int64_t* outer_data, size_t outer_num); + + /// + /// Supplies BlockSparse format specific indices and marks the contained sparse tensor as being a BlockSparse format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// indices shape or a {0} for fully sparse + /// user allocated buffer with indices or nullptr for fully spare tensors + void UseBlockSparseIndices(const Shape& indices_shape, int32_t* indices_data); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and COO indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information. + /// coo indices buffer or nullptr for fully sparse data + /// number of COO indices or 0 for fully sparse data + void FillSparseTensorCoo(const OrtMemoryInfo* data_mem_info, const OrtSparseValuesParam& values_param, + const int64_t* indices_data, size_t indices_num); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and CSR indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information + /// csr inner indices pointer or nullptr for fully sparse tensors + /// number of csr inner indices or 0 for fully sparse tensors + /// pointer to csr indices data or nullptr for fully sparse tensors + /// number of csr outer indices or 0 + void FillSparseTensorCsr(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const int64_t* inner_indices_data, size_t inner_indices_num, + const int64_t* outer_indices_data, size_t outer_indices_num); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and BlockSparse indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information + /// indices shape. use {0} for fully sparse tensors + /// pointer to indices data or nullptr for fully sparse tensors + void FillSparseTensorBlockSparse(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const Shape& indices_shape, + const int32_t* indices_data); + +#endif +}; + +} // namespace detail + +using ConstValue = detail::ConstValueImpl>; +using UnownedValue = detail::ValueImpl>; + +/** \brief Wrapper around ::OrtValue + * + */ +struct Value : detail::ValueImpl { + using Base = detail::ValueImpl; + using OrtSparseValuesParam = detail::OrtSparseValuesParam; + using Shape = detail::Shape; + + explicit Value(std::nullptr_t) {} ///< Create an empty Value object, must be assigned a valid one to be used + explicit Value(OrtValue* p) : Base{p} {} ///< Used for interop with the C API + Value(Value&&) = default; + Value& operator=(Value&&) = default; + + ConstValue GetConst() const { return ConstValue{this->p_}; } + UnownedValue GetUnowned() const { return UnownedValue{this->p_}; } + + /** \brief Creates a tensor with a user supplied buffer. Wraps OrtApi::CreateTensorWithDataAsOrtValue. + * \tparam T The numeric datatype. This API is not suitable for strings. + * \param info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param p_data Pointer to the data buffer. + * \param p_data_element_count The number of elements in the data buffer. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + */ + template + static Value CreateTensor(const OrtMemoryInfo* info, T* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len); + + /** \brief Creates a tensor with a user supplied buffer. Wraps OrtApi::CreateTensorWithDataAsOrtValue. + * + * \param info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param p_data Pointer to the data buffer. + * \param p_data_byte_count The number of bytes in the data buffer. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + * \param type The data type. + */ + static Value CreateTensor(const OrtMemoryInfo* info, void* p_data, size_t p_data_byte_count, const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type); + + /** \brief Creates an OrtValue with a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue. + * This overload will allocate the buffer for the tensor according to the supplied shape and data type. + * The allocated buffer will be owned by the returned OrtValue and will be freed when the OrtValue is released. + * The input data would need to be copied into the allocated buffer. + * This API is not suitable for strings. + * + * \tparam T The numeric datatype. This API is not suitable for strings. + * \param allocator The allocator to use. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + */ + template + static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len); + + /** \brief Creates an OrtValue with a tensor using the supplied OrtAllocator. + * Wraps OrtApi::CreateTensorAsOrtValue. + * The allocated buffer will be owned by the returned OrtValue and will be freed when the OrtValue is released. + * The input data would need to be copied into the allocated buffer. + * This API is not suitable for strings. + * + * \param allocator The allocator to use. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + * \param type The data type. + */ + static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type); + + /** \brief Creates an OrtValue with a Map Onnx type representation. + * The API would ref-count the supplied OrtValues and they will be released + * when the returned OrtValue is released. The caller may release keys and values after the call + * returns. + * + * \param keys an OrtValue containing a tensor with primitive data type keys. + * \param values an OrtValue that may contain a tensor. Ort currently supports only primitive data type values. + */ + static Value CreateMap(const Value& keys, const Value& values); ///< Wraps OrtApi::CreateValue + + /** \brief Creates an OrtValue with a Sequence Onnx type representation. + * The API would ref-count the supplied OrtValues and they will be released + * when the returned OrtValue is released. The caller may release the values after the call + * returns. + * + * \param values a vector of OrtValues that must have the same Onnx value type. + */ + static Value CreateSequence(const std::vector& values); ///< Wraps OrtApi::CreateValue + + /** \brief Creates an OrtValue wrapping an Opaque type. + * This is used for experimental support of non-tensor types. + * + * \tparam T - the type of the value. + * \param domain - zero terminated utf-8 string. Domain of the type. + * \param type_name - zero terminated utf-8 string. Name of the type. + * \param value - the value to be wrapped. + */ + template + static Value CreateOpaque(const char* domain, const char* type_name, const T& value); ///< Wraps OrtApi::CreateOpaqueValue + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// This is a simple forwarding method to the other overload that helps deducing + /// data type enum value from the type of the buffer. + /// + /// numeric datatype. This API is not suitable for strings. + /// Memory description where the user buffers reside (CPU vs GPU etc) + /// pointer to the user supplied buffer, use nullptr for fully sparse tensors + /// a would be dense shape of the tensor + /// non zero values shape. Use a single 0 shape for fully sparse tensors. + /// + template + static Value CreateSparseTensor(const OrtMemoryInfo* info, T* p_data, const Shape& dense_shape, + const Shape& values_shape); + + /// + /// Creates an OrtValue instance containing SparseTensor. This constructs + /// a sparse tensor that makes use of user allocated buffers. It does not make copies + /// of the user provided data and does not modify it. The lifespan of user provided buffers should + /// eclipse the life span of the resulting OrtValue. This call constructs an instance that only contain + /// a pointer to non-zero values. To fully populate the sparse tensor call UseIndices() API below + /// to supply a sparse format specific indices. + /// This API is not suitable for string data. Use CreateSparseTensor() with allocator specified so strings + /// can be properly copied into the allocated buffer. + /// + /// Memory description where the user buffers reside (CPU vs GPU etc) + /// pointer to the user supplied buffer, use nullptr for fully sparse tensors + /// a would be dense shape of the tensor + /// non zero values shape. Use a single 0 shape for fully sparse tensors. + /// data type + /// Ort::Value instance containing SparseTensor + static Value CreateSparseTensor(const OrtMemoryInfo* info, void* p_data, const Shape& dense_shape, + const Shape& values_shape, ONNXTensorElementDataType type); + + /// + /// This is a simple forwarding method to the below CreateSparseTensor. + /// This helps to specify data type enum in terms of C++ data type. + /// Use CreateSparseTensor + /// + /// numeric data type only. String data enum must be specified explicitly. + /// allocator to use + /// a would be dense shape of the tensor + /// Ort::Value + template + static Value CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape); + + /// + /// Creates an instance of OrtValue containing sparse tensor. The created instance has no data. + /// The data must be supplied by on of the FillSparseTensor() methods that take both non-zero values + /// and indices. The data will be copied into a buffer that would be allocated using the supplied allocator. + /// Use this API to create OrtValues that contain sparse tensors with all supported data types including + /// strings. + /// + /// allocator to use. The allocator lifespan must eclipse that of the resulting OrtValue + /// a would be dense shape of the tensor + /// data type + /// an instance of Ort::Value + static Value CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape, ONNXTensorElementDataType type); + +#endif // !defined(DISABLE_SPARSE_TENSORS) +}; + +/// +/// Represents native memory allocation coming from one of the +/// OrtAllocators registered with OnnxRuntime. +/// Use it to wrap an allocation made by an allocator +/// so it can be automatically released when no longer needed. +/// +struct MemoryAllocation { + MemoryAllocation(OrtAllocator* allocator, void* p, size_t size); + ~MemoryAllocation(); + MemoryAllocation(const MemoryAllocation&) = delete; + MemoryAllocation& operator=(const MemoryAllocation&) = delete; + MemoryAllocation(MemoryAllocation&&) noexcept; + MemoryAllocation& operator=(MemoryAllocation&&) noexcept; + + void* get() { return p_; } + size_t size() const { return size_; } + + private: + OrtAllocator* allocator_; + void* p_; + size_t size_; +}; + +namespace detail { +template +struct AllocatorImpl : Base { + using B = Base; + using B::B; + + void* Alloc(size_t size); + MemoryAllocation GetAllocation(size_t size); + void Free(void* p); + ConstMemoryInfo GetInfo() const; +}; + +} // namespace detail + +/** \brief Wrapper around ::OrtAllocator default instance that is owned by Onnxruntime + * + */ +struct AllocatorWithDefaultOptions : detail::AllocatorImpl> { + explicit AllocatorWithDefaultOptions(std::nullptr_t) {} ///< Convenience to create a class member and then replace with an instance + AllocatorWithDefaultOptions(); +}; + +/** \brief Wrapper around ::OrtAllocator + * + */ +struct Allocator : detail::AllocatorImpl { + explicit Allocator(std::nullptr_t) {} ///< Convenience to create a class member and then replace with an instance + Allocator(const Session& session, const OrtMemoryInfo*); +}; + +using UnownedAllocator = detail::AllocatorImpl>; + +namespace detail { +namespace binding_utils { +// Bring these out of template +std::vector GetOutputNamesHelper(const OrtIoBinding* binding, OrtAllocator*); +std::vector GetOutputValuesHelper(const OrtIoBinding* binding, OrtAllocator*); +} // namespace binding_utils + +template +struct ConstIoBindingImpl : Base { + using B = Base; + using B::B; + + std::vector GetOutputNames() const; + std::vector GetOutputNames(OrtAllocator*) const; + std::vector GetOutputValues() const; + std::vector GetOutputValues(OrtAllocator*) const; +}; + +template +struct IoBindingImpl : ConstIoBindingImpl { + using B = ConstIoBindingImpl; + using B::B; + + void BindInput(const char* name, const Value&); + void BindOutput(const char* name, const Value&); + void BindOutput(const char* name, const OrtMemoryInfo*); + void ClearBoundInputs(); + void ClearBoundOutputs(); + void SynchronizeInputs(); + void SynchronizeOutputs(); +}; + +} // namespace detail + +using ConstIoBinding = detail::ConstIoBindingImpl>; +using UnownedIoBinding = detail::IoBindingImpl>; + +/** \brief Wrapper around ::OrtIoBinding + * + */ +struct IoBinding : detail::IoBindingImpl { + explicit IoBinding(std::nullptr_t) {} ///< Create an empty object for convenience. Sometimes, we want to initialize members later. + explicit IoBinding(Session& session); + ConstIoBinding GetConst() const { return ConstIoBinding{this->p_}; } + UnownedIoBinding GetUnowned() const { return UnownedIoBinding{this->p_}; } +}; + +/*! \struct Ort::ArenaCfg + * \brief it is a structure that represents the configuration of an arena based allocator + * \details Please see docs/C_API.md for details + */ +struct ArenaCfg : detail::Base { + explicit ArenaCfg(std::nullptr_t) {} ///< Create an empty ArenaCfg object, must be assigned a valid one to be used + /** + * Wraps OrtApi::CreateArenaCfg + * \param max_mem - use 0 to allow ORT to choose the default + * \param arena_extend_strategy - use -1 to allow ORT to choose the default, 0 = kNextPowerOfTwo, 1 = kSameAsRequested + * \param initial_chunk_size_bytes - use -1 to allow ORT to choose the default + * \param max_dead_bytes_per_chunk - use -1 to allow ORT to choose the default + * See docs/C_API.md for details on what the following parameters mean and how to choose these values + */ + ArenaCfg(size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, int max_dead_bytes_per_chunk); +}; + +// +// Custom OPs (only needed to implement custom OPs) +// + +/// +/// This struct provides life time management for custom op attribute +/// +struct OpAttr : detail::Base { + OpAttr(const char* name, const void* data, int len, OrtOpAttrType type); +}; + +/** + * Macro that logs a message using the provided logger. Throws an exception if OrtApi::Logger_LogMessage fails. + * Example: ORT_CXX_LOG(logger, ORT_LOGGING_LEVEL_INFO, "Log a message"); + * + * \param logger The Ort::Logger instance to use. Must be a value or reference. + * \param message_severity The logging severity level of the message. + * \param message A null-terminated UTF-8 message to log. + */ +#define ORT_CXX_LOG(logger, message_severity, message) \ + do { \ + if (message_severity >= logger.GetLoggingSeverityLevel()) { \ + Ort::ThrowOnError(logger.LogMessage(message_severity, ORT_FILE, __LINE__, \ + static_cast(__FUNCTION__), message)); \ + } \ + } while (false) + +/** + * Macro that logs a message using the provided logger. Can be used in noexcept code since errors are silently ignored. + * Example: ORT_CXX_LOG_NOEXCEPT(logger, ORT_LOGGING_LEVEL_INFO, "Log a message"); + * + * \param logger The Ort::Logger instance to use. Must be a value or reference. + * \param message_severity The logging severity level of the message. + * \param message A null-terminated UTF-8 message to log. + */ +#define ORT_CXX_LOG_NOEXCEPT(logger, message_severity, message) \ + do { \ + if (message_severity >= logger.GetLoggingSeverityLevel()) { \ + static_cast(logger.LogMessage(message_severity, ORT_FILE, __LINE__, \ + static_cast(__FUNCTION__), message)); \ + } \ + } while (false) + +/** + * Macro that logs a printf-like formatted message using the provided logger. Throws an exception if + * OrtApi::Logger_LogMessage fails or if a formatting error occurs. + * Example: ORT_CXX_LOGF(logger, ORT_LOGGING_LEVEL_INFO, "Log an int: %d", 12); + * + * \param logger The Ort::Logger instance to use. Must be a value or reference. + * \param message_severity The logging severity level of the message. + * \param format A null-terminated UTF-8 format string forwarded to a printf-like function. + * Refer to https://en.cppreference.com/w/cpp/io/c/fprintf for information on valid formats. + * \param ... Zero or more variadic arguments referenced by the format string. + */ +#define ORT_CXX_LOGF(logger, message_severity, /*format,*/...) \ + do { \ + if (message_severity >= logger.GetLoggingSeverityLevel()) { \ + Ort::ThrowOnError(logger.LogFormattedMessage(message_severity, ORT_FILE, __LINE__, \ + static_cast(__FUNCTION__), __VA_ARGS__)); \ + } \ + } while (false) + +/** + * Macro that logs a printf-like formatted message using the provided logger. Can be used in noexcept code since errors + * are silently ignored. + * Example: ORT_CXX_LOGF_NOEXCEPT(logger, ORT_LOGGING_LEVEL_INFO, "Log an int: %d", 12); + * + * \param logger The Ort::Logger instance to use. Must be a value or reference. + * \param message_severity The logging severity level of the message. + * \param format A null-terminated UTF-8 format string forwarded to a printf-like function. + * Refer to https://en.cppreference.com/w/cpp/io/c/fprintf for information on valid formats. + * \param ... Zero or more variadic arguments referenced by the format string. + */ +#define ORT_CXX_LOGF_NOEXCEPT(logger, message_severity, /*format,*/...) \ + do { \ + if (message_severity >= logger.GetLoggingSeverityLevel()) { \ + static_cast(logger.LogFormattedMessage(message_severity, ORT_FILE, __LINE__, \ + static_cast(__FUNCTION__), __VA_ARGS__)); \ + } \ + } while (false) + +/// +/// This class represents an ONNX Runtime logger that can be used to log information with an +/// associated severity level and source code location (file path, line number, function name). +/// +/// A Logger can be obtained from within custom operators by calling Ort::KernelInfo::GetLogger(). +/// Instances of Ort::Logger are the size of two pointers and can be passed by value. +/// +/// Use the ORT_CXX_LOG macros to ensure the source code location is set properly from the callsite +/// and to take advantage of a cached logging severity level that can bypass calls to the underlying C API. +/// +struct Logger { + /** + * Creates an empty Ort::Logger. Must be initialized from a valid Ort::Logger before use. + */ + Logger() = default; + + /** + * Creates an empty Ort::Logger. Must be initialized from a valid Ort::Logger before use. + */ + explicit Logger(std::nullptr_t) {} + + /** + * Creates a logger from an ::OrtLogger instance. Caches the logger's current severity level by calling + * OrtApi::Logger_GetLoggingSeverityLevel. Throws an exception if OrtApi::Logger_GetLoggingSeverityLevel fails. + * + * \param logger The ::OrtLogger to wrap. + */ + explicit Logger(const OrtLogger* logger); + + ~Logger() = default; + + Logger(const Logger&) = default; + Logger& operator=(const Logger&) = default; + + Logger(Logger&& v) noexcept = default; + Logger& operator=(Logger&& v) noexcept = default; + + /** + * Returns the logger's current severity level from the cached member. + * + * \return The current ::OrtLoggingLevel. + */ + OrtLoggingLevel GetLoggingSeverityLevel() const noexcept; + + /** + * Logs the provided message via OrtApi::Logger_LogMessage. Use the ORT_CXX_LOG or ORT_CXX_LOG_NOEXCEPT + * macros to properly set the source code location and to use the cached severity level to potentially bypass + * calls to the underlying C API. + * + * \param log_severity_level The message's logging severity level. + * \param file_path The filepath of the file in which the message is logged. Usually the value of ORT_FILE. + * \param line_number The file line number in which the message is logged. Usually the value of __LINE__. + * \param func_name The name of the function in which the message is logged. Usually the value of __FUNCTION__. + * \param message The message to log. + * \return A Ort::Status value to indicate error or success. + */ + Status LogMessage(OrtLoggingLevel log_severity_level, const ORTCHAR_T* file_path, int line_number, + const char* func_name, const char* message) const noexcept; + + /** + * Logs a printf-like formatted message via OrtApi::Logger_LogMessage. Use the ORT_CXX_LOGF or ORT_CXX_LOGF_NOEXCEPT + * macros to properly set the source code location and to use the cached severity level to potentially bypass + * calls to the underlying C API. Returns an error status if a formatting error occurs. + * + * \param log_severity_level The message's logging severity level. + * \param file_path The filepath of the file in which the message is logged. Usually the value of ORT_FILE. + * \param line_number The file line number in which the message is logged. Usually the value of __LINE__. + * \param func_name The name of the function in which the message is logged. Usually the value of __FUNCTION__. + * \param format A null-terminated UTF-8 format string forwarded to a printf-like function. + * Refer to https://en.cppreference.com/w/cpp/io/c/fprintf for information on valid formats. + * \param args Zero or more variadic arguments referenced by the format string. + * \return A Ort::Status value to indicate error or success. + */ + template + Status LogFormattedMessage(OrtLoggingLevel log_severity_level, const ORTCHAR_T* file_path, int line_number, + const char* func_name, const char* format, Args&&... args) const noexcept; + + private: + const OrtLogger* logger_{}; + OrtLoggingLevel cached_severity_level_{}; +}; + +/// +/// This class wraps a raw pointer OrtKernelContext* that is being passed +/// to the custom kernel Compute() method. Use it to safely access context +/// attributes, input and output parameters with exception safety guarantees. +/// See usage example in onnxruntime/test/testdata/custom_op_library/custom_op_library.cc +/// +struct KernelContext { + explicit KernelContext(OrtKernelContext* context); + size_t GetInputCount() const; + size_t GetOutputCount() const; + // If input is optional and is not present, the method returns en empty ConstValue + // which can be compared to nullptr. + ConstValue GetInput(size_t index) const; + // If outout is optional and is not present, the method returns en empty UnownedValue + // which can be compared to nullptr. + UnownedValue GetOutput(size_t index, const int64_t* dim_values, size_t dim_count) const; + UnownedValue GetOutput(size_t index, const std::vector& dims) const; + void* GetGPUComputeStream() const; + Logger GetLogger() const; + OrtAllocator* GetAllocator(const OrtMemoryInfo& memory_info) const; + OrtKernelContext* GetOrtKernelContext() const { return ctx_; } + void ParallelFor(void (*fn)(void*, size_t), size_t total, size_t num_batch, void* usr_data) const; + + private: + OrtKernelContext* ctx_; +}; + +struct KernelInfo; + +namespace detail { +namespace attr_utils { +void GetAttr(const OrtKernelInfo* p, const char* name, float&); +void GetAttr(const OrtKernelInfo* p, const char* name, int64_t&); +void GetAttr(const OrtKernelInfo* p, const char* name, std::string&); +void GetAttrs(const OrtKernelInfo* p, const char* name, std::vector&); +void GetAttrs(const OrtKernelInfo* p, const char* name, std::vector&); +} // namespace attr_utils + +template +struct KernelInfoImpl : Base { + using B = Base; + using B::B; + + KernelInfo Copy() const; + + template // R is only implemented for float, int64_t, and string + R GetAttribute(const char* name) const { + R val; + attr_utils::GetAttr(this->p_, name, val); + return val; + } + + template // R is only implemented for std::vector, std::vector + std::vector GetAttributes(const char* name) const { + std::vector result; + attr_utils::GetAttrs(this->p_, name, result); + return result; + } + + Value GetTensorAttribute(const char* name, OrtAllocator* allocator) const; + + size_t GetInputCount() const; + size_t GetOutputCount() const; + + std::string GetInputName(size_t index) const; + std::string GetOutputName(size_t index) const; + + TypeInfo GetInputTypeInfo(size_t index) const; + TypeInfo GetOutputTypeInfo(size_t index) const; + + ConstValue GetTensorConstantInput(size_t index, int* is_constant) const; + + std::string GetNodeName() const; + Logger GetLogger() const; +}; + +} // namespace detail + +using ConstKernelInfo = detail::KernelInfoImpl>; + +/// +/// This struct owns the OrtKernInfo* pointer when a copy is made. +/// For convenient wrapping of OrtKernelInfo* passed to kernel constructor +/// and query attributes, warp the pointer with Ort::Unowned instance +/// so it does not destroy the pointer the kernel does not own. +/// +struct KernelInfo : detail::KernelInfoImpl { + explicit KernelInfo(std::nullptr_t) {} ///< Create an empty instance to initialize later + explicit KernelInfo(OrtKernelInfo* info); ///< Take ownership of the instance + ConstKernelInfo GetConst() const { return ConstKernelInfo{this->p_}; } +}; + +/// +/// Create and own custom defined operation. +/// +struct Op : detail::Base { + explicit Op(std::nullptr_t) {} ///< Create an empty Operator object, must be assigned a valid one to be used + + explicit Op(OrtOp*); ///< Take ownership of the OrtOp + + static Op Create(const OrtKernelInfo* info, const char* op_name, const char* domain, + int version, const char** type_constraint_names, + const ONNXTensorElementDataType* type_constraint_values, + size_t type_constraint_count, + const OpAttr* attr_values, + size_t attr_count, + size_t input_count, size_t output_count); + + void Invoke(const OrtKernelContext* context, + const Value* input_values, + size_t input_count, + Value* output_values, + size_t output_count); + + // For easier refactoring + void Invoke(const OrtKernelContext* context, + const OrtValue* const* input_values, + size_t input_count, + OrtValue* const* output_values, + size_t output_count); +}; + +/// +/// Provide access to per-node attributes and input shapes, so one could compute and set output shapes. +/// +struct ShapeInferContext { + struct SymbolicInteger { + SymbolicInteger(int64_t i) : i_(i), is_int_(true) {}; + SymbolicInteger(const char* s) : s_(s), is_int_(false) {}; + SymbolicInteger(const SymbolicInteger&) = default; + SymbolicInteger(SymbolicInteger&&) = default; + + SymbolicInteger& operator=(const SymbolicInteger&) = default; + SymbolicInteger& operator=(SymbolicInteger&&) = default; + + bool operator==(const SymbolicInteger& dim) const { + if (is_int_ == dim.is_int_) { + if (is_int_) { + return i_ == dim.i_; + } else { + return std::string{s_} == std::string{dim.s_}; + } + } + return false; + } + + bool IsInt() const { return is_int_; } + int64_t AsInt() const { return i_; } + const char* AsSym() const { return s_; } + + static constexpr int INVALID_INT_DIM = -2; + + private: + union { + int64_t i_; + const char* s_; + }; + bool is_int_; + }; + + using Shape = std::vector; + + ShapeInferContext(const OrtApi* ort_api, OrtShapeInferContext* ctx); + + const Shape& GetInputShape(size_t indice) const { return input_shapes_.at(indice); } + + size_t GetInputCount() const { return input_shapes_.size(); } + + Status SetOutputShape(size_t indice, const Shape& shape, ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT); + + int64_t GetAttrInt(const char* attr_name); + + using Ints = std::vector; + Ints GetAttrInts(const char* attr_name); + + float GetAttrFloat(const char* attr_name); + + using Floats = std::vector; + Floats GetAttrFloats(const char* attr_name); + + std::string GetAttrString(const char* attr_name); + + using Strings = std::vector; + Strings GetAttrStrings(const char* attr_name); + + private: + const OrtOpAttr* GetAttrHdl(const char* attr_name) const; + const OrtApi* ort_api_; + OrtShapeInferContext* ctx_; + std::vector input_shapes_; +}; + +using ShapeInferFn = Ort::Status (*)(Ort::ShapeInferContext&); + +#define MAX_CUSTOM_OP_END_VER (1UL << 31) - 1 + +template +struct CustomOpBase : OrtCustomOp { + CustomOpBase() { + OrtCustomOp::version = ORT_API_VERSION; + OrtCustomOp::GetName = [](const OrtCustomOp* this_) { return static_cast(this_)->GetName(); }; + + OrtCustomOp::GetExecutionProviderType = [](const OrtCustomOp* this_) { return static_cast(this_)->GetExecutionProviderType(); }; + + OrtCustomOp::GetInputTypeCount = [](const OrtCustomOp* this_) { return static_cast(this_)->GetInputTypeCount(); }; + OrtCustomOp::GetInputType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputType(index); }; + OrtCustomOp::GetInputMemoryType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputMemoryType(index); }; + + OrtCustomOp::GetOutputTypeCount = [](const OrtCustomOp* this_) { return static_cast(this_)->GetOutputTypeCount(); }; + OrtCustomOp::GetOutputType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetOutputType(index); }; + +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(push) +#pragma warning(disable : 26409) +#endif + OrtCustomOp::KernelDestroy = [](void* op_kernel) { delete static_cast(op_kernel); }; +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(pop) +#endif + OrtCustomOp::GetInputCharacteristic = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputCharacteristic(index); }; + OrtCustomOp::GetOutputCharacteristic = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetOutputCharacteristic(index); }; + + OrtCustomOp::GetVariadicInputMinArity = [](const OrtCustomOp* this_) { return static_cast(this_)->GetVariadicInputMinArity(); }; + OrtCustomOp::GetVariadicInputHomogeneity = [](const OrtCustomOp* this_) { return static_cast(static_cast(this_)->GetVariadicInputHomogeneity()); }; + OrtCustomOp::GetVariadicOutputMinArity = [](const OrtCustomOp* this_) { return static_cast(this_)->GetVariadicOutputMinArity(); }; + OrtCustomOp::GetVariadicOutputHomogeneity = [](const OrtCustomOp* this_) { return static_cast(static_cast(this_)->GetVariadicOutputHomogeneity()); }; +#ifdef __cpp_if_constexpr + if constexpr (WithStatus) { +#else + if (WithStatus) { +#endif + OrtCustomOp::CreateKernelV2 = [](const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info, void** op_kernel) -> OrtStatusPtr { + return static_cast(this_)->CreateKernelV2(*api, info, op_kernel); + }; + OrtCustomOp::KernelComputeV2 = [](void* op_kernel, OrtKernelContext* context) -> OrtStatusPtr { + return static_cast(op_kernel)->ComputeV2(context); + }; + } else { + OrtCustomOp::CreateKernelV2 = nullptr; + OrtCustomOp::KernelComputeV2 = nullptr; + + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info) { return static_cast(this_)->CreateKernel(*api, info); }; + OrtCustomOp::KernelCompute = [](void* op_kernel, OrtKernelContext* context) { + static_cast(op_kernel)->Compute(context); + }; + } + + SetShapeInferFn(0); + + OrtCustomOp::GetStartVersion = [](const OrtCustomOp* this_) { + return static_cast(this_)->start_ver_; + }; + + OrtCustomOp::GetEndVersion = [](const OrtCustomOp* this_) { + return static_cast(this_)->end_ver_; + }; + + OrtCustomOp::GetMayInplace = nullptr; + OrtCustomOp::ReleaseMayInplace = nullptr; + OrtCustomOp::GetAliasMap = nullptr; + OrtCustomOp::ReleaseAliasMap = nullptr; + } + + // Default implementation of GetExecutionProviderType that returns nullptr to default to the CPU provider + const char* GetExecutionProviderType() const { return nullptr; } + + // Default implementations of GetInputCharacteristic() and GetOutputCharacteristic() below + // (inputs and outputs are required by default) + OrtCustomOpInputOutputCharacteristic GetInputCharacteristic(size_t /*index*/) const { + return OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_REQUIRED; + } + + OrtCustomOpInputOutputCharacteristic GetOutputCharacteristic(size_t /*index*/) const { + return OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_REQUIRED; + } + + // Default implemention of GetInputMemoryType() that returns OrtMemTypeDefault + OrtMemType GetInputMemoryType(size_t /*index*/) const { + return OrtMemTypeDefault; + } + + // Default implementation of GetVariadicInputMinArity() returns 1 to specify that a variadic input + // should expect at least 1 argument. + int GetVariadicInputMinArity() const { + return 1; + } + + // Default implementation of GetVariadicInputHomegeneity() returns true to specify that all arguments + // to a variadic input should be of the same type. + bool GetVariadicInputHomogeneity() const { + return true; + } + + // Default implementation of GetVariadicOutputMinArity() returns 1 to specify that a variadic output + // should produce at least 1 output value. + int GetVariadicOutputMinArity() const { + return 1; + } + + // Default implementation of GetVariadicOutputHomegeneity() returns true to specify that all output values + // produced by a variadic output should be of the same type. + bool GetVariadicOutputHomogeneity() const { + return true; + } + + // Declare list of session config entries used by this Custom Op. + // Implement this function in order to get configs from CustomOpBase::GetSessionConfigs(). + // This default implementation returns an empty vector of config entries. + std::vector GetSessionConfigKeys() const { + return std::vector{}; + } + + template + decltype(&C::InferOutputShape) SetShapeInferFn(decltype(&C::InferOutputShape)) { + OrtCustomOp::InferOutputShapeFn = [](const OrtCustomOp*, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr { + ShapeInferContext ctx(&GetApi(), ort_ctx); + return C::InferOutputShape(ctx); + }; + return {}; + } + + template + void SetShapeInferFn(...) { + OrtCustomOp::InferOutputShapeFn = {}; + } + + protected: + // Helper function that returns a map of session config entries specified by CustomOpBase::GetSessionConfigKeys. + void GetSessionConfigs(std::unordered_map& out, ConstSessionOptions options) const; + + int start_ver_ = 1; + int end_ver_ = MAX_CUSTOM_OP_END_VER; +}; + +} // namespace Ort + +#include "onnxruntime_cxx_inline.h" diff --git a/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_cxx_inline.h b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_cxx_inline.h new file mode 100644 index 00000000..c38da3e1 --- /dev/null +++ b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_cxx_inline.h @@ -0,0 +1,2170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// Do not include this file directly. Please include "onnxruntime_cxx_api.h" instead. +// If interested in trying out features of the new experimental C++ API, include "experimental_onnxruntime_cxx_api.h" instead. +// +// These are the inline implementations of the C++ header APIs. They're in this separate file as to not clutter +// the main C++ file with implementation details. + +#include +#include +#include +#include + +// Convert OrtStatus to Ort::Status and return +// instead of throwing +#define ORT_CXX_RETURN_ON_API_FAIL(expression) \ + { \ + auto ort_status = (expression); \ + if (ort_status) { \ + return Ort::Status(ort_status); \ + } \ + } + +#ifdef __cpp_if_constexpr +#define ORT_CXX_IF_CONSTEXPR if constexpr +#else +#define ORT_CXX_IF_CONSTEXPR if +#endif + +namespace Ort { + +namespace detail { +inline void ThrowStatus(const Status& st) { + std::string error_message = st.GetErrorMessage(); + OrtErrorCode error_code = st.GetErrorCode(); + ORT_CXX_API_THROW(std::move(error_message), error_code); +} +} // namespace detail + +inline void ThrowOnError(OrtStatus* ort_status) { + if (ort_status) { + Ort::Status st(ort_status); + detail::ThrowStatus(st); + } +} + +inline void ThrowOnError(const Status& st) { + if (st) { + detail::ThrowStatus(st); + } +} + +inline Status::Status(OrtStatus* status) noexcept : Base{status} { +} + +inline Status::Status(const std::exception& e) noexcept { + p_ = GetApi().CreateStatus(ORT_FAIL, e.what()); +} + +inline Status::Status(const Exception& e) noexcept { + p_ = GetApi().CreateStatus(e.GetOrtErrorCode(), e.what()); +} + +inline Status::Status(const char* message, OrtErrorCode code) noexcept { + p_ = GetApi().CreateStatus(code, message); +} + +inline std::string Status::GetErrorMessage() const { + std::string message(GetApi().GetErrorMessage(p_)); + return message; +} + +inline OrtErrorCode Status::GetErrorCode() const { + return GetApi().GetErrorCode(p_); +} + +inline bool Status::IsOK() const noexcept { + return (p_ == nullptr); +} + +// This template converts a C++ type into it's ONNXTensorElementDataType +template +struct TypeToTensorType; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL; +}; + +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ; +}; + +inline bool BFloat16_t::operator==(const BFloat16_t& rhs) const noexcept { + if (IsNaN() || rhs.IsNaN()) { + // IEEE defines that NaN is not equal to anything, including itself. + return false; + } + return val == rhs.val; +} + +inline bool BFloat16_t::operator<(const BFloat16_t& rhs) const noexcept { + if (IsNaN() || rhs.IsNaN()) { + // IEEE defines that NaN is unordered with respect to everything, including itself. + return false; + } + + const bool left_is_negative = IsNegative(); + if (left_is_negative != rhs.IsNegative()) { + // When the signs of left and right differ, we know that left is less than right if it is + // the negative value. The exception to this is if both values are zero, in which case IEEE + // says they should be equal, even if the signs differ. + return left_is_negative && !AreZero(*this, rhs); + } + return (val != rhs.val) && ((val < rhs.val) ^ left_is_negative); +} + +inline MemoryAllocation::MemoryAllocation(OrtAllocator* allocator, void* p, size_t size) + : allocator_(allocator), p_(p), size_(size) { +} + +inline MemoryAllocation::~MemoryAllocation() { + if (p_ != nullptr) { + // We do not throw out of destructor + auto ret = GetApi().AllocatorFree(allocator_, p_); + static_cast(ret); + } +} + +inline MemoryAllocation::MemoryAllocation(MemoryAllocation&& o) noexcept : allocator_(nullptr), p_(nullptr), size_(0) { + *this = std::move(o); +} + +inline MemoryAllocation& MemoryAllocation::operator=(MemoryAllocation&& o) noexcept { + OrtAllocator* alloc = nullptr; + void* p = nullptr; + size_t sz = 0; + + // Swap out this + std::swap(alloc, allocator_); + std::swap(p, p_); + std::swap(sz, size_); + + // Swap with incoming + std::swap(allocator_, o.allocator_); + std::swap(p_, o.p_); + std::swap(size_, o.size_); + + // Destroy this instance if needed + MemoryAllocation this_alloc(alloc, p, sz); + return *this; +} + +namespace detail { + +template +inline void* AllocatorImpl::Alloc(size_t size) { + void* out; + ThrowOnError(GetApi().AllocatorAlloc(this->p_, size, &out)); + return out; +} + +template +inline MemoryAllocation AllocatorImpl::GetAllocation(size_t size) { + void* out; + ThrowOnError(GetApi().AllocatorAlloc(this->p_, size, &out)); + MemoryAllocation result(this->p_, out, size); + return result; +} + +template +inline void AllocatorImpl::Free(void* p) { + ThrowOnError(GetApi().AllocatorFree(this->p_, p)); +} + +template +inline ConstMemoryInfo AllocatorImpl::GetInfo() const { + const OrtMemoryInfo* out; + ThrowOnError(GetApi().AllocatorGetInfo(this->p_, &out)); + return ConstMemoryInfo{out}; +} + +} // namespace detail + +inline AllocatorWithDefaultOptions::AllocatorWithDefaultOptions() { + ThrowOnError(GetApi().GetAllocatorWithDefaultOptions(&this->p_)); +} + +inline Allocator::Allocator(const Session& sess, const OrtMemoryInfo* mem_info) { + ThrowOnError(GetApi().CreateAllocator(sess, mem_info, &this->p_)); +} + +namespace detail { + +template +inline std::string MemoryInfoImpl::GetAllocatorName() const { + const char* name = nullptr; + ThrowOnError(GetApi().MemoryInfoGetName(this->p_, &name)); + return std::string(name); +} + +template +inline OrtAllocatorType MemoryInfoImpl::GetAllocatorType() const { + OrtAllocatorType type; + ThrowOnError(GetApi().MemoryInfoGetType(this->p_, &type)); + return type; +} + +template +inline int MemoryInfoImpl::GetDeviceId() const { + int id = 0; + ThrowOnError(GetApi().MemoryInfoGetId(this->p_, &id)); + return id; +} + +template +inline OrtMemoryInfoDeviceType MemoryInfoImpl::GetDeviceType() const { + OrtMemoryInfoDeviceType type; + GetApi().MemoryInfoGetDeviceType(this->p_, &type); + return type; +} + +template +inline OrtMemType MemoryInfoImpl::GetMemoryType() const { + OrtMemType type; + ThrowOnError(GetApi().MemoryInfoGetMemType(this->p_, &type)); + return type; +} + +template +template +inline bool MemoryInfoImpl::operator==(const MemoryInfoImpl& o) const { + int comp_result = 0; + ThrowOnError(Ort::GetApi().CompareMemoryInfo(this->p_, o, &comp_result)); + return comp_result == 0; +} + +} // namespace detail + +inline MemoryInfo MemoryInfo::CreateCpu(OrtAllocatorType type, OrtMemType mem_type) { + OrtMemoryInfo* p; + ThrowOnError(GetApi().CreateCpuMemoryInfo(type, mem_type, &p)); + return MemoryInfo(p); +} + +inline MemoryInfo::MemoryInfo(const char* name, OrtAllocatorType type, int id, OrtMemType mem_type) { + ThrowOnError(GetApi().CreateMemoryInfo(name, type, id, mem_type, &this->p_)); +} + +namespace detail { +template +inline std::vector ConstIoBindingImpl::GetOutputNames() const { + AllocatorWithDefaultOptions allocator; + return binding_utils::GetOutputNamesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputNames(OrtAllocator* allocator) const { + return binding_utils::GetOutputNamesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputValues() const { + AllocatorWithDefaultOptions allocator; + return binding_utils::GetOutputValuesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputValues(OrtAllocator* allocator) const { + return binding_utils::GetOutputValuesHelper(this->p_, allocator); +} + +template +inline void IoBindingImpl::BindInput(const char* name, const Value& value) { + ThrowOnError(GetApi().BindInput(this->p_, name, value)); +} + +template +inline void IoBindingImpl::BindOutput(const char* name, const Value& value) { + ThrowOnError(GetApi().BindOutput(this->p_, name, value)); +} + +template +inline void IoBindingImpl::BindOutput(const char* name, const OrtMemoryInfo* mem_info) { + ThrowOnError(GetApi().BindOutputToDevice(this->p_, name, mem_info)); +} + +template +inline void IoBindingImpl::ClearBoundInputs() { + GetApi().ClearBoundInputs(this->p_); +} + +template +inline void IoBindingImpl::ClearBoundOutputs() { + GetApi().ClearBoundOutputs(this->p_); +} + +template +inline void IoBindingImpl::SynchronizeInputs() { + ThrowOnError(GetApi().SynchronizeBoundInputs(this->p_)); +} + +template +inline void IoBindingImpl::SynchronizeOutputs() { + ThrowOnError(GetApi().SynchronizeBoundOutputs(this->p_)); +} + +namespace binding_utils { +inline std::vector GetOutputNamesHelper(const OrtIoBinding* binding, OrtAllocator* allocator) { + std::vector result; + auto free_fn = detail::AllocatedFree(allocator); + using Ptr = std::unique_ptr; + + char* buffer = nullptr; + size_t* lengths = nullptr; + size_t count = 0; + ThrowOnError(GetApi().GetBoundOutputNames(binding, allocator, &buffer, &lengths, &count)); + + if (count == 0) { + return result; + } + + Ptr buffer_g(buffer, free_fn); + Ptr lengths_g(lengths, free_fn); + + result.reserve(count); + for (size_t i = 0; i < count; ++i) { + auto sz = *lengths; + result.emplace_back(buffer, sz); + buffer += sz; + ++lengths; + } + return result; +} + +inline std::vector GetOutputValuesHelper(const OrtIoBinding* binding, OrtAllocator* allocator) { + std::vector result; + size_t owned = 0; + size_t output_count = 0; + // Lambda to release the buffer when no longer needed and + // make sure that we destroy all instances on exception + auto free_fn = [&owned, &output_count, allocator](OrtValue** buffer) { + if (buffer) { + while (owned < output_count) { + auto* p = buffer + owned++; + GetApi().ReleaseValue(*p); + } + allocator->Free(allocator, buffer); + } + }; + using Ptr = std::unique_ptr; + + OrtValue** output_buffer = nullptr; + ThrowOnError(GetApi().GetBoundOutputValues(binding, allocator, &output_buffer, &output_count)); + if (output_count == 0) { + return result; + } + + Ptr buffer_g(output_buffer, free_fn); + + result.reserve(output_count); + for (size_t i = 0; i < output_count; ++i) { + result.emplace_back(output_buffer[i]); + ++owned; + } + return result; +} + +} // namespace binding_utils +} // namespace detail + +inline IoBinding::IoBinding(Session& session) { + ThrowOnError(GetApi().CreateIoBinding(session, &this->p_)); +} + +inline ArenaCfg::ArenaCfg(size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, int max_dead_bytes_per_chunk) { + ThrowOnError(GetApi().CreateArenaCfg(max_mem, arena_extend_strategy, initial_chunk_size_bytes, max_dead_bytes_per_chunk, &p_)); +} + +inline ThreadingOptions::ThreadingOptions() { + ThrowOnError(GetApi().CreateThreadingOptions(&p_)); +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalIntraOpNumThreads(int intra_op_num_threads) { + ThrowOnError(GetApi().SetGlobalIntraOpNumThreads(p_, intra_op_num_threads)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalInterOpNumThreads(int inter_op_num_threads) { + ThrowOnError(GetApi().SetGlobalInterOpNumThreads(p_, inter_op_num_threads)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalSpinControl(int allow_spinning) { + ThrowOnError(GetApi().SetGlobalSpinControl(p_, allow_spinning)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalDenormalAsZero() { + ThrowOnError(GetApi().SetGlobalDenormalAsZero(p_)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn) { + ThrowOnError(GetApi().SetGlobalCustomCreateThreadFn(p_, ort_custom_create_thread_fn)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomThreadCreationOptions(void* ort_custom_thread_creation_options) { + ThrowOnError(GetApi().SetGlobalCustomThreadCreationOptions(p_, ort_custom_thread_creation_options)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn) { + ThrowOnError(GetApi().SetGlobalCustomJoinThreadFn(p_, ort_custom_join_thread_fn)); + return *this; +} + +inline Env::Env(OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnv(logging_level, logid, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(OrtLoggingLevel logging_level, const char* logid, OrtLoggingFunction logging_function, void* logger_param) { + ThrowOnError(GetApi().CreateEnvWithCustomLogger(logging_function, logger_param, logging_level, logid, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(const OrtThreadingOptions* tp_options, OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnvWithGlobalThreadPools(logging_level, logid, tp_options, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(const OrtThreadingOptions* tp_options, OrtLoggingFunction logging_function, void* logger_param, + OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnvWithCustomLoggerAndGlobalThreadPools(logging_function, logger_param, logging_level, logid, tp_options, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env& Env::EnableTelemetryEvents() { + ThrowOnError(GetApi().EnableTelemetryEvents(p_)); + return *this; +} + +inline Env& Env::DisableTelemetryEvents() { + ThrowOnError(GetApi().DisableTelemetryEvents(p_)); + return *this; +} + +inline Env& Env::UpdateEnvWithCustomLogLevel(OrtLoggingLevel log_severity_level) { + ThrowOnError(GetApi().UpdateEnvWithCustomLogLevel(p_, log_severity_level)); + return *this; +} + +inline Env& Env::CreateAndRegisterAllocator(const OrtMemoryInfo* mem_info, const OrtArenaCfg* arena_cfg) { + ThrowOnError(GetApi().CreateAndRegisterAllocator(p_, mem_info, arena_cfg)); + return *this; +} + +inline Env& Env::CreateAndRegisterAllocatorV2(const std::string& provider_type, const OrtMemoryInfo* mem_info, const std::unordered_map& options, const OrtArenaCfg* arena_cfg) { + std::vector keys, values; + auto num_entries = options.size(); + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + for (const auto& entry : options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + ThrowOnError(GetApi().CreateAndRegisterAllocatorV2(p_, provider_type.c_str(), mem_info, arena_cfg, keys.data(), values.data(), num_entries)); + return *this; +} + +inline CustomOpDomain::CustomOpDomain(const char* domain) { + ThrowOnError(GetApi().CreateCustomOpDomain(domain, &p_)); +} + +inline void CustomOpDomain::Add(const OrtCustomOp* op) { + ThrowOnError(GetApi().CustomOpDomain_Add(p_, op)); +} + +inline LoraAdapter LoraAdapter::CreateLoraAdapter(const std::basic_string& adapter_path, + OrtAllocator* allocator) { + OrtLoraAdapter* p; + ThrowOnError(GetApi().CreateLoraAdapter(adapter_path.c_str(), allocator, &p)); + return LoraAdapter{p}; +} + +inline LoraAdapter LoraAdapter::CreateLoraAdapterFromArray(const void* bytes, size_t num_bytes, + OrtAllocator* allocator) { + OrtLoraAdapter* p; + ThrowOnError(GetApi().CreateLoraAdapterFromArray(bytes, num_bytes, allocator, &p)); + return LoraAdapter{p}; +} + +inline RunOptions::RunOptions() { + ThrowOnError(GetApi().CreateRunOptions(&p_)); +} + +inline RunOptions& RunOptions::SetRunLogVerbosityLevel(int level) { + ThrowOnError(GetApi().RunOptionsSetRunLogVerbosityLevel(p_, level)); + return *this; +} + +inline RunOptions& RunOptions::SetRunLogSeverityLevel(int level) { + ThrowOnError(GetApi().RunOptionsSetRunLogSeverityLevel(p_, level)); + return *this; +} + +inline int RunOptions::GetRunLogVerbosityLevel() const { + int out; + ThrowOnError(GetApi().RunOptionsGetRunLogVerbosityLevel(p_, &out)); + return out; +} + +inline int RunOptions::GetRunLogSeverityLevel() const { + int out; + ThrowOnError(GetApi().RunOptionsGetRunLogSeverityLevel(p_, &out)); + return out; +} + +inline RunOptions& RunOptions::SetRunTag(const char* run_tag) { + ThrowOnError(GetApi().RunOptionsSetRunTag(p_, run_tag)); + return *this; +} + +inline const char* RunOptions::GetRunTag() const { + const char* out; + ThrowOnError(GetApi().RunOptionsGetRunTag(p_, &out)); + return out; +} + +inline RunOptions& RunOptions::AddConfigEntry(const char* config_key, const char* config_value) { + ThrowOnError(GetApi().AddRunConfigEntry(p_, config_key, config_value)); + return *this; +} + +inline RunOptions& RunOptions::SetTerminate() { + ThrowOnError(GetApi().RunOptionsSetTerminate(p_)); + return *this; +} + +inline RunOptions& RunOptions::UnsetTerminate() { + ThrowOnError(GetApi().RunOptionsUnsetTerminate(p_)); + return *this; +} + +inline RunOptions& RunOptions::AddActiveLoraAdapter(const LoraAdapter& adapter) { + ThrowOnError(GetApi().RunOptionsAddActiveLoraAdapter(p_, adapter)); + return *this; +} + +namespace detail { + +template +inline Ort::SessionOptions ConstSessionOptionsImpl::Clone() const { + OrtSessionOptions* out; + ThrowOnError(GetApi().CloneSessionOptions(this->p_, &out)); + return SessionOptions{out}; +} + +template +inline std::string ConstSessionOptionsImpl::GetConfigEntry(const char* config_key) const { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().GetSessionConfigEntry(this->p_, config_key, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().GetSessionConfigEntry(this->p_, config_key, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline bool ConstSessionOptionsImpl::HasConfigEntry(const char* config_key) const { + int out = 0; + Ort::ThrowOnError(GetApi().HasSessionConfigEntry(this->p_, config_key, &out)); + return static_cast(out); +} + +template +inline std::string ConstSessionOptionsImpl::GetConfigEntryOrDefault(const char* config_key, const std::string& def) { + if (!this->HasConfigEntry(config_key)) { + return def; + } + + return this->GetConfigEntry(config_key); +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetIntraOpNumThreads(int intra_op_num_threads) { + ThrowOnError(GetApi().SetIntraOpNumThreads(this->p_, intra_op_num_threads)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetInterOpNumThreads(int inter_op_num_threads) { + ThrowOnError(GetApi().SetInterOpNumThreads(this->p_, inter_op_num_threads)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetGraphOptimizationLevel(GraphOptimizationLevel graph_optimization_level) { + ThrowOnError(GetApi().SetSessionGraphOptimizationLevel(this->p_, graph_optimization_level)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetDeterministicCompute(bool value) { + ThrowOnError(GetApi().SetDeterministicCompute(this->p_, value)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetOptimizedModelFilePath(const ORTCHAR_T* optimized_model_filepath) { + ThrowOnError(GetApi().SetOptimizedModelFilePath(this->p_, optimized_model_filepath)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableProfiling(const ORTCHAR_T* profile_file_prefix) { + ThrowOnError(GetApi().EnableProfiling(this->p_, profile_file_prefix)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableProfiling() { + ThrowOnError(GetApi().DisableProfiling(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableOrtCustomOps() { + ThrowOnError(GetApi().EnableOrtCustomOps(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableMemPattern() { + ThrowOnError(GetApi().EnableMemPattern(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableMemPattern() { + ThrowOnError(GetApi().DisableMemPattern(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableCpuMemArena() { + ThrowOnError(GetApi().EnableCpuMemArena(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableCpuMemArena() { + ThrowOnError(GetApi().DisableCpuMemArena(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetExecutionMode(ExecutionMode execution_mode) { + ThrowOnError(GetApi().SetSessionExecutionMode(this->p_, execution_mode)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetLogId(const char* logid) { + ThrowOnError(GetApi().SetSessionLogId(this->p_, logid)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetLogSeverityLevel(int level) { + ThrowOnError(GetApi().SetSessionLogSeverityLevel(this->p_, level)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::Add(OrtCustomOpDomain* custom_op_domain) { + ThrowOnError(GetApi().AddCustomOpDomain(this->p_, custom_op_domain)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddConfigEntry(const char* config_key, const char* config_value) { + ThrowOnError(GetApi().AddSessionConfigEntry(this->p_, config_key, config_value)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddInitializer(const char* name, const OrtValue* ort_val) { + ThrowOnError(GetApi().AddInitializer(this->p_, name, ort_val)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisablePerSessionThreads() { + ThrowOnError(GetApi().DisablePerSessionThreads(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddExternalInitializers(const std::vector& names, + const std::vector& ort_values) { + const size_t inputs_num = names.size(); + if (inputs_num != ort_values.size()) { + ORT_CXX_API_THROW("Expecting names and ort_values to have the same length", ORT_INVALID_ARGUMENT); + } + std::vector names_ptr; + std::vector ort_values_ptrs; + names_ptr.reserve(inputs_num); + ort_values_ptrs.reserve(inputs_num); + for (size_t i = 0; i < inputs_num; ++i) { + names_ptr.push_back(names[i].c_str()); + ort_values_ptrs.push_back(ort_values[i]); + } + ThrowOnError(GetApi().AddExternalInitializers(this->p_, names_ptr.data(), ort_values_ptrs.data(), inputs_num)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddExternalInitializersFromFilesInMemory(const std::vector>& file_names, + const std::vector& buffer_array, + const std::vector& file_lengths) { + const size_t inputs_num = file_names.size(); + if (inputs_num != buffer_array.size()) { + ORT_CXX_API_THROW("Expecting names and buffer_array to have the same length", ORT_INVALID_ARGUMENT); + } + if (inputs_num != file_lengths.size()) { + ORT_CXX_API_THROW("Expecting names and file_lengths to have the same length", ORT_INVALID_ARGUMENT); + } + std::vector names_ptr; + names_ptr.reserve(inputs_num); + for (size_t i = 0; i < inputs_num; ++i) { + names_ptr.push_back(file_names[i].c_str()); + } + ThrowOnError(GetApi().AddExternalInitializersFromFilesInMemory(this->p_, names_ptr.data(), buffer_array.data(), + file_lengths.data(), inputs_num)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CUDA(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CUDA_V2(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_ROCM(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_TensorRT(const OrtTensorRTProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_TensorRT(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_TensorRT_V2(const OrtTensorRTProviderOptionsV2& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_TensorRT_V2(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_MIGraphX(const OrtMIGraphXProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_MIGraphX(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CANN(const OrtCANNProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CANN(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_Dnnl(const OrtDnnlProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_Dnnl(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider( + const std::string& provider_name, + const std::unordered_map& provider_options) { + auto num_entries = provider_options.size(); + std::vector keys, values; + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + + for (const auto& entry : provider_options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider(this->p_, provider_name.c_str(), + keys.data(), values.data(), num_entries)); + + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn) { + ThrowOnError(GetApi().SessionOptionsSetCustomCreateThreadFn(this->p_, ort_custom_create_thread_fn)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomThreadCreationOptions(void* ort_custom_thread_creation_options) { + ThrowOnError(GetApi().SessionOptionsSetCustomThreadCreationOptions(this->p_, ort_custom_thread_creation_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn) { + ThrowOnError(GetApi().SessionOptionsSetCustomJoinThreadFn(this->p_, ort_custom_join_thread_fn)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_OpenVINO(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_OpenVINO_V2(const std::unordered_map& provider_options) { + auto num_entries = provider_options.size(); + std::vector keys, values; + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + + for (const auto& entry : provider_options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_OpenVINO_V2(this->p_, + keys.data(), values.data(), num_entries)); + + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_VitisAI(const std::unordered_map& provider_options) { + auto num_entries = provider_options.size(); + std::vector keys, values; + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + + for (const auto& entry : provider_options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_VitisAI(this->p_, keys.data(), values.data(), num_entries)); + + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::RegisterCustomOpsLibrary(const ORTCHAR_T* library_name, + const CustomOpConfigs& custom_op_configs) { + // Add custom op config entries before registering the custom op library. Otherwise, the config entries _may_ be ignored by + // the custom op library. + for (const auto& config_iter : custom_op_configs.GetFlattenedConfigs()) { + AddConfigEntry(config_iter.first.c_str(), config_iter.second.c_str()); + } + + ThrowOnError(GetApi().RegisterCustomOpsLibrary_V2(this->p_, library_name)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::RegisterCustomOpsUsingFunction(const char* registration_function_name) { + ThrowOnError(GetApi().RegisterCustomOpsUsingFunction(this->p_, registration_function_name)); + return *this; +} + +/// Session +template +inline size_t ConstSessionImpl::GetInputCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetInputCount(this->p_, &out)); + return out; +} + +template +inline size_t ConstSessionImpl::GetOutputCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetOutputCount(this->p_, &out)); + return out; +} + +template +inline size_t ConstSessionImpl::GetOverridableInitializerCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetOverridableInitializerCount(this->p_, &out)); + return out; +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetInputNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetInputName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetOutputNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetOutputName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetOverridableInitializerNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetOverridableInitializerName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline uint64_t ConstSessionImpl::GetProfilingStartTimeNs() const { + uint64_t out; + ThrowOnError(GetApi().SessionGetProfilingStartTimeNs(this->p_, &out)); + return out; +} + +template +inline ModelMetadata ConstSessionImpl::GetModelMetadata() const { + OrtModelMetadata* out; + ThrowOnError(GetApi().SessionGetModelMetadata(this->p_, &out)); + return ModelMetadata{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetInputTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetInputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetOutputTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetOutputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetOverridableInitializerTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetOverridableInitializerTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline std::vector SessionImpl::Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, size_t output_count) { + std::vector output_values; + output_values.reserve(output_count); + for (size_t i = 0; i < output_count; i++) + output_values.emplace_back(nullptr); + Run(run_options, input_names, input_values, input_count, output_names, output_values.data(), output_count); + return output_values; +} + +template +inline void SessionImpl::Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count) { + static_assert(sizeof(Value) == sizeof(OrtValue*), "Value is really just an array of OrtValue* in memory, so we can reinterpret_cast safely"); + auto ort_input_values = reinterpret_cast(input_values); + auto ort_output_values = reinterpret_cast(output_values); + ThrowOnError(GetApi().Run(this->p_, run_options, input_names, ort_input_values, input_count, output_names, output_count, ort_output_values)); +} + +template +inline void SessionImpl::Run(const RunOptions& run_options, const IoBinding& io_binding) { + ThrowOnError(GetApi().RunWithBinding(this->p_, run_options, io_binding)); +} + +template +inline void SessionImpl::RunAsync(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count, RunAsyncCallbackFn callback, void* user_data) { + auto ort_input_values = reinterpret_cast(input_values); + auto ort_output_values = reinterpret_cast(output_values); + ThrowOnError(GetApi().RunAsync(this->p_, run_options, input_names, + ort_input_values, input_count, output_names, output_count, + ort_output_values, callback, user_data)); +} + +template +inline AllocatedStringPtr SessionImpl::EndProfilingAllocated(OrtAllocator* allocator) { + char* out = nullptr; + ThrowOnError(GetApi().SessionEndProfiling(this->p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline void SessionImpl::SetEpDynamicOptions(const char* const* keys, const char* const* values, size_t kv_len) { + ThrowOnError(GetApi().SetEpDynamicOptions(this->p_, keys, values, kv_len)); +} + +} // namespace detail + +inline SessionOptions::SessionOptions() { + ThrowOnError(GetApi().CreateSessionOptions(&this->p_)); +} + +/// CustomOpConfigs +inline std::string detail::MakeCustomOpConfigEntryKey(const char* custom_op_name, const char* config) { + std::string config_key = "custom_op."; + + config_key += custom_op_name; + config_key += "."; + config_key += config; + + return config_key; +} + +inline CustomOpConfigs& CustomOpConfigs::AddConfig(const char* custom_op_name, const char* config_key, const char* config_value) { + const std::string full_flat_key = detail::MakeCustomOpConfigEntryKey(custom_op_name, config_key); + flat_configs_[full_flat_key] = config_value; + return *this; +} + +inline const std::unordered_map& CustomOpConfigs::GetFlattenedConfigs() const { + return flat_configs_; +} + +inline Session::Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options) { + ThrowOnError(GetApi().CreateSession(env, model_path, options, &this->p_)); +} + +inline Session::Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container) { + ThrowOnError(GetApi().CreateSessionWithPrepackedWeightsContainer(env, model_path, options, prepacked_weights_container, &this->p_)); +} + +inline Session::Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options) { + ThrowOnError(GetApi().CreateSessionFromArray(env, model_data, model_data_length, options, &this->p_)); +} + +inline Session::Session(const Env& env, const void* model_data, size_t model_data_length, + const SessionOptions& options, OrtPrepackedWeightsContainer* prepacked_weights_container) { + ThrowOnError(GetApi().CreateSessionFromArrayWithPrepackedWeightsContainer(env, model_data, model_data_length, options, + prepacked_weights_container, &this->p_)); +} + +inline AllocatedStringPtr ModelMetadata::GetProducerNameAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetProducerName(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetGraphNameAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetGraphName(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetDomainAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetDomain(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr Ort::ModelMetadata::GetDescriptionAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetDescription(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetGraphDescriptionAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetGraphDescription(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::LookupCustomMetadataMapAllocated(const char* key, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataLookupCustomMetadataMap(p_, allocator, key, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline std::vector ModelMetadata::GetCustomMetadataMapKeysAllocated(OrtAllocator* allocator) const { + auto deletor = detail::AllocatedFree(allocator); + std::vector result; + + char** out = nullptr; + int64_t num_keys = 0; + ThrowOnError(GetApi().ModelMetadataGetCustomMetadataMapKeys(p_, allocator, &out, &num_keys)); + if (num_keys <= 0) { + return result; + } + + // array of pointers will be freed + std::unique_ptr array_guard(out, deletor); + // reserve may throw + auto strings_deletor = [&deletor, num_keys](char** out) { for(int64_t i = 0; i < num_keys; ++i) deletor(out[i]); }; + std::unique_ptr strings_guard(out, strings_deletor); + result.reserve(static_cast(num_keys)); + strings_guard.release(); + for (int64_t i = 0; i < num_keys; ++i) { + result.push_back(AllocatedStringPtr(out[i], deletor)); + } + + return result; +} + +inline int64_t ModelMetadata::GetVersion() const { + int64_t out; + ThrowOnError(GetApi().ModelMetadataGetVersion(p_, &out)); + return out; +} + +namespace detail { + +template +inline ONNXTensorElementDataType TensorTypeAndShapeInfoImpl::GetElementType() const { + ONNXTensorElementDataType out; + ThrowOnError(GetApi().GetTensorElementType(this->p_, &out)); + return out; +} + +template +inline size_t TensorTypeAndShapeInfoImpl::GetElementCount() const { + size_t out; + ThrowOnError(GetApi().GetTensorShapeElementCount(this->p_, &out)); + return static_cast(out); +} + +template +inline size_t TensorTypeAndShapeInfoImpl::GetDimensionsCount() const { + size_t out; + ThrowOnError(GetApi().GetDimensionsCount(this->p_, &out)); + return out; +} + +template +inline void TensorTypeAndShapeInfoImpl::GetDimensions(int64_t* values, size_t values_count) const { + ThrowOnError(GetApi().GetDimensions(this->p_, values, values_count)); +} + +template +inline void TensorTypeAndShapeInfoImpl::GetSymbolicDimensions(const char** values, size_t values_count) const { + ThrowOnError(GetApi().GetSymbolicDimensions(this->p_, values, values_count)); +} + +template +inline std::vector TensorTypeAndShapeInfoImpl::GetShape() const { + std::vector out(GetDimensionsCount(), 0); + ThrowOnError(GetApi().GetDimensions(this->p_, out.data(), out.size())); + return out; +} + +template +inline ConstTensorTypeAndShapeInfo TypeInfoImpl::GetTensorTypeAndShapeInfo() const { + const OrtTensorTypeAndShapeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToTensorInfo(this->p_, &out)); + return ConstTensorTypeAndShapeInfo{out}; +} + +template +inline ConstSequenceTypeInfo TypeInfoImpl::GetSequenceTypeInfo() const { + const OrtSequenceTypeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToSequenceTypeInfo(this->p_, &out)); + return ConstSequenceTypeInfo{out}; +} + +template +inline ConstMapTypeInfo TypeInfoImpl::GetMapTypeInfo() const { + const OrtMapTypeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToMapTypeInfo(this->p_, &out)); + return ConstMapTypeInfo{out}; +} + +template +inline ONNXType TypeInfoImpl::GetONNXType() const { + ONNXType out; + ThrowOnError(GetApi().GetOnnxTypeFromTypeInfo(this->p_, &out)); + return out; +} + +template +inline TypeInfo SequenceTypeInfoImpl::GetSequenceElementType() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetSequenceElementType(this->p_, &output)); + return TypeInfo{output}; +} + +template +inline TypeInfo OptionalTypeInfoImpl::GetOptionalElementType() const { + OrtTypeInfo* info; + ThrowOnError(GetApi().GetOptionalContainedTypeInfo(this->p_, &info)); + return TypeInfo{info}; +} + +template +inline ONNXTensorElementDataType MapTypeInfoImpl::GetMapKeyType() const { + ONNXTensorElementDataType out; + ThrowOnError(GetApi().GetMapKeyType(this->p_, &out)); + return out; +} + +template +inline TypeInfo MapTypeInfoImpl::GetMapValueType() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetMapValueType(this->p_, &output)); + return TypeInfo{output}; +} + +template +inline ConstOptionalTypeInfo TypeInfoImpl::GetOptionalTypeInfo() const { + const OrtOptionalTypeInfo* info; + ThrowOnError(GetApi().CastTypeInfoToOptionalTypeInfo(this->p_, &info)); + return ConstOptionalTypeInfo{info}; +} + +} // namespace detail + +namespace detail { + +template +template +inline void ConstValueImpl::GetOpaqueData(const char* domain, const char* type_name, R& out) const { + ThrowOnError(GetApi().GetOpaqueValue(domain, type_name, this->p_, &out, sizeof(R))); +} + +template +inline bool ConstValueImpl::IsTensor() const { + int out; + ThrowOnError(GetApi().IsTensor(this->p_, &out)); + return out != 0; +} + +template +inline bool ConstValueImpl::HasValue() const { + int out; + ThrowOnError(GetApi().HasValue(this->p_, &out)); + return out != 0; +} + +template +inline size_t ConstValueImpl::GetCount() const { + size_t out; + ThrowOnError(GetApi().GetValueCount(this->p_, &out)); + return out; +} + +template +inline Value ConstValueImpl::GetValue(int index, OrtAllocator* allocator) const { + OrtValue* out; + ThrowOnError(GetApi().GetValue(this->p_, index, allocator, &out)); + return Value{out}; +} + +template +inline size_t ConstValueImpl::GetStringTensorDataLength() const { + size_t out; + ThrowOnError(GetApi().GetStringTensorDataLength(this->p_, &out)); + return out; +} + +template +inline size_t ConstValueImpl::GetStringTensorElementLength(size_t element_index) const { + size_t out; + ThrowOnError(GetApi().GetStringTensorElementLength(this->p_, element_index, &out)); + return out; +} + +template +template +inline const R* ConstValueImpl::GetTensorData() const { + R* out; + ThrowOnError(GetApi().GetTensorMutableData(const_cast(this->p_), (void**)&out)); + return out; +} + +template +inline const void* ConstValueImpl::GetTensorRawData() const { + void* out; + ThrowOnError(GetApi().GetTensorMutableData(const_cast(this->p_), &out)); + return out; +} + +template +inline TypeInfo ConstValueImpl::GetTypeInfo() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetTypeInfo(this->p_, &output)); + return TypeInfo{output}; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetTensorTypeAndShapeInfo() const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetTensorTypeAndShape(this->p_, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +inline ConstMemoryInfo ConstValueImpl::GetTensorMemoryInfo() const { + const OrtMemoryInfo* mem_info; + ThrowOnError(GetApi().GetTensorMemoryInfo(this->p_, &mem_info)); + return ConstMemoryInfo(mem_info); +} + +template +inline void ConstValueImpl::GetStringTensorElement(size_t buffer_length, size_t element_index, void* buffer) const { + ThrowOnError(GetApi().GetStringTensorElement(this->p_, buffer_length, element_index, buffer)); +} + +template +inline std::string ConstValueImpl::GetStringTensorElement(size_t element_index) const { + size_t buffer_length; + ThrowOnError(GetApi().GetStringTensorElementLength(this->p_, element_index, &buffer_length)); + + std::string s; + s.resize(buffer_length); + ThrowOnError(GetApi().GetStringTensorElement(this->p_, buffer_length, element_index, &s[0])); + return s; +} + +template +inline void ConstValueImpl::GetStringTensorContent(void* buffer, size_t buffer_length, size_t* offsets, size_t offsets_count) const { + ThrowOnError(GetApi().GetStringTensorContent(this->p_, buffer, buffer_length, offsets, offsets_count)); +} + +#if !defined(DISABLE_SPARSE_TENSORS) +template +inline OrtSparseFormat ConstValueImpl::GetSparseFormat() const { + OrtSparseFormat format; + ThrowOnError(GetApi().GetSparseTensorFormat(this->p_, &format)); + return format; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetSparseTensorValuesTypeAndShapeInfo() const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetSparseTensorValuesTypeAndShape(this->p_, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetSparseTensorIndicesTypeShapeInfo(OrtSparseIndicesFormat indices_format) const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetSparseTensorIndicesTypeShape(this->p_, indices_format, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +template +inline const R* ConstValueImpl::GetSparseTensorIndicesData(OrtSparseIndicesFormat indices_format, size_t& num_indices) const { + const void* out; + ThrowOnError(GetApi().GetSparseTensorIndices(this->p_, indices_format, &num_indices, &out)); + return reinterpret_cast(out); +} + +template +inline bool ConstValueImpl::IsSparseTensor() const { + int out; + ThrowOnError(GetApi().IsSparseTensor(this->p_, &out)); + return out != 0; +} + +template +template +inline const R* ConstValueImpl::GetSparseTensorValues() const { + const void* out; + ThrowOnError(GetApi().GetSparseTensorValues(this->p_, &out)); + return reinterpret_cast(out); +} + +#endif + +template +void ValueImpl::FillStringTensor(const char* const* s, size_t s_len) { + ThrowOnError(GetApi().FillStringTensor(this->p_, s, s_len)); +} + +template +void ValueImpl::FillStringTensorElement(const char* s, size_t index) { + ThrowOnError(GetApi().FillStringTensorElement(this->p_, s, index)); +} + +template +inline char* ValueImpl::GetResizedStringTensorElementBuffer(size_t index, size_t buffer_length) { + char* result; + ThrowOnError(GetApi().GetResizedStringTensorElementBuffer(this->p_, index, buffer_length, &result)); + return result; +} + +template +void* ValueImpl::GetTensorMutableRawData() { + void* out; + ThrowOnError(GetApi().GetTensorMutableData(this->p_, &out)); + return out; +} + +template +template +R* ValueImpl::GetTensorMutableData() { + R* out; + ThrowOnError(GetApi().GetTensorMutableData(this->p_, (void**)&out)); + return out; +} + +template +template +R& ValueImpl::At(const std::vector& location) { + static_assert(!std::is_same::value, "this api does not support std::string"); + R* out; + ThrowOnError(GetApi().TensorAt(this->p_, location.data(), location.size(), (void**)&out)); + return *out; +} + +#if !defined(DISABLE_SPARSE_TENSORS) +template +void ValueImpl::UseCooIndices(int64_t* indices_data, size_t indices_num) { + ThrowOnError(GetApi().UseCooIndices(this->p_, indices_data, indices_num)); +} + +template +void ValueImpl::UseCsrIndices(int64_t* inner_data, size_t inner_num, int64_t* outer_data, size_t outer_num) { + ThrowOnError(GetApi().UseCsrIndices(this->p_, inner_data, inner_num, outer_data, outer_num)); +} + +template +void ValueImpl::UseBlockSparseIndices(const Shape& indices_shape, int32_t* indices_data) { + ThrowOnError(GetApi().UseBlockSparseIndices(this->p_, indices_shape.shape, indices_shape.shape_len, indices_data)); +} + +template +void ValueImpl::FillSparseTensorCoo(const OrtMemoryInfo* mem_info, const OrtSparseValuesParam& values_param, + const int64_t* indices_data, size_t indices_num) { + ThrowOnError(GetApi().FillSparseTensorCoo(this->p_, mem_info, values_param.values_shape, + values_param.values_shape_len, values_param.data.p_data, + indices_data, indices_num)); +} + +template +void ValueImpl::FillSparseTensorCsr(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const int64_t* inner_indices_data, size_t inner_indices_num, + const int64_t* outer_indices_data, size_t outer_indices_num) { + ThrowOnError(GetApi().FillSparseTensorCsr(this->p_, data_mem_info, values.values_shape, values.values_shape_len, values.data.p_data, + inner_indices_data, inner_indices_num, + outer_indices_data, outer_indices_num)); +} + +template +void ValueImpl::FillSparseTensorBlockSparse(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const Shape& indices_shape, + const int32_t* indices_data) { + ThrowOnError(GetApi().FillSparseTensorBlockSparse(this->p_, data_mem_info, values.values_shape, values.values_shape_len, values.data.p_data, + indices_shape.shape, indices_shape.shape_len, + indices_data)); +} + +#endif // !defined(DISABLE_SPARSE_TENSORS) + +} // namespace detail + +template +inline Value Value::CreateTensor(const OrtMemoryInfo* info, T* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len) { + return CreateTensor(info, p_data, p_data_element_count * sizeof(T), shape, shape_len, TypeToTensorType::type); +} + +inline Value Value::CreateTensor(const OrtMemoryInfo* info, void* p_data, size_t p_data_byte_count, const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateTensorWithDataAsOrtValue(info, p_data, p_data_byte_count, shape, shape_len, type, &out)); + return Value{out}; +} + +template +inline Value Value::CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len) { + return CreateTensor(allocator, shape, shape_len, TypeToTensorType::type); +} + +inline Value Value::CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateTensorAsOrtValue(allocator, shape, shape_len, type, &out)); + return Value{out}; +} + +#if !defined(DISABLE_SPARSE_TENSORS) + +template +inline Value Value::CreateSparseTensor(const OrtMemoryInfo* info, T* p_data, const Shape& dense_shape, + const Shape& values_shape) { + return CreateSparseTensor(info, p_data, dense_shape, values_shape, TypeToTensorType::type); +} + +inline Value Value::CreateSparseTensor(const OrtMemoryInfo* info, void* p_data, const Shape& dense_shape, + const Shape& values_shape, ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateSparseTensorWithValuesAsOrtValue(info, p_data, dense_shape.shape, dense_shape.shape_len, + values_shape.shape, values_shape.shape_len, type, &out)); + return Value{out}; +} + +template +inline Value Value::CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape) { + return CreateSparseTensor(allocator, dense_shape, TypeToTensorType::type); +} + +inline Value Value::CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape, + ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateSparseTensorAsOrtValue(allocator, dense_shape.shape, dense_shape.shape_len, type, &out)); + return Value{out}; +} +#endif // !defined(DISABLE_SPARSE_TENSORS) + +inline Value Value::CreateMap(const Value& keys, const Value& values) { + OrtValue* out; + const OrtValue* inputs[2] = {keys, values}; + ThrowOnError(GetApi().CreateValue(inputs, 2, ONNX_TYPE_MAP, &out)); + return Value{out}; +} + +inline Value Value::CreateSequence(const std::vector& values) { + OrtValue* out; + std::vector values_ort{values.data(), values.data() + values.size()}; + ThrowOnError(GetApi().CreateValue(values_ort.data(), values_ort.size(), ONNX_TYPE_SEQUENCE, &out)); + return Value{out}; +} + +template +inline Value Value::CreateOpaque(const char* domain, const char* type_name, const T& data_container) { + OrtValue* out; + ThrowOnError(GetApi().CreateOpaqueValue(domain, type_name, &data_container, sizeof(T), &out)); + return Value{out}; +} + +// +// Custom OP Inlines +// +inline Logger::Logger(const OrtLogger* logger) : logger_(logger) { + Ort::ThrowOnError(GetApi().Logger_GetLoggingSeverityLevel(this->logger_, &this->cached_severity_level_)); +} + +inline OrtLoggingLevel Logger::GetLoggingSeverityLevel() const noexcept { + return cached_severity_level_; +} + +inline Status Logger::LogMessage(OrtLoggingLevel log_severity_level, const ORTCHAR_T* file_path, int line_number, + const char* func_name, const char* message) const noexcept { + OrtStatus* status = GetApi().Logger_LogMessage(logger_, log_severity_level, message, file_path, line_number, + func_name); + return Status{status}; +} + +// Disable warnings about the format string not being a literal (-Wformat-nonliteral and -Wformat-security) +// for gcc and clang. The alternative is to use actual C-style variadic parameters and apply +// __attribute__(format(printf...)), which does not work with variadic templates. +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#pragma GCC diagnostic ignored "-Wformat-security" +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-nonliteral" +#pragma clang diagnostic ignored "-Wformat-security" +#endif +template +inline Status Logger::LogFormattedMessage(OrtLoggingLevel log_severity_level, const ORTCHAR_T* file_path, + int line_number, const char* func_name, const char* format, + Args&&... args) const noexcept { + int msg_len = std::snprintf(nullptr, 0U, format, std::forward(args)...); + + if (msg_len < 0) { // Formatting error + return Status("Failed to log message due to formatting error", OrtErrorCode::ORT_FAIL); + } + + OrtStatus* status = nullptr; + const size_t buffer_size = static_cast(msg_len) + 1U; + + constexpr size_t kStackBufferSize = 1024; + + if (buffer_size < kStackBufferSize) { + char buffer[kStackBufferSize]; + snprintf(buffer, kStackBufferSize, format, std::forward(args)...); + status = GetApi().Logger_LogMessage(logger_, log_severity_level, buffer, file_path, line_number, func_name); + } else { + // std::make_unique is only supported starting at C++14. +#if (__cplusplus >= 201402L) || (_MSC_VER >= 1900) + auto buffer = std::make_unique(buffer_size); +#else + std::unique_ptr buffer(new char[buffer_size]); +#endif + std::snprintf(buffer.get(), buffer_size, format, std::forward(args)...); + status = GetApi().Logger_LogMessage(logger_, log_severity_level, buffer.get(), file_path, line_number, func_name); + } + + return Status{status}; +} +// Re-enable -Wformat-nonliteral and -Wformat-security +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +inline KernelContext::KernelContext(OrtKernelContext* context) : ctx_(context) { +} + +inline size_t KernelContext::GetInputCount() const { + size_t out = 0; + Ort::ThrowOnError(GetApi().KernelContext_GetInputCount(ctx_, &out)); + return out; +} + +inline size_t KernelContext::GetOutputCount() const { + size_t out = 0; + Ort::ThrowOnError(GetApi().KernelContext_GetOutputCount(ctx_, &out)); + return out; +} + +inline ConstValue KernelContext::GetInput(size_t index) const { + const OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetInput(ctx_, index, &out)); + return ConstValue{out}; +} + +inline UnownedValue KernelContext::GetOutput(size_t index, const int64_t* dim_values, size_t dim_count) const { + OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetOutput(ctx_, index, dim_values, dim_count, &out)); + return UnownedValue(out); +} + +inline UnownedValue KernelContext::GetOutput(size_t index, const std::vector& dims) const { + OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetOutput(ctx_, index, dims.data(), dims.size(), &out)); + return UnownedValue(out); +} + +inline void* KernelContext::GetGPUComputeStream() const { + void* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetGPUComputeStream(ctx_, &out)); + return out; +} + +inline OrtAllocator* KernelContext::GetAllocator(const OrtMemoryInfo& memory_info) const { + OrtAllocator* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetAllocator(ctx_, &memory_info, &out)); + return out; +} + +inline Logger KernelContext::GetLogger() const { + const OrtLogger* out = nullptr; + ThrowOnError(GetApi().KernelContext_GetLogger(this->ctx_, &out)); + return Logger{out}; +} + +inline void KernelContext::ParallelFor(void (*fn)(void*, size_t), size_t total, size_t num_batch, void* usr_data) const { + ThrowOnError(GetApi().KernelContext_ParallelFor(ctx_, fn, total, num_batch, usr_data)); +} + +inline OpAttr::OpAttr(const char* name, const void* data, int len, OrtOpAttrType type) { + Ort::ThrowOnError(GetApi().CreateOpAttr(name, data, len, type, &p_)); +} + +namespace detail { +template +inline KernelInfo KernelInfoImpl::Copy() const { + OrtKernelInfo* info_copy = nullptr; + Ort::ThrowOnError(GetApi().CopyKernelInfo(this->p_, &info_copy)); + return KernelInfo{info_copy}; +} + +template +inline size_t KernelInfoImpl::GetInputCount() const { + size_t out = 0; + ThrowOnError(GetApi().KernelInfo_GetInputCount(this->p_, &out)); + return out; +} + +template +inline size_t KernelInfoImpl::GetOutputCount() const { + size_t out = 0; + ThrowOnError(GetApi().KernelInfo_GetOutputCount(this->p_, &out)); + return out; +} + +template +inline std::string KernelInfoImpl::GetInputName(size_t index) const { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().KernelInfo_GetInputName(this->p_, index, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfo_GetInputName(this->p_, index, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline std::string KernelInfoImpl::GetOutputName(size_t index) const { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().KernelInfo_GetOutputName(this->p_, index, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfo_GetOutputName(this->p_, index, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline TypeInfo KernelInfoImpl::GetInputTypeInfo(size_t index) const { + OrtTypeInfo* out = nullptr; + ThrowOnError(GetApi().KernelInfo_GetInputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo KernelInfoImpl::GetOutputTypeInfo(size_t index) const { + OrtTypeInfo* out = nullptr; + ThrowOnError(GetApi().KernelInfo_GetOutputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline Value KernelInfoImpl::GetTensorAttribute(const char* name, OrtAllocator* allocator) const { + OrtValue* out = nullptr; + ThrowOnError(GetApi().KernelInfoGetAttribute_tensor(this->p_, name, allocator, &out)); + return Value{out}; +} + +template +inline ConstValue KernelInfoImpl::GetTensorConstantInput(size_t index, int* is_constant) const { + const OrtValue* out = nullptr; + ThrowOnError(GetApi().KernelInfoGetConstantInput_tensor(this->p_, index, is_constant, &out)); + return ConstValue{out}; +} + +template +inline std::string KernelInfoImpl::GetNodeName() const { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().KernelInfo_GetNodeName(this->p_, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfo_GetNodeName(this->p_, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline Logger KernelInfoImpl::GetLogger() const { + const OrtLogger* out = nullptr; + ThrowOnError(GetApi().KernelInfo_GetLogger(this->p_, &out)); + return Logger{out}; +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, float& out) { + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_float(p, name, &out)); +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, int64_t& out) { + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_int64(p, name, &out)); +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, std::string& result) { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the string attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_string(p, name, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_string(p, name, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + out.swap(result); +} + +inline void attr_utils::GetAttrs(const OrtKernelInfo* p, const char* name, std::vector& result) { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_float(p, name, nullptr, &size)); + + std::vector out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_float(p, name, out.data(), &size)); + out.swap(result); +} + +inline void attr_utils::GetAttrs(const OrtKernelInfo* p, const char* name, std::vector& result) { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_int64(p, name, nullptr, &size)); + + std::vector out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_int64(p, name, out.data(), &size)); + out.swap(result); +} +} // namespace detail + +inline KernelInfo::KernelInfo(OrtKernelInfo* info) : detail::KernelInfoImpl{info} {} + +inline Op::Op(OrtOp* p) : Base(p) {} + +inline Op Op::Create(const OrtKernelInfo* info, const char* op_name, const char* domain, int version, + const char** type_constraint_names, + const ONNXTensorElementDataType* type_constraint_values, + size_t type_constraint_count, + const OpAttr* attr_values, size_t attr_count, + size_t input_count, size_t output_count) { + static_assert(sizeof(OpAttr) == sizeof(OrtOpAttr*), + "OpAttr's is expected to be just an array of OrtOpAttr in memory so we can reinterpret safely"); + auto attr_input_values = reinterpret_cast(attr_values); + OrtOp* op; + Ort::ThrowOnError(GetApi().CreateOp(info, op_name, domain, version, type_constraint_names, type_constraint_values, + static_cast(type_constraint_count), + attr_input_values, + static_cast(attr_count), + static_cast(input_count), + static_cast(output_count), &op)); + return Op{op}; +} + +inline void Op::Invoke(const OrtKernelContext* context, + const Value* input_values, + size_t input_count, + Value* output_values, + size_t output_count) { + static_assert(sizeof(Value) == sizeof(OrtValue*), + "Value is really just an array of OrtValue* in memory, so we can reinterpret_cast safely"); + auto ort_input_values = reinterpret_cast(input_values); + auto ort_output_values = reinterpret_cast(output_values); + Ort::ThrowOnError(GetApi().InvokeOp(context, p_, ort_input_values, static_cast(input_count), + ort_output_values, static_cast(output_count))); +} + +inline void Op::Invoke(const OrtKernelContext* context, + const OrtValue* const* input_values, + size_t input_count, + OrtValue* const* output_values, + size_t output_count) { + Ort::ThrowOnError(GetApi().InvokeOp(context, p_, input_values, static_cast(input_count), + output_values, static_cast(output_count))); +} + +inline std::string GetVersionString() { + return OrtGetApiBase()->GetVersionString(); +} + +inline std::string GetBuildInfoString() { + return GetApi().GetBuildInfoString(); +} + +inline std::vector GetAvailableProviders() { + char** providers; + int len; + + auto release_fn = [&len](char** providers) { + // This should always return nullptr. + ThrowOnError(GetApi().ReleaseAvailableProviders(providers, len)); + }; + + ThrowOnError(GetApi().GetAvailableProviders(&providers, &len)); + std::unique_ptr guard(providers, release_fn); + std::vector available_providers; + available_providers.reserve(static_cast(len)); + for (int i = 0; i < len; ++i) { + available_providers.emplace_back(providers[i]); + } + return available_providers; +} + +template +void CustomOpBase::GetSessionConfigs(std::unordered_map& out, + ConstSessionOptions options) const { + const TOp* derived = static_cast(this); + std::vector keys = derived->GetSessionConfigKeys(); + + out.reserve(keys.size()); + + std::string config_entry_key = detail::MakeCustomOpConfigEntryKey(derived->GetName(), ""); + const size_t prefix_size = config_entry_key.length(); + + for (const auto& key : keys) { + config_entry_key.resize(prefix_size); + config_entry_key.append(key); + out[key] = options.GetConfigEntryOrDefault(config_entry_key.c_str(), ""); + } +} + +inline ShapeInferContext::ShapeInferContext(const OrtApi* ort_api, + OrtShapeInferContext* ctx) : ort_api_(ort_api), ctx_(ctx) { + size_t input_count = 0; + Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputCount(ctx_, &input_count)); + for (size_t ith_input = 0; ith_input < input_count; ++ith_input) { + OrtTensorTypeAndShapeInfo* info{}; + Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputTypeShape(ctx, ith_input, &info)); + TensorTypeAndShapeInfo type_shape_info(info); + auto integer_shape = type_shape_info.GetShape(); + std::vector symbolic_shape(integer_shape.size(), {}); + if (!integer_shape.empty()) { + type_shape_info.GetSymbolicDimensions(&symbolic_shape[0], integer_shape.size()); + } + Shape shape; + for (size_t ith = 0; ith < integer_shape.size(); ++ith) { + if (symbolic_shape[ith] && std::string{symbolic_shape[ith]}.size() > 0) { + shape.emplace_back(symbolic_shape[ith]); + } else { + shape.emplace_back(integer_shape[ith]); + } + } + input_shapes_.push_back(std::move(shape)); + type_shape_info.release(); + } +} + +inline Status ShapeInferContext::SetOutputShape(size_t indice, const Shape& shape, ONNXTensorElementDataType type) { + OrtTensorTypeAndShapeInfo* info = {}; + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->CreateTensorTypeAndShapeInfo(&info)); + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->SetTensorElementType(info, type)); + + using InfoPtr = std::unique_ptr>; + + InfoPtr info_ptr(info, [this](OrtTensorTypeAndShapeInfo* obj) { + ort_api_->ReleaseTensorTypeAndShapeInfo(obj); + }); + + std::vector integer_dims; + std::vector symbolic_dims; + + for (const auto dim : shape) { + if (dim.IsInt()) { + integer_dims.push_back(dim.AsInt()); + symbolic_dims.push_back(""); + } else { + if (!dim.AsSym() || std::string{dim.AsSym()}.empty()) { + ORT_CXX_API_THROW("Symbolic dim must not be an empty string", ORT_INVALID_ARGUMENT); + } + integer_dims.push_back(SymbolicInteger::INVALID_INT_DIM); + symbolic_dims.push_back(dim.AsSym()); + } + } + + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->SetDimensions(info, integer_dims.data(), integer_dims.size())); + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->SetSymbolicDimensions(info, symbolic_dims.data(), symbolic_dims.size())); + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->ShapeInferContext_SetOutputTypeShape(ctx_, indice, info)); + return Status{nullptr}; +} + +inline int64_t ShapeInferContext::GetAttrInt(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + int64_t i = {}; + size_t out = {}; + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INT, &i, sizeof(i), &out)); + return i; +} + +inline ShapeInferContext::Ints ShapeInferContext::GetAttrInts(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + int64_t i = {}; + size_t out = {}; + // first call to get the bytes needed + // 1. A status == nullptr means that ReadOpAttr was successful. A status != nullptr means failure. + // 2. The ReadOpAttr function should normally be called twice: once to get the needed buffer size (returns a status != nullptr), and a second time to actually read the ints (returns status == null on success). + // 3. This code tries a subtle optimization in the first call to ReadOpAttr. It passes in a buffer (&i) of size 1 just in case there is only 1 int. In this case, status == nullptr and we need to return {i}. + auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INTS, &i, sizeof(i), &out); + if (status) { + size_t num_i = out / sizeof(int64_t); + ShapeInferContext::Ints ints(num_i, 0); + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INTS, ints.data(), out, &out)); + return ints; + } else { + if (out == 0u) { + return {}; + } + return {i}; + } +} + +inline float ShapeInferContext::GetAttrFloat(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + float f = {}; + size_t out = {}; + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOAT, &f, sizeof(f), &out)); + return f; +} + +inline ShapeInferContext::Floats ShapeInferContext::GetAttrFloats(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + float f = {}; + size_t out = {}; + // first call to get the bytes needed + // 1. A status == nullptr means that ReadOpAttr was successful. A status != nullptr means failure. + // 2. The ReadOpAttr function should normally be called twice: once to get the needed buffer size (returns a status != nullptr), and a second time to actually read the ints (returns status == null on success). + // 3. This code tries a subtle optimization in the first call to ReadOpAttr. It passes in a buffer (&i) of size 1 just in case there is only 1 int. In this case, status == nullptr and we need to return {i}. + auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOATS, &f, sizeof(f), &out); + if (status) { + size_t num_f = out / sizeof(float); + ShapeInferContext::Floats floats(num_f, 0); + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOATS, floats.data(), out, &out)); + return floats; + } else { + if (out == 0u) { + return {}; + } + return {f}; + } +} + +inline std::string ShapeInferContext::GetAttrString(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + char c = {}; + size_t out = {}; + // first call to get the bytes needed + auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRING, &c, sizeof(char), &out); + if (status) { + std::vector chars(out, '\0'); + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRING, chars.data(), out, &out)); + return {chars.data()}; + } else { + return {c}; + } +} + +inline ShapeInferContext::Strings ShapeInferContext::GetAttrStrings(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + char c = {}; + size_t out = {}; + // first call to get the bytes needed + // 1. A status == nullptr means that ReadOpAttr was successful. A status != nullptr means failure. + // 2. The ReadOpAttr function should normally be called twice: once to get the needed buffer size (returns a status != nullptr), and a second time to actually read the ints (returns status == null on success). + // 3. This code tries a subtle optimization in the first call to ReadOpAttr. It passes in a buffer (&i) of size 1 just in case there is only 1 int. In this case, status == nullptr and we need to return {i}. + auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRINGS, &c, sizeof(char), &out); + if (status) { + std::vector chars(out, '\0'); + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRINGS, chars.data(), out, &out)); + ShapeInferContext::Strings strings; + char* char_st = chars.data(); + char* char_ed = char_st + out; + while (char_st < char_ed) { + strings.emplace_back(char_st); + while (*char_st != '\0') { + char_st++; + } + char_st++; + } + return strings; + } else { + if (out == 0u) { + return {}; + } + return {std::string{c}}; + } +} + +inline const OrtOpAttr* ShapeInferContext::GetAttrHdl(const char* attr_name) const { + const OrtOpAttr* attr_hdl = {}; + Ort::ThrowOnError(ort_api_->ShapeInferContext_GetAttribute(ctx_, attr_name, &attr_hdl)); + return attr_hdl; +} + +} // namespace Ort diff --git a/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_float16.h b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_float16.h new file mode 100644 index 00000000..408d3ccf --- /dev/null +++ b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_float16.h @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include +#include +#include +#include + +namespace onnxruntime_float16 { + +namespace detail { + +enum class endian { +#if defined(_WIN32) + little = 0, + big = 1, + native = little, +#elif defined(__GNUC__) || defined(__clang__) + little = __ORDER_LITTLE_ENDIAN__, + big = __ORDER_BIG_ENDIAN__, + native = __BYTE_ORDER__, +#else +#error onnxruntime_float16::detail::endian is not implemented in this environment. +#endif +}; + +static_assert( + endian::native == endian::little || endian::native == endian::big, + "Only little-endian or big-endian native byte orders are supported."); + +} // namespace detail + +/// +/// Shared implementation between public and internal classes. CRTP pattern. +/// +template +struct Float16Impl { + protected: + /// + /// Converts from float to uint16_t float16 representation + /// + /// + /// + constexpr static uint16_t ToUint16Impl(float v) noexcept; + + /// + /// Converts float16 to float + /// + /// float representation of float16 value + float ToFloatImpl() const noexcept; + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + uint16_t AbsImpl() const noexcept { + return static_cast(val & ~kSignMask); + } + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + uint16_t NegateImpl() const noexcept { + return IsNaN() ? val : static_cast(val ^ kSignMask); + } + + public: + // uint16_t special values + static constexpr uint16_t kSignMask = 0x8000U; + static constexpr uint16_t kBiasedExponentMask = 0x7C00U; + static constexpr uint16_t kPositiveInfinityBits = 0x7C00U; + static constexpr uint16_t kNegativeInfinityBits = 0xFC00U; + static constexpr uint16_t kPositiveQNaNBits = 0x7E00U; + static constexpr uint16_t kNegativeQNaNBits = 0xFE00U; + static constexpr uint16_t kMaxValueBits = 0x7BFFU; // Largest normal number + static constexpr uint16_t kOneBits = 0x3C00U; + static constexpr uint16_t kMinusOneBits = 0xBC00U; + + uint16_t val{0}; + + Float16Impl() = default; + + /// + /// Checks if the value is negative + /// + /// true if negative + bool IsNegative() const noexcept { + return static_cast(val) < 0; + } + + /// + /// Tests if the value is NaN + /// + /// true if NaN + bool IsNaN() const noexcept { + return AbsImpl() > kPositiveInfinityBits; + } + + /// + /// Tests if the value is finite + /// + /// true if finite + bool IsFinite() const noexcept { + return AbsImpl() < kPositiveInfinityBits; + } + + /// + /// Tests if the value represents positive infinity. + /// + /// true if positive infinity + bool IsPositiveInfinity() const noexcept { + return val == kPositiveInfinityBits; + } + + /// + /// Tests if the value represents negative infinity + /// + /// true if negative infinity + bool IsNegativeInfinity() const noexcept { + return val == kNegativeInfinityBits; + } + + /// + /// Tests if the value is either positive or negative infinity. + /// + /// True if absolute value is infinity + bool IsInfinity() const noexcept { + return AbsImpl() == kPositiveInfinityBits; + } + + /// + /// Tests if the value is NaN or zero. Useful for comparisons. + /// + /// True if NaN or zero. + bool IsNaNOrZero() const noexcept { + auto abs = AbsImpl(); + return (abs == 0 || abs > kPositiveInfinityBits); + } + + /// + /// Tests if the value is normal (not zero, subnormal, infinite, or NaN). + /// + /// True if so + bool IsNormal() const noexcept { + auto abs = AbsImpl(); + return (abs < kPositiveInfinityBits) // is finite + && (abs != 0) // is not zero + && ((abs & kBiasedExponentMask) != 0); // is not subnormal (has a non-zero exponent) + } + + /// + /// Tests if the value is subnormal (denormal). + /// + /// True if so + bool IsSubnormal() const noexcept { + auto abs = AbsImpl(); + return (abs < kPositiveInfinityBits) // is finite + && (abs != 0) // is not zero + && ((abs & kBiasedExponentMask) == 0); // is subnormal (has a zero exponent) + } + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + Derived Abs() const noexcept { return Derived::FromBits(AbsImpl()); } + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + Derived Negate() const noexcept { return Derived::FromBits(NegateImpl()); } + + /// + /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check + /// for two values by or'ing the private bits together and stripping the sign. They are both zero, + /// and therefore equivalent, if the resulting value is still zero. + /// + /// first value + /// second value + /// True if both arguments represent zero + static bool AreZero(const Float16Impl& lhs, const Float16Impl& rhs) noexcept { + return static_cast((lhs.val | rhs.val) & ~kSignMask) == 0; + } + + bool operator==(const Float16Impl& rhs) const noexcept { + if (IsNaN() || rhs.IsNaN()) { + // IEEE defines that NaN is not equal to anything, including itself. + return false; + } + return val == rhs.val; + } + + bool operator!=(const Float16Impl& rhs) const noexcept { return !(*this == rhs); } + + bool operator<(const Float16Impl& rhs) const noexcept { + if (IsNaN() || rhs.IsNaN()) { + // IEEE defines that NaN is unordered with respect to everything, including itself. + return false; + } + + const bool left_is_negative = IsNegative(); + if (left_is_negative != rhs.IsNegative()) { + // When the signs of left and right differ, we know that left is less than right if it is + // the negative value. The exception to this is if both values are zero, in which case IEEE + // says they should be equal, even if the signs differ. + return left_is_negative && !AreZero(*this, rhs); + } + return (val != rhs.val) && ((val < rhs.val) ^ left_is_negative); + } +}; + +// The following Float16_t conversions are based on the code from +// Eigen library. + +// The conversion routines are Copyright (c) Fabian Giesen, 2016. +// The original license follows: +// +// Copyright (c) Fabian Giesen, 2016 +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted. +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +namespace detail { +union float32_bits { + unsigned int u; + float f; +}; +} // namespace detail + +template +inline constexpr uint16_t Float16Impl::ToUint16Impl(float v) noexcept { + detail::float32_bits f{}; + f.f = v; + + constexpr detail::float32_bits f32infty = {255 << 23}; + constexpr detail::float32_bits f16max = {(127 + 16) << 23}; + constexpr detail::float32_bits denorm_magic = {((127 - 15) + (23 - 10) + 1) << 23}; + constexpr unsigned int sign_mask = 0x80000000u; + uint16_t val = static_cast(0x0u); + + unsigned int sign = f.u & sign_mask; + f.u ^= sign; + + // NOTE all the integer compares in this function can be safely + // compiled into signed compares since all operands are below + // 0x80000000. Important if you want fast straight SSE2 code + // (since there's no unsigned PCMPGTD). + + if (f.u >= f16max.u) { // result is Inf or NaN (all exponent bits set) + val = (f.u > f32infty.u) ? 0x7e00 : 0x7c00; // NaN->qNaN and Inf->Inf + } else { // (De)normalized number or zero + if (f.u < (113 << 23)) { // resulting FP16 is subnormal or zero + // use a magic value to align our 10 mantissa bits at the bottom of + // the float. as long as FP addition is round-to-nearest-even this + // just works. + f.f += denorm_magic.f; + + // and one integer subtract of the bias later, we have our final float! + val = static_cast(f.u - denorm_magic.u); + } else { + unsigned int mant_odd = (f.u >> 13) & 1; // resulting mantissa is odd + + // update exponent, rounding bias part 1 + // Equivalent to `f.u += ((unsigned int)(15 - 127) << 23) + 0xfff`, but + // without arithmetic overflow. + f.u += 0xc8000fffU; + // rounding bias part 2 + f.u += mant_odd; + // take the bits! + val = static_cast(f.u >> 13); + } + } + + val |= static_cast(sign >> 16); + return val; +} + +template +inline float Float16Impl::ToFloatImpl() const noexcept { + constexpr detail::float32_bits magic = {113 << 23}; + constexpr unsigned int shifted_exp = 0x7c00 << 13; // exponent mask after shift + detail::float32_bits o{}; + + o.u = (val & 0x7fff) << 13; // exponent/mantissa bits + unsigned int exp = shifted_exp & o.u; // just the exponent + o.u += (127 - 15) << 23; // exponent adjust + + // handle exponent special cases + if (exp == shifted_exp) { // Inf/NaN? + o.u += (128 - 16) << 23; // extra exp adjust + } else if (exp == 0) { // Zero/Denormal? + o.u += 1 << 23; // extra exp adjust + o.f -= magic.f; // re-normalize + } + + // Attempt to workaround the Internal Compiler Error on ARM64 + // for bitwise | operator, including std::bitset +#if (defined _MSC_VER) && (defined _M_ARM || defined _M_ARM64 || defined _M_ARM64EC) + if (IsNegative()) { + return -o.f; + } +#else + // original code: + o.u |= (val & 0x8000U) << 16U; // sign bit +#endif + return o.f; +} + +/// Shared implementation between public and internal classes. CRTP pattern. +template +struct BFloat16Impl { + protected: + /// + /// Converts from float to uint16_t float16 representation + /// + /// + /// + static uint16_t ToUint16Impl(float v) noexcept; + + /// + /// Converts bfloat16 to float + /// + /// float representation of bfloat16 value + float ToFloatImpl() const noexcept; + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + uint16_t AbsImpl() const noexcept { + return static_cast(val & ~kSignMask); + } + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + uint16_t NegateImpl() const noexcept { + return IsNaN() ? val : static_cast(val ^ kSignMask); + } + + public: + // uint16_t special values + static constexpr uint16_t kSignMask = 0x8000U; + static constexpr uint16_t kBiasedExponentMask = 0x7F80U; + static constexpr uint16_t kPositiveInfinityBits = 0x7F80U; + static constexpr uint16_t kNegativeInfinityBits = 0xFF80U; + static constexpr uint16_t kPositiveQNaNBits = 0x7FC1U; + static constexpr uint16_t kNegativeQNaNBits = 0xFFC1U; + static constexpr uint16_t kMaxValueBits = 0x7F7FU; + static constexpr uint16_t kRoundToNearest = 0x7FFFU; + static constexpr uint16_t kOneBits = 0x3F80U; + static constexpr uint16_t kMinusOneBits = 0xBF80U; + + uint16_t val{0}; + + BFloat16Impl() = default; + + /// + /// Checks if the value is negative + /// + /// true if negative + bool IsNegative() const noexcept { + return static_cast(val) < 0; + } + + /// + /// Tests if the value is NaN + /// + /// true if NaN + bool IsNaN() const noexcept { + return AbsImpl() > kPositiveInfinityBits; + } + + /// + /// Tests if the value is finite + /// + /// true if finite + bool IsFinite() const noexcept { + return AbsImpl() < kPositiveInfinityBits; + } + + /// + /// Tests if the value represents positive infinity. + /// + /// true if positive infinity + bool IsPositiveInfinity() const noexcept { + return val == kPositiveInfinityBits; + } + + /// + /// Tests if the value represents negative infinity + /// + /// true if negative infinity + bool IsNegativeInfinity() const noexcept { + return val == kNegativeInfinityBits; + } + + /// + /// Tests if the value is either positive or negative infinity. + /// + /// True if absolute value is infinity + bool IsInfinity() const noexcept { + return AbsImpl() == kPositiveInfinityBits; + } + + /// + /// Tests if the value is NaN or zero. Useful for comparisons. + /// + /// True if NaN or zero. + bool IsNaNOrZero() const noexcept { + auto abs = AbsImpl(); + return (abs == 0 || abs > kPositiveInfinityBits); + } + + /// + /// Tests if the value is normal (not zero, subnormal, infinite, or NaN). + /// + /// True if so + bool IsNormal() const noexcept { + auto abs = AbsImpl(); + return (abs < kPositiveInfinityBits) // is finite + && (abs != 0) // is not zero + && ((abs & kBiasedExponentMask) != 0); // is not subnormal (has a non-zero exponent) + } + + /// + /// Tests if the value is subnormal (denormal). + /// + /// True if so + bool IsSubnormal() const noexcept { + auto abs = AbsImpl(); + return (abs < kPositiveInfinityBits) // is finite + && (abs != 0) // is not zero + && ((abs & kBiasedExponentMask) == 0); // is subnormal (has a zero exponent) + } + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + Derived Abs() const noexcept { return Derived::FromBits(AbsImpl()); } + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + Derived Negate() const noexcept { return Derived::FromBits(NegateImpl()); } + + /// + /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check + /// for two values by or'ing the private bits together and stripping the sign. They are both zero, + /// and therefore equivalent, if the resulting value is still zero. + /// + /// first value + /// second value + /// True if both arguments represent zero + static bool AreZero(const BFloat16Impl& lhs, const BFloat16Impl& rhs) noexcept { + // IEEE defines that positive and negative zero are equal, this gives us a quick equality check + // for two values by or'ing the private bits together and stripping the sign. They are both zero, + // and therefore equivalent, if the resulting value is still zero. + return static_cast((lhs.val | rhs.val) & ~kSignMask) == 0; + } +}; + +template +inline uint16_t BFloat16Impl::ToUint16Impl(float v) noexcept { + uint16_t result; + if (std::isnan(v)) { + result = kPositiveQNaNBits; + } else { + auto get_msb_half = [](float fl) { + uint16_t result; +#ifdef __cpp_if_constexpr + if constexpr (detail::endian::native == detail::endian::little) { +#else + if (detail::endian::native == detail::endian::little) { +#endif + std::memcpy(&result, reinterpret_cast(&fl) + sizeof(uint16_t), sizeof(uint16_t)); + } else { + std::memcpy(&result, &fl, sizeof(uint16_t)); + } + return result; + }; + + uint16_t upper_bits = get_msb_half(v); + union { + uint32_t U32; + float F32; + }; + F32 = v; + U32 += (upper_bits & 1) + kRoundToNearest; + result = get_msb_half(F32); + } + return result; +} + +template +inline float BFloat16Impl::ToFloatImpl() const noexcept { + if (IsNaN()) { + return std::numeric_limits::quiet_NaN(); + } + float result; + char* const first = reinterpret_cast(&result); + char* const second = first + sizeof(uint16_t); +#ifdef __cpp_if_constexpr + if constexpr (detail::endian::native == detail::endian::little) { +#else + if (detail::endian::native == detail::endian::little) { +#endif + std::memset(first, 0, sizeof(uint16_t)); + std::memcpy(second, &val, sizeof(uint16_t)); + } else { + std::memcpy(first, &val, sizeof(uint16_t)); + std::memset(second, 0, sizeof(uint16_t)); + } + return result; +} + +} // namespace onnxruntime_float16 diff --git a/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_lite_custom_op.h b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_lite_custom_op.h new file mode 100644 index 00000000..ce87d8c5 --- /dev/null +++ b/src/热成像识别/cpp/third_party/onnxruntime/include/onnxruntime_lite_custom_op.h @@ -0,0 +1,1119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// Summary +// The header has APIs to save custom op authors the trouble of defining schemas, +// which will be inferred by functions' signature, as long as their argument list has types supported here. +// Input could be: +// 1. Tensor of onnx data types. +// 2. Span of onnx data types. +// 3. Scalar of onnx data types. +// A input could be optional if indicated as std::optional<...>. +// For an output, it must be a tensor of onnx data types. +// Further, the header also has utility for a simple custom struct, where resources could be kept, to be registered as a custom op. +// For concrete examples, please search keyword "LiteCustomOpTest" under "/onnxruntime/test/". +// Note - all APIs in this header are ABI. + +#pragma once +#include "onnxruntime_cxx_api.h" +#include +#include +#include +#include + +namespace Ort { +namespace Custom { + +class ArgBase { + public: + ArgBase(OrtKernelContext* ctx, + size_t indice, + bool is_input) : ctx_(ctx), indice_(indice), is_input_(is_input) {} + virtual ~ArgBase() {}; + + protected: + struct KernelContext ctx_; + size_t indice_; + bool is_input_; +}; + +using ArgPtr = std::unique_ptr; +using ArgPtrs = std::vector; + +class TensorBase : public ArgBase { + public: + TensorBase(OrtKernelContext* ctx, + size_t indice, + bool is_input) : ArgBase(ctx, indice, is_input) {} + + operator bool() const { + return shape_.has_value(); + } + + const std::vector& Shape() const { + if (!shape_.has_value()) { + ORT_CXX_API_THROW("tensor shape is not yet initialized", OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + return shape_.value(); + } + + ONNXTensorElementDataType Type() const { + return type_; + } + + int64_t NumberOfElement() const { + if (shape_.has_value()) { + return std::accumulate(shape_->begin(), shape_->end(), 1LL, std::multiplies()); + } else { + return 0; + } + } + + std::string Shape2Str() const { + if (shape_.has_value()) { + std::string shape_str; + for (const auto& dim : *shape_) { + shape_str.append(std::to_string(dim)); + shape_str.append(", "); + } + return shape_str; + } else { + return "empty"; + } + } + + bool IsCpuTensor() const { + return strcmp("Cpu", mem_type_) == 0; + } + + virtual const void* DataRaw() const = 0; + virtual size_t SizeInBytes() const = 0; + + protected: + std::optional> shape_; + ONNXTensorElementDataType type_ = ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED; + const char* mem_type_ = "Cpu"; +}; + +template +struct Span { + const T* data_ = {}; + size_t size_ = {}; + void Assign(const T* data, size_t size) { + data_ = data; + size_ = size; + } + size_t size() const { return size_; } + T operator[](size_t indice) const { + return data_[indice]; + } + const T* data() const { return data_; } +}; + +template +class Tensor : public TensorBase { + public: + using TT = typename std::remove_reference::type; + Tensor(OrtKernelContext* ctx, size_t indice, bool is_input) : TensorBase(ctx, indice, is_input) { + if (is_input_) { + if (indice >= ctx_.GetInputCount()) { + ORT_CXX_API_THROW("invalid indice for Ort::Custom::Tensor", OrtErrorCode::ORT_INVALID_ARGUMENT); + } + const_value_ = ctx_.GetInput(indice); + auto type_shape_info = const_value_.GetTensorTypeAndShapeInfo(); + shape_ = type_shape_info.GetShape(); + } + } + const TT* Data() const { + return reinterpret_cast(const_value_.GetTensorRawData()); + } + TT* Allocate(const std::vector& shape) { + shape_ = shape; + if (!data_) { + shape_ = shape; + data_ = ctx_.GetOutput(indice_, shape).template GetTensorMutableData(); + } + return data_; + } + static TT GetT() { return (TT)0; } + const Span& AsSpan() { + if (!shape_.has_value() || shape_->size() != 1) { + ORT_CXX_API_THROW("invalid shape while trying to get a span out of Ort::Custom::Tensor", + OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + span_.Assign(Data(), static_cast((*shape_)[0])); + return span_; + } + const T& AsScalar() { + if (!shape_.has_value() || shape_->size() != 1 || (*shape_)[0] != 1) { + ORT_CXX_API_THROW("invalid shape while trying to get a scalar from Ort::Custom::Tensor", + OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + return *Data(); + } + const void* DataRaw() const override { + return reinterpret_cast(Data()); + } + + size_t SizeInBytes() const override { + return sizeof(TT) * static_cast(NumberOfElement()); + } + + private: + ConstValue const_value_; // for input + TT* data_{}; // for output + Span span_; +}; + +template <> +class Tensor : public TensorBase { + public: + using strings = std::vector; + + Tensor(OrtKernelContext* ctx, size_t indice, bool is_input) : TensorBase(ctx, indice, is_input) { + if (is_input_) { + if (indice >= ctx_.GetInputCount()) { + ORT_CXX_API_THROW("invalid indice for Ort::Custom::Tensor", OrtErrorCode::ORT_INVALID_ARGUMENT); + } + auto const_value = ctx_.GetInput(indice); + auto type_shape_info = const_value.GetTensorTypeAndShapeInfo(); + shape_ = type_shape_info.GetShape(); + auto num_chars = const_value.GetStringTensorDataLength(); + // note - there will be copy ... + auto num_strings = static_cast(NumberOfElement()); + if (num_strings) { + std::vector chars(num_chars + 1, '\0'); + std::vector offsets(num_strings); + const_value.GetStringTensorContent(static_cast(chars.data()), num_chars, offsets.data(), offsets.size()); + auto upper_bound = num_strings - 1; + input_strings_.resize(num_strings); + for (size_t i = upper_bound;; --i) { + if (i < upper_bound) { + chars[offsets[i + 1]] = '\0'; + } + input_strings_[i] = chars.data() + offsets[i]; + if (0 == i) { + break; + } + } + } + } + } + const strings& Data() const { + return input_strings_; + } + const void* DataRaw() const override { + if (input_strings_.size() != 1) { + ORT_CXX_API_THROW("DataRaw() only applies to string scalar", ORT_RUNTIME_EXCEPTION); + } + return reinterpret_cast(input_strings_[0].c_str()); + } + size_t SizeInBytes() const override { + if (input_strings_.size() != 1) { + ORT_CXX_API_THROW("SizeInBytes() only applies to string scalar", ORT_RUNTIME_EXCEPTION); + } + return input_strings_[0].size(); + } + void SetStringOutput(const strings& ss, const std::vector& dims) { + shape_ = dims; + std::vector raw; + for (const auto& s : ss) { + raw.push_back(s.data()); + } + auto output = ctx_.GetOutput(indice_, dims.data(), dims.size()); + // note - there will be copy ... + output.FillStringTensor(raw.data(), raw.size()); + } + const Span& AsSpan() { + ORT_CXX_API_THROW("span for TensorT of string not implemented", OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + const std::string& AsScalar() { + if (input_strings_.size() != 1) { + ORT_CXX_API_THROW("invalid shape while trying to get a scalar string from Ort::Custom::Tensor", + OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + return input_strings_[0]; + } + + private: + std::vector input_strings_; // for input +}; + +template <> +class Tensor : public TensorBase { + public: + using strings = std::vector; + using string_views = std::vector; + + Tensor(OrtKernelContext* ctx, size_t indice, bool is_input) : TensorBase(ctx, indice, is_input) { + if (is_input_) { + if (indice >= ctx_.GetInputCount()) { + ORT_CXX_API_THROW("invalid indice for Ort::Custom::Tensor", OrtErrorCode::ORT_INVALID_ARGUMENT); + } + auto const_value = ctx_.GetInput(indice); + auto type_shape_info = const_value.GetTensorTypeAndShapeInfo(); + shape_ = type_shape_info.GetShape(); + auto num_chars = const_value.GetStringTensorDataLength(); + chars_.resize(num_chars + 1, '\0'); + auto num_strings = static_cast(NumberOfElement()); + if (num_strings) { + std::vector offsets(num_strings); + const_value.GetStringTensorContent(static_cast(chars_.data()), num_chars, offsets.data(), offsets.size()); + offsets.push_back(num_chars); + for (size_t i = 0; i < num_strings; ++i) { + input_string_views_.emplace_back(chars_.data() + offsets[i], offsets[i + 1] - offsets[i]); + } + } + } + } + const string_views& Data() const { + return input_string_views_; + } + const void* DataRaw() const override { + if (input_string_views_.size() != 1) { + ORT_CXX_API_THROW("DataRaw() only applies to string scalar", ORT_RUNTIME_EXCEPTION); + } + return reinterpret_cast(input_string_views_[0].data()); + } + size_t SizeInBytes() const override { + if (input_string_views_.size() != 1) { + ORT_CXX_API_THROW("SizeInBytes() only applies to string scalar", ORT_RUNTIME_EXCEPTION); + } + return input_string_views_[0].size(); + } + void SetStringOutput(const strings& ss, const std::vector& dims) { + shape_ = dims; + std::vector raw; + for (const auto& s : ss) { + raw.push_back(s.data()); + } + auto output = ctx_.GetOutput(indice_, dims.data(), dims.size()); + // note - there will be copy ... + output.FillStringTensor(raw.data(), raw.size()); + } + const Span& AsSpan() { + ORT_CXX_API_THROW("span for TensorT of string view not implemented", OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + std::string_view AsScalar() { + if (input_string_views_.size() != 1) { + ORT_CXX_API_THROW("invalid shape while trying to get a scalar string view from Ort::Custom::Tensor", + OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + return input_string_views_[0]; + } + + private: + std::vector chars_; // for input + std::vector input_string_views_; // for input +}; + +using TensorPtr = std::unique_ptr; +using TensorPtrs = std::vector; + +struct TensorArray : public ArgBase { + TensorArray(OrtKernelContext* ctx, + size_t start_indice, + bool is_input) : ArgBase(ctx, + start_indice, + is_input) { + if (is_input) { + auto input_count = ctx_.GetInputCount(); + for (size_t ith_input = start_indice; ith_input < input_count; ++ith_input) { + auto const_value = ctx_.GetInput(start_indice); + auto type_shape_info = const_value.GetTensorTypeAndShapeInfo(); + auto type = type_shape_info.GetElementType(); + TensorPtr tensor; + switch (type) { + case ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING: + tensor = std::make_unique>(ctx, ith_input, true); + break; + default: + ORT_CXX_API_THROW("unknow input type", ORT_RUNTIME_EXCEPTION); + break; + } + tensors_.emplace_back(tensor.release()); + } // for + } + } + template + T* AllocateOutput(size_t ith_output, const std::vector& shape) { + // ith_output is the indice of output relative to the tensor array + // indice_ + ith_output is the indice relative to context + auto tensor = std::make_unique>(ctx_.GetOrtKernelContext(), indice_ + ith_output, false); + auto raw_output = tensor.get()->Allocate(shape); + tensors_.emplace_back(tensor.release()); + return raw_output; + } + Tensor& AllocateStringTensor(size_t ith_output) { + // ith_output is the indice of output relative to the tensor array + // indice_ + ith_output is the indice relative to context + auto tensor = std::make_unique>(ctx_.GetOrtKernelContext(), indice_ + ith_output, false); + Tensor& output = *tensor; + tensors_.emplace_back(tensor.release()); + return output; + } + size_t Size() const { + return tensors_.size(); + } + const TensorPtr& operator[](size_t ith_input) const { + // ith_input is the indice of output relative to the tensor array + return tensors_.at(ith_input); + } + + private: + TensorPtrs tensors_; +}; + +using Variadic = TensorArray; + +/* +Note: +OrtLiteCustomOp inherits from OrtCustomOp to bridge tween a custom func/struct and ort core. +The lifetime of an OrtLiteCustomOp instance is managed by customer code, not ort, so: +1. DO NOT cast OrtLiteCustomOp to OrtCustomOp and release since there is no virtual destructor in the hierarchy. +2. OrtLiteCustomFunc and OrtLiteCustomStruct, as two sub-structs, can be released in form of OrtLiteCustomOp since all members are kept in the OrtLiteCustomOp, + hence memory could still be recycled properly. +Further, OrtCustomOp is a c struct bearing no v-table, so offspring structs are by design to be of zero virtual functions to maintain cast safety. +*/ +struct OrtLiteCustomOp : public OrtCustomOp { + using ConstOptionalFloatTensor = std::optional&>; + using OptionalFloatTensor = std::optional>; + + // CreateTuple + template + static typename std::enable_if>::type + CreateTuple(OrtKernelContext*, ArgPtrs&, size_t, size_t, const std::string&) { + return std::make_tuple(); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + std::tuple current = std::tuple{context}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + std::tuple current = std::tuple{*context}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + +#ifdef ORT_CUDA_CTX + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + thread_local CudaContext cuda_context; + cuda_context.Init(*context); + std::tuple current = std::tuple{cuda_context}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } +#endif + +#ifdef ORT_ROCM_CTX + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + thread_local RocmContext rocm_context; + rocm_context.Init(*context); + std::tuple current = std::tuple{rocm_context}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } +#endif + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + args.push_back(std::make_unique(context, ith_input, true)); + std::tuple current = std::tuple{reinterpret_cast(args.back().get())}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + args.push_back(std::make_unique(context, ith_input, true)); + std::tuple current = std::tuple{reinterpret_cast(*args.back().get())}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + args.push_back(std::make_unique(context, ith_output, false)); + std::tuple current = std::tuple{reinterpret_cast(args.back().get())}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + args.push_back(std::make_unique(context, ith_output, false)); + std::tuple current = std::tuple{reinterpret_cast(*args.back().get())}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + +#define CREATE_TUPLE_INPUT(data_type) \ + template \ + static typename std::enable_if*>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast(args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if&>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast(*args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if*>>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if (ith_input < num_input) { \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } else { \ + std::tuple current = std::tuple{}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + } \ + template \ + static typename std::enable_if*>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("span input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{&reinterpret_cast*>(args.back().get())->AsSpan()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if&>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("span input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())->AsSpan()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if*>>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if (ith_input < num_input) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("span input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{&reinterpret_cast*>(args.back().get())->AsSpan()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } else { \ + std::tuple current = std::tuple{}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + } \ + template \ + static typename std::enable_if::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("scalar input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())->AsScalar()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if (ith_input < num_input) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("scalar input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())->AsScalar()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } else { \ + std::tuple current = std::tuple{}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + } +#define CREATE_TUPLE_OUTPUT(data_type) \ + template \ + static typename std::enable_if*>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + args.push_back(std::make_unique>(context, ith_output, false)); \ + std::tuple current = std::tuple{reinterpret_cast(args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if&>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + args.push_back(std::make_unique>(context, ith_output, false)); \ + std::tuple current = std::tuple{reinterpret_cast(*args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if*>>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if (ith_output < num_output) { \ + args.push_back(std::make_unique>(context, ith_output, false)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } else { \ + std::tuple current = std::tuple{}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + } +#define CREATE_TUPLE(data_type) \ + CREATE_TUPLE_INPUT(data_type) \ + CREATE_TUPLE_OUTPUT(data_type) + + CREATE_TUPLE(bool) + CREATE_TUPLE(float) + CREATE_TUPLE(Ort::Float16_t) + CREATE_TUPLE(Ort::BFloat16_t) + CREATE_TUPLE(double) + CREATE_TUPLE(int8_t) + CREATE_TUPLE(int16_t) + CREATE_TUPLE(int32_t) + CREATE_TUPLE(int64_t) + CREATE_TUPLE(uint8_t) + CREATE_TUPLE(uint16_t) + CREATE_TUPLE(uint32_t) + CREATE_TUPLE(uint64_t) + CREATE_TUPLE(std::string) + CREATE_TUPLE_INPUT(std::string_view) + CREATE_TUPLE(Ort::Float8E4M3FN_t) + CREATE_TUPLE(Ort::Float8E4M3FNUZ_t) + CREATE_TUPLE(Ort::Float8E5M2_t) + CREATE_TUPLE(Ort::Float8E5M2FNUZ_t) + + // ParseArgs ... + template + static typename std::enable_if<0 == sizeof...(Ts)>::type + ParseArgs(std::vector&, std::vector&) { + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + ParseArgs(input_types, output_types); + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + ParseArgs(input_types, output_types); + } + +#ifdef ORT_CUDA_CTX + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + ParseArgs(input_types, output_types); + } +#endif + +#ifdef ORT_ROCM_CTX + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + ParseArgs(input_types, output_types); + } +#endif + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + input_types.push_back(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); + ParseArgs(input_types, output_types); + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + input_types.push_back(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); + ParseArgs(input_types, output_types); + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + output_types.push_back(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); + ParseArgs(input_types, output_types); + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + output_types.push_back(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); + ParseArgs(input_types, output_types); + } + +#define PARSE_INPUT_BASE(pack_type, onnx_type) \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + input_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + input_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + input_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } + +#define PARSE_INPUT(data_type, onnx_type) \ + PARSE_INPUT_BASE(const Custom::Tensor*, onnx_type) \ + PARSE_INPUT_BASE(const Custom::Tensor&, onnx_type) \ + PARSE_INPUT_BASE(const Custom::Span*, onnx_type) \ + PARSE_INPUT_BASE(const Custom::Span&, onnx_type) \ + PARSE_INPUT_BASE(data_type, onnx_type) + +#define PARSE_OUTPUT(data_type, onnx_type) \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same*>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + output_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same&>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + output_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same*>>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + output_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } + +#define PARSE_ARGS(data_type, onnx_type) \ + PARSE_INPUT(data_type, onnx_type) \ + PARSE_OUTPUT(data_type, onnx_type) + + PARSE_ARGS(bool, ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL) + PARSE_ARGS(float, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT) + PARSE_ARGS(Ort::Float16_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16) + PARSE_ARGS(Ort::BFloat16_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16) + PARSE_ARGS(double, ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE) + PARSE_ARGS(int8_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8) + PARSE_ARGS(int16_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16) + PARSE_ARGS(int32_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32) + PARSE_ARGS(int64_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64) + PARSE_ARGS(uint8_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8) + PARSE_ARGS(uint16_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16) + PARSE_ARGS(uint32_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32) + PARSE_ARGS(uint64_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64) + PARSE_ARGS(std::string, ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING) + PARSE_ARGS(std::string_view, ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING) // todo - remove string_view output + PARSE_ARGS(Ort::Float8E4M3FN_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN) + PARSE_ARGS(Ort::Float8E4M3FNUZ_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ) + PARSE_ARGS(Ort::Float8E5M2_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2) + PARSE_ARGS(Ort::Float8E5M2FNUZ_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ) + + OrtLiteCustomOp(const char* op_name, + const char* execution_provider, + ShapeInferFn shape_infer_fn, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) : op_name_(op_name), + execution_provider_(execution_provider), + shape_infer_fn_(shape_infer_fn), + start_ver_(start_ver), + end_ver_(end_ver) { + OrtCustomOp::version = ORT_API_VERSION; + + OrtCustomOp::GetName = [](const OrtCustomOp* op) { return static_cast(op)->op_name_.c_str(); }; + OrtCustomOp::GetExecutionProviderType = [](const OrtCustomOp* op) { return ((OrtLiteCustomOp*)op)->execution_provider_.c_str(); }; + OrtCustomOp::GetInputMemoryType = [](const OrtCustomOp*, size_t) { return OrtMemTypeDefault; }; + + OrtCustomOp::GetInputTypeCount = [](const OrtCustomOp* op) { + auto self = reinterpret_cast(op); + return self->input_types_.size(); + }; + + OrtCustomOp::GetInputType = [](const OrtCustomOp* op, size_t indice) { + auto self = reinterpret_cast(op); + return self->input_types_[indice]; + }; + + OrtCustomOp::GetOutputTypeCount = [](const OrtCustomOp* op) { + auto self = reinterpret_cast(op); + return self->output_types_.size(); + }; + + OrtCustomOp::GetOutputType = [](const OrtCustomOp* op, size_t indice) { + auto self = reinterpret_cast(op); + return self->output_types_[indice]; + }; + + OrtCustomOp::GetInputCharacteristic = [](const OrtCustomOp* op, size_t indice) { + auto self = reinterpret_cast(op); + return self->input_types_[indice] == ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED ? INPUT_OUTPUT_VARIADIC : INPUT_OUTPUT_OPTIONAL; + }; + + OrtCustomOp::GetOutputCharacteristic = [](const OrtCustomOp* op, size_t indice) { + auto self = reinterpret_cast(op); + return self->output_types_[indice] == ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED ? INPUT_OUTPUT_VARIADIC : INPUT_OUTPUT_OPTIONAL; + }; + + OrtCustomOp::GetVariadicInputMinArity = [](const OrtCustomOp*) { + return 1; + }; + + OrtCustomOp::GetVariadicInputHomogeneity = [](const OrtCustomOp*) { + return 0; + }; + + OrtCustomOp::GetVariadicOutputMinArity = [](const OrtCustomOp*) { + return 1; + }; + + OrtCustomOp::GetVariadicOutputHomogeneity = [](const OrtCustomOp*) { + return 0; + }; + + OrtCustomOp::GetVariadicInputMinArity = [](const OrtCustomOp*) { return 0; }; + OrtCustomOp::GetVariadicInputHomogeneity = [](const OrtCustomOp*) { return 0; }; + OrtCustomOp::GetVariadicOutputMinArity = [](const OrtCustomOp*) { return 0; }; + OrtCustomOp::GetVariadicOutputHomogeneity = [](const OrtCustomOp*) { return 0; }; + + OrtCustomOp::CreateKernelV2 = {}; + OrtCustomOp::KernelComputeV2 = {}; + OrtCustomOp::KernelCompute = {}; + + OrtCustomOp::InferOutputShapeFn = {}; + + OrtCustomOp::GetStartVersion = [](const OrtCustomOp* op) { + auto self = reinterpret_cast(op); + return self->start_ver_; + }; + + OrtCustomOp::GetEndVersion = [](const OrtCustomOp* op) { + auto self = reinterpret_cast(op); + return self->end_ver_; + }; + + OrtCustomOp::GetMayInplace = {}; + OrtCustomOp::ReleaseMayInplace = {}; + OrtCustomOp::GetAliasMap = {}; + OrtCustomOp::ReleaseAliasMap = {}; + } + + const std::string op_name_; + const std::string execution_provider_; + + std::vector input_types_; + std::vector output_types_; + + ShapeInferFn shape_infer_fn_ = {}; + + int start_ver_ = 1; + int end_ver_ = MAX_CUSTOM_OP_END_VER; + + void* compute_fn_ = {}; + void* compute_fn_return_status_ = {}; +}; + +//////////////////////////// OrtLiteCustomFunc //////////////////////////////// +// The struct is to implement function-as-op. +// E.g. a function might be defined as: +// void Filter(const Ort::Custom::Tensor& floats_in, Ort::Custom::Tensor& floats_out) { ... } +// It could be registered this way: +// Ort::CustomOpDomain v2_domain{"v2"}; +// std::unique_ptr fil_op_ptr{Ort::Custom::CreateLiteCustomOp("Filter", "CPUExecutionProvider", Filter)}; +// v2_domain.Add(fil_op_ptr.get()); +// session_options.Add(v2_domain); +// For the complete example, please search keyword "LiteCustomOpTest" under "/onnxruntime/test/". +template +struct OrtLiteCustomFunc : public OrtLiteCustomOp { + using ComputeFn = void (*)(Args...); + using ComputeFnReturnStatus = Status (*)(Args...); + using MyType = OrtLiteCustomFunc; + + struct Kernel { + size_t num_input_{}; + size_t num_output_{}; + ComputeFn compute_fn_{}; + ComputeFnReturnStatus compute_fn_return_status_{}; + std::string ep_{}; + }; + + OrtLiteCustomFunc(const char* op_name, + const char* execution_provider, + ComputeFn compute_fn, + ShapeInferFn shape_infer_fn = {}, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) : OrtLiteCustomOp(op_name, execution_provider, shape_infer_fn, start_ver, end_ver) { + compute_fn_ = reinterpret_cast(compute_fn); + ParseArgs(input_types_, output_types_); + + OrtCustomOp::KernelCompute = [](void* op_kernel, OrtKernelContext* context) { + auto kernel = reinterpret_cast(op_kernel); + std::vector args; + auto t = CreateTuple<0, 0, Args...>(context, args, kernel->num_input_, kernel->num_output_, kernel->ep_); + std::apply([kernel](Args const&... t_args) { kernel->compute_fn_(t_args...); }, t); + }; + + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* ort_api, const OrtKernelInfo* info) { + auto kernel = std::make_unique(); + auto me = static_cast(this_); + kernel->compute_fn_ = reinterpret_cast(me->compute_fn_); + Ort::ThrowOnError(ort_api->KernelInfo_GetInputCount(info, &kernel->num_input_)); + Ort::ThrowOnError(ort_api->KernelInfo_GetOutputCount(info, &kernel->num_output_)); + auto self = static_cast(this_); + kernel->ep_ = self->execution_provider_; + return reinterpret_cast(kernel.release()); + }; + + OrtCustomOp::KernelDestroy = [](void* op_kernel) { + delete reinterpret_cast(op_kernel); + }; + + if (shape_infer_fn_) { + OrtCustomOp::InferOutputShapeFn = [](const OrtCustomOp* op, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr { + auto shape_info_fn = static_cast(op)->shape_infer_fn_; + ShapeInferContext ctx(&GetApi(), ort_ctx); + return shape_info_fn(ctx); + }; + } + } + + OrtLiteCustomFunc(const char* op_name, + const char* execution_provider, + ComputeFnReturnStatus compute_fn_return_status, + ShapeInferFn shape_infer_fn = {}, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) : OrtLiteCustomOp(op_name, execution_provider, shape_infer_fn, start_ver, end_ver) { + compute_fn_return_status_ = reinterpret_cast(compute_fn_return_status); + ParseArgs(input_types_, output_types_); + + OrtCustomOp::KernelComputeV2 = [](void* op_kernel, OrtKernelContext* context) -> OrtStatusPtr { + auto kernel = reinterpret_cast(op_kernel); + std::vector args; + auto t = CreateTuple<0, 0, Args...>(context, args, kernel->num_input_, kernel->num_output_, kernel->ep_); + return std::apply([kernel](Args const&... t_args) { Status status = kernel->compute_fn_return_status_(t_args...); return status.release(); }, t); + }; + + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* ort_api, const OrtKernelInfo* info) { + auto kernel = std::make_unique(); + auto me = static_cast(this_); + kernel->compute_fn_return_status_ = reinterpret_cast(me->compute_fn_return_status_); + Ort::ThrowOnError(ort_api->KernelInfo_GetInputCount(info, &kernel->num_input_)); + Ort::ThrowOnError(ort_api->KernelInfo_GetOutputCount(info, &kernel->num_output_)); + auto self = static_cast(this_); + kernel->ep_ = self->execution_provider_; + return reinterpret_cast(kernel.release()); + }; + + OrtCustomOp::KernelDestroy = [](void* op_kernel) { + delete reinterpret_cast(op_kernel); + }; + + if (shape_infer_fn_) { + OrtCustomOp::InferOutputShapeFn = [](const OrtCustomOp* op, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr { + auto shape_info_fn = static_cast(op)->shape_infer_fn_; + ShapeInferContext ctx(&GetApi(), ort_ctx); + return shape_info_fn(ctx); + }; + } + } +}; // struct OrtLiteCustomFunc + +/////////////////////////// OrtLiteCustomStruct /////////////////////////// +// The struct is to implement struct-as-op. +// E.g. a struct might be defined as: +// struct Merge { +// Merge(const OrtApi* ort_api, const OrtKernelInfo* info) {...} +// void Compute(const Ort::Custom::Tensor& strings_in, +// std::string_view string_in, +// Ort::Custom::Tensor* strings_out) {...} +// bool reverse_ = false; +// }; +// It could be registered this way: +// Ort::CustomOpDomain v2_domain{"v2"}; +// std::unique_ptr mrg_op_ptr{Ort::Custom::CreateLiteCustomOp("Merge", "CPUExecutionProvider")}; +// v2_domain.Add(mrg_op_ptr.get()); +// session_options.Add(v2_domain); +// For the complete example, please search keyword "LiteCustomOpTest" under "/onnxruntime/test/". +template +struct OrtLiteCustomStruct : public OrtLiteCustomOp { + template + using CustomComputeFn = void (CustomOp::*)(Args...); + + template + using CustomComputeFnReturnStatus = Status (CustomOp::*)(Args...); + + using MyType = OrtLiteCustomStruct; + + struct Kernel { + size_t num_input_{}; + size_t num_output_{}; + std::unique_ptr custom_op_; + std::string ep_{}; + }; + + OrtLiteCustomStruct(const char* op_name, + const char* execution_provider, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) : OrtLiteCustomOp(op_name, execution_provider, {}, start_ver, end_ver) { + SetCompute(&CustomOp::Compute); + + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* ort_api, const OrtKernelInfo* info) { + auto kernel = std::make_unique(); + Ort::ThrowOnError(ort_api->KernelInfo_GetInputCount(info, &kernel->num_input_)); + Ort::ThrowOnError(ort_api->KernelInfo_GetOutputCount(info, &kernel->num_output_)); + kernel->custom_op_ = std::make_unique(ort_api, info); + auto self = static_cast(this_); + kernel->ep_ = self->execution_provider_; + return reinterpret_cast(kernel.release()); + }; + + OrtCustomOp::KernelDestroy = [](void* op_kernel) { + delete reinterpret_cast(op_kernel); + }; + + SetShapeInfer(0); + } + + template + void SetCompute(CustomComputeFn) { + ParseArgs(input_types_, output_types_); + OrtCustomOp::KernelCompute = [](void* op_kernel, OrtKernelContext* context) { + auto kernel = reinterpret_cast(op_kernel); + ArgPtrs args; + auto t = CreateTuple<0, 0, Args...>(context, args, kernel->num_input_, kernel->num_output_, kernel->ep_); + std::apply([kernel](Args const&... t_args) { kernel->custom_op_->Compute(t_args...); }, t); + }; + } + + template + void SetCompute(CustomComputeFnReturnStatus) { + ParseArgs(input_types_, output_types_); + OrtCustomOp::KernelComputeV2 = [](void* op_kernel, OrtKernelContext* context) -> OrtStatusPtr { + auto kernel = reinterpret_cast(op_kernel); + ArgPtrs args; + auto t = CreateTuple<0, 0, Args...>(context, args, kernel->num_input_, kernel->num_output_, kernel->ep_); + return std::apply([kernel](Args const&... t_args) { Status status = kernel->custom_op_->Compute(t_args...); return status.release(); }, t); + }; + } + + template + decltype(&C::InferOutputShape) SetShapeInfer(decltype(&C::InferOutputShape)) { + OrtCustomOp::InferOutputShapeFn = [](const OrtCustomOp*, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr { + ShapeInferContext ctx(&GetApi(), ort_ctx); + return C::InferOutputShape(ctx); + }; + return {}; + } + + template + void SetShapeInfer(...) { + OrtCustomOp::InferOutputShapeFn = {}; + } +}; // struct OrtLiteCustomStruct + +/////////////////////////// CreateLiteCustomOp //////////////////////////// + +template +OrtLiteCustomOp* CreateLiteCustomOp(const char* op_name, + const char* execution_provider, + void (*custom_compute_fn)(Args...), + Status (*shape_infer_fn)(ShapeInferContext&) = {}, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) { + using LiteOp = OrtLiteCustomFunc; + return std::make_unique(op_name, execution_provider, custom_compute_fn, shape_infer_fn, start_ver, end_ver).release(); +} + +template +OrtLiteCustomOp* CreateLiteCustomOp(const char* op_name, + const char* execution_provider, + Status (*custom_compute_fn_v2)(Args...), + Status (*shape_infer_fn)(ShapeInferContext&) = {}, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) { + using LiteOp = OrtLiteCustomFunc; + return std::make_unique(op_name, execution_provider, custom_compute_fn_v2, shape_infer_fn, start_ver, end_ver).release(); +} + +template +OrtLiteCustomOp* CreateLiteCustomOp(const char* op_name, + const char* execution_provider, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) { + using LiteOp = OrtLiteCustomStruct; + return std::make_unique(op_name, execution_provider, start_ver, end_ver).release(); +} + +} // namespace Custom +} // namespace Ort diff --git a/src/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.def b/src/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.def new file mode 100644 index 00000000..4daf2d4e --- /dev/null +++ b/src/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.def @@ -0,0 +1,10 @@ +; +; Definition file of onnxruntime.dll +; Automatic generated by gendef 1.1 +; written by Kai Tietz 2008 +; The def file has to be processed by --kill-at (-k) option of dlltool or ld +; +LIBRARY "onnxruntime.dll" +EXPORTS +OrtGetApiBase +OrtSessionOptionsAppendExecutionProvider_CPU diff --git a/src/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.dll b/src/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.dll new file mode 100644 index 00000000..76764755 Binary files /dev/null and b/src/热成像识别/cpp/third_party/onnxruntime/lib/onnxruntime.dll differ diff --git a/src/热成像识别/label_tool.py b/src/热成像识别/label_tool.py deleted file mode 100644 index 036b4e70..00000000 --- a/src/热成像识别/label_tool.py +++ /dev/null @@ -1,290 +0,0 @@ -""" -热成像威胁标注工具 — 手动标记训练数据 - -操作方式: - 鼠标左键拖拽 → 绘制矩形框 - P → 标记为 Person (人员) - B → 标记为 Barrel Overheat (枪管过热) - W → 标记为 Cold Weapon (冷武器) - F → 标记为 Flash Residue (闪光残留) - H → 标记为 Hotspot (热点) - D → 删除最后一个标注 - C → 清除所有标注 - S → 保存并下一张 - N → 不保存,跳到下一张 - Q → 退出 - 左右箭头 → 切换图片 - -用法: - python label_tool.py # 标注 test/test_images/ 下所有图片 - python label_tool.py path/to/images/ # 标注指定目录 - python label_tool.py photo1.jpg photo2.jpg # 标注指定图片 - python label_tool.py --review # 只查看已有标注 -""" - -import cv2 -import numpy as np -import json -import os -import sys -import glob - -THREAT_TYPES = { - 'P': ('Person', (0, 255, 0)), - 'B': ('Barrel_Overheat', (0, 165, 255)), - 'W': ('Cold_Weapon', (255, 255, 0)), - 'F': ('Flash_Residue', (0, 255, 255)), - 'H': ('Hotspot', (0, 0, 255)), -} - -LABEL_FILE = 'labels.json' - - -def load_labels(label_path): - if os.path.exists(label_path): - with open(label_path, 'r', encoding='utf-8') as f: - return json.load(f) - return {} - - -def save_labels(label_path, data): - with open(label_path, 'w', encoding='utf-8') as f: - json.dump(data, f, ensure_ascii=False, indent=2) - - -def draw_labels(image, labels): - vis = image.copy() - for lb in labels: - x, y, w, h = lb['bbox'] - color = (0, 0, 0) - for key, (name, c) in THREAT_TYPES.items(): - if name == lb['type']: - color = c - break - cv2.rectangle(vis, (x, y), (x + w, y + h), color, 2) - label_text = lb['type'] - cv2.putText(vis, label_text, (x, y - 5), - cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 1) - return vis - - -class LabelTool: - def __init__(self, image_paths, label_path, review_only=False): - self.image_paths = image_paths - self.label_path = label_path - self.review_only = review_only - self.all_labels = load_labels(label_path) - self.idx = 0 - - self.current_labels = [] - self.drawing = False - self.rect_start = None - self.rect_end = None - self.display = None - self.original = None - self._pending_rect = None - - self.win = 'Label Tool' - cv2.namedWindow(self.win, cv2.WINDOW_NORMAL) - cv2.setMouseCallback(self.win, self._mouse_cb) - - def _load_current(self): - path = self.image_paths[self.idx] - buf = np.fromfile(path, dtype=np.uint8) - img = cv2.imdecode(buf, cv2.IMREAD_COLOR) - if img is None: - img = cv2.imdecode(buf, cv2.IMREAD_GRAYSCALE) - if img is not None: - img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR) - if img is None: - print(f"无法读取: {path}") - return False - - self.original = img.copy() - fname = os.path.basename(path) - self.current_labels = self.all_labels.get(fname, []) - self._redraw() - return True - - def _redraw(self): - self.display = draw_labels(self.original, self.current_labels) - path = self.image_paths[self.idx] - fname = os.path.basename(path) - info = f"[{self.idx+1}/{len(self.image_paths)}] {fname} | {len(self.current_labels)} labels" - cv2.putText(self.display, info, (10, 25), - cv2.FONT_HERSHEY_SIMPLEX, 0.6, (255, 255, 255), 1) - help_y = self.display.shape[0] - 10 - help_text = "P:Person B:Barrel W:Weapon F:Flash H:Hotspot D:Del C:Clear S:Save N:Skip Q:Quit" - cv2.putText(self.display, help_text, (10, help_y), - cv2.FONT_HERSHEY_SIMPLEX, 0.4, (200, 200, 200), 1) - cv2.imshow(self.win, self.display) - - def _mouse_cb(self, event, x, y, flags, param): - if self.review_only: - return - if event == cv2.EVENT_LBUTTONDOWN: - self.drawing = True - self.rect_start = (x, y) - self.rect_end = (x, y) - elif event == cv2.EVENT_MOUSEMOVE and self.drawing: - self.rect_end = (x, y) - vis = self.display.copy() - cv2.rectangle(vis, self.rect_start, self.rect_end, (255, 255, 255), 1) - cv2.imshow(self.win, vis) - elif event == cv2.EVENT_LBUTTONUP: - self.drawing = False - self.rect_end = (x, y) - x1, y1 = self.rect_start - x2, y2 = self.rect_end - rx, ry = min(x1, x2), min(y1, y2) - rw, rh = abs(x2 - x1), abs(y2 - y1) - if rw < 5 or rh < 5: - return - self._pending_rect = (rx, ry, rw, rh) - print(f" 框选: ({rx},{ry}) {rw}x{rh} -> 按 P/B/W/F/H 选类型") - - def _add_label(self, type_name): - if not self._pending_rect: - print(" 请先框选区域") - return - x, y, w, h = self._pending_rect - self.current_labels.append({ - 'type': type_name, - 'bbox': [x, y, w, h], - }) - print(f" + {type_name} at ({x},{y}) {w}x{h}") - self._pending_rect = None - self._redraw() - - def _save_current(self): - path = self.image_paths[self.idx] - fname = os.path.basename(path) - self.all_labels[fname] = self.current_labels - save_labels(self.label_path, self.all_labels) - print(f" 已保存 {fname}: {len(self.current_labels)} labels") - - def _next(self): - if self.idx + 1 < len(self.image_paths): - self.idx += 1 - self._load_current() - else: - print("已是最后一张") - - def _prev(self): - if self.idx > 0: - self.idx -= 1 - self._load_current() - else: - print("已是第一张") - - def run(self): - if not self.image_paths: - print("没有可标注的图片") - return - if not self._load_current(): - return - - print("\n=== 热成像标注工具 ===") - print("鼠标拖拽框选 -> 按键选类型 (P/B/W/F/H)") - print("D=删除最后 C=清空 S=保存 N=跳过 Q=退出") - print("左右箭头切换图片\n") - - while True: - key = cv2.waitKey(50) & 0xFF - - if key == ord('q') or key == 27: - break - elif key == ord('p'): - self._add_label('Person') - elif key == ord('b'): - self._add_label('Barrel_Overheat') - elif key == ord('w'): - self._add_label('Cold_Weapon') - elif key == ord('f'): - self._add_label('Flash_Residue') - elif key == ord('h'): - self._add_label('Hotspot') - elif key == ord('d') and not self.review_only: - if self.current_labels: - removed = self.current_labels.pop() - print(f" - 删除: {removed['type']}") - self._redraw() - elif key == ord('c') and not self.review_only: - self.current_labels = [] - print(" 已清除所有标注") - self._redraw() - elif key == ord('s'): - self._save_current() - self._next() - elif key == ord('n'): - self._next() - elif key == 83 or key == ord('.'): - self._next() - elif key == 81 or key == ord(','): - self._prev() - - path = self.image_paths[self.idx] - fname = os.path.basename(path) - if self.current_labels: - self.all_labels[fname] = self.current_labels - save_labels(self.label_path, self.all_labels) - print(f"\n自动保存 {fname}") - - cv2.destroyAllWindows() - - total = sum(len(v) for v in self.all_labels.values()) - print(f"\n标注完成: {len(self.all_labels)} 张图片, {total} 个标注") - print(f"保存至: {self.label_path}") - - -def collect_images(source): - images = [] - if isinstance(source, str) and os.path.isdir(source): - for ext in ['*.jpg', '*.jpeg', '*.png', '*.bmp', '*.tif']: - images.extend(glob.glob(os.path.join(source, ext))) - elif isinstance(source, list): - for s in source: - if os.path.isfile(s): - images.append(s) - elif os.path.isdir(s): - images.extend(collect_images(s)) - images.sort() - return images - - -def main(): - review = '--review' in sys.argv - args = [a for a in sys.argv[1:] if not a.startswith('--')] - - if args: - if all(os.path.isfile(a) for a in args): - image_dir = None - image_paths = args - else: - image_dir = args[0] - image_paths = collect_images(image_dir) - else: - script_dir = os.path.dirname(os.path.abspath(__file__)) - image_dir = os.path.join(script_dir, 'test', 'test_images') - image_paths = collect_images(image_dir) - - if not image_paths: - print("没有找到可标注的图片") - print("用法: python label_tool.py [图片目录 | 图片1 图片2 ...]") - return - - if image_dir: - label_path = os.path.join(image_dir, '..', LABEL_FILE) - else: - label_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), LABEL_FILE) - label_path = os.path.abspath(label_path) - - print(f"图片: {len(image_paths)} 张") - print(f"标注文件: {label_path}") - - tool = LabelTool(image_paths, label_path, review_only=review) - tool.run() - - -if __name__ == '__main__': - main() diff --git a/src/热成像识别/test/labels.json b/src/热成像识别/test/labels.json index ee032a8f..3306b05e 100644 --- a/src/热成像识别/test/labels.json +++ b/src/热成像识别/test/labels.json @@ -44,6 +44,33 @@ 50, 38 ] + }, + { + "type": "Person", + "bbox": [ + 984, + 519, + 88, + 68 + ] + }, + { + "type": "Person", + "bbox": [ + 796, + 609, + 110, + 93 + ] + }, + { + "type": "Person", + "bbox": [ + 669, + 602, + 99, + 86 + ] } ], "20260510170127_1.jpg": [ @@ -485,5 +512,358 @@ 396 ] } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.43.29.53.png": [ + { + "type": "Person", + "bbox": [ + 785, + 179, + 182, + 273 + ] + }, + { + "type": "Person", + "bbox": [ + 558, + 239, + 155, + 142 + ] + }, + { + "type": "Person", + "bbox": [ + 1067, + 273, + 110, + 116 + ] + }, + { + "type": "Person", + "bbox": [ + 989, + 262, + 83, + 119 + ] + }, + { + "type": "Person", + "bbox": [ + 1249, + 247, + 94, + 149 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.47.49.85.png": [ + { + "type": "Person", + "bbox": [ + 812, + 587, + 89, + 97 + ] + }, + { + "type": "Person", + "bbox": [ + 453, + 654, + 166, + 119 + ] + }, + { + "type": "Person", + "bbox": [ + 939, + 497, + 94, + 101 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.52.49.37.png": [ + { + "type": "Person", + "bbox": [ + 1006, + 475, + 143, + 153 + ] + }, + { + "type": "Person", + "bbox": [ + 757, + 430, + 127, + 82 + ] + }, + { + "type": "Person", + "bbox": [ + 619, + 404, + 77, + 82 + ] + }, + { + "type": "Person", + "bbox": [ + 519, + 362, + 89, + 98 + ] + }, + { + "type": "Person", + "bbox": [ + 1183, + 437, + 105, + 101 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.53.10.76.png": [ + { + "type": "Person", + "bbox": [ + 647, + 396, + 132, + 112 + ] + }, + { + "type": "Person", + "bbox": [ + 1033, + 415, + 172, + 157 + ] + }, + { + "type": "Person", + "bbox": [ + 757, + 355, + 77, + 78 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.53.24.08.png": [ + { + "type": "Person", + "bbox": [ + 829, + 467, + 105, + 235 + ] + }, + { + "type": "Person", + "bbox": [ + 641, + 370, + 116, + 142 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.53.37.41.png": [ + { + "type": "Person", + "bbox": [ + 1022, + 340, + 216, + 213 + ] + }, + { + "type": "Person", + "bbox": [ + 757, + 247, + 138, + 186 + ] + }, + { + "type": "Person", + "bbox": [ + 547, + 239, + 127, + 146 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.53.57.13.png": [ + { + "type": "Person", + "bbox": [ + 801, + 531, + 89, + 89 + ] + }, + { + "type": "Person", + "bbox": [ + 962, + 471, + 77, + 101 + ] + }, + { + "type": "Person", + "bbox": [ + 658, + 463, + 121, + 79 + ] + }, + { + "type": "Person", + "bbox": [ + 597, + 407, + 77, + 68 + ] + }, + { + "type": "Person", + "bbox": [ + 519, + 366, + 100, + 82 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.54.09.74.png": [ + { + "type": "Person", + "bbox": [ + 906, + 493, + 105, + 94 + ] + }, + { + "type": "Person", + "bbox": [ + 630, + 497, + 99, + 75 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.54.59.57.png": [ + { + "type": "Person", + "bbox": [ + 851, + 557, + 122, + 78 + ] + }, + { + "type": "Person", + "bbox": [ + 707, + 658, + 83, + 104 + ] + }, + { + "type": "Person", + "bbox": [ + 895, + 277, + 105, + 123 + ] + }, + { + "type": "Person", + "bbox": [ + 967, + 179, + 83, + 101 + ] + }, + { + "type": "Person", + "bbox": [ + 1067, + 172, + 71, + 82 + ] + } + ], + "ArmA 3 Screenshot 2026.05.24 - 10.55.10.88.png": [ + { + "type": "Person", + "bbox": [ + 807, + 385, + 72, + 60 + ] + }, + { + "type": "Person", + "bbox": [ + 901, + 456, + 66, + 116 + ] + }, + { + "type": "Person", + "bbox": [ + 729, + 680, + 133, + 123 + ] + }, + { + "type": "Person", + "bbox": [ + 1210, + 639, + 149, + 134 + ] + } ] } \ No newline at end of file diff --git a/src/热成像识别/test/output_yolo/result_20260510170010_1.jpg b/src/热成像识别/test/output_yolo/result_20260510170010_1.jpg new file mode 100644 index 00000000..f05fc1e9 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_20260510170010_1.jpg differ diff --git a/src/热成像识别/test/output_yolo/result_20260510170100_1.jpg b/src/热成像识别/test/output_yolo/result_20260510170100_1.jpg new file mode 100644 index 00000000..97deb28e Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_20260510170100_1.jpg differ diff --git a/src/热成像识别/test/output_yolo/result_20260510170106_1.jpg b/src/热成像识别/test/output_yolo/result_20260510170106_1.jpg new file mode 100644 index 00000000..97deb28e Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_20260510170106_1.jpg differ diff --git a/src/热成像识别/test/output_yolo/result_20260510170110_1.jpg b/src/热成像识别/test/output_yolo/result_20260510170110_1.jpg new file mode 100644 index 00000000..21af0c1e Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_20260510170110_1.jpg differ diff --git a/src/热成像识别/test/output_yolo/result_20260510170127_1.jpg b/src/热成像识别/test/output_yolo/result_20260510170127_1.jpg new file mode 100644 index 00000000..1f5e5e28 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_20260510170127_1.jpg differ diff --git a/src/热成像识别/test/output_yolo/result_20260510170152_1.jpg b/src/热成像识别/test/output_yolo/result_20260510170152_1.jpg new file mode 100644 index 00000000..2201f7d4 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_20260510170152_1.jpg differ diff --git a/src/热成像识别/test/output_yolo/result_20260510170205_1.jpg b/src/热成像识别/test/output_yolo/result_20260510170205_1.jpg new file mode 100644 index 00000000..b819cee3 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_20260510170205_1.jpg differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.43.29.53.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.43.29.53.png new file mode 100644 index 00000000..c9732a46 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.43.29.53.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.47.49.85.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.47.49.85.png new file mode 100644 index 00000000..f3904d76 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.47.49.85.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.52.49.37.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.52.49.37.png new file mode 100644 index 00000000..e1917009 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.52.49.37.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.10.76.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.10.76.png new file mode 100644 index 00000000..60d72e2f Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.10.76.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.24.08.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.24.08.png new file mode 100644 index 00000000..ec128608 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.24.08.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.37.41.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.37.41.png new file mode 100644 index 00000000..a1f47208 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.37.41.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.57.13.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.57.13.png new file mode 100644 index 00000000..d068aa16 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.53.57.13.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.54.09.74.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.54.09.74.png new file mode 100644 index 00000000..3ab0abf0 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.54.09.74.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.54.59.57.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.54.59.57.png new file mode 100644 index 00000000..72f0ac11 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.54.59.57.png differ diff --git a/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.55.10.88.png b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.55.10.88.png new file mode 100644 index 00000000..4d5775d9 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_ArmA 3 Screenshot 2026.05.24 - 10.55.10.88.png differ diff --git a/src/热成像识别/test/output_yolo/result_Thermal_ColdGun_001_processed.png b/src/热成像识别/test/output_yolo/result_Thermal_ColdGun_001_processed.png new file mode 100644 index 00000000..0827b088 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_Thermal_ColdGun_001_processed.png differ diff --git a/src/热成像识别/test/output_yolo/result_fusion_20260510170010_1.jpg b/src/热成像识别/test/output_yolo/result_fusion_20260510170010_1.jpg new file mode 100644 index 00000000..3e090b51 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_fusion_20260510170010_1.jpg differ diff --git a/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224413_383_75.png b/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224413_383_75.png new file mode 100644 index 00000000..93fbfe0e Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224413_383_75.png differ diff --git a/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224418_384_75.png b/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224418_384_75.png new file mode 100644 index 00000000..efd5bd01 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224418_384_75.png differ diff --git a/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224424_385_75.png b/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224424_385_75.png new file mode 100644 index 00000000..13f7b1a7 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224424_385_75.png differ diff --git a/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224430_386_75.png b/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224430_386_75.png new file mode 100644 index 00000000..5be2a8b5 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_寰俊鍥剧墖_20260503224430_386_75.png differ diff --git a/src/热成像识别/test/output_yolo/result_微信图片_20260503224413_383_75.png b/src/热成像识别/test/output_yolo/result_微信图片_20260503224413_383_75.png new file mode 100644 index 00000000..dd25d1e5 Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_微信图片_20260503224413_383_75.png differ diff --git a/src/热成像识别/test/output_yolo/result_微信图片_20260503224418_384_75.png b/src/热成像识别/test/output_yolo/result_微信图片_20260503224418_384_75.png new file mode 100644 index 00000000..8fd7244d Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_微信图片_20260503224418_384_75.png differ diff --git a/src/热成像识别/test/output_yolo/result_微信图片_20260503224424_385_75.png b/src/热成像识别/test/output_yolo/result_微信图片_20260503224424_385_75.png new file mode 100644 index 00000000..c52a835f Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_微信图片_20260503224424_385_75.png differ diff --git a/src/热成像识别/test/output_yolo/result_微信图片_20260503224430_386_75.png b/src/热成像识别/test/output_yolo/result_微信图片_20260503224430_386_75.png new file mode 100644 index 00000000..c293d71c Binary files /dev/null and b/src/热成像识别/test/output_yolo/result_微信图片_20260503224430_386_75.png differ diff --git a/src/热成像识别/test/output_yolo/results.json b/src/热成像识别/test/output_yolo/results.json new file mode 100644 index 00000000..2cea09cb --- /dev/null +++ b/src/热成像识别/test/output_yolo/results.json @@ -0,0 +1,553 @@ +{ + "20260510170010_1.jpg": [ + { + "type": "Person", + "bbox": [ + 882, + 283, + 76, + 131 + ], + "confidence": 0.8 + }, + { + "type": "Person", + "bbox": [ + 883, + 394, + 22, + 39 + ], + "confidence": 0.78 + }, + { + "type": "Person", + "bbox": [ + 883, + 476, + 125, + 58 + ], + "confidence": 0.75 + }, + { + "type": "Person", + "bbox": [ + 819, + 624, + 46, + 24 + ], + "confidence": 0.68 + }, + { + "type": "Person", + "bbox": [ + 1472, + 303, + 42, + 90 + ], + "confidence": 0.65 + }, + { + "type": "Person", + "bbox": [ + 182, + 391, + 63, + 24 + ], + "confidence": 0.65 + }, + { + "type": "Person", + "bbox": [ + 603, + 450, + 97, + 49 + ], + "confidence": 0.65 + }, + { + "type": "Person", + "bbox": [ + 1400, + 525, + 141, + 58 + ], + "confidence": 0.6 + }, + { + "type": "Person", + "bbox": [ + 294, + 394, + 53, + 22 + ], + "confidence": 0.55 + } + ], + "20260510170100_1.jpg": [ + { + "type": "Person", + "bbox": [ + 1452, + 376, + 169, + 119 + ], + "confidence": 0.8 + }, + { + "type": "Person", + "bbox": [ + 907, + 416, + 51, + 22 + ], + "confidence": 0.68 + }, + { + "type": "Person", + "bbox": [ + 699, + 362, + 27, + 45 + ], + "confidence": 0.63 + }, + { + "type": "Person", + "bbox": [ + 834, + 445, + 42, + 44 + ], + "confidence": 0.63 + }, + { + "type": "Person", + "bbox": [ + 732, + 435, + 63, + 28 + ], + "confidence": 0.6 + }, + { + "type": "Person", + "bbox": [ + 949, + 338, + 43, + 25 + ], + "confidence": 0.58 + } + ], + "20260510170106_1.jpg": [ + { + "type": "Person", + "bbox": [ + 1452, + 376, + 169, + 119 + ], + "confidence": 0.8 + }, + { + "type": "Person", + "bbox": [ + 907, + 416, + 51, + 22 + ], + "confidence": 0.68 + }, + { + "type": "Person", + "bbox": [ + 699, + 362, + 27, + 45 + ], + "confidence": 0.63 + }, + { + "type": "Person", + "bbox": [ + 834, + 445, + 42, + 44 + ], + "confidence": 0.63 + }, + { + "type": "Person", + "bbox": [ + 732, + 435, + 63, + 28 + ], + "confidence": 0.6 + }, + { + "type": "Person", + "bbox": [ + 949, + 338, + 43, + 25 + ], + "confidence": 0.58 + } + ], + "20260510170110_1.jpg": [ + { + "type": "Person", + "bbox": [ + 737, + 490, + 26, + 43 + ], + "confidence": 0.78 + }, + { + "type": "Person", + "bbox": [ + 1610, + 68, + 28, + 30 + ], + "confidence": 0.68 + }, + { + "type": "Person", + "bbox": [ + 941, + 549, + 51, + 21 + ], + "confidence": 0.68 + }, + { + "type": "Person", + "bbox": [ + 765, + 564, + 56, + 25 + ], + "confidence": 0.68 + }, + { + "type": "Person", + "bbox": [ + 867, + 576, + 43, + 51 + ], + "confidence": 0.55 + }, + { + "type": "Person", + "bbox": [ + 188, + 59, + 41, + 40 + ], + "confidence": 0.53 + }, + { + "type": "Person", + "bbox": [ + 31, + 143, + 36, + 36 + ], + "confidence": 0.53 + }, + { + "type": "Person", + "bbox": [ + 982, + 473, + 44, + 23 + ], + "confidence": 0.53 + } + ], + "20260510170127_1.jpg": [ + { + "type": "Person", + "bbox": [ + 1300, + 463, + 110, + 115 + ], + "confidence": 0.8 + }, + { + "type": "Person", + "bbox": [ + 386, + 607, + 274, + 82 + ], + "confidence": 0.75 + }, + { + "type": "Person", + "bbox": [ + 485, + 779, + 68, + 21 + ], + "confidence": 0.75 + }, + { + "type": "Person", + "bbox": [ + 17, + 345, + 41, + 47 + ], + "confidence": 0.65 + }, + { + "type": "Person", + "bbox": [ + 532, + 243, + 61, + 18 + ], + "confidence": 0.58 + }, + { + "type": "Person", + "bbox": [ + 274, + 323, + 30, + 33 + ], + "confidence": 0.58 + }, + { + "type": "Person", + "bbox": [ + 1376, + 333, + 31, + 40 + ], + "confidence": 0.58 + }, + { + "type": "Person", + "bbox": [ + 979, + 522, + 44, + 62 + ], + "confidence": 0.5 + } + ], + "20260510170152_1.jpg": [], + "20260510170205_1.jpg": [ + { + "type": "Person", + "bbox": [ + 796, + 330, + 47, + 48 + ], + "confidence": 0.85 + }, + { + "type": "Person", + "bbox": [ + 773, + 603, + 28, + 57 + ], + "confidence": 0.85 + }, + { + "type": "Person", + "bbox": [ + 792, + 139, + 150, + 188 + ], + "confidence": 0.75 + }, + { + "type": "Person", + "bbox": [ + 96, + 194, + 40, + 44 + ], + "confidence": 0.75 + }, + { + "type": "Person", + "bbox": [ + 912, + 569, + 55, + 25 + ], + "confidence": 0.75 + }, + { + "type": "Person", + "bbox": [ + 679, + 753, + 52, + 28 + ], + "confidence": 0.75 + }, + { + "type": "Person", + "bbox": [ + 1432, + 340, + 83, + 52 + ], + "confidence": 0.6 + }, + { + "type": "Person", + "bbox": [ + 629, + 312, + 67, + 22 + ], + "confidence": 0.53 + }, + { + "type": "Person", + "bbox": [ + 267, + 537, + 42, + 29 + ], + "confidence": 0.53 + } + ], + "Thermal_ColdGun_001_processed.png": [], + "微信图片_20260503224413_383_75.png": [ + { + "type": "Person", + "bbox": [ + 1286, + 155, + 52, + 53 + ], + "confidence": 0.85 + }, + { + "type": "Person", + "bbox": [ + 1183, + 151, + 57, + 64 + ], + "confidence": 0.75 + }, + { + "type": "Person", + "bbox": [ + 903, + 99, + 55, + 59 + ], + "confidence": 0.65 + }, + { + "type": "Person", + "bbox": [ + 1353, + 191, + 70, + 45 + ], + "confidence": 0.6 + } + ], + "微信图片_20260503224418_384_75.png": [], + "微信图片_20260503224424_385_75.png": [ + { + "type": "Person", + "bbox": [ + 817, + 127, + 44, + 47 + ], + "confidence": 0.85 + }, + { + "type": "Person", + "bbox": [ + 554, + 160, + 73, + 62 + ], + "confidence": 0.65 + } + ], + "微信图片_20260503224430_386_75.png": [ + { + "type": "Person", + "bbox": [ + 509, + 79, + 50, + 50 + ], + "confidence": 0.85 + } + ] +} \ No newline at end of file diff --git a/src/热成像识别/test/test_images/.gitkeep b/src/热成像识别/test/test_images/.gitkeep deleted file mode 100644 index 48cdce85..00000000 --- a/src/热成像识别/test/test_images/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -placeholder diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.43.29.53.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.43.29.53.png new file mode 100644 index 00000000..d541efe8 Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.43.29.53.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.47.49.85.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.47.49.85.png new file mode 100644 index 00000000..771ccd00 Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.47.49.85.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.52.49.37.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.52.49.37.png new file mode 100644 index 00000000..5a123164 Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.52.49.37.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.10.76.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.10.76.png new file mode 100644 index 00000000..139598a9 Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.10.76.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.24.08.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.24.08.png new file mode 100644 index 00000000..85a552ef Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.24.08.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.37.41.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.37.41.png new file mode 100644 index 00000000..d279e1a4 Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.37.41.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.57.13.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.57.13.png new file mode 100644 index 00000000..cb327283 Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.53.57.13.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.54.09.74.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.54.09.74.png new file mode 100644 index 00000000..d67d4cf5 Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.54.09.74.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.54.59.57.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.54.59.57.png new file mode 100644 index 00000000..dd5d961a Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.54.59.57.png differ diff --git a/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.55.10.88.png b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.55.10.88.png new file mode 100644 index 00000000..b24201ec Binary files /dev/null and b/src/热成像识别/test/test_images/ArmA 3 Screenshot 2026.05.24 - 10.55.10.88.png differ diff --git a/src/热成像识别/test/test_images/fusion_20260510170010_1.jpg b/src/热成像识别/test/test_images/fusion_20260510170010_1.jpg deleted file mode 100644 index 717f11bf..00000000 Binary files a/src/热成像识别/test/test_images/fusion_20260510170010_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_20260510170010_1.jpg b/src/热成像识别/test/test_images/result_20260510170010_1.jpg index 717f11bf..6c8e6609 100644 Binary files a/src/热成像识别/test/test_images/result_20260510170010_1.jpg and b/src/热成像识别/test/test_images/result_20260510170010_1.jpg differ diff --git a/src/热成像识别/test/test_images/result_20260510170100_1.jpg b/src/热成像识别/test/test_images/result_20260510170100_1.jpg deleted file mode 100644 index 2281ddd2..00000000 Binary files a/src/热成像识别/test/test_images/result_20260510170100_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_20260510170106_1.jpg b/src/热成像识别/test/test_images/result_20260510170106_1.jpg deleted file mode 100644 index 2281ddd2..00000000 Binary files a/src/热成像识别/test/test_images/result_20260510170106_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_20260510170110_1.jpg b/src/热成像识别/test/test_images/result_20260510170110_1.jpg deleted file mode 100644 index 48f72b46..00000000 Binary files a/src/热成像识别/test/test_images/result_20260510170110_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_20260510170127_1.jpg b/src/热成像识别/test/test_images/result_20260510170127_1.jpg deleted file mode 100644 index 0c2ed5ca..00000000 Binary files a/src/热成像识别/test/test_images/result_20260510170127_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_20260510170152_1.jpg b/src/热成像识别/test/test_images/result_20260510170152_1.jpg deleted file mode 100644 index d0626460..00000000 Binary files a/src/热成像识别/test/test_images/result_20260510170152_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_20260510170205_1.jpg b/src/热成像识别/test/test_images/result_20260510170205_1.jpg deleted file mode 100644 index a8cf144f..00000000 Binary files a/src/热成像识别/test/test_images/result_20260510170205_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_Thermal_ColdGun_001_processed.png b/src/热成像识别/test/test_images/result_Thermal_ColdGun_001_processed.png deleted file mode 100644 index 80fa96cd..00000000 Binary files a/src/热成像识别/test/test_images/result_Thermal_ColdGun_001_processed.png and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_20260510170010_1.jpg b/src/热成像识别/test/test_images/result_result_20260510170010_1.jpg deleted file mode 100644 index 5649cd9b..00000000 Binary files a/src/热成像识别/test/test_images/result_result_20260510170010_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_20260510170100_1.jpg b/src/热成像识别/test/test_images/result_result_20260510170100_1.jpg deleted file mode 100644 index 205ae9cf..00000000 Binary files a/src/热成像识别/test/test_images/result_result_20260510170100_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_20260510170106_1.jpg b/src/热成像识别/test/test_images/result_result_20260510170106_1.jpg deleted file mode 100644 index 205ae9cf..00000000 Binary files a/src/热成像识别/test/test_images/result_result_20260510170106_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_20260510170110_1.jpg b/src/热成像识别/test/test_images/result_result_20260510170110_1.jpg deleted file mode 100644 index f920633b..00000000 Binary files a/src/热成像识别/test/test_images/result_result_20260510170110_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_20260510170127_1.jpg b/src/热成像识别/test/test_images/result_result_20260510170127_1.jpg deleted file mode 100644 index 64ca7ce0..00000000 Binary files a/src/热成像识别/test/test_images/result_result_20260510170127_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_20260510170152_1.jpg b/src/热成像识别/test/test_images/result_result_20260510170152_1.jpg deleted file mode 100644 index 653c3773..00000000 Binary files a/src/热成像识别/test/test_images/result_result_20260510170152_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_20260510170205_1.jpg b/src/热成像识别/test/test_images/result_result_20260510170205_1.jpg deleted file mode 100644 index 1e8fbfc0..00000000 Binary files a/src/热成像识别/test/test_images/result_result_20260510170205_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_result_20260510170010_1.jpg b/src/热成像识别/test/test_images/result_result_result_20260510170010_1.jpg deleted file mode 100644 index 52fde594..00000000 Binary files a/src/热成像识别/test/test_images/result_result_result_20260510170010_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_result_result_20260510170127_1.jpg b/src/热成像识别/test/test_images/result_result_result_20260510170127_1.jpg deleted file mode 100644 index 0d628ce9..00000000 Binary files a/src/热成像识别/test/test_images/result_result_result_20260510170127_1.jpg and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_微信图片_20260503224413_383_75.png b/src/热成像识别/test/test_images/result_微信图片_20260503224413_383_75.png deleted file mode 100644 index cfb6e9c9..00000000 Binary files a/src/热成像识别/test/test_images/result_微信图片_20260503224413_383_75.png and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_微信图片_20260503224418_384_75.png b/src/热成像识别/test/test_images/result_微信图片_20260503224418_384_75.png deleted file mode 100644 index ecdd4f42..00000000 Binary files a/src/热成像识别/test/test_images/result_微信图片_20260503224418_384_75.png and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_微信图片_20260503224424_385_75.png b/src/热成像识别/test/test_images/result_微信图片_20260503224424_385_75.png deleted file mode 100644 index b5355ed4..00000000 Binary files a/src/热成像识别/test/test_images/result_微信图片_20260503224424_385_75.png and /dev/null differ diff --git a/src/热成像识别/test/test_images/result_微信图片_20260503224430_386_75.png b/src/热成像识别/test/test_images/result_微信图片_20260503224430_386_75.png deleted file mode 100644 index 4cd0ec08..00000000 Binary files a/src/热成像识别/test/test_images/result_微信图片_20260503224430_386_75.png and /dev/null differ diff --git a/src/热成像识别/test/test_images/微信图片_20260503224418_384_75.png b/src/热成像识别/test/test_images/微信图片_20260503224418_384_75.png deleted file mode 100644 index bd3de7ec..00000000 Binary files a/src/热成像识别/test/test_images/微信图片_20260503224418_384_75.png and /dev/null differ diff --git a/src/热成像识别/test/test_images/微信图片_20260503224424_385_75.png b/src/热成像识别/test/test_images/微信图片_20260503224424_385_75.png deleted file mode 100644 index 66f9fe4f..00000000 Binary files a/src/热成像识别/test/test_images/微信图片_20260503224424_385_75.png and /dev/null differ diff --git a/src/热成像识别/test/test_images/微信图片_20260503224430_386_75.png b/src/热成像识别/test/test_images/微信图片_20260503224430_386_75.png deleted file mode 100644 index 0184f093..00000000 Binary files a/src/热成像识别/test/test_images/微信图片_20260503224430_386_75.png and /dev/null differ diff --git a/src/热成像识别/test/yolo_dataset/data.yaml b/src/热成像识别/test/yolo_dataset/data.yaml new file mode 100644 index 00000000..b8b7670a --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/data.yaml @@ -0,0 +1,6 @@ +path: D:/29578/Documents/Study/computer/S_E/软件体系结构与设计/软件开发/热成像识别/test/yolo_dataset +train: images/train +val: images/val + +nc: 2 +names: ['Person', 'Hotspot'] diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0002.jpg b/src/热成像识别/test/yolo_dataset/images/train/img_0002.jpg new file mode 100644 index 00000000..32dcab71 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0002.jpg differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0003.jpg b/src/热成像识别/test/yolo_dataset/images/train/img_0003.jpg new file mode 100644 index 00000000..32dcab71 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0003.jpg differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0004.jpg b/src/热成像识别/test/yolo_dataset/images/train/img_0004.jpg new file mode 100644 index 00000000..da7c4693 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0004.jpg differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0006.jpg b/src/热成像识别/test/yolo_dataset/images/train/img_0006.jpg new file mode 100644 index 00000000..efc72d57 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0006.jpg differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0007.jpg b/src/热成像识别/test/yolo_dataset/images/train/img_0007.jpg new file mode 100644 index 00000000..969fc61e Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0007.jpg differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0008.png b/src/热成像识别/test/yolo_dataset/images/train/img_0008.png new file mode 100644 index 00000000..d541efe8 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0008.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0009.png b/src/热成像识别/test/yolo_dataset/images/train/img_0009.png new file mode 100644 index 00000000..771ccd00 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0009.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0010.png b/src/热成像识别/test/yolo_dataset/images/train/img_0010.png new file mode 100644 index 00000000..5a123164 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0010.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0011.png b/src/热成像识别/test/yolo_dataset/images/train/img_0011.png new file mode 100644 index 00000000..139598a9 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0011.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0012.png b/src/热成像识别/test/yolo_dataset/images/train/img_0012.png new file mode 100644 index 00000000..85a552ef Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0012.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0013.png b/src/热成像识别/test/yolo_dataset/images/train/img_0013.png new file mode 100644 index 00000000..d279e1a4 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0013.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0014.png b/src/热成像识别/test/yolo_dataset/images/train/img_0014.png new file mode 100644 index 00000000..cb327283 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0014.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0015.png b/src/热成像识别/test/yolo_dataset/images/train/img_0015.png new file mode 100644 index 00000000..d67d4cf5 Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0015.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0016.png b/src/热成像识别/test/yolo_dataset/images/train/img_0016.png new file mode 100644 index 00000000..dd5d961a Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0016.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/train/img_0017.png b/src/热成像识别/test/yolo_dataset/images/train/img_0017.png new file mode 100644 index 00000000..b24201ec Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/train/img_0017.png differ diff --git a/src/热成像识别/test/yolo_dataset/images/val/img_0001.jpg b/src/热成像识别/test/yolo_dataset/images/val/img_0001.jpg new file mode 100644 index 00000000..b3a52b4f Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/val/img_0001.jpg differ diff --git a/src/热成像识别/test/yolo_dataset/images/val/img_0005.jpg b/src/热成像识别/test/yolo_dataset/images/val/img_0005.jpg new file mode 100644 index 00000000..ec48ab9f Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/images/val/img_0005.jpg differ diff --git a/src/热成像识别/test/test_images/Thermal_ColdGun_001_processed.png b/src/热成像识别/test/yolo_dataset/images/val/img_0008.png similarity index 100% rename from src/热成像识别/test/test_images/Thermal_ColdGun_001_processed.png rename to src/热成像识别/test/yolo_dataset/images/val/img_0008.png diff --git a/src/热成像识别/test/test_images/微信图片_20260503224413_383_75.png b/src/热成像识别/test/yolo_dataset/images/val/img_0009.png similarity index 100% rename from src/热成像识别/test/test_images/微信图片_20260503224413_383_75.png rename to src/热成像识别/test/yolo_dataset/images/val/img_0009.png diff --git a/src/热成像识别/test/yolo_dataset/labels/train.cache b/src/热成像识别/test/yolo_dataset/labels/train.cache new file mode 100644 index 00000000..59789e8b Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/labels/train.cache differ diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0002.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0002.txt new file mode 100644 index 00000000..ef1e524c --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0002.txt @@ -0,0 +1,9 @@ +0 0.470238 0.430476 0.039286 0.036190 +0 0.524702 0.457143 0.036310 0.032381 +0 0.563988 0.468095 0.023214 0.039048 +0 0.564286 0.421905 0.042857 0.060952 +0 0.582440 0.340000 0.032738 0.045714 +0 0.434226 0.375238 0.052976 0.053333 +0 0.419345 0.304286 0.062500 0.039048 +0 0.498214 0.273810 0.029762 0.014286 +0 0.478571 0.297143 0.029762 0.045714 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0003.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0003.txt new file mode 100644 index 00000000..0a1d602d --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0003.txt @@ -0,0 +1,7 @@ +0 0.554464 0.460952 0.023214 0.032381 +0 0.561012 0.412857 0.023214 0.042857 +0 0.595536 0.341429 0.032738 0.035238 +0 0.516369 0.439524 0.032738 0.039048 +0 0.458929 0.423333 0.029762 0.035238 +0 0.440774 0.377619 0.052976 0.042857 +0 0.409524 0.300476 0.048810 0.039048 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0004.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0004.txt new file mode 100644 index 00000000..72a39ad1 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0004.txt @@ -0,0 +1,7 @@ +0 0.602083 0.470000 0.045833 0.035238 +0 0.569048 0.519524 0.026190 0.035238 +0 0.578869 0.594286 0.032738 0.020952 +0 0.537798 0.565714 0.036310 0.057143 +0 0.480357 0.553333 0.052381 0.045714 +0 0.457143 0.492857 0.072619 0.039048 +0 0.450595 0.430952 0.078571 0.063810 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0006.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0006.txt new file mode 100644 index 00000000..9cfe4fb7 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0006.txt @@ -0,0 +1,2 @@ +0 0.532738 0.610476 0.039286 0.045714 +0 0.491667 0.581429 0.055952 0.039048 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0007.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0007.txt new file mode 100644 index 00000000..e481442e --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0007.txt @@ -0,0 +1,4 @@ +0 0.472024 0.604762 0.069048 0.078095 +0 0.560714 0.551905 0.069048 0.071429 +0 0.675893 0.516190 0.062500 0.057143 +0 0.557738 0.485714 0.055952 0.053333 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0008.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0008.txt new file mode 100644 index 00000000..00c8a096 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0008.txt @@ -0,0 +1,5 @@ +0 0.521429 0.300476 0.108333 0.260000 +0 0.378274 0.295238 0.092262 0.135238 +0 0.667857 0.315238 0.065476 0.110476 +0 0.613393 0.306190 0.049405 0.113333 +0 0.771429 0.306190 0.055952 0.141905 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0009.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0009.txt new file mode 100644 index 00000000..d537357a --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0009.txt @@ -0,0 +1,3 @@ +0 0.509821 0.605238 0.052976 0.092381 +0 0.319048 0.679524 0.098810 0.113333 +0 0.586905 0.521429 0.055952 0.096190 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0010.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0010.txt new file mode 100644 index 00000000..a197f480 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0010.txt @@ -0,0 +1,5 @@ +0 0.641369 0.525238 0.085119 0.145714 +0 0.488393 0.448571 0.075595 0.078095 +0 0.391369 0.423810 0.045833 0.078095 +0 0.335417 0.391429 0.052976 0.093333 +0 0.735417 0.464286 0.062500 0.096190 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0011.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0011.txt new file mode 100644 index 00000000..ef2134cf --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0011.txt @@ -0,0 +1,3 @@ +0 0.424405 0.430476 0.078571 0.106667 +0 0.666071 0.470000 0.102381 0.149524 +0 0.473512 0.375238 0.045833 0.074286 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0012.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0012.txt new file mode 100644 index 00000000..ab3d938a --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0012.txt @@ -0,0 +1,2 @@ +0 0.524702 0.556667 0.062500 0.223810 +0 0.416071 0.420000 0.069048 0.135238 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0013.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0013.txt new file mode 100644 index 00000000..8f44d537 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0013.txt @@ -0,0 +1,3 @@ +0 0.672619 0.425238 0.128571 0.202857 +0 0.491667 0.323810 0.082143 0.177143 +0 0.363393 0.297143 0.075595 0.139048 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0014.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0014.txt new file mode 100644 index 00000000..b13b7467 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0014.txt @@ -0,0 +1,5 @@ +0 0.503274 0.548095 0.052976 0.084762 +0 0.595536 0.496667 0.045833 0.096190 +0 0.427679 0.478571 0.072024 0.075238 +0 0.378274 0.420000 0.045833 0.064762 +0 0.338690 0.387619 0.059524 0.078095 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0015.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0015.txt new file mode 100644 index 00000000..d80c941a --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0015.txt @@ -0,0 +1,2 @@ +0 0.570536 0.514286 0.062500 0.089524 +0 0.404464 0.509048 0.058929 0.071429 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0016.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0016.txt new file mode 100644 index 00000000..d6b0b98b --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0016.txt @@ -0,0 +1,5 @@ +0 0.542857 0.567619 0.072619 0.074286 +0 0.445536 0.676190 0.049405 0.099048 +0 0.563988 0.322381 0.062500 0.117143 +0 0.600298 0.218571 0.049405 0.096190 +0 0.656250 0.202857 0.042262 0.078095 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/train/img_0017.txt b/src/热成像识别/test/yolo_dataset/labels/train/img_0017.txt new file mode 100644 index 00000000..3227abe0 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/train/img_0017.txt @@ -0,0 +1,4 @@ +0 0.501786 0.395238 0.042857 0.057143 +0 0.555952 0.489524 0.039286 0.110476 +0 0.473512 0.706190 0.079167 0.117143 +0 0.764583 0.672381 0.088690 0.127619 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/val.cache b/src/热成像识别/test/yolo_dataset/labels/val.cache new file mode 100644 index 00000000..1493915c Binary files /dev/null and b/src/热成像识别/test/yolo_dataset/labels/val.cache differ diff --git a/src/热成像识别/test/yolo_dataset/labels/val/img_0001.txt b/src/热成像识别/test/yolo_dataset/labels/val/img_0001.txt new file mode 100644 index 00000000..e48c4227 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/val/img_0001.txt @@ -0,0 +1,8 @@ +1 0.091964 0.060476 0.183929 0.109524 +1 0.786012 0.216190 0.042262 0.078095 +0 0.513095 0.626190 0.059524 0.050476 +0 0.430952 0.617619 0.046429 0.060000 +0 0.597024 0.512381 0.029762 0.036190 +0 0.611905 0.526667 0.052381 0.064762 +0 0.506548 0.624286 0.065476 0.088571 +0 0.427679 0.614286 0.058929 0.081905 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/val/img_0005.txt b/src/热成像识别/test/yolo_dataset/labels/val/img_0005.txt new file mode 100644 index 00000000..8e54365e --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/val/img_0005.txt @@ -0,0 +1,5 @@ +1 0.190476 0.395238 0.023810 0.028571 +0 0.565774 0.643810 0.026786 0.049524 +0 0.600298 0.637143 0.036310 0.036190 +0 0.644643 0.446667 0.039286 0.060952 +0 0.595536 0.471905 0.032738 0.039048 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/val/img_0008.txt b/src/热成像识别/test/yolo_dataset/labels/val/img_0008.txt new file mode 100644 index 00000000..2ad8fcc1 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/val/img_0008.txt @@ -0,0 +1 @@ +0 0.502534 0.533755 0.684122 0.862166 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/labels/val/img_0009.txt b/src/热成像识别/test/yolo_dataset/labels/val/img_0009.txt new file mode 100644 index 00000000..f9f14916 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/labels/val/img_0009.txt @@ -0,0 +1 @@ +0 0.531250 0.585238 0.299405 0.423810 \ No newline at end of file diff --git a/src/热成像识别/test/yolo_dataset/name_map.json b/src/热成像识别/test/yolo_dataset/name_map.json new file mode 100644 index 00000000..49101b03 --- /dev/null +++ b/src/热成像识别/test/yolo_dataset/name_map.json @@ -0,0 +1,19 @@ +{ + "img_0001.jpg": "20260510170010_1.jpg", + "img_0002.jpg": "20260510170100_1.jpg", + "img_0003.jpg": "20260510170106_1.jpg", + "img_0004.jpg": "20260510170110_1.jpg", + "img_0005.jpg": "20260510170127_1.jpg", + "img_0006.jpg": "20260510170152_1.jpg", + "img_0007.jpg": "20260510170205_1.jpg", + "img_0008.png": "ArmA 3 Screenshot 2026.05.24 - 10.43.29.53.png", + "img_0009.png": "ArmA 3 Screenshot 2026.05.24 - 10.47.49.85.png", + "img_0010.png": "ArmA 3 Screenshot 2026.05.24 - 10.52.49.37.png", + "img_0011.png": "ArmA 3 Screenshot 2026.05.24 - 10.53.10.76.png", + "img_0012.png": "ArmA 3 Screenshot 2026.05.24 - 10.53.24.08.png", + "img_0013.png": "ArmA 3 Screenshot 2026.05.24 - 10.53.37.41.png", + "img_0014.png": "ArmA 3 Screenshot 2026.05.24 - 10.53.57.13.png", + "img_0015.png": "ArmA 3 Screenshot 2026.05.24 - 10.54.09.74.png", + "img_0016.png": "ArmA 3 Screenshot 2026.05.24 - 10.54.59.57.png", + "img_0017.png": "ArmA 3 Screenshot 2026.05.24 - 10.55.10.88.png" +} \ No newline at end of file diff --git a/src/热成像识别/thermal_yolo_detect.py b/src/热成像识别/thermal_yolo_detect.py new file mode 100644 index 00000000..3982c915 --- /dev/null +++ b/src/热成像识别/thermal_yolo_detect.py @@ -0,0 +1,440 @@ +""" +热成像人员检测方案 — YOLOv8 + 局部差分法回退 + +默认使用 YOLOv8 深度学习模型进行 Person 检测,辅以局部差分法检测 Hotspot。 +可通过 --method classical 切回纯局部差分法。 + +检测模式: + YOLO 模式 (默认): + - YOLOv8 检测 Person(COCO 预训练或微调模型) + - 局部差分法检测 Hotspot(高阈值回退) + - NMS 去重 + + Classical 模式 (--method classical): + - 局部差分法检测所有热目标 + - 与原版行为一致 + +用法: + python thermal_yolo_detect.py --image test/test_images/20260510170010_1.jpg + python thermal_yolo_detect.py --image-dir test/test_images/ --json + python thermal_yolo_detect.py --image-dir test/test_images/ --eval test/labels.json + python thermal_yolo_detect.py --image-dir test/test_images/ --method classical + python thermal_yolo_detect.py --image-dir test/test_images/ --model yolov8n_thermal.pt +""" + +import argparse +import json +import os +import sys +import cv2 +import numpy as np + + +def imread_unicode(path, flags=cv2.IMREAD_COLOR): + """支持中文路径的 imread。""" + arr = np.fromfile(path, dtype=np.uint8) + return cv2.imdecode(arr, flags) + + +def detect_persons_multi(image): + """局部差分人员检测。返回 list of dict。""" + gray = image if len(image.shape) == 2 else cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + orig_gray = gray.copy() + gray_f = gray.astype(np.float32) + h, w = gray.shape + + # 局部差分: 找到比周围环境亮的区域 (热目标) + local_mean = cv2.blur(gray_f, (121, 121)) + diff = gray_f - local_mean + binary = (diff > 10).astype(np.uint8) * 255 + + k_close = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (11, 11)) + k_open = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5, 5)) + binary = cv2.morphologyEx(binary, cv2.MORPH_CLOSE, k_close) + binary = cv2.morphologyEx(binary, cv2.MORPH_OPEN, k_open) + + return _extract_blobs(binary, orig_gray, h, w, weight=1.0) + + +def _extract_blobs(binary, gray, h, w, weight=1.0): + """从二值图中提取连通域并过滤。""" + num_labels, labels, stats, centroids = cv2.connectedComponentsWithStats( + binary, connectivity=8 + ) + + detections = [] + for i in range(1, num_labels): + area = int(stats[i, cv2.CC_STAT_AREA]) + bw = int(stats[i, cv2.CC_STAT_WIDTH]) + bh = int(stats[i, cv2.CC_STAT_HEIGHT]) + x = int(stats[i, cv2.CC_STAT_LEFT]) + y = int(stats[i, cv2.CC_STAT_TOP]) + x2, y2 = x + bw, y + bh + + # 面积过滤 + if area < 500 or area > h * w * 0.3: + continue + + # 边缘过滤: 跳过贴边的检测 (传感器伪影) + border_margin = 5 + if x <= border_margin or y <= border_margin: + continue + if x2 >= w - border_margin or y2 >= h - border_margin: + continue + + # 宽高比 + ar = max(bw, bh) / max(min(bw, bh), 1) + if ar > 4.0: + continue + + # 实心度 + solidity = area / max(bw * bh, 1) + if solidity < 0.35: + continue + + # ROI 亮度 + x2c, y2c = min(x2, w), min(y2, h) + roi = gray[y:y2c, x:x2c] + roi_mean = float(roi.mean()) if roi.size > 0 else 0 + + # 局部背景对比度 + margin = max(bw, bh) // 2 + 10 + bg_x1 = max(0, x - margin) + bg_y1 = max(0, y - margin) + bg_x2 = min(w, x2c + margin) + bg_y2 = min(h, y2c + margin) + bg_patch = gray[bg_y1:bg_y2, bg_x1:bg_x2].copy() + lx, ly = x - bg_x1, y - bg_y1 + lx2, ly2 = min(lx + bw, bg_patch.shape[1]), min(ly + bh, bg_patch.shape[0]) + if 0 <= ly and 0 <= lx: + bg_patch[max(0, ly):ly2, max(0, lx):lx2] = 0 + bg_vals = bg_patch[bg_patch > 0] + bg_mean = float(bg_vals.mean()) if bg_vals.size > 0 else roi_mean + contrast = roi_mean - bg_mean + + # 对比度太低的直接过滤 + if contrast < 10: + continue + + # 置信度评分 + score = 0.15 * weight + + # 对比度是最关键的特征 + if contrast > 30: + score += 0.40 + elif contrast > 20: + score += 0.30 + elif contrast > 15: + score += 0.20 + elif contrast > 10: + score += 0.05 + + # 面积合理性 + if 800 < area < 15000: + score += 0.10 + elif 500 < area < 50000: + score += 0.03 + + # 垂直/方形人形 + if bh >= bw * 0.6: + score += 0.10 + + # 高实心度 + if solidity > 0.55: + score += 0.10 + elif solidity > 0.40: + score += 0.05 + + score = min(score, 0.95) + + detections.append({ + 'type': 'Person', + 'bbox': [x, y, bw, bh], + 'confidence': round(score, 3), + }) + + return detections + + +def iou(box_a, box_b): + ax1, ay1 = box_a[0], box_a[1] + ax2, ay2 = ax1 + box_a[2], ay1 + box_a[3] + bx1, by1 = box_b[0], box_b[1] + bx2, by2 = bx1 + box_b[2], by1 + box_b[3] + + ix1, iy1 = max(ax1, bx1), max(ay1, by1) + ix2, iy2 = min(ax2, bx2), min(by2, by2) + inter = max(0, ix2 - ix1) * max(0, iy2 - iy1) + union = box_a[2] * box_a[3] + box_b[2] * box_b[3] - inter + return inter / max(union, 1) + + +def nms(detections, iou_threshold=0.35): + """非极大值抑制。""" + if not detections: + return [] + + by_conf = sorted(detections, key=lambda d: d['confidence'], reverse=True) + keep = [] + for det in by_conf: + should_keep = True + for k in keep: + if iou(det['bbox'], k['bbox']) > iou_threshold: + should_keep = False + break + if should_keep: + keep.append(det) + return keep + + +def detect_hotspots_classical(image): + """局部差分法检测热点(高阈值变体)。""" + gray = image if len(image.shape) == 2 else cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + orig_gray = gray.copy() + gray_f = gray.astype(np.float32) + h, w = gray.shape + + # 高阈值热点检测: 差值 > 30 的极亮区域 + local_mean = cv2.blur(gray_f, (61, 61)) + diff = gray_f - local_mean + binary = (diff > 30).astype(np.uint8) * 255 + + k_close = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (7, 7)) + k_open = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (3, 3)) + binary = cv2.morphologyEx(binary, cv2.MORPH_CLOSE, k_close) + binary = cv2.morphologyEx(binary, cv2.MORPH_OPEN, k_open) + + num_labels, labels, stats, centroids = cv2.connectedComponentsWithStats( + binary, connectivity=8 + ) + + detections = [] + for i in range(1, num_labels): + area = int(stats[i, cv2.CC_STAT_AREA]) + bw = int(stats[i, cv2.CC_STAT_WIDTH]) + bh = int(stats[i, cv2.CC_STAT_HEIGHT]) + x = int(stats[i, cv2.CC_STAT_LEFT]) + y = int(stats[i, cv2.CC_STAT_TOP]) + + if area < 100 or area > h * w * 0.3: + continue + + x2, y2 = min(x + bw, w), min(y + bh, h) + roi = orig_gray[y:y2, x:x2] + roi_mean = float(roi.mean()) if roi.size > 0 else 0 + + margin = max(bw, bh) // 2 + 10 + bg_x1, bg_y1 = max(0, x - margin), max(0, y - margin) + bg_x2, bg_y2 = min(w, x2 + margin), min(h, y2 + margin) + bg_patch = orig_gray[bg_y1:bg_y2, bg_x1:bg_x2].copy() + lx, ly = x - bg_x1, y - bg_y1 + lx2 = min(lx + bw, bg_patch.shape[1]) + ly2 = min(ly + bh, bg_patch.shape[0]) + if 0 <= ly and 0 <= lx: + bg_patch[max(0, ly):ly2, max(0, lx):lx2] = 0 + bg_vals = bg_patch[bg_patch > 0] + bg_mean = float(bg_vals.mean()) if bg_vals.size > 0 else roi_mean + contrast = roi_mean - bg_mean + + if contrast < 20: + continue + + score = min(0.4 + contrast / 100.0, 0.95) + detections.append({ + 'type': 'Hotspot', + 'bbox': [x, y, bw, bh], + 'confidence': round(score, 3), + }) + + return detections + + +def detect(image_path, conf=0.3, method='yolo', model_path=None): + """主检测函数。 + + Args: + image_path: 图片路径 + conf: 置信度阈值 + method: 'yolo' 或 'classical' + model_path: YOLO 模型路径 (None 则使用默认 yolov8n.pt) + """ + image = imread_unicode(image_path) + if image is None: + print(f"无法读取: {image_path}", file=sys.stderr) + return [] + + if method == 'yolo': + from yolo_detector import YOLODetector + if not hasattr(detect, '_yolo_detector') or detect._yolo_model_path != model_path: + if model_path is None: + # 优先查找同目录下的模型 + script_dir = os.path.dirname(os.path.abspath(__file__)) + for candidate in ['yolov8n_thermal.pt', 'yolov8n.pt']: + p = os.path.join(script_dir, candidate) + if os.path.isfile(p): + model_path = p + break + if model_path is None: + model_path = 'yolov8n.pt' + detect._yolo_detector = YOLODetector(model_path, conf_threshold=conf) + detect._yolo_model_path = model_path + + det = detect._yolo_detector + det.conf_threshold = conf + all_dets = det.detect(image, conf=conf) + + # 如果是 COCO 预训练模型,补充 Hotspot 检测 + if det.model_type == 'coco': + hotspot_dets = detect_hotspots_classical(image) + all_dets.extend(hotspot_dets) + else: + all_dets = detect_persons_multi(image) + + all_dets = nms(all_dets) + all_dets = [d for d in all_dets if d['confidence'] >= conf] + + return all_dets + + +def draw_results(image, detections, output_path=None): + """绘制检测结果。""" + vis = image.copy() + colors = {'Person': (0, 255, 0), 'Hotspot': (0, 0, 255)} + + for det in detections: + x, y, w, h = det['bbox'] + color = colors.get(det['type'], (255, 255, 0)) + conf = det.get('confidence', 0) + + cl = max(8, min(w, h) // 4) + for pt1, pt2 in [ + ((x, y), (x + cl, y)), ((x, y), (x, y + cl)), + ((x + w, y), (x + w - cl, y)), ((x + w, y), (x + w, y + cl)), + ((x, y + h), (x + cl, y + h)), ((x, y + h), (x, y + h - cl)), + ((x + w, y + h), (x + w - cl, y + h)), ((x + w, y + h), (x + w, y + h - cl)), + ]: + cv2.line(vis, pt1, pt2, (0, 0, 0), 4) + cv2.line(vis, pt1, pt2, color, 2) + + label = f"{det['type']} {conf:.2f}" + cv2.putText(vis, label, (x, y - 5), + cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 0), 2) + cv2.putText(vis, label, (x, y - 5), + cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 1) + + if output_path: + cv2.imwrite(output_path, vis) + return vis + + +def evaluate(image_dir, label_path, conf=0.3, method='yolo', model_path=None): + """评估 F1/Precision/Recall。""" + with open(label_path, 'r', encoding='utf-8') as f: + labels = json.load(f) + + tp, fp, fn = 0, 0, 0 + + for fname, gt_boxes in labels.items(): + if fname.startswith('result_'): + continue + img_path = os.path.join(image_dir, fname) + if not os.path.exists(img_path): + continue + + detections = detect(img_path, conf=conf, method=method, model_path=model_path) + det_boxes = [d['bbox'] for d in detections if d['type'] == 'Person'] + gt_person = [g['bbox'] for g in gt_boxes if g['type'] == 'Person'] + + matched_gt = set() + for db in sorted(det_boxes, key=lambda b: b[2] * b[3], reverse=True): + best_iou, best_j = 0.3, -1 + for j, gb in enumerate(gt_person): + if j in matched_gt: + continue + v = iou(db, gb) + if v > best_iou: + best_iou, best_j = v, j + if best_j >= 0: + tp += 1 + matched_gt.add(best_j) + else: + fp += 1 + + fn += len(gt_person) - len(matched_gt) + + prec = tp / max(tp + fp, 1) + rec = tp / max(tp + fn, 1) + f1 = 2 * prec * rec / max(prec + rec, 0.001) + + print(f"TP={tp} FP={fp} FN={fn}") + print(f"Precision={prec:.3f} Recall={rec:.3f} F1={f1:.3f}") + return {'tp': tp, 'fp': fp, 'fn': fn, 'precision': prec, 'recall': rec, 'f1': f1} + + +def main(): + parser = argparse.ArgumentParser(description='热成像人员检测 (YOLOv8 + 局部差分回退)') + parser.add_argument('--image', help='单张图片路径') + parser.add_argument('--image-dir', help='图片目录') + parser.add_argument('--output-dir', default='test/output_yolo', help='输出目录') + parser.add_argument('--conf', type=float, default=0.25, help='置信度阈值 (默认 0.25)') + parser.add_argument('--json', action='store_true', help='JSON 输出') + parser.add_argument('--no-show', action='store_true', help='不显示窗口') + parser.add_argument('--eval', metavar='LABELS', help='评估模式: 指定 labels.json') + parser.add_argument('--method', choices=['yolo', 'classical'], default='yolo', + help='检测方法: yolo (默认) 或 classical (原局部差分法)') + parser.add_argument('--model', default=None, help='YOLO 模型路径 (默认自动查找)') + args = parser.parse_args() + + if args.eval: + image_dir = args.image_dir or 'test/test_images' + evaluate(image_dir, args.eval, conf=args.conf, method=args.method, model_path=args.model) + return + + if args.image: + images = [args.image] + elif args.image_dir: + exts = ('.jpg', '.png', '.bmp') + images = [] + for f in sorted(os.listdir(args.image_dir)): + if any(f.lower().endswith(e) for e in exts) and not f.startswith('result_') and not f.startswith('fusion_'): + images.append(os.path.join(args.image_dir, f)) + else: + print("请指定 --image 或 --image-dir", file=sys.stderr) + return + + os.makedirs(args.output_dir, exist_ok=True) + all_results = {} + + for img_path in images: + fname = os.path.basename(img_path) + detections = detect(img_path, conf=args.conf, method=args.method, model_path=args.model) + all_results[fname] = detections + + print(f"{fname}: {len(detections)} 个检测") + for d in detections: + print(f" {d['type']} conf={d['confidence']:.2f} " + f"bbox={d['bbox']}") + + image = imread_unicode(img_path) + if image is not None: + out_path = os.path.join(args.output_dir, f"result_{fname}") + draw_results(image, detections, out_path) + print(f" -> {out_path}") + + if args.json: + json_path = os.path.join(args.output_dir, 'results.json') + with open(json_path, 'w', encoding='utf-8') as f: + json.dump(all_results, f, ensure_ascii=False, indent=2) + print(f"JSON saved: {json_path}") + + if not args.no_show and len(images) == 1: + image = imread_unicode(images[0]) + if image is not None: + vis = draw_results(image, all_results[os.path.basename(images[0])]) + cv2.imshow('Thermal Detection', vis) + cv2.waitKey(0) + cv2.destroyAllWindows() + + +if __name__ == '__main__': + main() diff --git a/src/热成像识别/yolo_detector.py b/src/热成像识别/yolo_detector.py new file mode 100644 index 00000000..e14fe2b5 --- /dev/null +++ b/src/热成像识别/yolo_detector.py @@ -0,0 +1,105 @@ +""" +YOLOv8 热成像检测推理模块 + +封装 ultralytics YOLO 模型,提供与 thermal_yolo_detect.py 一致的输出接口。 +支持 COCO 预训练模型和自定义微调模型。 + +用法: + from yolo_detector import YOLODetector + det = YOLODetector('yolov8n.pt') + results = det.detect('test.jpg') +""" + +import os +import numpy as np +import cv2 +from ultralytics import YOLO + +# COCO class 0 = person 的名称变体 +PERSON_NAMES = {'person', 'Person'} + +# 自定义模型的类别映射 +THERMAL_CLASS_MAP = {0: 'Person', 1: 'Hotspot'} + + +class YOLODetector: + def __init__(self, model_path='yolov8n.pt', conf_threshold=0.25, imgsz=1280): + self.model = YOLO(model_path) + self.conf_threshold = conf_threshold + self.imgsz = imgsz + self._detect_model_type() + + def _detect_model_type(self): + """自动识别模型类型,决定类别映射策略。""" + names = self.model.names + # COCO 预训练模型有 80 个类 + if len(names) == 80 and 0 in names and names[0] == 'person': + self.model_type = 'coco' + self._person_class_ids = [k for k, v in names.items() if v in PERSON_NAMES] + else: + self.model_type = 'custom' + self._class_map = {} + for k, v in names.items(): + if v in PERSON_NAMES: + self._class_map[k] = 'Person' + elif v == 'Hotspot': + self._class_map[k] = 'Hotspot' + else: + self._class_map[k] = v + + def detect(self, image, conf=None): + """ + 对单张图像执行 YOLO 检测。 + + Args: + image: numpy array (BGR) 或图像文件路径 + conf: 置信度阈值,None 则使用默认值 + + Returns: + list of dict: [{'type': str, 'confidence': float, 'bbox': [x,y,w,h]}] + """ + conf = conf or self.conf_threshold + + results = self.model.predict( + image, + conf=conf, + imgsz=self.imgsz, + device='cpu', + half=False, + verbose=False, + ) + + detections = [] + if not results: + return detections + + r = results[0] + if r.boxes is None or len(r.boxes) == 0: + return detections + + for box in r.boxes: + cls_id = int(box.cls[0]) + confidence = float(box.conf[0]) + xyxy = box.xyxy[0].cpu().numpy() + x1, y1, x2, y2 = xyxy + bw = int(round(x2 - x1)) + bh = int(round(y2 - y1)) + bx = int(round(x1)) + by = int(round(y1)) + + if self.model_type == 'coco': + if cls_id not in self._person_class_ids: + continue + det_type = 'Person' + else: + det_type = self._class_map.get(cls_id, None) + if det_type is None: + continue + + detections.append({ + 'type': det_type, + 'confidence': round(confidence, 3), + 'bbox': [bx, by, bw, bh], + }) + + return detections