# HVAC Blueprint Analyzer — Setup & Usage Find and tag HVAC indoor units on mechanical floor-plan PDFs, with a point-and-click GUI. ## 1. Prerequisites (install once per PC) 1. **Python 3.10 or newer** — https://www.python.org/downloads/ On the first installer screen, tick **“Add python.exe to PATH”**. 2. **Tesseract-OCR** (free) — https://github.com/UB-Mannheim/tesseract/wiki Install to the default `C:\Program Files\Tesseract-OCR` (it's detected automatically). Used to snap boxes precisely onto tag text. 3. **A Gemini API key** (free tier works) — https://aistudio.google.com/apikey *(Optional)* an **OpenRouter key** for the Qwen/Claude QA steps — https://openrouter.ai/keys ## 2. Install & run 1. Unzip this folder anywhere (e.g. `C:\HVAC-Analyzer`). 2. **Double-click `setup_and_run.bat`.** - First run: it builds a private Python environment and installs all packages automatically (a few minutes). Later runs just open the app. 3. On first run it creates a **`.env`** file — open it in Notepad and paste your `GEMINI_API_KEY` (and `OPENROUTER_API_KEY` if you have one). Save, then run again. That's it. No command line needed. ## 3. Using the app 1. **① Select PDF…** — pick a mechanical floor-plan PDF. *(Optional)* **Crisp PDF** — if you have the original un-flattened/vector version, pick it too for sharper detection (same page order). 2. It reads the equipment **schedule** and lists the floors (one-time per PDF). 3. **Recipe** is pre-set to the best configuration (runs 3, tile 1800, fp-filter, all-tags). 4. **▶ Run ALL floors** or select rows → **Run selected**. 5. When done, the **Flags** panel shows schedule-count mismatches and cross-floor issues. 6. Per floor: **Open PNG** (annotated plan) or **Verify ▶** (review/fix boxes one floor at a time — confirm / delete / drag / relabel, then save). Results are written under `output\\`. ## 4. Notes & troubleshooting - **API cost:** Gemini free tier is ~250 calls/day. `runs 3` is thorough but uses more calls; lower **runs** to 1–2 in the Recipe panel to save quota. - **Low memory:** if a floor crashes during the fp-filter step, its detection is saved — re-run that floor, or set **runs = 2** / untick **fp-filter** (the Verify step still lets you delete false positives by hand). - **Tesseract warning at launch:** install it (step 1.2); detection still works without it, box placement is just less precise. - **SmartScreen** may warn on the .bat (unsigned local script) → “More info → Run anyway”. ## 5. What's in the package - `setup_and_run.bat` — self-installing launcher (use this) - `launch_gui.bat` — quick launcher once installed - `requirements.txt` — Python dependencies - `.env.example` — API-key template - `python_files\` — the app (engine, GUI, QA scripts) - `Mitsubishi_Daikin_Indoor_HVAC_Units_v1.xlsx` — unit-type reference sheet