Skip to content

Releases

Room to Breathe v1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 12:05

Room to Breathe 1.0 is the first public release of an open-source system that helps anyone who runs a
gathering, from a temple committee to a national disaster authority, stop crowd crushes before they happen.

Try it now, nothing to install: https://abhieq31.github.io/roomtobreathe/

What it does

  • Is my event safe? Find the venue on a map, trace where people will stand, tap each gate and enter the
    expected crowd. You get one verdict (Safe, Possible with precautions or Not safe), the reasons worst
    first, and a numbered list of what to change, including how much extra exit width would fix it. It checks
    capacity with the largest exit blocked, crowding as people arrive, a sudden surge (with and without the
    response plan) and a full evacuation.
  • Live early warning at the venue. Existing CCTV gives people per m² and crowd motion per zone. Alerts
    say why they fired and how many minutes are left before critical density. Each one comes with a
    pre-approved playbook (which gate to close or open, and what to announce in English, Hindi or Bengali)
    that a named operator approves.
  • Count a crowd from a photo, a gate counter for volunteers, and a permit check, all in the
    browser. Photos never leave the device.
  • Open standards: alerts export as CAP 1.2. Every action is recorded with who approved it.

New since v0.3.0

  • Draw the venue on a map: search anywhere in the world (OpenStreetMap, no account or key), trace zones,
    and tap across gates. Areas and widths are measured for you.
  • One-question planning: the web app opens on Plan an event and gives a single verdict and fixes,
    using the new roomtobreathe.assess engine (rtb assess venue.json --people N, POST /api/assess).
  • Find the right place: when many places share a name (there are many "Ramlila Maidan"s), the search
    lists every match with its area and state. It also tries spelling variants (Maidan, Ground, Field)
    and accepts a pasted Google Maps or OpenStreetMap link, or plain coordinates.
  • Fixed: playbook actions in one simulation leaked into the next one, so an evacuation could start with
    nobody inside.
  • Fixed: pressing Enter in the Permit check reloaded the page and cleared every answer.
  • Fixed: a returning visitor's browser could keep using an old cached copy of the engine. It is now
    fingerprinted, so each release loads fresh.

Install

pip install "roomtobreathe[server]"          # control room:   roomtobreathe demo  /  roomtobreathe serve
pip install "roomtobreathe[vision,onnx]"     # camera device:  roomtobreathe setup && roomtobreathe edge
docker run -p 8000:8000 ghcr.io/abhieq31/roomtobreathe

Deployment guide: docs/DEPLOY.md.

Read before relying on it

Room to Breathe is decision support. Trained people decide and remain responsible. The default density
model undercounts the densest crowds by roughly 9–19%
(benchmark), so combine
cameras with gate counts. Calibrate thresholds and playbooks with your police, fire and medical teams before
the event. There is no face recognition and no individual tracking
(ETHICS.md).

Field pilots, translations and reviews from crowd-safety practitioners are very welcome. Please open an issue.

Room to Breathe v0.3.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 09:35
7275e08

Room to Breathe v0.3.0 is the project's new name (formerly CrowdSafe) and adds a web app that needs no
installation: https://abhieq31.github.io/roomtobreathe/

New

  • Web app, nothing to install. What-if studies, photo counting, capacity planning and the gate counter
    all run in the browser. Live camera monitoring still runs on a computer at the venue
    (docs/DEPLOY.md).
  • What-if studies on your own venue (roomtobreathe whatif, POST /api/whatif, and the web app):
    attendance, surge, a blocked gate or a full evacuation, each run twice, with nobody acting and with
    operators approving the playbook at the first RED alert. It reports where and when each zone reaches
    critical density, how many minutes of warning the RED alert gives, and how long an evacuation takes. In
    the browser it runs the same Python engine through Pyodide, so the numbers are identical.
  • Photo count: DM-Count in the browser (WebGPU or WebAssembly). Mark a ground rectangle of known size to
    get the people per m² and the densest square metre, and download it as a camera calibration file for
    roomtobreathe edge. The photo never leaves the device.

Fixed

  • A venue saved and loaded through the API had its usable-area share applied twice (the demo hall shrank
    from 720 to 540 m²).
  • Engine ticks are 3x faster (stop-and-go detection is cached for 5 s).

Renamed

  • Package and command roomtobreathe (short alias rtb), environment variables RTB_*, images
    ghcr.io/abhieq31/roomtobreathe and roomtobreathe-edge. Old GitHub links redirect.

CrowdSafe v0.2.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 08:47
85ca5cf

CrowdSafe v0.2.0 makes the camera pipeline usable on dense crowds, and makes the whole system deployable
by a local body or event organiser without programming. Start with docs/DEPLOY.md.

Install

  • Control room: docker compose up -d, or docker run -p 8000:8000 -v $PWD/data:/data ghcr.io/abhieq31/crowdsafe
  • Camera device: ghcr.io/abhieq31/crowdsafe-edge (density model included, works offline)
  • Python: pip install "crowdsafe[server,vision,onnx] @ <wheel URL from this release>"

New

  • A real density model. DM-Count (MIT), installed with crowdsafe model fetch and checked against a
    pinned SHA-256. Published accuracy: MAE 69.9 on ShanghaiTech A and 14.4 on B, never trained on either. It
    undercounts the densest scenes; see docs/vision.md.
  • crowdsafe venue new describes a venue in plain questions and prints its safe capacity and structural
    problems (single exit, trapped zones, crowd beyond exit capacity).
  • crowdsafe setup / check / edge: answer once, test everything (camera, calibration, model, device
    speed, server, access code, zone names), then run with no options.
  • Operator sign-in on the dashboard. Approved actions record the operator's name, and work when an
    access code is set.
  • An event record on disk: every alert, approved action, trigger and restart, fsynced as it happens,
    kept across crashes, downloadable at /api/log.

Safety fixes

  • A camera device with a fast clock could look alive long after it died. The server now corrects device
    clocks and never accepts future timestamps.
  • A batch the server rejected was retried forever, silencing that camera for the rest of the event. Bad
    values are now dropped one by one, and rejected batches are discarded.
  • The dashboard showed an action as done even when the server had not recorded it. It now says
    "NOT recorded" and re-enables the button.
  • Devices too slow to report within the 15 s no-data limit are rejected by check, instead of making
    zones flicker.
  • Slow devices report less often instead of shrinking the model input, because 512 px quadruples the
    undercount of the densest scenes.

Density models v1 (DM-Count)

Choose a tag to compare

@abhieq31 abhieq31 released this 20 Oct 07:13

Pretrained crowd-density models for CrowdSafe's camera pipeline. Install them with crowdsafe model fetch, which downloads the file and checks its SHA-256. No PyTorch is needed.

File crowdsafe name Trained on Use
dmcount_qnrf.onnx dense (default) UCF-QNRF Dense or unknown scenes. Best on cameras it has never seen
dmcount_shb.onnx sparse ShanghaiTech B Street scenes below ~250 people per frame

DM-Count (Wang et al., NeurIPS 2020), VGG-19. Exported with scripts/export_density_onnx.py (torch 2.14.1, opset 17). Input is (1,3,H,W) RGB with ImageNet normalisation; output is a (1,1,H/8,W/8) density map whose sum is the head count.

Measured accuracy (2026-10-20, CPU, dense model, at a 1024 px input; full tables in docs/vision.md):

MAE / RMSE Note
ShanghaiTech A test (182 images) 71.7 / 129.6 never trained on this dataset
ShanghaiTech B test (316 images) 14.4 / 27.8 never trained on this dataset

The model undercounts the densest scenes: by about 9% on Part A images with 1000+ heads, and 19% on Part B images with 250+ heads. Set alert thresholds with that margin, and combine cameras with gate counts. Before relying on it at a venue, measure the error on that venue's own cameras (scripts/benchmark_density.py --format csv).

Licence: DM-Count code and the source weights are MIT (see NOTICE.txt). The training images (UCF-QNRF, ShanghaiTech) were published for research; deployers should take their own advice on that, or fine-tune on footage they own.

CrowdSafe is decision support, not autopilot. See ETHICS.md.