feat: Rust-native scene detection & ROI, store refactoring#3
Merged
Conversation
- Add paddle_ocr.py wrapper for PaddleOCR - Add ocr.rs with ocr_recognize and ocr_get_languages commands - Update mod.rs to include ocr module - Update lib.rs to register OCR commands - Update system.rs to check PaddleOCR dependency Refs: Task 1.1 of optimization plan
- Add GPU detection in paddle_ocr.py (auto-enable CUDA when available) - Create Rust gpu.rs command to check GPU capability via PaddlePaddle - Register check_gpu_capability in Tauri invoke handler - Create useGPU.ts Vue composable for frontend GPU detection - Add GPU info section to Settings.vue (shows only when GPU available) - Update ocr.rs to handle new JSON response format with GPU info
- Add Translator class supporting Google Translate, DeepL, and OpenAI - Add useBilingual composable for translation workflow - Add translatedText field to SubtitleItem type - Add exportBilingualSRT and exportBilingualVTT functions - Add translation UI to Export tab with provider/language settings
P0: Replace Python dependencies with Rust native implementations: - scene.rs: PySceneDetect → FFmpeg 'select' filter (4.4-5.3x faster) - auto_roi.rs: OpenCV → Rust 'image' crate Sobel edge detection (8.4x faster) - Deleted scene_detect.py and auto_detect_roi.py - Added standalone_tests.rs (18 pure-logic tests) - Added BENCHMARKS.md with performance comparison - Fixed deduplicate_timestamps boundary condition ('<' → '<=') P1: Store refactoring: - Split project.ts → video.ts + extraction.ts - project.ts kept as deprecated backward-compat facade - All 410 JS tests pass, 19 test files green
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改造概述
P0: 消除 Python 运行时依赖 🔥
scene.rsselectfilterauto_roi.rsimagecrate + Sobelscene_detect.py+auto_detect_roi.py(paddle_ocr.py保留)standalone_tests.rs(18 个纯逻辑测试 ✅)BENCHMARKS.md性能基准文档deduplicate_timestamps边界条件 bugP1: Store 分层重构
project.ts(巨石)video.ts+extraction.ts+project.ts(facade)向后兼容,所有 410 个 JS 测试全绿 ✅
变更统计