11 Commits

Author SHA1 Message Date
6e9885404c fix: resolve 3 runtime errors in inference and UI
- result_handler: add _InferenceResultEncoder to handle dataclass objects
  (ObjectDetectionResult, ClassificationResult) in JSON serialization;
  fixes "Object of type ObjectDetectionResult is not JSON serializable"

- deployment: replace textCursor().movePosition() with toPlainText/setPlainText
  for log trimming; eliminates QTextCursor cross-thread Qt warning

- main: remove duplicate setAttribute(AA_EnableHighDpiScaling) call in
  setup_application() which ran after QApplication was already created;
  fixes "Attribute Qt::AA_EnableHighDpiScaling must be set before
  QCoreApplication is created"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 19:32:30 +08:00
55040733fe feat: implement Phase 1-4 performance visualization and device management
Phase 1 — Performance Benchmarking:
- PerformanceBenchmarker: sequential vs parallel benchmark with injectable runner
- PerformanceHistory: JSON-backed benchmark history with regression support
- PerformanceDashboard: real-time FPS/latency display widget
- BenchmarkDialog: one-click benchmark with 3-phase progress bar

Phase 2 — Device Management:
- DeviceManager: NPU dongle scan, assign/unassign, load balance recommendation
- DeviceManagementPanel: live device status cards with auto-refresh
- BottleneckAlert: dataclass for pipeline bottleneck detection

Phase 3 — Advanced Features:
- OptimizationEngine: 3 optimization rules (rebalance/adjust_queue/add_devices)
- TemplateManager: 3 built-in pipeline templates (YOLOv5, fire detection, dual-model)

Phase 4 — Report Export:
- ReportExporter: PDF (reportlab, optional) and CSV export
- ExportReportDialog: format selection + path picker UI

192 unit tests, all passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 19:32:05 +08:00
ccd7cdd6b9 feat: Reorganize test scripts and improve YOLOv5 postprocessing
- Move test scripts to tests/ directory for better organization
- Add improved YOLOv5 postprocessing with reference implementation
- Update gitignore to exclude *.mflow files and include main.spec
- Add debug capabilities and coordinate scaling improvements
- Enhance multi-series support with proper validation
- Add AGENTS.md documentation and example utilities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 19:23:59 +08:00
bfac50f066 Merge branch 'developer' of github.com:HuangMason320/cluster4npu into developer 2025-08-21 00:34:50 +08:00
Mason
d90d9d6783 feat: Add default postprocess options with fire detection and bounding box support
- Implement PostProcessorOptions system with built-in postprocessing types (fire detection, YOLO v3/v5, classification, raw output)
- Add fire detection as default option maintaining backward compatibility
- Support YOLO v3/v5 object detection with bounding box visualization in live view windows
- Integrate text output with confidence scores and visual indicators for all postprocess types
- Update exact nodes postprocess_node.py to configure postprocessing through UI properties
- Add comprehensive example demonstrating all available postprocessing options and usage patterns
- Enhance WebcamInferenceRunner with dynamic visualization based on result types

Technical improvements:
- Created PostProcessType enum and PostProcessorOptions configuration class
- Built-in postprocessing eliminates external dependencies on Kneron Default examples
- Added BoundingBox, ObjectDetectionResult, and ClassificationResult data structures
- Enhanced live view with color-coded confidence bars and object detection overlays
- Integrated postprocessing options into MultiDongle constructor and exact nodes system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 16:42:26 +08:00
c4090b2420 perf: Optimize multi-series dongle performance and prevent bottlenecks
Key improvements:
- Add timeout mechanism (2s) for result ordering to prevent slow devices from blocking pipeline
- Implement performance-biased load balancing with 2x penalty for low-GOPS devices (< 10 GOPS)
- Adjust KL520 GOPS from 3 to 2 for more accurate performance representation
- Remove KL540 references to focus on available hardware
- Add intelligent sequence skipping with timeout results for better throughput

This resolves the issue where multi-series mode had lower FPS than single KL720
due to KL520 devices creating bottlenecks in the result ordering queue.

Performance impact:
- Reduces KL520 task allocation from ~12.5% to ~5-8%
- Prevents pipeline stalls from slow inference results
- Maintains result ordering integrity with timeout fallback

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 17:15:39 +08:00
2fea1eceec fix: Resolve multi-series initialization and validation issues
- Fix mflow_converter to properly handle multi-series configuration creation
- Update InferencePipeline to correctly initialize MultiDongle with multi-series config
- Add comprehensive multi-series configuration validation in mflow_converter
- Enhance deployment dialog to display multi-series configuration details
- Improve analysis and configuration tabs to show proper multi-series info

This resolves the issue where multi-series mode was falling back to single-series
during inference initialization, ensuring proper multi-series dongle support.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 16:33:22 +08:00
Mason
ec940c3f2f Improve assets folder selection and fix macOS tkinter crash
- Replace tkinter with PyQt5 QFileDialog as primary folder selector to fix macOS crashes
- Add specialized assets_folder property handling in dashboard with validation
- Integrate improved folder dialog utility with ExactModelNode
- Provide detailed validation feedback and user-friendly tooltips
- Maintain backward compatibility with tkinter as fallback

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 11:26:23 +08:00
48acae9c74 feat: Implement multi-series dongle support and improve app stability 2025-08-13 22:03:42 +08:00
Mason
92f9d956af Remove cluster4npu_ui package prefix and remove export/analysis buttons
- Update all imports to use relative imports instead of cluster4npu_ui.* prefix
- Remove export configuration functionality from dashboard menu
- Remove performance analysis action from pipeline menu
- Update dependencies in pyproject.toml to include NodeGraphQt and PyQt5
- Maintain clean import structure across all modules

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 12:17:59 +08:00
Mason
1ad614289b remove redundant file 2025-08-04 22:40:22 +08:00