Spaces:
Build error
Build error
Commit History
-
🎯 修正特徵提取以匹配訓練時的方法
**核心修正:** - 使用 mp.solutions.holistic.Holistic (與訓練一致) - 修正關鍵點順序:手部(左+右) + 姿勢 (63+63+99=225) - 實現與訓練時相同的區域性光流計算 - 添加手部遮罩創建 (create_hand_mask) - 使用 calcOpticalFlowFarneback 替代 calcOpticalFlowPyrLK **技術改進:** - 每幀同時提取關鍵點和MediaPipe結果 - 基於實際檢測到的關鍵點創建ROI遮罩 - 統一數據類型為 np.float32/np.float16 - 與sign_language_recognition.py保持完全一致 **預期效果:** - 大幅提升預測準確率 - 特徵提取與訓練時100%匹配de897a8 -
🔧 修復光流特徵維度不匹配問題
- 改為計算每一幀的光流特徵 (50 frames × 10 dims) - 確保光流特徵序列長度與關鍵點序列一致 - 修正張量形狀從 [1, 10] 到 [1, 50, 10] - 添加調試輸出確認張量形狀 - 與訓練時的特徵維度保持一致2101309 -
🔧 修復光流計算和張量轉換問題
- 改進 calculate_optical_flow_features 函數的錯誤處理 - 使用 goodFeaturesToTrack + calcOpticalFlowPyrLK 的標準光流算法 - 修復 'npoints checkVector' 錯誤 - 確保有足夠的角點 - 優化張量轉換 - 使用 torch.from_numpy 避免警告 - 改進光流特徵計算 - 對所有幀計算再平均 - 增加 NaN 值處理確保數值穩定性feafc47 -
🔧 修復 Gradio 4.44.0 flagging_mode 參數錯誤
- 移除 gr.Interface 中不支援的 flagging_mode 參數 - 升級 Gradio 到 4.44.1 (修復版本) - 保持 pydantic==2.10.6 穩定性e198588 -
🔧 修復模型架構不匹配問題 + pydantic版本鎖定
- 使用正確的SignLanguageModel架構 (包含keypoint_projection, flow_projection等) - 修正關鍵點提取維度 (225維: 姿勢99 + 手部126) - 簡化光流特徵計算 (10維) - 新增pydantic==2.10.6解決schema錯誤 - 調整序列長度為50 (與訓練時一致)3abf194 -
🔧 使用 pydantic==2.10.6 修復 schema 錯誤
3bf3b96 -
DOWNGRADE FIX: Rollback to Gradio 4.38.1 + Robust Launch
- Downgrade to gradio==4.38.1 to avoid schema bug in 4.44.0 - Use simple gr.Interface with flagging_mode='never' - Add multi-tier error handling for different environments - Progressive fallback: default -> share=True -> server config - This should resolve the persistent TypeError bool iteration issue - Reference: GitHub issue #4046 about localhost accessibilityd68547d -
ULTIMATE FIX: Switch to Blocks + HF Spaces detection
- Replace gr.Interface with gr.Blocks to avoid schema processing bugs - Use direct image.change event instead of complex Interface schema - Add SPACE_ID environment detection for proper HF Spaces handling - Use server_name='0.0.0.0' for Spaces, share=True for local - This should resolve both TypeError and localhost accessibility issues - Reference: HF Forums discussion on Spaces launch problemsc4b1c9d -
Restore complete app.py with ultra-minimal Gradio config
- Add back full application code that was accidentally wiped - Use minimal gr.Interface with string shortcuts to avoid schema bugs - Single text output to prevent complex component issues - Should finally resolve the persistent TypeError64d50e5 -
FINAL FIX: Ultra-minimal Gradio interface to avoid schema bugs
- Strip down to bare minimum gr.Interface configuration - Use string shortcuts ('image', 'text') instead of component objects - Remove ALL complex parameters that trigger schema processing - Simplify to single output text instead of dual outputs - Eliminate any potential source of TypeError bool iteration - This should definitively resolve the persistent schema errorba7ba17 -
Fix Gradio launch parameters: remove incompatible enable_queue
- Remove enable_queue parameter causing TypeError - Simplify launch parameters to basic stable options - Fix Gradio 4.44.x compatibility issues - Use gr.Interface consistently for better stability - Model loading working correctly on serverf2900ce -
Switch to gr.Interface to fix persistent schema errors
- Replace complex gr.Blocks with simple gr.Interface - Eliminate all potential sources of TypeError bool iteration - Remove CSS themes and complex configurations - Simplify component definitions to bare minimum - Maintain core functionality with maximum compatibility3a86301 -
Fix Gradio app.py: resolve TypeError and localhost accessibility issues
- Fixed TypeError: argument of type 'bool' is not iterable - Added share=True to resolve localhost accessibility - Improved error handling and model loading - Enhanced UI with better parameter specifications - Added path auto-detection for flexible deployment8b41cc3 -
重新創建簡化版 app.py - 修復 Gradio 兼容性問題
6484498 -
簡化 Gradio 介面設計 - 修復 JSON schema 錯誤和移除 share=True
86d38f2 -
修復 Hugging Face Spaces 部署問題 - 添加 share=True 參數
ab4f6fb -
修復 Gradio 4.44.x 兼容性 - 使用 Image 組件替代 Video,移除 streaming 參數
70c378e -
重新創建完整的 app.py - 修復 Hugging Face Spaces 初始化問題
35d308c -
🎉 SignView2.0 精簡版部署 (with Git LFS)
✨ 核心功能: - 支援34種手語詞彙的即時辨識 - Gradio 網頁界面,攝像頭即時辨識 - MediaPipe Segmentation 背景分割 - 94.25% 測試準確率的深度學習模型 🔧 技術架構: - MediaPipe Holistic 關鍵點檢測 - 光流特徵即時計算 - 雙向LSTM + GRU + 多頭注意力機制 - 人體分割自動去除背景噪聲 📦 精簡包含: - app.py: Gradio 網頁應用程式 - realtime_sign_prediction.py: 核心辨識系統 - tsflow/models/best_model.pt: 訓練好的模型(Git LFS) - tsflow/results/: 模型配置和測試結果 - requirements.txt: 依賴套件 - README.md: 專案說明文件 ⚡ 優化:使用 Git LFS 處理二進制檔案,移除預處理特徵檔案改為即時計算ddab8ea