Netra / .env.example
chikentikka's picture
Default OCR off for deploy β€” TrOCR OOM-kills the 512MB Render worker
9beb748
Raw
History Blame Contribute Delete
2.04 kB
# ── Red-light running ─────────────────────────────────────────────────────
# Enable stop-line crossing detection. Set the fraction of frame height where
# the stop line appears in your camera's view (0 = top, 1 = bottom).
RED_LIGHT_ENFORCEMENT=true
STOP_LINE_FRAC=0.6
# ── Wrong-side driving ────────────────────────────────────────────────────
# Motion-based enforcement (video only). Set the direction legal traffic flows
# in your camera's image space: down | up | left | right
WRONG_SIDE_ENFORCEMENT=true
WRONG_SIDE_DIRECTION=down
# ── Plate OCR (TrOCR) ─────────────────────────────────────────────────────
# OFF by default. Loading TrOCR can exceed a 512MB host's RAM and the OS kills
# the worker (hangs the request). Only set true on a host with β‰₯2GB RAM.
# OCR_ENABLED=true
# ── Illegal parking zones ─────────────────────────────────────────────────
# JSON array of no-parking polygons. Each polygon is a list of [x, y] fractions
# of the frame (0.0–1.0, top-left origin). Example marks both road shoulders:
PARKING_ZONES=[ [[0.0,0.72],[0.35,0.72],[0.35,1.0],[0.0,1.0]], [[0.65,0.72],[1.0,0.72],[1.0,1.0],[0.65,1.0]] ]
# Set to [] to disable parking detection:
# PARKING_ZONES=[]
# ── MongoDB Atlas ─────────────────────────────────────────────────────────
# Get this from: cloud.mongodb.com β†’ Cluster β†’ Connect β†’ Drivers β†’ Python
MONGODB_URI=mongodb+srv://<user>:<password>@<cluster>.xxxxx.mongodb.net/?retryWrites=true&w=majority&appName=<AppName>
MONGODB_DB=netra