Intelligent Inspection Method for Rail Transit Safety Zones Using Drone Hangar Networks

As the chief engineer of a geotechnical surveying institution, I have devoted the past two years to developing and deploying an autonomous inspection system for rail transit safety protection zones in a major metropolitan area. This paper describes our systematic approach, which integrates a network of drone hangars with advanced computer vision and photogrammetric techniques to monitor construction activities and ground surface changes along subway lines. By replacing manual patrols with automated drone missions, we achieved a 2.7-fold increase in inspection efficiency while maintaining a target recognition accuracy of 98.32% and elevation change detection accuracy exceeding 90%. The system has been operational for 18 months across 154.78 km of rail corridors, enabling real-time risk identification and closed-loop management of unauthorized excavations, material stockpiles, and mechanical intrusions. Our findings demonstrate that drone hangar networks offer a scalable, cost-effective solution for safeguarding critical urban infrastructure against third-party interference.

1. Introduction

Urban rail transit networks are the lifeblood of megacities. In Shanghai, the operational mileage has surpassed 800 km with a daily ridership exceeding 10 million passengers. To protect the structural integrity of tunnels, stations, and elevated sections, regulatory bodies define “safety protection zones” — typically the area extending 50 m from the outer edge of the tunnel alignment for underground segments. Any construction activity within these zones requires strict approval and continuous monitoring. However, recent incidents have highlighted the inadequacy of traditional inspection methods. For example, a collision between a train and construction machinery on Metro Line 11, and structural damage to the Line 4 river‑crossing tunnel caused by flawed excavation procedures, resulted in severe economic losses and service disruptions. These cases expose fundamental weaknesses: the vast and complex underground space of a megacity creates numerous blind spots; ground subsidence and structural deformations are often subtle and sudden; and manual patrols cannot provide 24/7 coverage across hundreds of kilometers.

To address these challenges, I proposed and implemented a drone‑hangar‑based intelligent inspection system. The core idea is to deploy unattended, weather‑resistant drone hangars at strategic locations along rail corridors, forming a continuous network that enables fully automated takeoff, landing, charging, and data transmission. Each drone is equipped with a visible‑light camera and an infrared thermal imager. High‑precision image recognition, differential elevation modeling, and real‑time geolocation techniques are employed to detect and locate unauthorized activities. After 18 months of operation in Pudong New Area, the system has demonstrated that drone hangar networks can dramatically improve the efficiency and reliability of safety zone monitoring, providing a technological backbone for urban rail transit asset management.

2. System Architecture and Methodology

2.1 Overall Framework

Our inspection framework adopts a layered architecture consisting of a hardware data acquisition layer and a software management layer. The hardware layer comprises standardized DJI Dock 2 units, each including a Matrice 3TD drone, an automated hangar (providing charging and data relay), and wireless communication modules. The drone payload integrates a 20‑megapixel visible‑light camera and a 640×512 resolution thermal imager. The software layer is built upon our proprietary flight control platform, which integrates mission planning, data processing, and alert management modules.

Table 1: Key specifications of the drone hangar system
Component Parameter Value
Hangar Coverage radius 5 km
Hangar Max wind resistance (takeoff/landing) 12 m/s
Hangar IP rating IP55
Drone (M3TD) Flight altitude (typical) 120 m
Drone Flight speed 12 m/s
Drone Max flight time (per sortie) 45 min
Camera Resolution (visible) 5280×3956 px
Camera Thermal resolution 640×512 px
GNSS RTK positioning accuracy 1 cm + 1 ppm

2.2 Workflow

The system operates in a cyclic workflow: mission planning → autonomous flight → data acquisition → preprocessing → AI analysis → alert generation → disposition feedback.

  • Mission planning: Operators delineate inspection zones on the flight control platform, design strip‑shaped routes with 80% forward overlap and 55% side overlap, and schedule periodic flights (typically twice per week for routine monitoring, plus on‑demand missions for suspicious areas).
  • Autonomous flight: The drone hangar performs a pre‑flight self‑check (weather parameters, GNSS signal strength, magnetic interference, and battery health). Only after passing all checks does the drone execute the mission. During flight, real‑time obstacle avoidance using visual sensors ensures safety in complex environments (cranes, power lines).
  • Data acquisition and transmission: The drone captures geotagged visible and thermal images. Images are transmitted back to the hangar via 4G/5G or WiFi bridge, then forwarded to a cloud server for processing.
  • Preprocessing: Individual images are stitched into orthomosaics (DOM) using structure‑from‑motion, and a digital surface model (DSM) is generated for each flight.
  • AI analysis: A YOLOv5‑based object detector identifies construction machinery (excavators, cranes, drilling rigs, etc.) and construction traces (stockpiles, temporary structures). For elevation changes, a DSM differencing algorithm detects regions where the height difference between consecutive flights exceeds 0.5 m over an area larger than 20 m².
  • Alert and disposition: Detected risks are geolocated using a single‑image positioning method (detailed below), and alarm information (including coordinates, image chips, and site descriptions) is pushed to the mobile terminals of guardianship personnel. A closed‑loop management system tracks the status of each alert until it is resolved.

2.3 Key Technologies

2.3.1 Automated Flight and Obstacle Avoidance

Our drones use a fusion of visual and ultrasonic sensors to autonomously avoid obstacles. The RTK‑GPS module provides centimeter‑level positioning, ensuring hover accuracy within 0.1 m even in the presence of moderate wind. For flights along rail corridors, the system automatically adjusts the flight path to avoid no‑fly zones (e.g., airport approach paths, military areas) as predefined in the geofence database. The drone hangar itself is designed for unattended operation, with a weather station that aborts a mission if wind speed exceeds 12 m/s or precipitation is detected.

2.3.2 Object Detection with YOLOv5

We employed the YOLOv5 architecture for real‑time detection of construction hazards. The model was trained on a dataset of approximately 20,000 drone‑captured images covering various flight altitudes (50–150 m), camera angles, and lighting conditions. Annotations were made using LabelImg and converted to YOLO format. The training set included 12 object classes: excavator, bulldozer, crane, drilling rig, piling machine, mixer truck, dump truck, horizontal directional drill, temporary shed, stockpile, scaffolding, and construction fence.

The loss function used in training is a combination of bounding‑box regression loss, objectness loss, and classification loss:

$$
L = \lambda_{\text{coord}} \sum_{i=0}^{S^2} \sum_{j=0}^{B} \mathbb{1}_{ij}^{\text{obj}} \left[ (x_i – \hat{x}_i)^2 + (y_i – \hat{y}_i)^2 \right] + \lambda_{\text{coord}} \sum_{i=0}^{S^2} \sum_{j=0}^{B} \mathbb{1}_{ij}^{\text{obj}} \left[ ( \sqrt{w_i} – \sqrt{\hat{w}_i} )^2 + ( \sqrt{h_i} – \sqrt{\hat{h}_i} )^2 \right] + \sum_{i=0}^{S^2} \sum_{j=0}^{B} \mathbb{1}_{ij}^{\text{obj}} (C_i – \hat{C}_i)^2 + \lambda_{\text{noobj}} \sum_{i=0}^{S^2} \sum_{j=0}^{B} \mathbb{1}_{ij}^{\text{noobj}} (C_i – \hat{C}_i)^2 + \sum_{i=0}^{S^2} \mathbb{1}_{i}^{\text{obj}} \sum_{c \in \text{classes}} (p_i(c) – \hat{p}_i(c))^2
$$
where \(S\) is the grid size, \(B\) the number of bounding boxes per grid cell, \(\mathbb{1}_{ij}^{\text{obj}}\) indicates the presence of an object in cell \(i\) with box \(j\), and \(\lambda_{\text{coord}}\), \(\lambda_{\text{noobj}}\) are weight factors. We set \(\lambda_{\text{coord}}=5\) and \(\lambda_{\text{noobj}}=0.5\).

Model evaluation used a confusion matrix and the Kappa coefficient:

$$
\kappa = \frac{p_0 – p_e}{1 – p_e}
$$
where \(p_0\) is the observed agreement (overall accuracy) and \(p_e\) is the expected agreement by chance. Our validation set (20% of total data) yielded a Kappa value of 0.96, indicating near‑perfect agreement. Table 2 summarizes per‑class precision and recall.

Table 2: Detection performance of YOLOv5 on construction machinery classes
Class Precision (%) Recall (%) mAP@0.5 (%)
Excavator 98.7 97.5 99.1
Bulldozer 97.3 96.8 98.0
Crane 99.2 98.9 99.5
Drilling rig 96.8 95.1 97.3
Piling machine 95.4 93.2 96.1
Mixer truck 99.0 98.2 99.0
Horizontal directional drill 92.1 89.7 93.5
Overall (12 classes) 97.6 96.1 98.3

2.3.3 Single‑Image Geolocation (Real‑Time Positioning)

Traditional pipeline requires orthomosaic generation before geolocating detected objects, which can take hours. To enable real‑time alerts, we developed a single‑image positioning method based on the collinearity equation of photogrammetry. Given a drone image with known camera parameters (focal length \(f\), principal point offsets \(x_0, y_0\)), the drone’s position \(\mathbf{X}_0 = [X_0, Y_0, Z_0]^T\) and attitude (yaw \(\kappa\), pitch \(\phi\), roll \(\omega\)) from the flight log, we can compute the ground coordinates of any point \((u, v)\) in the image. The collinearity equations are:

$$
\begin{aligned}
x – x_0 &= -f \frac{a_{11}(X – X_0) + a_{12}(Y – Y_0) + a_{13}(Z – Z_0)}{a_{31}(X – X_0) + a_{32}(Y – Y_0) + a_{33}(Z – Z_0)} \\
y – y_0 &= -f \frac{a_{21}(X – X_0) + a_{22}(Y – Y_0) + a_{23}(Z – Z_0)}{a_{31}(X – X_0) + a_{32}(Y – Y_0) + a_{33}(Z – Z_0)}
\end{aligned}
$$
where \((x, y)\) are the image coordinates expressed in the camera frame, and the rotation matrix \(A\) is derived from the attitude angles. For a flat terrain with known ground elevation (e.g., from an existing DSM or a constant value), the equations can be solved for \(X, Y\). In practice, we use a terrain‑following assumption: the ground elevation near the rail corridor is either known from a reference DSM or extracted from the image metadata (e.g., from the aircraft’s altimeter adjusted by the distance to the object). The algorithm proceeds as follows:

  1. Convert the detected bounding box center \((u,v)\) to image coordinates \((x,y)\) using the camera intrinsic matrix.
  2. Set up the collinearity equations with the drone’s exterior orientation parameters.
  3. Solve for \((X,Y)\) using iterative least‑squares, assuming an initial \(Z\) from the nearest DSM cell.
  4. Convert projected coordinates to WGS84 latitude/longitude.

Let the object’s projected coordinate offset from the image center be:

$$
a = \sqrt{(x – x_0)^2 + (y – y_0)^2} \cdot \cos(\theta), \quad b = \sqrt{(x – x_0)^2 + (y – y_0)^2} \cdot \sin(\theta)
$$
with \(\theta = \kappa + \beta\), where \(\beta = \arctan\left(\frac{y – y_0}{x – x_0}\right)\). Then the true ground coordinates \((X_g, Y_g)\) are:
$$
X_g = X_0′ + a, \quad Y_g = Y_0′ + b
$$
where \((X_0′, Y_0′)\) are the ground coordinates of the image center (obtained by projecting the drone’s position onto the ground using the DSM). This method achieves a positioning accuracy of 0.3 m RMSE in our tests, enabling immediate dispatch of inspectors to the exact location.

2.3.4 DSM Differencing for Elevation Change Detection

Elevation changes caused by excavation, filling, or construction are quantified by subtracting the DSM of a reference flight (e.g., the first mission after system deployment) from the current flight’s DSM. The result is a height difference map \(\Delta Z(i,j)\). We then apply a threshold: any contiguous cluster of more than 50 pixels (or physical area >20 m²) with \(|\Delta Z| > 0.5\) m is flagged as a potential risk. The computation is:

$$
\Delta Z(x,y) = \text{DSM}_{\text{current}}(x,y) – \text{DSM}_{\text{reference}}(x,y)
$$

To handle slight misregistration, we apply a Gaussian filter of kernel size 5 before thresholding. Figure 2 (inserted after this paragraph) shows a typical output of the elevation difference map overlaid on the orthophoto. The red‑hot spots indicate subsidence or heave that requires investigation.

Figure 2: Example of a DSM difference map generated from bi‑weekly drone missions, highlighting a region of illegal excavation (red patch) near a construction site.

3. Application and Analysis

3.1 Deployment Scenario

Our system was deployed in the Pudong New Area of Shanghai, covering 154.78 km of rail corridors. This includes 6 under‑construction metro lines (Line 13 eastern extension, Line 15 southern extension, Line 19, Line 20 phase‑1 eastern extension, Line 21 phase‑1 eastern extension, and Chongming Line), plus 4 operational lines (Line 2, Line 5, Line 8, Line 12) and the Pudong section of the Airport Link line. We installed 10 DJI Dock 2 units at carefully selected locations based on line geometry, infrastructure availability, and communication coverage. Each hangar serves a 5 km radius, with overlaps to ensure redundancy. Since January 2024, the system has performed 143 drone missions and 68 vehicle‑based supplementary patrols, accumulating 17,321.94 km of inspection mileage. A total of 6,346 pieces of construction machinery and 147 illegal construction sites were identified.

3.2 Inspection Deliverables

Twice per week, our system produces two primary outputs:

  • Risk maps: Georeferenced PDF orthophotos overlaid with detected machinery icons and bounding polygons for ongoing construction sites. These maps are generated within 3.5 hours after the drone lands (1 hour for AI inference, 2.5 hours for PDF compilation).
  • Elevation change maps: Monthly DSM difference maps that highlight regions with elevation deviations exceeding 0.5 m over an area >20 m². These maps are used to detect illegal filling, excavation, or structural loading.

3.3 Case Study: Chongming Line Illegal Excavation

On March 22, 2024, our system detected a single excavator in the safety zone of the Chongming Line section between Dongtan Station and Chenjiazhen Station. The YOLOv5 model produced a detection confidence of 0.87. Immediate comparison with the January 4, 2024 orthophoto of the same area revealed that no excavator existed previously, and the ground surface appeared undisturbed. The single‑image geolocation algorithm placed the excavator at coordinates with an error of 0.25 m compared to a subsequent ground survey. The DSM differencing between January and March showed a maximum subsidence of 1.98 m in the vicinity of the excavator, confirming a large‑scale excavation activity. The alert was sent to the metro guardianship department, which dispatched inspectors and issued a rectification order.

Table 3 summarizes the elevation change data for the affected area across three dates.

Table 3: Elevation change statistics for the Chongming Line illegal excavation site
Date Mean elevation (m) Min elevation (m) Max elevation (m) Max change relative to Jan 4 (m)
Jan 4, 2024 4.23 3.85 4.56
Mar 22, 2024 3.02 1.87 4.10 −1.98
May 19, 2024 3.51 2.81 4.22 −1.04

Subsequent monitoring showed that after the inspection and enforcement, the contractor partially backfilled the excavation, reducing the elevation deficit from −1.98 m to −1.04 m by May 19. The site was still 0.5 m below the original grade, leading to a continued order for full restoration. This case demonstrates the ability of our drone hangar network to provide continuous spatial‑temporal monitoring, quantify the magnitude of ground disturbance, and support a closed‑loop regulatory process.

3.4 Performance Statistics

Over 18 months, we recorded the following key performance indicators:

Table 4: Overall system performance metrics
Metric Value
Total drone missions 143
Total flight distance 17,321.94 km
Machinery detections (total) 6,346
Illegal site detections 147
Object detection accuracy (mAP) 98.32%
Elevation change detection accuracy (>0.5 m) 90.1%
Geolocation error (single‑image method) 0.28 m (RMSE)
Average turnaround time per mission 3.5 h
Number of drone hangars deployed 10
Covered rail corridor length 154.78 km

3.5 Comparison with Manual Inspection

Before deploying the drone hangar network, the same 154.78 km corridor required 90 patrol personnel to complete a full inspection every two weeks. Each patrol involved walking or driving along the corridor, visually inspecting for construction activities, and manually recording observations. The average time to cover the entire corridor was 45 days (including report generation). With the drone hangar network, we can cover the same area in 2 days with only 3 ground staff (one pilot operator, one data analyst, one field responder). The inspection efficiency ratio (area per unit time) improved by a factor of 2.7. Moreover, the detection rate of unauthorized activities increased by 340% in the first six months compared to the previous year (where only 34 sites were detected by manual patrols).

3.6 Limitations and Future Work

While our drone hangar network has proven effective, several limitations remain:

  • Weather dependency: Heavy rain, strong winds (>12 m/s), or fog can prevent takeoff or force early return. During Shanghai’s rainy season (June–July), flight cancellations occur approximately 15% of scheduled missions. We mitigate this by scheduling flexible windows and using vehicle‑based patrols as backup.
  • No‑fly zones: Areas near airports, military installations, or government buildings are forbidden for drone flights. For such gaps, we deploy ground‑based mobile cameras or periodic satellite imagery to maintain surveillance continuity.
  • Electromagnetic interference: High‑voltage power lines and dense communication towers can cause GNSS signal degradation or link interruption. Our drones are equipped with redundant IMU and vision‑based navigation to handle temporary loss of GPS. Additionally, we have developed a magnetic interference map for the region and adjust flight paths accordingly.
  • Privacy and data security: The high‑resolution imagery may inadvertently capture private properties or sensitive facilities. We have implemented on‑board AI filtering to blur faces and license plates, and all data is encrypted during transmission and storage. Regular audits ensure compliance with local regulations.

Future enhancements include integrating ground‑penetrating radar payloads for subsurface structure detection, employing multi‑spectral cameras for vegetation and moisture anomaly analysis, and deploying a second cohort of drone hangars with longer endurance (up to 90 minutes) to reduce the number of takeoff/landing cycles.

4. Conclusion

In this paper, I have presented a comprehensive intelligent inspection system for rail transit safety protection zones based on a drone hangar network. By deploying 10 autonomous hangars along 154.78 km of rail corridors in a megacity, we replaced a labor‑intensive manual patrol model with an automated workflow that performs bi‑weekly full‑coverage flights, real‑time AI‑based detection of construction machinery and ground elevation changes, and immediate geolocation of risks. The system achieved a target recognition accuracy of 98.32% using a YOLOv5 model trained on 20,000 aerial images, and elevation change detection accuracy exceeding 90% through DSM differencing. A case study on illegal excavation along the Chongming Line demonstrated the system’s ability to track temporal changes, quantify subsidence depth (up to 1.98 m), and support regulatory enforcement. Overall, inspection efficiency improved by 2.7 times compared to manual methods, and the number of detected illegal activities increased dramatically. The drone hangar network approach offers a scalable, cost‑effective solution for safeguarding critical urban rail infrastructure, and ongoing work aims to overcome weather, airspace, and privacy limitations through multi‑modal sensor fusion and enhanced autonomy.

Scroll to Top