Skip to content

Deployed · 2026

Protecting a sacred sitewith AI at the edge

AI Box solution for Bao Ha Temple, a national historical and cultural relic (Lao Cai)

3 AI Boxes analyse video from the temple's 48 cameras right on site. The system spots fire, fights and restricted-area intrusion early and counts people in real time, then sends alerts with annotated snapshots to a central dashboard within seconds.

Inner gate courtyard of Bao Ha Temple from a security camera, with the worship hall and a 10-year national intangible heritage sign behind

Real footage from the Tam Quan Noi courtyard camera at Bao Ha Temple.

Edge AI processing — no need to stream all video to a central site
3 AI Boxes
Existing IP cameras analysed continuously by AI
48 cameras
Automated monitoring and alerts
24/7

Challenges

  • Seasonal visitor surges: around 300,000 visits in spring 2026 and more than 136,000 during the 7th-lunar-month festival (Lao Cai Newspaper).
  • High fire risk from incense, candles and votive paper burning among wooden structures.
  • Pushing and scuffles in the courtyard, gate and incense area when crowds build up.
  • The rear sanctuary and donation boxes need after-hours protection; one person cannot watch dozens of screens at once.

Deployed solution

  • 3 AI Boxes read RTSP streams directly from 48 existing IP cameras — no camera replacement, no video sent to the cloud.
  • Four zone-based functions: fire detection, fight detection, restricted-area intrusion, people counting.
  • Instant alerts via webhook to a central dashboard, with an annotated snapshot.
  • Secure remote access over HTTPS to update configuration, zones and models.

Value delivered

  • Fire and security incidents spotted early, before they spread.
  • Real-time crowd density to manage visitor flow during festivals.
  • Staff only handle alerts instead of watching every screen.
  • The temple keeps its solemn atmosphere without adding many on-site personnel.

Visitor numbers from Lao Cai Newspaper. “Value delivered” describes what the running system does, not measured statistics.

Technology

Existing cameras, AI processing on site

Each AI Box runs AI models on a dedicated chip and analyses many camera streams at once. All analysis stays inside the temple's local network; only alert messages (event type, camera, time, bounding box) and one annotated snapshot leave it.

See the BoxAI solution
  • 48 existing IP cameras
  • 3 edge AI Boxes
  • Central alert dashboard
Camera frame of the Phu Chua courtyard with yellow markers on people detected by the AI Box
Real footage from the Phu Chua courtyard camera — yellow markers are people detected by the AI Box; faces are blurred.
From the system

Bao Ha Temple through AI cameras

  • Tam Quan Noi courtyard camera: stone courtyard in front of the worship hall
  • Main courtyard camera: large incense burner in the temple yard at dawn
  • Phu Chua courtyard camera: the AI Box marks people walking and resting
  • Worship hall camera: monitoring the altar and donation box area

Real footage from the temple's camera system; faces have been blurred.

Looking ahead

Technology serving the safety of sacred places

AI does not replace the temple's caretakers; it helps them see more and respond faster. On the same AI Box platform, the Bao Ha model can extend to nearby relics, towards a unified local heritage-protection network.

Every safe festival season is a complete one. AI helps the management keep the relic solemn even when tens of thousands of people arrive at once.
NTA's vision for the project
AI algorithms

One AI Box, layered algorithms for each area of the temple

  • Object detection

    Base layer: a one-stage CNN (YOLO family) detects people and flames in every frame, INT8-quantised to run in real time on the AI Box.

  • Multi-object tracking

    Base layer: a Kalman filter and Hungarian matching (SORT/ByteTrack style) give each person a stable ID for counting and direction checks.

  • Fire detection

    A flame region must persist across many frames and tend to grow before an alert fires. Used at: votive-paper burner, offerings store, wooden halls.

  • Fight detection

    Pose keypoints and motion sequences are analysed to recognise scuffles. Used at: courtyard, gate and crowded areas during festivals.

  • Restricted-area intrusion

    Virtual fence: checks whether a person's foot point lies inside the restricted polygon, on a time schedule. Used at: rear sanctuary and donation boxes after closing.

  • People counting and density

    Counts people crossing the gate in both directions, estimates how many are in a zone and alerts above a safe threshold. Used at: gate, main courtyard, incense area.

Operations

Timely alerts, fewer false alarms

Reducing false alarms in a spiritual setting

Incense smoke and candlelight easily trigger false fire alarms on ordinary AI cameras, so each zone is configured separately.

  • Exclusion masks around incense burners, candle stands and oil lamps so they never trigger fire alerts.
  • Per-camera confidence thresholds and consecutive-frame counts, tuned for day and night lighting.
  • The dashboard groups alerts of the same type from the same camera within a time window into one incident, so staff are not flooded.

Event flow

  • IP camera → RTSP stream → on-site AI Box analyses each frame.
  • Event detected → JSON alert + annotated snapshot sent via webhook.
  • The central dashboard lists alerts by type, camera and time for staff to act on.

Want to use AI to protect your temple, pagoda or heritage site?

Contact NTA for a site survey and advice on an AI Box solution for temples, pagodas, relics and spiritual tourism sites.

Contact us