posedet/main_qt.py
2025-06-22 16:51:48 +08:00

28 lines
562 B
Python

#!/usr/bin/env python3
"""
Qt版本的动作比较与姿态分析系统
"""
import sys
import os
import torch
# Add current directory to path for imports
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
# Set environment variables for performance
os.environ['OMP_NUM_THREADS'] = '1'
os.environ['MKL_NUM_THREADS'] = '1'
try:
torch.set_num_threads(1)
except:
pass
# Set Qt path workaround for torch
torch.classes.__path__ = [os.path.join(torch.__path__[0], 'classes')]
if __name__ == "__main__":
from qt_main import main
main()