Merge branch 'feature' into feature_cpp_test
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,3 +3,5 @@
|
||||
**/build/
|
||||
**/install/
|
||||
**/log/
|
||||
|
||||
/vision_test/**
|
||||
|
||||
21
tools/add_n_txt.py
Normal file
21
tools/add_n_txt.py
Normal 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)
|
||||
Binary file not shown.
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user