ISL_Sign_Language_Translation / setup_windows.ps1
Abs6187's picture
Upload 2 files
13fd1dd verified
# TechMatrix Solvers - ISL Translation System
# Windows Setup Script for Dependencies
Write-Host "πŸš€ TechMatrix Solvers - ISL Translation System" -ForegroundColor Cyan
Write-Host "Setting up Windows environment..." -ForegroundColor Green
# Check Python version
Write-Host "`nπŸ“‹ Checking Python installation..." -ForegroundColor Yellow
try {
$pythonVersion = python --version 2>&1
Write-Host "βœ… Found: $pythonVersion" -ForegroundColor Green
} catch {
Write-Host "❌ Python not found. Please install Python 3.8+ first." -ForegroundColor Red
exit 1
}
# Check pip
Write-Host "`nπŸ“¦ Checking pip installation..." -ForegroundColor Yellow
try {
$pipVersion = pip --version 2>&1
Write-Host "βœ… Found: $pipVersion" -ForegroundColor Green
} catch {
Write-Host "❌ pip not found. Please install pip first." -ForegroundColor Red
exit 1
}
# Upgrade pip
Write-Host "`nπŸ”„ Upgrading pip..." -ForegroundColor Yellow
pip install --upgrade pip
# Remove conflicting OpenCV packages
Write-Host "`n🧹 Cleaning up conflicting OpenCV packages..." -ForegroundColor Yellow
pip uninstall opencv-python opencv-python-headless opencv-contrib-python -y 2>$null
# Install PyTorch first (CPU version for Windows compatibility)
Write-Host "`n🧠 Installing PyTorch (CPU version)..." -ForegroundColor Yellow
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# Install OpenCV headless version specifically
Write-Host "`nπŸ“Έ Installing OpenCV (headless)..." -ForegroundColor Yellow
pip install opencv-python-headless==4.8.1.78
# Install other core dependencies
Write-Host "`nπŸ“š Installing core dependencies..." -ForegroundColor Yellow
pip install streamlit>=1.28.0
pip install numpy>=1.24.0
pip install pandas>=2.0.0
pip install Pillow>=9.0.0
pip install matplotlib==3.5.3
pip install scipy>=1.10.0
pip install scikit-image>=0.20.0
pip install tqdm>=4.65.0
# Install ML/AI dependencies
Write-Host "`nπŸ€– Installing AI/ML dependencies..." -ForegroundColor Yellow
pip install keras>=2.13.0
pip install seaborn>=0.12.0
pip install huggingface_hub>=0.16.0
# Install media processing
Write-Host "`n🎬 Installing media processing..." -ForegroundColor Yellow
pip install av>=10.0.0
pip install ffmpeg-python>=0.2.0
# Check FFmpeg installation
Write-Host "`nπŸŽ₯ Checking FFmpeg installation..." -ForegroundColor Yellow
try {
$ffmpegVersion = ffmpeg -version 2>&1 | Select-String "version"
Write-Host "βœ… FFmpeg found: $($ffmpegVersion -split ' ')[2]" -ForegroundColor Green
} catch {
Write-Host "⚠️ FFmpeg not found. Installing via conda or manually download from https://ffmpeg.org/" -ForegroundColor Yellow
Write-Host " Trying conda install..." -ForegroundColor Yellow
try {
conda install ffmpeg -c conda-forge -y 2>$null
Write-Host "βœ… FFmpeg installed via conda" -ForegroundColor Green
} catch {
Write-Host "❌ Please install FFmpeg manually from https://ffmpeg.org/" -ForegroundColor Red
}
}
# Verify installation
Write-Host "`nπŸ” Verifying installation..." -ForegroundColor Yellow
python -c "
import sys
print(f'Python: {sys.version}')
try:
import cv2
print(f'βœ… OpenCV: {cv2.__version__}')
except Exception as e:
print(f'❌ OpenCV: {e}')
try:
import streamlit
print(f'βœ… Streamlit: {streamlit.__version__}')
except Exception as e:
print(f'❌ Streamlit: {e}')
try:
import torch
print(f'βœ… PyTorch: {torch.__version__}')
except Exception as e:
print(f'❌ PyTorch: {e}')
try:
import keras
print(f'βœ… Keras: {keras.__version__}')
except Exception as e:
print(f'❌ Keras: {e}')
try:
import numpy as np
print(f'βœ… NumPy: {np.__version__}')
except Exception as e:
print(f'❌ NumPy: {e}')
try:
import pandas as pd
print(f'βœ… Pandas: {pd.__version__}')
except Exception as e:
print(f'❌ Pandas: {e}')
"
Write-Host "`nπŸŽ‰ Setup completed!" -ForegroundColor Cyan
Write-Host "`nTo run the application:" -ForegroundColor Green
Write-Host " streamlit run src/streamlit_app.py" -ForegroundColor White
Write-Host "`nTechMatrix Solvers Team - Ready to translate ISL! 🀟" -ForegroundColor Cyan