Abnormal object detection method and device based on electronic fence, equipment and medium
Through the abnormal object detection method based on electronic fences, combining the positional relationship between objects and fences and category information, the problem of insufficient accuracy in traditional image analysis technology in industrial environments is solved, and more efficient abnormal object detection is achieved.
Patent Information
- Application Number
- CN202311870553.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-30
- Publication Date
- 2025-07-01
AI Technical Summary
Traditional image analysis technology has high requirements for image quality in industrial production environments, resulting in reduced accuracy in detection of abnormal objects, especially in problems such as overexposure, underexposure and blur.
An abnormal object detection method based on electronic fence is adopted, and object detection is detected by obtaining target images, the positional relationship between objects and fences is determined, and abnormal state detection is carried out in combination with object categories and fence identification, reducing dependence on image quality and improving detection accuracy.
It improves the accuracy and flexibility of abnormal object detection, reduces the requirements for image quality, and is suitable for changing industrial production environments.
Smart Images

Figure CN120235809A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular, to an abnormal object detection method, device, equipment and medium based on an electronic fence. Background Art
[0002] In related technologies, image analysis technology is used to locate and identify abnormal objects such as obstacles and improperly placed objects in a site to maintain site order. Traditional image analysis technologies such as edge detection and histogram analysis have low robustness and high requirements for image quality. However, in an industrial production environment, images may have problems such as overexposure, underexposure, and blurring. Using traditional image analysis technology will result in a decrease in the accuracy of abnormal object detection. Summary of the Invention
[0003] The main purpose of the embodiments of this application is to propose an abnormal object detection method, device, equipment and medium based on an electronic fence, aiming to improve the accuracy of abnormal object detection.
[0004] To achieve the above object, the first aspect of the embodiments of this application proposes an abnormal object detection method based on an electronic fence, and the method includes:
[0005] Obtain a target image; the target image includes an electronic fence;
[0006] Perform object detection on the target image to obtain the object category and object position of a preset object;
[0007] Obtain the fence position and fence identifier of the electronic fence;
[0008] Determine the positional relationship between the preset object and the electronic fence according to the object position and the fence position;
[0009] If the positional relationship indicates that the preset object is located inside the electronic fence, obtain the placement area identifier of the preset object according to the object category;
[0010] Perform abnormal object detection according to the fence identifier and the placement area identifier to obtain the abnormal state information of the preset object; the abnormal state information is used to indicate that the preset object is an abnormal object or the preset object is a normal object.
[0011] In some embodiments, the determining the positional relationship between the preset object and the electronic fence according to the object position and the fence position includes:
[0012] Emit a target ray from the object position in a preset emission direction; the preset emission direction is the horizontal direction of the preset object;
[0013] Obtain the intersection points formed between the target ray and the fence position to obtain fence intersection points;
[0014] Obtain the number of intersection points of the fence intersection points;
[0015] Determine the positional relationship according to the number of intersection points.
[0016] In some embodiments, the electronic fence includes a plurality of fence sides, each of the fence sides includes a first fence vertex and a second fence vertex, the fence position includes the first fence vertex coordinates of the first fence vertex and the second fence vertex coordinates of the second fence vertex, and obtaining the intersection points formed between the target ray and the fence position to obtain fence intersection points includes:
[0017] Determine the edge index of the fence side according to the first fence vertex coordinates and the second fence vertex coordinates;
[0018] Read the slope and intercept of the fence side from a preset dictionary according to the edge index;
[0019] Obtain the intersection points formed between the target ray and the fence side according to the slope and intercept to obtain the fence intersection points.
[0020] In some embodiments, determining the positional relationship according to the number of intersection points includes:
[0021] If the number of intersection points is odd, determine that the positional relationship is that the preset object is inside the electronic fence.
[0022] In some embodiments, performing object detection on the target image to obtain the object category and object position of the preset object includes:
[0023] Perform initial feature extraction on the target image to obtain initial image features;
[0024] Perform multi-scale feature extraction on the initial image features to obtain candidate image features;
[0025] Perform object category detection on the candidate image features through a preset object detection model to obtain the object category, and perform position detection on the candidate image features through the object detection model to obtain the object position.
[0026] In some embodiments, the object detection model includes a regression branch and a classification branch, and performing object category detection on the candidate image features through a preset object detection model to obtain the object category, and performing position detection on the candidate image features through the object detection model to obtain the object position includes:
[0027] Classify the candidate image features through the classification branch to obtain the object category;
[0028] Perform position regression on the candidate image features through the regression branch to obtain the object position.
[0029] In some embodiments, after detecting an abnormal object according to the fence identifier and the placement area identifier to obtain the abnormal state information of the preset object, the abnormal object detection method further includes:
[0030] If the abnormal state information indicates that the preset object is an abnormal object, determine the alarm type according to the object category;
[0031] Perform abnormal alarm on the preset object according to the alarm type.
[0032] To achieve the above object, a second aspect of the embodiments of the present application proposes an abnormal object detection device based on an electronic fence, and the device includes:
[0033] A first acquisition module, configured to acquire a target image; the target image includes an electronic fence;
[0034] A first object detection module, configured to perform object detection on the target image to obtain the object category and object position of a preset object;
[0035] A second acquisition module, configured to acquire the fence position and fence identifier of the electronic fence;
[0036] A determination module, configured to determine the positional relationship between the preset object and the electronic fence according to the object position and the fence position;
[0037] A third acquisition module, configured to, if the positional relationship indicates that the preset object is located inside the electronic fence, acquire the placement area identifier of the preset object according to the object category;
[0038] A second object detection module, configured to perform abnormal object detection according to the fence identifier and the placement area identifier to obtain the abnormal state information of the preset object; the abnormal state information is used to indicate that the preset object is an abnormal object or the preset object is a normal object.
[0039] To achieve the above object, a third aspect of the embodiments of the present application proposes an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the abnormal object detection method based on an electronic fence described in the first aspect above.
[0040] To achieve the above object, a fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the method for detecting abnormal objects based on an electronic fence described in the first aspect above.
[0041] The method for detecting abnormal objects based on an electronic fence, the device for detecting abnormal objects based on an electronic fence, the electronic device, and the computer-readable storage medium provided by the present application obtain a target image, where the target image includes an electronic fence. Since a camera can only execute a single detection rule, this configuration lacks flexibility and causes significant resource waste. By setting an electronic fence to execute diverse detection rules, the resource utilization rate is improved. Object detection is performed on the target image to identify and locate a preset object, and the object category and object position of the preset object are obtained. The fence position and fence identifier of the electronic fence are obtained, and based on the object position and the fence position, the positional relationship between the preset object and the electronic fence is determined to judge whether the preset object is located within the electronic fence according to the positional relationship. If the positional relationship indicates that the preset object is located within the electronic fence, then it is necessary to judge whether the preset object is an abnormal object. The placement area identifier of the preset object is obtained according to the object category, and abnormal object detection is performed based on the fence identifier and the placement area identifier to judge whether the preset object can be placed within the electronic fence represented by the fence identifier, and the abnormal state information of the preset object is obtained. The abnormal state information is used to indicate that the preset object is an abnormal object or the preset object is a normal object. Compared with traditional image analysis methods, the method of the present application can reduce the requirements for image quality and improve the accuracy of abnormal object detection. Description of the Drawings
[0042] Figure 1 is a flowchart of the method for detecting abnormal objects based on an electronic fence provided by the embodiments of the present application;
[0043] Figure 2 is a network structure diagram of the visual model provided by the embodiments of the present application;
[0044] Figure 3 is Figure 1 a flowchart of step S120 in
[0045] Figure 4 is Figure 3 a flowchart of step S330 in
[0046] Figure 5 is a network structure diagram of the classification branch provided by the embodiments of the present application;
[0047] Figure 6 is Figure 1 a flowchart of step S140 in
[0048] Figure 7 Yes Figure 6 is the flowchart of step S620 in
[0049] Figure 8 is another flowchart of the abnormal object detection method based on an electronic fence provided by an embodiment of the present application;
[0050] Figure 9 is another flowchart of the abnormal object detection method based on an electronic fence provided by an embodiment of the present application;
[0051] Figure 10 is a schematic structural diagram of an abnormal object detection device based on an electronic fence provided by an embodiment of the present application;
[0052] Figure 11 is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0053] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] It should be noted that although functional module division is performed in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different module division in the device or a different order in the flowchart. Terms such as "first" and "second" in the description, claims and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0056] First, several nouns involved in the present application are analyzed:
[0057] Electronic fence: It is a boundary management system that restricts or detects the movement of objects by using electronic devices. It usually consists of a set of sensors, controllers and communication devices. When an object approaches or crosses the set boundary, the system will issue an alarm or trigger other actions.
[0058] Residual Network (ResNet): Also known as deep residual learning, it is a network structure used to solve the problems of gradient vanishing and gradient explosion during the training of deep neural networks. Its design idea is to construct a deep network by introducing residual blocks. In a residual network, the input of each layer not only undergoes an activation function transformation but also is summed with the original input to form a "residual". In this way, the network can directly learn the residual, thereby effectively capturing the differences between layers. This design makes the network easier to train, avoids the problems of gradient vanishing or gradient explosion, and at the same time can accelerate the convergence speed of the network.
[0059] The rapid development of artificial intelligence technology has greatly promoted the development of the computer vision field, and computer vision can be used to maintain the order of the venue. In related technologies, abnormal objects such as obstacles and improperly placed objects in the venue are located and identified through image analysis technology to maintain the order of the venue. Traditional image analysis technologies such as edge detection and histogram analysis have low robustness and high requirements for image quality. However, in an industrial production environment, images may have problems such as overexposure, underexposure, and blurring, and using traditional image analysis technologies will result in a decrease in the accuracy of abnormal object detection.
[0060] Based on this, the embodiments of the present application provide an abnormal object detection method based on an electronic fence, an abnormal object detection device based on an electronic fence, an electronic device, and a computer-readable storage medium, aiming to improve the accuracy of abnormal object detection.
[0061] The abnormal object detection method based on an electronic fence, the abnormal object detection device based on an electronic fence, the electronic device, and the computer-readable storage medium provided by the embodiments of the present application are specifically described through the following embodiments. First, the abnormal object detection method based on an electronic fence in the embodiments of the present application is described.
[0062] The abnormal object detection method based on an electronic fence provided by the embodiments of the present application relates to the field of artificial intelligence technology. The abnormal object detection method based on an electronic fence provided by the embodiments of the present application can be applied to a terminal, a server side, or software running on a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the abnormal object detection method based on an electronic fence, etc., but is not limited to the above forms.
[0063] This application can be used in numerous general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0064] Figure 1 FIG. 5 is an alternative flowchart of an abnormal object detection method based on an electronic fence provided by an embodiment of this application. Figure 1 The method in FIG. 5 may include, but is not limited to, steps S110 to S160.
[0065] Step S110: Obtain a target image; the target image includes an electronic fence.
[0066] Step S120: Perform object detection on the target image to obtain the object category and object position of a preset object.
[0067] Step S130: Obtain the fence position and fence identifier of the electronic fence.
[0068] Step S140: Determine the positional relationship between the preset object and the electronic fence according to the object position and the fence position.
[0069] Step S150: If the positional relationship indicates that the preset object is located inside the electronic fence, obtain the placement area identifier of the preset object according to the object category.
[0070] Step S160: Perform abnormal object detection according to the fence identifier and the placement area identifier to obtain the abnormal state information of the preset object; the abnormal state information is used to indicate that the preset object is an abnormal object or the preset object is a normal object.
[0071] In step S110 of some embodiments, a single camera can only execute a single detection rule. This configuration lacks flexibility and causes significant resource waste. To enable the camera to execute diverse detection rules, embodiments of the present application introduce an electronic fence and delineate the electronic fence on the camera screen. Specifically, select the camera on the front-end rule configuration interface, and use a tool to draw points and connect lines to circle out the electronic fence area on the camera screen and configure rules for the electronic fence. Multiple electronic fences can be set for one camera, and each electronic fence can be independently configured with rules. These rules are used to indicate the objects that can be placed within the electronic fence. For example, only forklifts can be parked within fence A, any item other than goods can be placed within fence B, and no items are allowed to be placed within fence C. An object that is indicated by the rule not to be placed within the electronic fence but is actually within the electronic fence is regarded as an abnormal object. By collecting target images with a camera equipped with an electronic fence, image analysis can be performed based on the target images to detect abnormal objects within the site, maintain site order, and achieve automated site management. The target image is an environmental image of a preset site. The electronic fence will be applied to each frame of the image within a set time, and each frame of the target image includes the electronic fence.
[0072] Traditional image analysis techniques such as edge detection and histogram analysis have low robustness and are very sensitive to the quality of the image. In an industrial production environment, the image may have problems such as overexposure, underexposure, and blurring. If traditional image analysis techniques are used to detect objects in the image, it will lead to a decrease in the positioning and recognition accuracy of the objects. Due to the variability of the site environment and the strict requirements of automation technology for recognition accuracy, how to improve the accuracy of abnormal object detection has become particularly crucial. Embodiments of the present application perform feature extraction on the target image based on a deep learning visual model to capture deep abstract features, reduce the dependence on image quality, and at the same time improve the accuracy of abnormal object detection. The visual model uses a convolutional neural network architecture, which is built on a general base model. The network structure of the visual model is as Figure 2 shown. The visual model includes a base model, a bottleneck model, and an object detection model. The base model, the bottleneck model, and the object detection model are connected in series in sequence. The object detection model includes a classification branch and a regression branch. The following describes the detailed process of object detection by the visual model.
[0073] Please refer to Figure 3 , in some embodiments, step S120 may include but is not limited to steps S310 to S330:
[0074] Step S310, perform initial feature extraction on the target image to obtain initial image features;
[0075] Step S320, perform multi-scale feature extraction on the initial image features to obtain candidate image features;
[0076] Step S330: Detect the object category of the candidate image features through a preset object detection model to obtain the object category, and detect the object position of the candidate image features through the object detection model to obtain the object position.
[0077] In step S310 of some embodiments, initial feature extraction is performed on the target image through a base model to extract the feature representation of the target image and obtain the initial image features. The initial image features include features such as brightness, color, texture, and edge contours of each region in the target image, as well as context features between regions. The selection of the base model is not restricted, and current mainstream deep learning architectures such as residual networks or Transformer models based on the attention mechanism can be used. Among them, the residual network introduces skip connections and residual blocks, and extracts more abstract and complex features through the stacking of multiple residual blocks. Through the skip connections, the original input is passed to subsequent network layers, accelerating the convergence speed of the network. The Transformer model consists of an encoder and a decoder. The encoder is used to convert the input sequence into a continuous representation, and the decoder is used to convert these representations into the target sequence. Both the encoder and the decoder include multiple layers of self-attention mechanisms and feed-forward neural networks. Through the self-attention mechanism, context information can be automatically learned from the input sequence, dependencies between different positions can be captured, and the input sequence does not need to be processed sequentially, having the advantage of parallelization in terms of calculation.
[0078] In step S320 of some embodiments, multi-scale feature extraction is performed on the initial image features through a bottleneck model to obtain candidate image features. The bottleneck model can enhance the model's ability to capture multi-scale features, enabling the model to effectively integrate feature maps of different resolutions and improve the model's detection performance for various objects of different sizes. The candidate image features include the feature representations of objects of different scales in the image. An object refers to a device, an item, etc. in the image frame. The bottleneck model can be a Feature Pyramid Network (FPN). The process of feature extraction through the Feature Pyramid Network is as follows. The initial image features are extracted through the backbone network to obtain multiple feature maps of different scales, which include the first feature map, the second feature map, the third feature map, and the fourth feature map. The feature map sizes of the first feature map, the second feature map, the third feature map, and the fourth feature map decrease in sequence, and the resolutions also decrease in sequence. The first feature map is at the bottom layer of the feature pyramid and has the highest resolution, which can be used to detect small-scale objects. The fourth feature map is at the top layer of the feature pyramid and has the lowest resolution, which can be used to detect large-scale objects. The high-level semantic information is transmitted to the low-level feature maps through top-down feature propagation to achieve the fusion of high-level features and low-level features, so as to provide richer context semantic information. Specifically, an upsampling operation is performed on the fourth feature map to make the size of the fourth feature map the same as that of the third feature map. The upsampled fourth feature map and the third feature map are fused to obtain the first fused feature map. An upsampling operation is performed on the first fused feature map to make the size of the first fused feature map the same as that of the second feature map. The upsampled first fused feature map and the second feature map are feature-fused to obtain the second fused feature map. The upsampled second fused feature map and the first feature map are feature-fused to obtain the third fused feature map. The low-level detailed information and the high-level semantic information are fused through bottom-up feature propagation to provide a more accurate feature representation. Specifically, the third fused feature map is downsampled, and the downsampled third fused feature map and the second fused feature map are fused to obtain the fourth fused feature map. The downsampled fourth fused feature map and the first fused feature map are fused to obtain the fifth fused feature map. The downsampled fifth fused feature map and the fourth feature map are feature-fused to obtain the sixth fused feature map. The third fused feature map, the fourth fused feature map, the fifth fused feature map, and the sixth fused feature map are used as multi-scale features for object detection.
[0079] In step S330 of some embodiments, in a traditional convolutional neural network, an object detection model consists of a regression branch, a classification branch, and an objectness branch. The objectness branch is used to evaluate whether a candidate region contains an object to be detected. To reduce the computational complexity of the model and avoid redundant calculations, the embodiments of the present application simplify the traditional three-branch detection head in a decoupled manner to optimize the model structure, thereby improving the recognition accuracy of the model for real targets. The embodiments of the present application adopt an optimization strategy for model optimization. This optimization strategy abandons the objectness branch and only uses a two-branch structure including a regression branch and a classification branch. The object category is detected from the candidate image features through the classification branch, and the object position is detected from the candidate image features through the regression branch. By eliminating the objectness branch, the model can focus more on improving the performance of classification and localization, directly classify the anchor points and perform bounding box regression based on the classification branch and the regression branch, thereby improving the response sensitivity of the object detection model to features and reducing the probability of false detection.
[0080] Through the above steps S310 to S330, objects of different scales in the target image can be detected, the dependence on image quality is reduced, and the accuracy of target detection is improved. By only retaining the classification branch and the regression branch, redundant calculations are avoided, and the efficiency of object detection is improved while ensuring the accuracy of object detection.
[0081] Please refer to Figure 4 , in some embodiments, step S330 may include but is not limited to steps S410 to S420:
[0082] Step S410, perform object classification on the candidate image features through the classification branch to obtain the object category;
[0083] Step S420, perform position regression on the candidate image features through the regression branch to obtain the object position.
[0084] In step S410 of some embodiments, as Figure 5As shown, both the classification branch and the regression branch are composed of convolutions. Both branches include convolutional blocks and 1×1 convolutional kernels. The convolutional block includes a convolutional layer, a batch normalization layer (BatchNormalization, BN), and an activation layer. The convolutional layer has a convolutional kernel with a size of 3×3, a stride of 2, and a padding of 1. This convolutional kernel has spatial perception ability. The activation layer uses the SiLu activation function, and the SiLu activation function is expressed as SiLU(x) = x × sigmoid(x), where x is the input parameter of the activation function. Specifically, the candidate image features are subjected to spatial feature extraction through the convolutional block to obtain image spatial features. The image spatial features are linearly transformed through the 1×1 convolutional kernel to obtain the object category. The number of channels in the classification branch is equal to the number of object categories.
[0085] In step S420 of some embodiments, the candidate image features are subjected to position regression through the regression branch, and the upper left coordinate and the lower right coordinate of the detection box are output to obtain the object position. Since the regression branch predicts the upper left coordinate and the lower right coordinate, the number of channels output by the regression branch is 4. The network structure of the regression branch is the same as that of the classification branch. The method for position regression through the regression branch can refer to step S410 and will not be elaborated here.
[0086] In the above steps S410 to S420, by adopting a decoupled dual-head network structure, the computational burden of the network is significantly reduced, thereby making the entire model more lightweight. This lightweight network not only improves the inference speed but also reduces the demand for hardware resources, enabling the model to be easily deployed on various devices, including resource-constrained embedded systems and mobile devices. The lightweight network design also brings faster response time and lower deployment cost, which is particularly suitable for application scenarios that require fast and real-time detection, enhances the multi-platform deployment ability of the model, and greatly improves its practicality and accessibility in various industrial environments.
[0087] The embodiments of the present application perform model training based on a supervised learning method. The object detection model can be trained through the following steps: Obtain a sample image, which has an object position label and an object category label. Perform object classification on the sample image through a classification branch to obtain a predicted object category. Calculate a classification loss based on the object category label and the predicted object category. For a binary classification task, the classification loss can be calculated through a binary cross-entropy loss function (Binary Cross Entropy, BCE). For a multi-classification task, the classification loss can be calculated through a categorical cross-entropy loss function (Categorical Cross Entropy, CE). Perform position regression on the sample image through a regression branch to obtain a predicted object position. Calculate a regression loss based on the object position label and the predicted object position. The regression loss can be calculated in the manner of Complete Intersection over Union (CIOU). Perform loss weighting on the classification loss and the regression loss to obtain a target loss. Minimize the target loss to adjust the model parameters to minimize the gap between the predicted position value and the true position value, and the gap between the predicted object category and the true object category, to obtain an object detection model. If the target loss is denoted as L, the classification loss is denoted as L1, and the regression loss is denoted as L2, then L = (1 - β) * L1 + β * L2, where β is a weight parameter and * represents a multiplication operation. The embodiments of the present application need to perform refined positioning of the object, so the weight of the regression loss needs to be increased. β can be set to 0.6, so that the weight of the classification loss is 0.4 and the weight of the regression loss is 0.6.
[0088] In step S130 of some embodiments, the electronic fence is a polygon, and the electronic fence includes multiple vertices, which are connected in a clockwise or counterclockwise order. After detecting the object position, it is necessary to obtain the fence position and fence identifier of the electronic fence to determine whether a preset object is within the electronic fence. The fence position includes the coordinates of different vertices. The fence identifier is used to distinguish different electronic fences.
[0089] In order to determine whether an object is parked abnormally within the electronic fence, the embodiments of the present application use the ray method to compare the relationship between the object position and the fence position to determine the spatial relationship between the preset object and the electronic fence. The position relationship is used to characterize the inclusion relationship between the preset object and the electronic fence. According to the position relationship, it can be known whether the preset object is within the electronic fence. The process of determining the position relationship using the ray method is described in detail below.
[0090] Please refer to Figure 6 , in some embodiments, step S140 may include but is not limited to steps S610 to S640:
[0091] Step S610: Emit a target ray from the object position in a preset emission direction; the preset emission direction is the horizontal direction of a preset object.
[0092] Step S620: Obtain the intersection points formed between the target ray and the fence position to get the fence intersection points.
[0093] Step S630: Obtain the number of intersection points of the fence intersection points.
[0094] Step S640: Determine the positional relationship according to the number of intersection points.
[0095] In step S610 of some embodiments, the object position refers to the coordinates of the center point of the rectangular detection frame. Taking the object position as an endpoint, emit a target ray horizontally from the object position. The target ray is usually a ray horizontally to the right. The center point of the rectangular detection frame is point P, and the object position is represented as (x p , y p ), where x p is the abscissa of point P, and y p is the ordinate of point P. Emit a target ray horizontally from the ordinate of point P, and the target ray is represented as y = y p .
[0096] In step S620 of some embodiments, the electronic fence includes multiple fence sides. For each fence side, obtain the intersection points formed between the target ray and the fence side according to the fence position to get the fence intersection points.
[0097] In step S630 of some embodiments, the ray method emits a ray from the point to be determined, detects the number of intersection points of the ray and each side of the polygon, and judges the positional relationship between the point and the polygon according to the number of intersection points. Take the center point of the detection frame as the point to be determined, detect the fence intersection points of the target ray and each fence side, count the number of fence intersection points, and obtain the number of intersection points. The calculation method of the number of intersection points is shown in formula (1).
[0098]
[0099] Where C is the number of intersection points; n is the number of fence sides; E i is the i-th fence side; l intersect is an indicator function. When the target ray intersects with the fence side E i , the value of the indicator function is 1, otherwise the value is 0.
[0100] In step S640 of some embodiments, the relative position relationship between the rectangular detection frame and the electronic fence is determined according to the number of intersection points. If the number of intersection points is odd, it indicates that the center point of the detection frame is inside the polygon, and it is determined that the position relationship is that the preset object is inside the electronic fence. If the number of intersection points is even, it indicates that the center point of the detection frame is outside the polygon, and it is determined that the position relationship is that the preset object is outside the electronic fence.
[0101] Through the above steps S610 to S640, the position relationship between the preset object and the electronic fence can be determined, so as to detect abnormal objects based on the position relationship, identify abnormal objects in the site, and maintain the order of the site. Whether an object is abnormal is judged by calculating whether the center point of the detection frame is within the artificially set electronic fence area through the ray method. This method is not only applicable to regular geometric shapes, but also can adapt to irregular or dynamically changing polygon areas, and independent rules can be set for each electronic fence, greatly improving the flexibility and accuracy of abnormal judgment.
[0102] Please refer to Figure 7 , in some embodiments, the electronic fence is defined by n vertices to form a closed polygon. The closed polygon is represented as V = {V1, V2,..., V n}, for the i-th vertex V i has coordinates (x i , y i ). Each two vertices form a fence edge. For the i-th fence edge, it is formed by the vertices V i and V i+1 . Each fence edge includes a first fence vertex and a second fence vertex. The fence position includes the first fence vertex coordinates of the first fence vertex and the second fence vertex coordinates of the second fence vertex. Step S620 may include but is not limited to steps S710 to S730:
[0103] Step S710, determine the edge index of the fence edge according to the first fence vertex coordinates and the second fence vertex coordinates;
[0104] Step S720, read the slope and intercept of the fence edge from the preset dictionary according to the edge index;
[0105] Step S730, obtain the intersection point formed between the target ray and the fence edge according to the slope and intercept, and obtain the fence intersection point.
[0106] In step S710 of some embodiments, the mapping relationship between the edge index of the fence edge and the two vertices can be stored in the mapping table in advance. Since the fence edge is composed of the first fence vertex and the second fence vertex, the edge index of the fence edge is found from the mapping table according to the first fence vertex coordinates and the second fence vertex coordinates. The edge index is used to identify different fence edges. For example, the fence edge is represented as E i, then i is the edge index.
[0107] In step S720 of some embodiments, to avoid repeated calculations and improve the efficiency of intersection point calculation, embodiments of the present application pre-calculate the slopes and intercepts of all fence edges of the electronic fence, and establish a mapping and associate the storage of the edge index, slope, and intercept of the fence edge through a dictionary data structure. The edge index can be used as the key, and the tuple composed of the slope and intercept can be used as the value to store information in the dictionary, so that the slope and intercept of the fence edge can be read from the dictionary according to the edge index. The slope and intercept can be calculated based on the coordinates of the first fence vertex and the second fence vertex. The calculation method of the slope is shown in formula (2), and the calculation method of the intercept is shown in formula (3).
[0108]
[0109] b i =y i -m i *x i Formula (3)
[0110] For fence edge E i , the first fence vertex is V i , the second fence vertex is V i+1 , the coordinates of the first fence vertex are (x i ,y i ), and the coordinates of the second fence vertex are (x i+1 ,y i+1 ). i is the edge index, m i is the slope of the i-th fence edge, and b i is the intercept of the i-th fence edge.
[0111] In step S730 of some embodiments, it is determined whether the fence edge intersects the target ray. If the ordinate of the first fence vertex coordinate is less than the ordinate of the object position, and the ordinate of the second fence vertex coordinate is greater than or equal to the ordinate of the object position, that is, y i <y p and y i+1 ≥y p , then there may be an intersection point between the fence edge and the target ray. If the ordinate of the first fence vertex coordinate is greater than the ordinate of the object position, and the ordinate of the second fence vertex coordinate is less than the ordinate of the object position, that is, y i >y p and y i+1 <y p , then there may be an intersection point between the fence edge and the target ray. If fence edge E i intersects the target ray y = y pIf there is an intersection point, the abscissa of the intersection point is calculated by solving the linear equation according to the slope and intercept to obtain the potential intersection point. The calculation method of the abscissa is shown in formula (4).
[0112]
[0113] Among them, x is the abscissa of the intersection point.
[0114] Judge whether the abscissa of the intersection point is greater than the abscissa of the object position (the abscissa of the center point of the detection frame). If the judgment result is yes, that is, x > x p , it means that the intersection point is valid. Mark this intersection point as a valid intersection point to obtain the fence intersection point. The number of intersection points is the number of valid intersection points.
[0115] Through the above steps S710 to S730, when judging the intersection of a point and an edge, it is possible to avoid repeatedly calculating the slope and intercept of each edge. In the case of a refined electronic fence, that is, when the number of fence edges is extremely large, the efficiency of intersection point calculation can be greatly improved. By applying the ray method, the spatial relationship between the preset device and the electronic fence can be accurately determined, greatly improving the accuracy and efficiency of abnormal object detection.
[0116] In step S150 of some embodiments, after determining the spatial relationship between the center point of the detection frame and the electronic fence, enter the rule execution stage. In this stage, it is necessary to perform a rule compliance analysis on the preset objects within the electronic fence. Each type of object is pre-assigned a set of rules, and this set of rules defines the areas where the object is allowed or prohibited from parking. For example, for type A objects, there may be a set of rules defining that this type of object is not allowed to park in a specific area of the electronic fence. Specifically, if the position relationship indicates that the preset object is within the electronic fence, obtain the placement area identifier of the preset object according to the object category. The placement area identifier is the set of rules, and the placement area identifier is the fence identifier of the electronic fence where the preset object is allowed or prohibited from being placed. If the position relationship indicates that the preset object is outside the electronic fence, no subsequent abnormal detection is performed on this preset object.
[0117] In step S160 of some embodiments, the abnormal state information can reflect the abnormal state of an object, and is used to characterize that the preset object is an abnormal object or the preset object is a normal object. If the preset object is an abnormal object, it indicates that the preset object may be an obstacle or an improperly placed object, and the preset object cannot be placed within the electronic fence represented by the fence identifier. If the preset object is a normal object, it indicates that the preset object can be placed within the electronic fence. Specifically, if the placement area identifier is the fence identifier of the electronic fence where the preset object is allowed to be placed, when the fence identifier is included in the placement area identifier, it is determined that the abnormal state information of the preset object is that the preset object is a normal object; when the fence identifier is not included in the placement area identifier, it is determined that the abnormal state information of the preset object is an abnormal object. If the placement area identifier is the fence representation of the electronic fence where the preset object is prohibited from being placed, when the fence identifier is included in the placement area identifier, it is determined that the abnormal state information of the preset object is that the preset object is an abnormal object; when the fence identifier is not included in the placement area identifier, it is determined that the abnormal state information of the preset object is that the preset object is a normal object. In a complex site environment, this method can accurately identify and locate various objects to ensure that they are in the correct area. In addition, this method shows high robustness in dealing with small sample datasets and variable scenarios, effectively improving the intelligent level of site management and reducing labor costs and the possibility of misoperations.
[0118] Please refer to Figure 8 , in some embodiments, after step S160, the abnormal object detection method may further include but is not limited to steps S810 to S820:
[0119] Step S810, if the abnormal state information characterizes the preset object as an abnormal object, determine the alarm type according to the object category;
[0120] Step S820, perform an abnormal alarm on the preset object according to the alarm type.
[0121] In step S810 of some embodiments, if the abnormal status information indicates that the preset object is an abnormal object, that is, the preset object is not allowed to be placed in the electronic fence and the preset object violates the parking rules of the electronic area, the warning type is determined according to the object category. The warning type is the response measure type of the abnormal information, including real-time notification of relevant personnel by means of email, text message, etc., recording abnormal events, starting an automated device movement program, etc. The association relationship between the object category and the warning type can be established in advance, and the warning type corresponding to the object category can be determined by looking up the association relationship later. In the logistics and express delivery scenario, the preset objects include cage trucks, pallets, goods, forklifts, other sundries, etc. When the preset object is a pallet, goods, or other sundries, the intelligent handling robot can be used to move the preset object to the allowed parking area by starting the device movement program. When the preset object is a cage truck or a forklift, relevant personnel can be notified so that the relevant personnel can move the cage truck and the forklift to a suitable area, and the abnormal event can be recorded.
[0122] For example, when the center point of the detection frame of device A falls within the electronic fence, the logical judgment of the rule set will be executed. If the electronic fence area is marked as a prohibited area for type A devices, an automatic warning mechanism will be triggered. The warning mechanism includes a series of response measures, such as real-time notification of relevant personnel, recording abnormal events, and starting an automated device movement program. This processing flow is crucial for achieving site safety management and maintaining order, especially in unattended or highly automated sites. In addition, these abnormal status information can provide data support for further analyzing device usage patterns and optimizing site layout design.
[0123] In step S820 of some embodiments, if the warning type is to notify relevant personnel, the warning information of the preset object is generated according to the warning type, and the warning information is sent to relevant personnel by means of text message, email, etc. The warning information includes the category of the preset object, the current parking area of the preset object, and the allowed parking area of the preset object, etc. If the warning type is to record abnormal events, the category of the preset object, the fence identifier of the current electronic fence where it is parked, and the current time are stored as abnormal events. If the warning type is to start an automated device movement program, the intelligent handling robot is controlled through the device movement program to move the preset object to the allowed electronic fence area for automated site clearing service. The device movement program includes the object category of the preset object, the object position, the fence identifier of the electronic fence area where the object can be placed, etc.
[0124] The above steps S810 to S820 can not only identify the object position, but also automatically execute the alarm mechanism according to the preset rule set. When an object violates the parking rules in a specific area, the system can immediately trigger an alarm and take corresponding measures. This automated process significantly improves the response speed and safety of site management, especially suitable for large or highly automated sites. In addition, by collecting data on violations of parking rules, it provides valuable data support for future site planning and optimization of object management strategies.
[0125] Please refer to Figure 9 , an embodiment of the present application provides an abnormal object detection method based on an electronic fence, which is applied to an abnormal object detection system. The abnormal object detection system includes a front-end rule configuration module, a data acquisition module, a detection module, and a cloud data management module. The abnormal object detection method includes: pre-configuring a placement rule set of devices through the front-end rule configuration module, and the placement rule set is used to indicate the fence identifier of the electronic fence that allows or prohibits the placement of objects. Select a camera in the data acquisition module, pre-define an electronic fence around the camera, and collect videos through the camera. The videos include multiple video frames. Perform device detection on the video frames through the detection module. The devices can be cage trucks, pallets, goods, forklifts, or other sundries. If a device is detected, determine whether the center point of the device is inside the electronic fence by the ray method. If no device is detected, or the center point of the device is not inside the electronic fence, continue to perform device detection on the next video frame. If the center point of the device is inside the electronic fence, determine whether the device can be placed in the electronic fence area according to the placement rule set. If the device cannot be placed in the electronic fence area, mark and save the device detection frame and the electronic fence in the video frame, and upload them to the cloud platform through the cloud data management module.
[0126] Please refer to Figure 10 , an embodiment of the present application also provides an abnormal object detection device based on an electronic fence, which can implement the above abnormal object detection method based on an electronic fence. The abnormal object detection device based on an electronic fence includes:
[0127] A first acquisition module 1010, configured to acquire a target image; the target image includes an electronic fence;
[0128] A first object detection module 1020, configured to perform object detection on the target image to obtain the object category and object position of a preset object;
[0129] A second acquisition module 1030, configured to acquire the fence position and fence identifier of the electronic fence;
[0130] A determination module 1040, configured to determine the positional relationship between the preset object and the electronic fence according to the object position and the fence position;
[0131] The third acquisition module 1050 is configured to, if the position relationship indicates that the preset object is within the electronic fence, obtain the placement area identifier of the preset object according to the object category;
[0132] The second object detection module 1060 is configured to perform abnormal object detection based on the fence identifier and the placement area identifier to obtain the abnormal state information of the preset object; the abnormal state information is used to indicate that the preset object is an abnormal object or the preset object is a normal object.
[0133] The specific implementation manner of the abnormal object detection device based on the electronic fence is basically the same as the specific embodiments of the above-mentioned abnormal object detection method based on the electronic fence, and will not be elaborated herein.
[0134] An embodiment of the present application further provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above-mentioned abnormal object detection method based on the electronic fence is implemented. The electronic device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.
[0135] Please refer to Figure 11 , Figure 11 , which schematically shows the hardware structure of an electronic device in another embodiment. The electronic device includes:
[0136] The processor 1110 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present application;
[0137] The memory 1120 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 1120 can store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1120, and the processor 1110 is called to execute the abnormal object detection method based on the electronic fence in the embodiments of the present application;
[0138] The input / output interface 1130 is used to implement information input and output;
[0139] A communication interface 1140 for implementing communication and interaction between this device and other devices, which can achieve communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as mobile network, WIFI, Bluetooth, etc.);
[0140] A bus 1150 for transmitting information between various components of the device (such as a processor 1110, a memory 1120, an input / output interface 1130, and a communication interface 1140);
[0141] Among them, the processor 1110, the memory 1120, the input / output interface 1130, and the communication interface 1140 achieve communication connections with each other inside the device through the bus 1150.
[0142] The embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the above-mentioned abnormal object detection method based on an electronic fence.
[0143] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely provided relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0144] The abnormal object detection method based on an electronic fence, the abnormal object detection device based on an electronic fence, the electronic device, and the computer-readable storage medium proposed in this application obtain a target image, which includes an electronic fence. Since a camera can only execute a single detection rule, this configuration lacks flexibility and causes significant resource waste. By setting up an electronic fence to execute diverse detection rules, the resource utilization rate is improved. Object detection is performed on the target image to identify and locate a preset object, and the object category and object position of the preset object are obtained. The fence position and fence identifier of the electronic fence are obtained, and based on the object position and the fence position, the positional relationship between the preset object and the electronic fence is determined to judge whether the preset object is located inside the electronic fence according to the positional relationship. If the positional relationship indicates that the preset object is located inside the electronic fence, then it is necessary to judge whether the preset object is an abnormal object. The placement area identifier of the preset object is obtained according to the object category, and abnormal object detection is performed based on the fence identifier and the placement area identifier to judge whether the preset object can be placed inside the electronic fence represented by the fence identifier, and the abnormal state information of the preset object is obtained. The abnormal state information is used to indicate that the preset object is an abnormal object or the preset object is a normal object. Compared with traditional image analysis methods, the method of this application can reduce the requirements for image quality and improve the accuracy of abnormal object detection.
[0145] The embodiments described in the embodiments of this application are for more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.
[0146] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than those shown in the figures, or combine some steps, or different steps.
[0147] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and their appropriate combinations.
[0149] In the description of the present application and the above-mentioned drawings, the terms "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0150] It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or a similar expression means any combination of these items, including any combination of single items (ones) or plural items (ones). For example, at least one (one) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0151] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above-mentioned division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.
[0152] The units described above as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0153] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0154] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present application. The aforementioned storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0155] The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings. However, this does not limit the scope of the rights of the embodiments of the present application. Any modification, equivalent replacement, and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall fall within the scope of the rights of the embodiments of the present application.
Claims
1. An abnormal object detection method based on an electronic fence, characterized in that, The method includes: Obtaining a target image; the target image includes an electronic fence; Performing object detection on the target image to obtain the object category and object position of a preset object; Obtaining the fence position and fence identifier of the electronic fence; Determining the positional relationship between the preset object and the electronic fence according to the object position and the fence position; If the positional relationship indicates that the preset object is located inside the electronic fence, obtaining the placement area identifier of the preset object according to the object category; Performing abnormal object detection according to the fence identifier and the placement area identifier to obtain the abnormal state information of the preset object; the abnormal state information is used to indicate that the preset object is an abnormal object or the preset object is a normal object.
2. The abnormal object detection method based on an electronic fence according to claim 1, wherein The determining the positional relationship between the preset object and the electronic fence according to the object position and the fence position includes: Emitting a target ray from the object position in a preset emission direction; the preset emission direction is the horizontal direction of the preset object; Obtaining the intersection point formed between the target ray and the fence position to obtain a fence intersection point; Obtaining the number of intersection points of the fence intersection point; Determining the positional relationship according to the number of intersection points.
3. The abnormal object detection method based on an electronic fence according to claim 2, characterized in that, The electronic fence includes a plurality of fence sides, each fence side includes a first fence vertex and a second fence vertex, the fence position includes the first fence vertex coordinates of the first fence vertex and the second fence vertex coordinates of the second fence vertex, and the obtaining the intersection point formed between the target ray and the fence position to obtain a fence intersection point includes: Determining the edge index of the fence side according to the first fence vertex coordinates and the second fence vertex coordinates; Reading the slope and intercept of the fence side from a preset dictionary according to the edge index; Obtaining the intersection point formed between the target ray and the fence side according to the slope and intercept to obtain the fence intersection point.
4. The method for detecting abnormal objects based on an electronic fence according to claim 2, wherein, The determining the positional relationship according to the number of intersection points includes: If the number of intersection points is odd, determining the positional relationship as the preset object is located inside the electronic fence.
5. The method for detecting abnormal objects based on an electronic fence according to any one of claims 1 to 4, characterized in that, The performing object detection on the target image to obtain the object category and object position of a preset object includes: Performing initial feature extraction on the target image to obtain initial image features; Performing multi-scale feature extraction on the initial image features to obtain candidate image features; Performing object category detection on the candidate image features through a preset object detection model to obtain the object category, and performing position detection on the candidate image features through the object detection model to obtain the object position.
6. The method for detecting abnormal objects based on an electronic fence according to claim 5, characterized in that, The object detection model includes a regression branch and a classification branch, and the performing object category detection on the candidate image features through a preset object detection model to obtain the object category, and performing position detection on the candidate image features through the object detection model to obtain the object position includes: Performing object classification on the candidate image features through the classification branch to obtain the object category; Performing position regression on the candidate image features through the regression branch to obtain the object position.
7. The abnormal object detection method based on an electronic fence according to any one of claims 1 to 4, characterized in that, After performing anomaly object detection based on the fence identifier and the placement area identifier to obtain the anomaly status information of the preset object, the anomaly object detection method further includes: If the anomaly status information indicates that the preset object is an anomaly object, determine the alarm type according to the object category; Perform an anomaly alarm on the preset object according to the alarm type.
8. An abnormal object detection device based on an electronic fence, characterized in that, The device includes: A first acquisition module, configured to acquire a target image; the target image includes an electronic fence; A first object detection module, configured to perform object detection on the target image to obtain the object category and object position of a preset object; A second acquisition module, configured to acquire the fence position and fence identifier of the electronic fence; A determination module, configured to determine the positional relationship between the preset object and the electronic fence according to the object position and the fence position; A third acquisition module, configured to, if the positional relationship indicates that the preset object is located inside the electronic fence, acquire the placement area identifier of the preset object according to the object category; A second object detection module, configured to perform anomaly object detection based on the fence identifier and the placement area identifier to obtain the anomaly status information of the preset object; the anomaly status information is used to indicate that the preset object is an anomaly object or the preset object is a normal object.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the anomaly object detection method based on an electronic fence according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the anomaly object detection method based on an electronic fence according to any one of claims 1 to 7 is implemented.