start_demo_gpu.bat 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @echo off
  2. REM LightGlue Demo - GPU Accelerated Launcher (Python 3.12 + CUDA 12.1)
  3. REM This version uses Python 3.12 with GPU support
  4. REM Skip some Windows startup delays
  5. chcp 65001 >nul 2>&1
  6. REM Configuration
  7. set "CAMERA_IP=192.168.0.28"
  8. set "CAMERA_PORT=4747"
  9. set "MAX_KEYPOINTS=256"
  10. echo.
  11. echo ========================================
  12. echo LightGlue Camera Demo - GPU Mode
  13. echo Python 3.12 + CUDA 12.1
  14. echo ========================================
  15. echo.
  16. REM Check if Python 3.12 is available
  17. py -3.12 --version >nul 2>&1
  18. if errorlevel 1 (
  19. echo ERROR: Python 3.12 not found!
  20. echo Please install Python 3.12 or use start_demo_fast.bat instead
  21. pause
  22. exit /b 1
  23. )
  24. echo Python 3.12 detected, using GPU acceleration
  25. echo.
  26. REM Check for custom arguments
  27. if "%~1"=="" (
  28. REM Use default settings
  29. echo Using default camera: %CAMERA_IP%:%CAMERA_PORT%
  30. echo Max keypoints: %MAX_KEYPOINTS%
  31. echo.
  32. echo Starting demo...
  33. echo.
  34. REM Run with optimized settings
  35. py -3.12 "%~dp0demo_lightglue_camera_position_single_window.py" --input "http://%CAMERA_IP%:%CAMERA_PORT%/video" --max_keypoints %MAX_KEYPOINTS%
  36. ) else (
  37. REM Pass all arguments to the script
  38. py -3.12 "%~dp0demo_lightglue_camera_position_single_window.py" %*
  39. )
  40. if errorlevel 1 (
  41. echo.
  42. echo Demo exited with error.
  43. pause
  44. )