Ver código fonte

chore: 更新IDE配置文件以支持py.test测试运行器

在.idea/Model.iml文件中添加了TestRunnerService组件,配置了PROJECT_TEST_RUNNER选项为py.test,以便更好地支持测试运行。
Hannnk 3 semanas atrás
pai
commit
bb446e1cde
2 arquivos alterados com 4 adições e 1 exclusões
  1. 3 0
      .idea/Model.iml
  2. 1 1
      src/core/inference.py

+ 3 - 0
.idea/Model.iml

@@ -4,4 +4,7 @@
     <option name="format" value="PLAIN" />
     <option name="myDocStringFormat" value="Plain" />
   </component>
+  <component name="TestRunnerService">
+    <option name="PROJECT_TEST_RUNNER" value="py.test" />
+  </component>
 </module>

+ 1 - 1
src/core/inference.py

@@ -20,7 +20,7 @@ class ONNXDetector:
         folder_path = filedialog.askdirectory(title='选择输入目录')
         return folder_path if folder_path else None
 
-    def __init__(self, model_path: str = 'data/models/250411_Anti_UAV.onnx', threshold: float = 0.5, 
+    def __init__(self, model_path: str = 'D:\PythonProject\Model\Data\models\250411_Anti_UAV.onnx', threshold: float = 0.5, 
                  output_dir: str = "None", save_empty: bool = False, 
                  max_bbox_ratio: float = 0.5,  # 已有该参数
                  input_dir: str = "None"):