Merge branch 'feature' into feature_cpp_test

This commit is contained in:
liangyuxuan
2025-12-12 10:05:49 +08:00
4 changed files with 24 additions and 1 deletions

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@
**/build/
**/install/
**/log/
/vision_test/**

21
tools/add_n_txt.py Normal file
View File

@@ -0,0 +1,21 @@
import os
# ======== 你可以修改的参数 ========
start_id = 1 # 起始编号
end_id = 200 # 结束编号
save_dir = "labels" # 输出目录
prefix = "neg_" # 文件名前缀
zero_padding = 5 # 位数(例如 00001
# ==================================
os.makedirs(save_dir, exist_ok=True)
for i in range(start_id, end_id + 1):
name = f"{prefix}{str(i).zfill(zero_padding)}.txt"
path = os.path.join(save_dir, name)
# 创建空文件
with open(path, "w") as f:
pass
print("created:", path)

View File

@@ -9,7 +9,7 @@ from ament_index_python.packages import get_package_share_directory
share_dir = get_package_share_directory('vision_detect')
config_dir = os.path.join(share_dir, 'configs/launch_configs/bottle_detect_service_pca.json')
config_dir = os.path.join(share_dir, 'configs/launch_configs/medical_sense.json')
with open(config_dir, "r") as f:
configs = json.load(f)