Unsupervised Detection Method for Law Enforcement Images Based on Edge Computing Power
By integrating edge computing devices and fusion adaptive cross-layer optimization networks onto drones, real-time unsupervised detection of drone law enforcement images was achieved, solving the problems of latency and labeling dependence in existing technologies and improving the real-time performance and intelligence of detection.
Patent Information
- Application Number
- CN202511315703.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-15
AI Technical Summary
Existing technologies rely on centralized cloud processing for drone law enforcement image processing, resulting in high latency, high bandwidth pressure, concentrated computational pressure, high operation and maintenance costs, and the supervised learning model is highly dependent on labeled data, making it unable to effectively identify targets such as illegal buildings in complex scenarios.
An unsupervised detection method based on edge computing power is adopted, and real-time image processing is performed using OrangePi AIPro devices. The method combines a fusion adaptive cross-layer optimization network for feature extraction and segmentation, including a dual-path cross-layer feature extractor and an unsupervised optimization objective function. Feature extraction and segmentation are performed through a scale-adaptive asymmetric convolution module and a self-supervised learning method.
It enables drones to segment and identify targets such as illegal buildings in real time during flight, reducing latency and bandwidth consumption, improving the level of detection intelligence, adapting to complex scenarios, and reducing operation and maintenance costs.
Smart Images

Figure CN120808120B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video fusion technology, specifically to an unsupervised detection method for law enforcement images based on edge computing power. Background Technology
[0002] In existing technologies, drones are typically used only as data collection platforms, transmitting law enforcement images to the cloud or local servers for centralized processing. For example, Chinese patent CN115984694A describes a method, device, system, and equipment for intelligent inspection of illegal construction in urban buildings. The method described in this application involves using drones or satellites to capture images of a target geographical area, obtaining images of the target geographical area collected by the drones or satellites at different times; stitching the images of the target geographical area from different times together; and identifying the building area images of the target geographical area using a pre-trained semantic segmentation model for recognizing building areas; determining whether there are newly built or demolished buildings in the target geographical area based on the building area images; and issuing an illegal construction warning if newly built or demolished buildings are found.
[0003] However, the aforementioned patents still have the following drawbacks:
[0004] High latency; cloud-based centralized processing relies heavily on network transmission and cannot guarantee real-time performance.
[0005] High bandwidth pressure: Transmission of high-resolution real-time images consumes a large amount of bandwidth, which is not conducive to large-scale applications;
[0006] The concentrated computing pressure leads to excessive server load and high maintenance costs.
[0007] The model is highly dependent on annotations, requiring a large amount of labeled data for training. When transferred to new scenes, its performance is limited, especially in complex scenes (such as similar building appearances, changes in lighting, and severe occlusion). Summary of the Invention
[0008] Therefore, the technical problem to be solved by the present invention is to overcome the defects in the prior art and propose an unsupervised detection method for law enforcement images based on edge computing power. This method is independent of the network environment, can realize real-time image processing and analysis during flight, and can complete the segmentation and identification of targets such as illegal buildings without relying on external network transmission.
[0009] To address the aforementioned technical problems, this invention provides an unsupervised detection method for law enforcement images based on edge computing power, comprising:
[0010] An unsupervised detection method for law enforcement images based on edge computing power includes the following steps:
[0011] 1) The collected image data is directly input into the edge computing device and preprocessed to obtain the image to be processed;
[0012] 2) The image to be processed is input into the fusion adaptive cross-layer optimization network for feature extraction and segmentation. The fusion adaptive cross-layer optimization network includes a dual-path cross-layer feature extractor and an unsupervised optimization objective function composed of the weighted sum of the intra-image contrast loss function and the local reconstruction loss function. The dual-path cross-layer feature extractor includes an initial feature encoding module, a backbone feature extraction path composed of multiple identical feature encoding modules connected in series, and a feature fusion path that runs parallel to it and performs cross-layer feature fusion.
[0013] The feature encoding modules mentioned above are all scale-adaptive asymmetric convolution modules. The implementation of the scale-adaptive asymmetric convolution module includes the following sub-steps.
[0014] 2.1.1) Using the input image or feature map as the original input, preliminary feature extraction is performed. After batch normalization and activation function processing, shared features are generated.
[0015] 2.1.2) The shared features are input into three parallel asymmetric convolutional branches with different receptive field scales to extract short-range, medium-range, and long-range features respectively.
[0016] 2.1.3) Element-wise multiplication of short-range and mid-range features is performed to generate an attention map, and the long-range features are weighted using the attention map to obtain the gated features.
[0017] 2.1.4) Aggregate the gated features with the original input copy features and long-range features, and output a feature map;
[0018] 3) The edge computing device generates segmentation results in real time based on the final output feature map.
[0019] As one of the preferred solutions, in step 1), the edge computing device is an OrangePi AIPro device, and the collected image data does not need to rely on external network transmission and can be directly accessed to the OrangePi AIPro device.
[0020] As one preferred embodiment, in step 1), the preprocessing includes at least one of the following operations: size normalization, illumination and color correction, and noise filtering.
[0021] As one preferred embodiment, the three branches are short-range feature branch, medium-range feature branch, and long-range feature branch, each branch consisting of a... Depth-separable convolution and a Depth-separable convolutional concatenation is used to capture features within different receptive fields. It is the size parameter of the convolution kernel in depthwise separable convolution.
[0022] As one preferred embodiment, the segmentation results are output to the user terminal in the form of contour annotations and binary segmentation maps.
[0023] As one of the preferred solutions, in step 3), the segmentation result includes the outline label of the target area and the binary segmentation map, and the target area includes illegal buildings, street vendor facilities or garbage dumps.
[0024] As one preferred embodiment, the unsupervised optimization objective function is specifically implemented including,
[0025] 2.2.1) Calculate the intra-image contrast loss: Randomly sample anchor blocks, define positive sample blocks that are spatially adjacent and visually similar and negative sample blocks that are significantly different, and optimize the loss by minimizing the feature distance between the anchor block and the positive sample block and maximizing the feature distance between the anchor block and the negative sample block;
[0026] 2.2.2) Calculate the local image patch reconstruction loss: The original image patch is reconstructed by the lightweight reconstruction module after the encoder, with the feature embedding of the anchor block as input, and the mean square error between the original image patch and the reconstructed patch is used as the loss.
[0027] 2.2.3) The intra-image contrast loss and the local image patch reconstruction loss are weighted and summed according to preset weights, and used as the final unsupervised optimization objective function.
[0028] The technical solution of this invention has the following advantages:
[0029] To address the aforementioned issues, this invention proposes an unsupervised real-time image detection method for urban law enforcement using drones with embedded edge computing power. This method embeds the high-performance edge computing device OrangePi AIPro into the drone, enabling real-time image processing and analysis during flight. It can segment and identify targets such as illegal buildings without relying on external network transmission. The unsupervised optimization objective function (unsupervised detection algorithm) eliminates the dependence on large amounts of labeled data, achieving efficient detection by utilizing the image's inherent features. This allows the drone to collect and process data simultaneously during flight, feeding the results back to the user in real time, significantly reducing latency, bandwidth consumption, and enhancing the intelligence and practical application value of the detection.
[0030] This technology can be widely applied to scenarios such as automatic segmentation and detection of illegal buildings, smart city integrated law enforcement, and rapid response to emergency management; it can also be extended to other urban governance tasks, such as identification of street vendors, monitoring of exposed garbage dumps, and inspection of damaged public facilities, providing efficient and intelligent technical support for urban management. Attached Figure Description
[0031] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram of the structure of the law enforcement image unsupervised detection method based on edge computing power provided in the first embodiment of the present invention. Detailed Implementation
[0033] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] The present invention provides an unsupervised detection method for law enforcement images based on edge computing power, comprising the following steps:
[0035] 1) The acquired image data is directly input into the airborne edge computing device for preprocessing to obtain the image to be processed. Specifically, an edge computing device such as OrangePi AIpro (the edge computing device is integrated into the drone; the drone is equipped with a high-resolution camera to acquire high-definition video streams of the target area in real time during the cruise) is used. This video stream, i.e., the image data, is transmitted in real time to the airborne OrangePi AIPro device, which decodes it in real time, converting the continuous video signal into a complete sequence of image frames (i.e., converting it frame by frame into an image). Subsequently, OrangePi AIpro uses its built-in multi-core CPU and NPU with up to 8 TOPS of AI computing power to quickly preprocess each frame of the sequence. The acquired real-time video stream data is directly input into the airborne OrangePi AIPro device without relying on external transmission. At the same time, the edge computing device performs data preprocessing, such as OrangePi AIPro directly performing fast preprocessing on the image after receiving it. The preprocessing steps include: size normalization; illumination and color correction; and noise filtering. This step ensures that the input image still has high quality under complex environments (strong light, shadow, low illumination).
[0036] 2) The image to be processed is input into a fusion adaptive cross-layer optimization network for feature extraction and segmentation. The fusion adaptive cross-layer optimization network includes a dual-path cross-layer feature extractor and an unsupervised optimization objective function consisting of a weighted sum of an intra-image contrast loss function and a local reconstruction loss function. The dual-path cross-layer feature extractor includes an initial feature encoding module, a backbone feature extraction path consisting of multiple identical feature encoding modules connected in series, and a feature fusion path.
[0037] The main feature extraction path and feature fusion path receive and process feature maps output from the previous depth level in the feature encoding module at each depth level. The feature fusion path also introduces feature maps output from different depth levels in the main feature extraction path through multiple adapter layers.
[0038] Conventional deep network encoders typically employ a linear structure that deepens layer by layer in a unidirectional manner. This type of structure can capture global semantic information well in deep features, thus determining region categories, but it loses accurate local boundary information due to the gradual decrease in spatial resolution. Conversely, shallow features, while preserving pixel-level spatial details such as edges, lack high-level semantic guidance. This separation between semantic and spatial information often leads to problems such as blurred boundaries and missing small targets in the segmentation results.
[0039] To address the problem of the separation between deep semantic information and shallow spatial detail information in traditional encoders, such as Figure 1 As shown, this invention designs a dual-path cross-layer feature extractor. The core of this architecture lies in achieving collaborative optimization of multi-level features through parallel main feature extraction path (left path) and feature fusion path (right path) and dense cross-layer connections between them. Specifically, given an input image... First, it is mapped to a shallow feature map through an initial feature encoding module. This serves as the input to the entire dual-path structure. The main feature extraction path consists of N cascaded feature encoding modules, where N can be selected from 3 to 10 depending on the actual situation. In this embodiment of the invention, 3 modules will be used as an example for illustrative explanation. Hierarchical features are extracted layer by layer from bottom to top, progressing from low-level information such as edges and textures to high-level semantic information such as targets and scenes. This invention represents the feature map output by the i-th depth level main feature extraction path as follows: In parallel, the feature fusion path also consists of N identical feature encoding modules cascaded together. At each depth level i, the feature encoding module not only receives and processes the feature map output from its previous depth level, but also... More importantly, it actively incorporates feature maps from different depth levels in the main feature extraction path (e.g., through multiple adapter layers, such as those implemented by 1x1 convolutions) And even shallower , These feature maps from different paths and depth levels are fused element-wise after channel dimension unification and feature alignment through the adapter layer. This results in a fused feature rich in multi-scale contextual information, which is then used as input to the feature encoding module of the current depth level for deep integration. This allows deep semantics to guide the selection of shallow details, while shallow details provide accurate spatial localization for deep semantics, thus maintaining full resolution without any spatial downsampling. Under this premise, the final features with both high-level semantic discriminative power and high-precision spatial details were generated.
[0040] set up This represents the initial feature encoding module. and These represent the feature encoding modules of the i-th layer in the left path (main feature extraction path) and the right path (feature fusion path), respectively, where each feature encoding module has the same network structure. Representing the adapter layer (a linear transformation of the unified channel dimension and aligned features, implemented by 1x1 convolution), the entire feature extraction process can be precisely described by the following formula:
[0041] 1. Initial feature extraction:
[0042] ;
[0043] 2. Main feature extraction path (left path):
[0044] ; The concatenation operator for the representative feature encoding module, from =1 to The deep-level feature encoding modules are executed sequentially;
[0045] 3. Feature Fusion Path (Right Path): The feature fusion process in this path is calculated through the following depth-level calculations, consistent with the network architecture diagram:
[0046] ;
[0047] ;
[0048] ;
[0049] The final feature is obtained by element-wise addition of the feature maps output by the main feature extraction path and the feature fusion path at the last depth level (e.g., N=3 in this embodiment). The final feature map is specifically represented as follows:
[0050]
[0051] Processing real-time drone-based law enforcement imagery presents unique challenges due to its high-altitude perspective, variable lighting, and complex urban terrain. Targets (such as illegal buildings and street vendors) exhibit extreme diversity in shape, scale, and orientation. For example, a building's outline may be a regular rectangle or an irregular polygon; its key edge features (such as eaves and walls) may appear at arbitrary angles in aerial imagery. Furthermore, target textures are often highly intertwined with the surrounding environment (such as vegetation, shadows, and roads), placing stringent demands on the robustness of feature extraction.
[0052] To address the aforementioned technical challenges, the feature encoding modules designed in this invention are all Scale Adaptive Asymmetric Convolutional Modules (hereinafter referred to as SAACM). The core idea of this module is to simulate specialized perception of features at different scales and orientations through parallel asymmetric convolutional paths with different receptive fields, and to introduce a dynamic gating mechanism that enables the SAACM module to adaptively focus on the most informative long-range dependencies based on the intrinsic relationships of features, thereby providing high-quality, highly discriminative feature representations for subsequent unsupervised learning tasks.
[0053] The overall architecture of SAACM is shown in the figure, and its specific process is as follows:
[0054] Let the input feature map of the module be... ,in These represent the number of channels, height, and width of the feature map, respectively. The input image for the primary feature encoding module is the image to be processed. The input images for other feature encoding modules are the feature images output from the previous depth level or the fused feature images. To achieve residual learning and preserve the original input information, the module introduces an identity path, which takes the input feature map... The input feature map or the image to be processed is directly passed to the subsequent fusion stage as the original input to the scale-adaptive asymmetric convolution module. The output of this identity mapping can then be expressed as: , Features are for copies of the original input.
[0055] 2.1.1) Extracting shared features
[0056] Input feature map First, a 5×5 depthwise separable convolution (DWConv) is used for initial feature extraction. This operation aims to effectively expand the receptive field with low computational cost and capture local spatial context information to generate a shared feature set. .
[0057]
[0058] in, This represents a 5×5 depthwise separable convolution, BN represents batch normalization, and ReLU represents the activation function.
[0059] 2.1.2) Multi-scale asymmetric feature extraction
[0060] To efficiently capture slender structural features of different scale ranges and with orientation, this invention will share features. Three parallel asymmetric convolution branches are fed in. Each branch consists of one... of and of Connected in series, This refers to the size parameter of the convolution kernel in depthwise separable convolution. This design approximates... While convolutional receptive field is increased, the number of parameters is significantly reduced, and the sensitivity to structural features in both horizontal and vertical directions is enhanced.
[0061] Short-range characteristic branches:
[0062] ;
[0063] Mid-range characteristic branches:
[0064] ;
[0065] Long-range feature branches:
[0066] ;
[0067] Through these three paths, the module can simultaneously analyze information within receptive fields of approximately 7×7, 11×11, and 21×21, achieving parallel perception of the target at multiple scales. It is characterized by short range. It is a medium-range characteristic. It is a long-range characteristic.
[0068] 2.1.3) Feature Gating and Fusion
[0069] To achieve dynamic interaction and information filtering among features at different scales, this invention designs a feature gating mechanism. First, this invention uses short-range features... With medium-range characteristics Element-wise multiplication is performed to capture co-occurrence patterns of features at both scales. Then, the result is transformed into a normalized attention map using a spatial softmax function. Its value reflects the importance of features at different spatial locations.
[0070] ;
[0071] in This represents element-wise multiplication. (Attention graph) It was subsequently used for long-range features By applying weights, the model can adaptively enhance or suppress long-range contextual information, thus achieving dynamic information filtering.
[0072] ;
[0073] 2.1.4) Multi-path Residual Aggregation
[0074] Finally, to ensure the richness of the information flow and promote gradient propagation, this invention uses gated features... It is then aggregated with two adjusted residual paths. The first path originates from the original input features of the identity path. The second path originates from ungated long-range features. Each feature is processed by a 1×1 convolution to adjust the channels and transform the feature space, in order to match the feature dimensions of the main feature extraction path.
[0075]
[0076] Final output features By integrating core features filtered through scale-adaptive gating, raw low-level information, and complete long-range contextual information, a comprehensive and robust feature description of UAV imagery is formed. Through its unique design, SAACM can efficiently address the challenges of target scale variations and arbitrary orientations in UAV law enforcement scenarios, laying the foundation for accurate unsupervised recognition tasks.
[0077] To achieve efficient feature extraction under the limited computing power of edge computing devices, this invention abandons the traditional single-path convolution stacking structure in the network encoder design and proposes an unsupervised fusion adaptive cross-layer optimization network. This architecture consists of a "scale-adaptive asymmetric convolution module" and a "dual-path cross-layer feature extractor," aiming to capture rich multi-scale, multi-directional texture and structural information in real-time images with low computational overhead.
[0078] Unsupervised feature extraction and image segmentation constitute the core of the technical solution of this invention. A lightweight unsupervised segmentation model, specifically designed for real-time UAV law enforcement imagery, is deployed on edge computing devices using an unsupervised fusion adaptive cross-layer optimization network. This network, through its unique structural design and self-supervised learning paradigm, can automatically learn the differences between law enforcement targets such as illegal buildings, street vendors, and garbage dumps and their background environment without manual annotation. To achieve unsupervised training, the network optimization process of this invention does not rely on manually annotated segmentation masks. The model learns a highly discriminative pixel-level feature embedding space that preserves local details by jointly optimizing two collaborative self-supervised learning tasks: an intra-image contrast loss function and a local image patch reconstruction loss function. This dual constraint mechanism enhances the semantic discriminative power of the features while ensuring the integrity of visual details. Specifically,
[0079] 2.2.1 Intra-Image Contrastive Loss
[0080] The core idea of this loss function is to encourage the model to automatically aggregate similar features and distinguish dissimilar features by comparing different image patches within the same image. The specific process is as follows:
[0081] 1) Random sampling of anchor patches Its center is located at the pixel A local area.
[0082] 2) Define positive sample patches These image patches are spatially adjacent to anchor patches and have high similarity in visual attributes (such as structure and texture). Similarity is measured by indicators such as structural similarity index. For example, different areas of the same building's roof can be positive samples of each other.
[0083] 3) Image patches that differ significantly from anchor patches in structure or texture are defined as negative patches.
[0084] 4) The goal is to minimize the distance between the anchor block and the positive sample block, while maximizing the distance between the anchor block and the negative sample block in the high-dimensional feature space.
[0085] The contrastive loss function The definition is as follows:
[0086]
[0087] in, This represents the feature embedding generated by the dual-path cross-layer feature extractor. Let represent cosine similarity, and τ be the temperature hyperparameter. By optimizing this loss model, we can learn that semantically similar pixels (such as those both belonging to illegal construction areas) are close to each other in the feature space, while pixels with large semantic differences (such as illegal construction and vegetation) are far apart.
[0088] 3.2.2 Local image patch reconstruction loss
[0089] To prevent the model from losing local detail information during contrastive learning, a local reconstruction loss is introduced as a supplementary constraint. The basic idea is: feature embedding... Sufficient information must be included to reconstruct the original image patches. The specific steps are as follows.
[0090] 1) Attach a lightweight reconstruction module after the encoder. .
[0091] 2) This module is embedded using the features of anchor blocks. As input, output reconstructed block .
[0092] 3) Reconstruction losses Mean squared error (MSE) is defined as the difference between the original image patch and the reconstructed patch.
[0093] .
[0094] Minimizing this loss allows us to preserve key visual information such as texture, color, and structure in the original image while maintaining feature discriminativeness.
[0095] 3.2.3 The final objective function, i.e., the unsupervised optimization objective function
[0096] The network's ultimate optimization objective, i.e., the unsupervised optimization objective function, is composed of a weighted sum of intra-graph contrast loss and local reconstruction loss, and is balanced by a balancing coefficient. Adjustments are made, among which =0.001:
[0097] ;
[0098] By jointly optimizing the unsupervised objective function, the model can obtain high-quality pixel-level feature embeddings under unsupervised conditions, thus laying a solid foundation for subsequent real-time image region segmentation with clear boundaries and high accuracy.
[0099] The network structure of this invention primarily receives input UAV images and efficiently transforms them into a high-dimensional, information-rich feature map through its network structure (scale-adaptive asymmetric convolution module, dual-path fusion), where each pixel location corresponds to a high-dimensional feature vector. The quality of the network architecture design determines whether this feature can capture sufficiently rich and useful information. However, without manual annotation, guiding the extractor to learn 'high-quality' features that can distinguish different ground features while preserving fine boundaries is the core challenge of unsupervised methods. To address this, this invention does not employ traditional supervised learning methods but instead borrows and improves upon ideas from the field of self-supervised learning, designing a dual optimization objective consisting of intra-image contrast loss and local image patch reconstruction loss. This objective function serves as the fundamental basis for training, jointly constraining and optimizing the learning process of the feature extractor from two dimensions, enabling it to automatically learn high-quality feature representations suitable for urban law enforcement scenarios on unlabeled data.
[0100] Intra-graph contrastive loss is a mature self-supervised learning technique. Typically, without labels, it constructs positive and negative sample pairs, allowing the model to learn a meaningful feature representation space. This invention has the following advantages compared to this:
[0101] 1. Traditional contrastive learning often requires a large external dataset for pre-training. In contrast, the "intra-image contrast" strategy of this invention mines positive and negative samples entirely within a single UAV image. This method significantly reduces dependence on external data, enabling the model to perform highly adaptive feature learning for each real-time acquired image.
[0102] 2. Unlike contrastive learning used for classification (which focuses on features of the entire image), the contrast in this invention is performed between pixel-level image patches. This changes the learning objective from "identifying what this image is" to "distinguishing what this small region in the image belongs to".
[0103] Local image patch reconstruction loss is a classic component of self-supervised learning models, generally serving as an information constraint. It ensures that the encoded features can be reconstructed from the original input by the reconstruction module, thus preventing the loss of excessive original information. This invention has the following advantages compared to similar models:
[0104] Using contrastive learning alone carries a potential risk that the model may only learn the simplest features that distinguish between positive and negative samples (e.g., only learn to distinguish between "gray roofs" and "green trees"), while ignoring a great deal of detailed information such as the texture of roof tiles and the shape of tree leaves.
[0105] By adding a reconstruction loss, this invention forces the model to generate feature embeddings that are not only "separable" but also "reversible." Feature embeddings must retain sufficiently rich local detail information to successfully reconstruct the original image patch. Similarly, in reading comprehension, contrastive loss requires "summarizing the main idea of a paragraph," while reconstruction loss requires "restoring the key details of the original text."
[0106] In summary, the reconstruction loss and contrast loss are cleverly designed in synergy to form a complementary constraint system specifically for solving unsupervised high-precision segmentation tasks. The contrast loss is responsible for building macroscopic semantic discriminative power, while the reconstruction loss is responsible for preserving microscopic visual fidelity.
[0107] 3. Real-time segmentation and result output
[0108] After completing feature learning through the fusion of an adaptive cross-layer optimization network, the network possesses powerful image understanding capabilities. To effectively translate this capability into the final segmented image, this invention designs a lightweight segmentation head at the network's backend. This module is used to efficiently generate segmentation results for the target region. The feature extractor generates high-dimensional feature maps through encoding and then passes them to the segmentation head to complete the final pixel-level semantic decoding task.
[0109] The segmentation head is designed to transform the abstract feature representation output by the feature extractor into pixel-level segmentation maps that are intuitively understandable to humans. In this scheme, the backbone network does not perform spatial downsampling during feature encoding. Therefore, the segmentation head does not require a complex upsampling module to restore image resolution, thus maintaining a lighter and more efficient structure. The core modules of the segmentation head include the following: First, a feature refinement and channel dimensionality reduction module, which consists of several lightweight convolutional layers (3×3 convolutions). Its main function is to refine the input high-dimensional feature map, i.e., the final feature map, while maintaining the original spatial resolution. (For example, 2048 channels) Information refinement and channel dimensionality reduction are performed. Through this step, the feature map is mapped to a more compact and task-relevant feature space, providing a more efficient feature representation for subsequent classification and decoding.
[0110] Next, the refined feature map is passed to a pixel-level classification layer, a 1×1 convolutional layer responsible for outputting C channels of prediction results at each pixel location, where C is the number of predefined semantic categories (such as buildings, roads, vegetation, background, etc.). The value of each channel represents the raw score of the pixel belonging to the corresponding category. The output of the classification layer is processed by an activation function, typically using the Softmax activation function to normalize the C scores of each pixel pixel-by-pixel, converting them into a probability distribution. This process ensures that each pixel in the final segmentation map generated by the model is assigned its most probable category label, thus achieving accurate semantic segmentation. The segmentation result includes contour annotations and binary segmentation maps of the target region, which may include illegal buildings, street vendors, or garbage dumps.
[0111] In terms of real-time result synthesis and output, the segmentation map generated by the model inference will undergo real-time visualization processing on the device and then be immediately fed back to the ground control terminal. Specifically, the model will overlay the final segmentation result onto the original video frames in real time in the form of contour annotations or pseudo-color segmentation maps, forming a dynamically annotated video stream. This video stream, which incorporates the segmentation results, is then instantly transmitted back to the ground user terminal (such as a tablet or monitoring center screen) via the UAV's image transmission system. This "what you see is what you get" closed-loop system not only provides on-site law enforcement personnel with a real-time structured understanding of the scene but also provides strong visual support for accurate and efficient on-site decision-making.
[0112] This technical solution integrates the high-performance edge computing device OrangePi AIPro into the drone, enabling preprocessing and unsupervised detection analysis of law enforcement images during the acquisition process. This eliminates the need for centralized cloud processing, significantly improving the real-time performance of illegal activity monitoring and reducing reliance on network conditions. It effectively avoids latency and bandwidth consumption caused by image transmission. Furthermore, the unsupervised feature learning method proposed in this invention eliminates the reliance on large-scale manually labeled data, maintaining strong transferability and adaptability under different building forms, complex lighting conditions, and occlusion environments. Combined with a scale-adaptive asymmetric convolution module and a dual-path cross-layer feature extractor structure, the model can fully integrate global semantics and local details, ensuring the clarity of segmentation boundaries and detection accuracy, effectively overcoming problems such as blurred boundaries and missed detection of small targets that easily occur in existing technologies.
[0113] Therefore, this invention not only reduces the cost pressure on the system in terms of bandwidth and computing power, but also improves the autonomy and intelligence level of UAV patrols, enabling urban law enforcement monitoring to achieve a highly efficient closed loop of simultaneous data collection, processing, and feedback, demonstrating significant application value and social benefits. This technology is not only applicable to illegal building detection, but can also be extended to smart city scenarios such as street vendor monitoring, garbage dumping identification, public facility inspection, and emergency management, providing efficient and reliable technical support for urban governance.
[0114] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for unsupervised detection of law enforcement images based on edge computing power, characterized in that, Includes the following steps: 1) The collected image data is directly input into the edge computing device and preprocessed to obtain the image to be processed; 2) The image to be processed is input into the fusion adaptive cross-layer optimization network for feature extraction and segmentation. The fusion adaptive cross-layer optimization network includes a dual-path cross-layer feature extractor and an unsupervised optimization objective function composed of the weighted sum of the intra-image contrast loss function and the local reconstruction loss function. The dual-path cross-layer feature extractor includes an initial feature encoding module, a backbone feature extraction path composed of multiple identical feature encoding modules connected in series, and a feature fusion path that runs parallel to it and performs cross-layer feature fusion. The feature encoding modules mentioned above are all scale-adaptive asymmetric convolution modules. The implementation of the scale-adaptive asymmetric convolution module includes the following sub-steps. 2.1.1) Using the input image or feature map as the original input, preliminary feature extraction is performed. After batch normalization and activation function processing, shared features are generated. 2.1.2) The shared features are input into three parallel asymmetric convolutional branches with different receptive field scales to extract short-range, medium-range, and long-range features respectively. 2.1.3) Element-wise multiplication of short-range and mid-range features is performed to generate an attention map, and the long-range features are weighted using the attention map to obtain the gated features. 2.1.4) Aggregate the gated features with the original input copy features and long-range features, and output a feature map; 3) The edge computing device generates segmentation results in real time based on the final output feature map.
2. The method according to claim 1, characterized in that, In step 1), the edge computing device is an OrangePi AIPro device, and the collected image data does not need to rely on external network transmission and can be directly connected to the OrangePi AIPro device.
3. The method according to claim 1, characterized in that, In step 1), the preprocessing includes at least one of the following operations: size normalization, illumination and color correction, and noise filtering.
4. The method according to claim 1, characterized in that, The three branches are the short-range feature branch, the medium-range feature branch, and the long-range feature branch, each branch consisting of one... Depth-separable convolution and a Depth-separable convolutional concatenation is used to capture features within different receptive fields. It is the size parameter of the convolution kernel in depthwise separable convolution.
5. The method according to claim 1, characterized in that, The segmentation results are output to the user terminal in the form of contour annotations and binary segmentation maps.
6. The method according to claim 1, characterized in that, In step 3), the segmentation result includes the outline annotation of the target area and the binary segmentation map. The target area includes illegal buildings, street vendor facilities, or garbage dumps.
7. The method according to claim 1, characterized in that, In step 2), the unsupervised optimization objective function is specifically implemented including, 2.2.1) Calculate the intra-image contrast loss: Randomly sample anchor blocks, define positive sample blocks that are spatially adjacent and visually similar and negative sample blocks that are significantly different, and optimize the loss by minimizing the feature distance between the anchor block and the positive sample block and maximizing the feature distance between the anchor block and the negative sample block; 2.2.2) Calculate the local image patch reconstruction loss: The original image patch is reconstructed by the lightweight reconstruction module after the encoder, with the feature embedding of the anchor block as input, and the mean square error between the original image patch and the reconstructed patch is used as the loss. 2.2.3) The intra-image contrast loss and the local image patch reconstruction loss are weighted and summed according to preset weights, and used as the final unsupervised optimization objective function.
Citation Information
Patent Citations
Intelligent inspection method, device, system and equipment for illegal building of urban house
CN115984694A
Dynamic scene blurred image blind restoration method based on multi-stream attention adversarial network
CN110969589A
Road surface crack detection method based on edge reconstruction network
CN118096672A