Python CV Setup Assistant
Python CV Setup Assistant
Cross-platform guide for computer vision development environment
🔍 Platform Detection
Select your operating system to get customized setup instructions:
Windows
10/11 with PowerShell
macOS
Intel/Apple Silicon
Linux
Ubuntu/Debian/CentOS
🐍 Python Installation
Check Current Python
Loading platform-specific commands...
Install Python 3.10+
Platform-specific installation commands
Verification Checklist
- Python 3.10+ installed
- pip working correctly
- PATH configured
Python Version Test
Click to test
📦 Virtual Environment Setup
Create Environment (venv)
python -m venv cv_env
Activate Environment
Loading...
Environment not verified
📚 Core CV Libraries
Essential Libraries
- OpenCV - Image processing
- PyTorch - Deep learning
- NumPy - Numerical computing
- Pillow - Image manipulation
Optional Enhancement
- Supervision - Post-processing
- Albumentations - Data augmentation
Installation Commands
# Essential CV libraries
pip install opencv-python
pip install torch torchvision torchaudio
pip install numpy
pip install pillow
# Optional enhancements
pip install supervision
pip install albumentations
pip install jupyter
Loading platform-specific commands...
✅ Environment Verification
Quick Tests
OpenCV Test
import cv2
import numpy as np
# Create test image
img = np.zeros((300, 300, 3), dtype=np.uint8)
cv2.putText(img, 'CV Setup OK!', (50, 150),
cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)
cv2.imshow('Test', img)
cv2.waitKey(0)
cv2.destroyAllWindows()
print("OpenCV working!")
PyTorch Test
import torch
print(f"PyTorch version: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
print(f"CUDA devices: {torch.cuda.device_count()}")
print(f"Device name: {torch.cuda.get_device_name(0)}")
# Test tensor creation
x = torch.randn(3, 4)
print("Tensor test:", x.shape)
Test Results
Tests not run
Common Issues
- Module not found: Check virtual environment
- CUDA not available: Install NVIDIA drivers
- Permission denied: Run with admin/sudo
🎉 Setup Complete!
Export Configuration
Select an export option above
Next Steps
- Try basic image operations
- Load pre-trained models
- Set up Jupyter notebooks
- Configure GPU acceleration
Resources
📖 OpenCV Tutorials: docs.opencv.org
🔥 PyTorch Examples: pytorch.org/tutorials
🐍 Python CV Cookbook: github.com/cv-cookbook
Environment Ready
Your Python CV environment is configured and ready for development!
留言
發佈留言