Spaces:
Paused
Paused
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Blueprint Room Extractor β requirements.txt | |
| # Target: Hugging Face Spaces (NVIDIA T4 / A10G GPU runtime) | |
| # | |
| # Install order matters β torch must come before torchvision/torchaudio and | |
| # before segment-anything / easyocr so they all link against the same libcuda. | |
| # | |
| # To run locally with GPU: | |
| # pip install -r requirements.txt | |
| # | |
| # To run locally CPU-only (fallback): | |
| # pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # ββ Web framework βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| flask>=3.0.0 | |
| werkzeug>=3.0.0 | |
| # ββ Core numerics βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| numpy>=1.26.0,<3.0 | |
| scipy>=1.12.0 | |
| scikit-image>=0.22.0 | |
| pillow>=10.0.0 | |
| # ββ OpenCV (CUDA-enabled build via headless + contrib) ββββββββββββββββββββββββ | |
| # opencv-python-headless is the standard HF Spaces variant (no GTK/Qt deps). | |
| # The opencv-contrib-python-headless build ships ximgproc (thinning) and | |
| # cuda* modules when the underlying system has libcuda.so. | |
| # On CPU-only machines both packages fall back gracefully; cv2.cuda | |
| # functions will raise RuntimeError which we catch and route to CPU. | |
| opencv-contrib-python-headless>=4.9.0.80 | |
| # ββ PyTorch β CUDA 12.1 wheel (HF Spaces default CUDA version) βββββββββββββββ | |
| # HF Spaces hardware: NVIDIA T4 (sm_75) or A10G (sm_86), CUDA 12.x | |
| torch>=2.3.0 | |
| torchvision>=0.18.0 | |
| torchaudio>=2.3.0 | |
| # ββ CuPy β GPU NumPy (matches CUDA 12.x on HF Spaces) ββββββββββββββββββββββββ | |
| # Provides cp.asarray / cp.asnumpy for zero-copy GPUβCPU transfers and | |
| # replaces NumPy hotspots (chroma erase, RLE encoding, gap analysis) on GPU. | |
| cupy-cuda12x>=13.0.0 | |
| # ββ Segment Anything Model (SAM) ββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Facebook's original SAM β predictor.predict() runs on CUDA when available. | |
| # Checkpoint (vit_h ~2.4 GB) is downloaded at runtime from HF Hub. | |
| git+https://github.com/facebookresearch/segment-anything.git | |
| # ββ OCR β EasyOCR with GPU support βββββββββββββββββββββββββββββββββββββββββββ | |
| # EasyOCR uses its own torch-based CRNN; when torch.cuda.is_available() it | |
| # automatically moves tensors to GPU without any code change. | |
| easyocr>=1.7.1 | |
| # ββ ONNXRuntime GPU (optional accelerator for EasyOCR detection backbone) βββββ | |
| # EasyOCR's detection model can run via onnxruntime-gpu if present. | |
| onnxruntime-gpu>=1.18.0 | |
| # ββ Hugging Face integration ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # huggingface_hub: model download (SAM checkpoint) | |
| # spaces: @spaces.GPU decorator for zero-GPU billing on HF Spaces free tier | |
| huggingface_hub>=0.23.0 | |
| spaces>=0.29.0 | |
| # ββ Enchant spell checker (room-label validation) βββββββββββββββββββββββββββββ | |
| # Requires system package: apt-get install libenchant-2-dev (add to packages.txt) | |
| pyenchant>=3.2.2 | |
| # ββ Miscellaneous utilities βββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # imageio: used by skimage internally | |
| imageio>=2.34.0 | |
| # tqdm: progress bars inside EasyOCR / SAM | |
| tqdm>=4.66.0 | |
| # requests: SAM checkpoint download fallback | |
| requests>=2.31.0 | |
| openpyxl |