Update requirements.txt
Browse files- requirements.txt +73 -31
requirements.txt
CHANGED
|
@@ -1,41 +1,55 @@
|
|
| 1 |
# ============================================
|
| 2 |
-
#
|
| 3 |
-
#
|
| 4 |
-
#
|
| 5 |
# ============================================
|
| 6 |
|
| 7 |
# Core Dependencies
|
| 8 |
streamlit==1.32.2
|
| 9 |
-
opencv-python-headless==4.
|
| 10 |
-
|
|
|
|
| 11 |
Pillow==10.2.0
|
| 12 |
|
| 13 |
-
# System Monitoring
|
| 14 |
psutil==5.9.8
|
| 15 |
GPUtil==1.4.0
|
| 16 |
nvidia-ml-py==12.535.161
|
| 17 |
py3nvml==0.2.7
|
| 18 |
|
| 19 |
-
# PyTorch with CUDA (
|
| 20 |
-
torch==2.
|
| 21 |
-
torchvision==0.
|
| 22 |
-
torchaudio==2.
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
tokenizers==0.15.1
|
| 29 |
-
safetensors==0.4.2
|
| 30 |
-
huggingface-hub==0.20.3
|
| 31 |
|
| 32 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
rembg==2.0.53
|
| 34 |
onnxruntime-gpu==1.16.3
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
timm==0.9.12
|
| 40 |
albumentations==1.3.1
|
| 41 |
ultralytics==8.1.18
|
|
@@ -49,9 +63,9 @@ imageio==2.33.1
|
|
| 49 |
imageio-ffmpeg==0.4.9
|
| 50 |
|
| 51 |
# Video Processing
|
| 52 |
-
opencv-contrib-python==4.9.0.80
|
| 53 |
moviepy==1.0.3
|
| 54 |
av==11.0.0
|
|
|
|
| 55 |
|
| 56 |
# ML Libraries
|
| 57 |
xgboost==2.0.3
|
|
@@ -62,7 +76,16 @@ scikit-learn==1.4.0
|
|
| 62 |
pandas==2.2.0
|
| 63 |
pyarrow==15.0.0
|
| 64 |
|
| 65 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
memory-profiler==0.61.0
|
| 67 |
pympler==1.0.1
|
| 68 |
objgraph==3.6.1
|
|
@@ -72,16 +95,35 @@ joblib==1.3.2
|
|
| 72 |
threadpoolctl==3.2.0
|
| 73 |
|
| 74 |
# Utilities
|
| 75 |
-
tqdm==4.66.1
|
| 76 |
-
rich==13.7.0
|
| 77 |
python-dotenv==1.0.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
-
#
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
groundingdino-py==0.4.0
|
| 82 |
|
| 83 |
-
#
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# ============================================
|
| 2 |
+
# PRODUCTION REQUIREMENTS - FINAL VERSION
|
| 3 |
+
# MatAnyone (BEST) + SAM2 (VIDEO) + Rembg (FAST)
|
| 4 |
+
# Optimized for HuggingFace Spaces L4 GPU
|
| 5 |
# ============================================
|
| 6 |
|
| 7 |
# Core Dependencies
|
| 8 |
streamlit==1.32.2
|
| 9 |
+
opencv-python-headless==4.8.1.78 # Fixed for compatibility
|
| 10 |
+
opencv-contrib-python==4.8.1.78 # Matching version
|
| 11 |
+
numpy==1.26.4
|
| 12 |
Pillow==10.2.0
|
| 13 |
|
| 14 |
+
# System Monitoring
|
| 15 |
psutil==5.9.8
|
| 16 |
GPUtil==1.4.0
|
| 17 |
nvidia-ml-py==12.535.161
|
| 18 |
py3nvml==0.2.7
|
| 19 |
|
| 20 |
+
# PyTorch with CUDA (Latest stable)
|
| 21 |
+
torch==2.2.0
|
| 22 |
+
torchvision==0.17.0
|
| 23 |
+
torchaudio==2.2.0
|
| 24 |
|
| 25 |
+
# ============================================
|
| 26 |
+
# PRIMARY METHOD: MatAnyone (Production Quality)
|
| 27 |
+
# ============================================
|
| 28 |
+
git+https://github.com/pq-yang/MatAnyone.git
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
# ============================================
|
| 31 |
+
# SECONDARY METHOD: SAM2 (Video Optimized)
|
| 32 |
+
# ============================================
|
| 33 |
+
git+https://github.com/facebookresearch/segment-anything-2.git
|
| 34 |
+
|
| 35 |
+
# ============================================
|
| 36 |
+
# TERTIARY METHOD: Rembg (Fast Fallback)
|
| 37 |
+
# ============================================
|
| 38 |
rembg==2.0.53
|
| 39 |
onnxruntime-gpu==1.16.3
|
| 40 |
|
| 41 |
+
# ============================================
|
| 42 |
+
# Supporting Libraries
|
| 43 |
+
# ============================================
|
| 44 |
|
| 45 |
+
# Transformers & HuggingFace (for model downloads)
|
| 46 |
+
transformers==4.37.2
|
| 47 |
+
accelerate==0.26.1
|
| 48 |
+
huggingface-hub==0.20.3
|
| 49 |
+
safetensors==0.4.2
|
| 50 |
+
tokenizers==0.15.1
|
| 51 |
+
|
| 52 |
+
# Computer Vision
|
| 53 |
timm==0.9.12
|
| 54 |
albumentations==1.3.1
|
| 55 |
ultralytics==8.1.18
|
|
|
|
| 63 |
imageio-ffmpeg==0.4.9
|
| 64 |
|
| 65 |
# Video Processing
|
|
|
|
| 66 |
moviepy==1.0.3
|
| 67 |
av==11.0.0
|
| 68 |
+
decord==0.6.0
|
| 69 |
|
| 70 |
# ML Libraries
|
| 71 |
xgboost==2.0.3
|
|
|
|
| 76 |
pandas==2.2.0
|
| 77 |
pyarrow==15.0.0
|
| 78 |
|
| 79 |
+
# Progress & UI
|
| 80 |
+
tqdm==4.66.1
|
| 81 |
+
rich==13.7.0
|
| 82 |
+
|
| 83 |
+
# Web & Downloads
|
| 84 |
+
requests==2.31.0
|
| 85 |
+
httpx==0.26.0
|
| 86 |
+
aiohttp==3.9.3
|
| 87 |
+
|
| 88 |
+
# Memory Management
|
| 89 |
memory-profiler==0.61.0
|
| 90 |
pympler==1.0.1
|
| 91 |
objgraph==3.6.1
|
|
|
|
| 95 |
threadpoolctl==3.2.0
|
| 96 |
|
| 97 |
# Utilities
|
|
|
|
|
|
|
| 98 |
python-dotenv==1.0.1
|
| 99 |
+
fire==0.5.0
|
| 100 |
+
typer==0.9.0
|
| 101 |
+
|
| 102 |
+
# ============================================
|
| 103 |
+
# OPTIONAL: Additional Features
|
| 104 |
+
# ============================================
|
| 105 |
|
| 106 |
+
# Audio support (for videos with sound)
|
| 107 |
+
librosa==0.10.1
|
| 108 |
+
soundfile==0.12.1
|
| 109 |
+
pydub==0.25.1
|
| 110 |
+
|
| 111 |
+
# Advanced CV models
|
| 112 |
+
open-clip-torch==2.24.0
|
| 113 |
+
clip-interrogator==0.6.0
|
| 114 |
groundingdino-py==0.4.0
|
| 115 |
|
| 116 |
+
# Monitoring
|
| 117 |
+
wandb==0.16.3
|
| 118 |
+
tensorboard==2.15.1
|
| 119 |
+
|
| 120 |
+
# ============================================
|
| 121 |
+
# NOTES:
|
| 122 |
+
# 1. MatAnyone provides best quality with temporal consistency
|
| 123 |
+
# 2. SAM2 is video-optimized segmentation
|
| 124 |
+
# 3. Rembg is fast fallback
|
| 125 |
+
# 4. OpenCV is always available (comes with opencv-python)
|
| 126 |
+
# 5. Models download dynamically on first use
|
| 127 |
+
# 6. Total package size: ~10-15GB
|
| 128 |
+
# 7. Models add: 500MB-2GB depending on selection
|
| 129 |
+
# ============================================
|