9 Commits

Author SHA1 Message Date
be4bd617c3 fix: eliminate QTextCursor cross-thread signal warning on inference stop
Three related fixes to the QObject::connect / QTextCursor warning that
appeared when stopping inference:

1. StdoutCapture: replace signal emission with queue.Queue.put_nowait()
   so non-Qt SDK threads (Kneron shutdown) never touch Qt signal machinery.
   DeploymentWorker.stdout_captured signal removed; worker now accepts a
   stdout_queue and passes it to StdoutCapture.

2. start_deployment: create QTimer (100 ms) on main thread to drain the
   stdout queue via _drain_stdout_queue(). Connect worker.finished to
   _on_worker_finished to stop the timer and flush remaining output.

3. stop_deployment / wait_for_stop: the background thread was calling
   QTextEdit.append() and other widget methods directly, which internally
   creates QTextCursor queued connections — the real trigger of the
   warning. Fixed by having wait_for_stop emit _stop_done signal only;
   all UI updates moved to _on_stop_done slot (main thread).

Also adds QTextCursor import in main.py to pre-register the type with
Qt's meta-type system as a belt-and-suspenders measure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 17:56:02 +08:00
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
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
48acae9c74 feat: Implement multi-series dongle support and improve app stability 2025-08-13 22:03:42 +08:00
Mason
2ceedb0f45 Add single instance protection to prevent multiple app windows
- Implement SingleInstance class using QSharedMemory and file locking
- Cross-platform support with fcntl on Unix/macOS and file creation on Windows
- Show warning dialog when user tries to launch second instance
- Automatic cleanup of resources on application exit
- Graceful handling of instance detection failures

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 12:32:21 +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
2ed3d2cb49 Add .gitignore and remove README.md 2025-05-15 01:22:37 +08:00
0bd11ca63e first commit 2025-05-14 16:37:15 +08:00