fix import path problem in deployment.py

This commit is contained in:
HuangMason320 2025-07-17 09:25:07 +08:00
parent af9adc8e82
commit c94eb5ee30
3 changed files with 62 additions and 34 deletions

View File

@ -330,7 +330,7 @@ class MultiDongle:
# kp.core.set_timeout(device_group=self.device_group, milliseconds=5000)
# print(' - Success')
if self.upload_fw:
# if self.upload_fw:
try:
print('[Upload Firmware]')
kp.core.load_firmware_from_file(device_group=self.device_group,

View File

@ -3,7 +3,7 @@
"description": "",
"nodes": [
{
"id": "0x1131773d0",
"id": "0x1b8706d5710",
"name": "Input Node",
"type": "ExactInputNode",
"pos": [
@ -19,24 +19,24 @@
}
},
{
"id": "0x12b4ae9d0",
"id": "0x1b8706f4bd0",
"name": "Model Node",
"type": "ExactModelNode",
"pos": [
295.0,
292.0
245.18958624423732,
292.00000000000006
],
"properties": {
"dongle_series": "520",
"num_dongles": 1,
"model_path": "",
"scpu_fw_path": "",
"ncpu_fw_path": "",
"port_id": ""
"model_path": "C:/Users/mason/AppData/Local/Kneron_Academy/utils/yolov5s/yolov5s/kl520_20005_yolov5-noupsample_w640h640.nef",
"scpu_fw_path": "C:/Users/mason/Downloads/kneron_plus_v3.1.2/kneron_plus/res/firmware/KL520/fw_scpu.bin",
"ncpu_fw_path": "C:/Users/mason/Downloads/kneron_plus_v3.1.2/kneron_plus/res/firmware/KL520/fw_ncpu.bin",
"port_id": "6, 32"
}
},
{
"id": "0x12b4aff50",
"id": "0x1b8706f6790",
"name": "Output Node",
"type": "ExactOutputNode",
"pos": [
@ -44,38 +44,65 @@
430.1696952829989
],
"properties": {
"output_type": "File",
"output_type": "Display",
"format": "JSON",
"destination": "",
"destination": "C:/Users/mason/Downloads/test.json",
"save_interval": 1.0
}
},
{
"id": "0x12b4c8990",
"id": "0x1b8706f7950",
"name": "Preprocess Node",
"type": "ExactPreprocessNode",
"pos": [
230.0,
190.0
575.7830427160366,
150.8128173029918
],
"properties": {
"resize_width": 112,
"resize_height": 112,
"resize_width": 144,
"resize_height": 144,
"operations": "resize,normalize"
}
},
{
"id": "0x1b870700c90",
"name": "Postprocess Node",
"type": "ExactPostprocessNode",
"pos": [
272.09359134850405,
474.2416550230502
],
"properties": {
"output_format": "JSON",
"confidence_threshold": 0.5,
"nms_threshold": 0.4,
"max_detections": 100
}
}
],
"connections": [
{
"input_node": "0x12b4ae9d0",
"input_node": "0x1b8706f7950",
"input_port": "input",
"output_node": "0x1131773d0",
"output_node": "0x1b8706d5710",
"output_port": "output"
},
{
"input_node": "0x12b4aff50",
"input_node": "0x1b870700c90",
"input_port": "input",
"output_node": "0x12b4ae9d0",
"output_node": "0x1b8706f4bd0",
"output_port": "output"
},
{
"input_node": "0x1b8706f4bd0",
"input_port": "input",
"output_node": "0x1b8706f7950",
"output_port": "output"
},
{
"input_node": "0x1b8706f6790",
"input_port": "input",
"output_node": "0x1b870700c90",
"output_port": "output"
}
],

View File

@ -37,16 +37,17 @@ from PyQt5.QtGui import QFont, QColor, QPalette, QImage, QPixmap
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'core', 'functions'))
try:
from mflow_converter import MFlowConverter, PipelineConfig
from ...core.functions.mflow_converter import MFlowConverter, PipelineConfig
CONVERTER_AVAILABLE = True
except ImportError as e:
print(f"Warning: MFlow converter not available: {e}")
CONVERTER_AVAILABLE = False
try:
from InferencePipeline import InferencePipeline
from Multidongle import MultiDongle
from workflow_orchestrator import WorkflowOrchestrator
from ...core.functions.Multidongle import MultiDongle
from ...core.functions.InferencePipeline import InferencePipeline
from ...core.functions.workflow_orchestrator import WorkflowOrchestrator
# from workflow_orchestrator import WorkflowOrchestrator
PIPELINE_AVAILABLE = True
except ImportError as e:
print(f"Warning: Pipeline system not available: {e}")