Pream912 commited on
Commit
785c226
Β·
verified Β·
1 Parent(s): 1dabf28

Create requirements.txt

Browse files
Files changed (1) hide show
  1. requirements.txt +74 -0
requirements.txt ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ══════════════════════════════════════════════════════════════════════════════
2
+ # Blueprint Room Extractor β€” requirements.txt
3
+ # Target: Hugging Face Spaces (NVIDIA T4 / A10G GPU runtime)
4
+ #
5
+ # Install order matters β€” torch must come before torchvision/torchaudio and
6
+ # before segment-anything / easyocr so they all link against the same libcuda.
7
+ #
8
+ # To run locally with GPU:
9
+ # pip install -r requirements.txt
10
+ #
11
+ # To run locally CPU-only (fallback):
12
+ # pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
13
+ # ══════════════════════════════════════════════════════════════════════════════
14
+
15
+ # ── Web framework ─────────────────────────────────────────────────────────────
16
+ flask>=3.0.0
17
+ werkzeug>=3.0.0
18
+
19
+ # ── Core numerics ─────────────────────────────────────────────────────────────
20
+ numpy>=1.26.0,<3.0
21
+ scipy>=1.12.0
22
+ scikit-image>=0.22.0
23
+ pillow>=10.0.0
24
+
25
+ # ── OpenCV (CUDA-enabled build via headless + contrib) ────────────────────────
26
+ # opencv-python-headless is the standard HF Spaces variant (no GTK/Qt deps).
27
+ # The opencv-contrib-python-headless build ships ximgproc (thinning) and
28
+ # cuda* modules when the underlying system has libcuda.so.
29
+ # On CPU-only machines both packages fall back gracefully; cv2.cuda
30
+ # functions will raise RuntimeError which we catch and route to CPU.
31
+ opencv-contrib-python-headless>=4.9.0.80
32
+
33
+ # ── PyTorch β€” CUDA 12.1 wheel (HF Spaces default CUDA version) ───────────────
34
+ # HF Spaces hardware: NVIDIA T4 (sm_75) or A10G (sm_86), CUDA 12.x
35
+ torch>=2.3.0
36
+ torchvision>=0.18.0
37
+ torchaudio>=2.3.0
38
+
39
+ # ── CuPy β€” GPU NumPy (matches CUDA 12.x on HF Spaces) ────────────────────────
40
+ # Provides cp.asarray / cp.asnumpy for zero-copy GPU↔CPU transfers and
41
+ # replaces NumPy hotspots (chroma erase, RLE encoding, gap analysis) on GPU.
42
+ cupy-cuda12x>=13.0.0
43
+
44
+ # ── Segment Anything Model (SAM) ──────────────────────────────────────────────
45
+ # Facebook's original SAM β€” predictor.predict() runs on CUDA when available.
46
+ # Checkpoint (vit_h ~2.4 GB) is downloaded at runtime from HF Hub.
47
+ git+https://github.com/facebookresearch/segment-anything.git
48
+
49
+ # ── OCR β€” EasyOCR with GPU support ───────────────────────────────────────────
50
+ # EasyOCR uses its own torch-based CRNN; when torch.cuda.is_available() it
51
+ # automatically moves tensors to GPU without any code change.
52
+ easyocr>=1.7.1
53
+
54
+ # ── ONNXRuntime GPU (optional accelerator for EasyOCR detection backbone) ─────
55
+ # EasyOCR's detection model can run via onnxruntime-gpu if present.
56
+ onnxruntime-gpu>=1.18.0
57
+
58
+ # ── Hugging Face integration ──────────────────────────────────────────────────
59
+ # huggingface_hub: model download (SAM checkpoint)
60
+ # spaces: @spaces.GPU decorator for zero-GPU billing on HF Spaces free tier
61
+ huggingface_hub>=0.23.0
62
+ spaces>=0.29.0
63
+
64
+ # ── Enchant spell checker (room-label validation) ─────────────────────────────
65
+ # Requires system package: apt-get install libenchant-2-dev (add to packages.txt)
66
+ pyenchant>=3.2.2
67
+
68
+ # ── Miscellaneous utilities ───────────────────────────────────────────────────
69
+ # imageio: used by skimage internally
70
+ imageio>=2.34.0
71
+ # tqdm: progress bars inside EasyOCR / SAM
72
+ tqdm>=4.66.0
73
+ # requests: SAM checkpoint download fallback
74
+ requests>=2.31.0