Automatic generation method of electronic fence based on risk level of mine markers
By using an automatic electronic fence generation method based on the risk level of mine markers, and by employing image acquisition, classification models, and AI recognition technologies, the problem of insufficient generalization and inadequate algorithm models in existing electronic fence area recognition methods has been solved. This method enables the automatic generation and dynamic adjustment of electronic fences in the mining environment, thereby improving the intelligence and automation level of safety management.
Patent Information
- Application Number
- CN202510413636.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-04-03
AI Technical Summary
Existing electronic fence area identification methods lack generalization capabilities, and big data analysis and artificial intelligence technologies still have shortcomings in terms of data quality, privacy protection, processing capabilities, and algorithm models, making it difficult to effectively cope with complex and ever-changing mining environments.
An automatic electronic fence generation method based on the risk level of mine markers is adopted. Through image acquisition, image classification model training, AI recognition and image transformation, a closed electronic fence area is adaptively formed. By using deep learning image annotation software, convolutional neural network and AI recognition model, combined with risk classification rules and feature point extraction, the electronic fence can be automatically generated and adjusted.
It improves the generalizability and accuracy of electronic fence identification, enables dynamic adjustment of fence position, reduces dependence on data and computing resources, enhances the intelligence and automation level of mine safety management, reduces false alarm rate, and ensures safety and efficiency.
Smart Images

Figure CN120279486B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mine safety monitoring technology, and in particular to a method for automatically generating electronic fences based on the risk level of mine markers. Background Technology
[0002] In the mining industry, safety has always been of paramount importance. Due to the complexity and danger of the mining environment, traditional safety measures such as manual patrols and video surveillance are no longer sufficient to meet the safety management needs of modern mines. These methods suffer from incomplete coverage, delayed response, and high false alarm rates, making them ineffective in dealing with the complex and ever-changing mining environment. With the rapid development of technology, electronic fence technology, with its high degree of intelligence, precision, and real-time performance, is gradually becoming a new favorite in mine safety management.
[0003] Electronic fences are a safety protection system that constructs an invisible "safety net" through advanced sensing technology, IoT technology, and big data analytics. They not only monitor the perimeter area in real time but also immediately trigger alarms in case of abnormal intrusion, achieving all-weather, comprehensive safety protection. The introduction of electronic fence systems marks a step towards intelligent and automated mine safety management. Mine electronic fence systems are widely used in critical and hazardous areas underground, such as tunneling faces, coal bunkers, sealed walls, and belt conveyors. Through a precise personnel positioning system, they provide safety warnings when workers enter hazardous areas, promptly issuing audible and visual alarms or triggering equipment shutdowns to prevent accidents.
[0004] However, existing electronic fence area identification methods lack generalization capabilities, and big data analytics and artificial intelligence technologies still have shortcomings in terms of data quality, privacy protection, processing capabilities, and algorithm models. Summary of the Invention
[0005] The purpose of this invention is to provide an automatic electronic fence generation method based on the risk level of mine markers, aiming to solve the technical problems of the lack of generalization of existing electronic fence area identification methods, and the shortcomings of big data analysis and artificial intelligence technologies in terms of data quality, privacy protection, processing power and algorithm models.
[0006] To achieve the above objectives, the present invention employs an automatic electronic fence generation method based on the risk level of mine markers, comprising the following steps:
[0007] First, environmental images of people working and producing in the mining industry that pose safety hazards are collected to form an image classification dataset and labeled. The labeling criteria are high-risk images, medium-risk images, and low-risk images.
[0008] The constructed image classification dataset is used to divide the data and train an image classification model.
[0009] Annotate selected production environment images to form a test set, and use this test set to infer the image classification model, then display and evaluate the model results;
[0010] The image classification model is deployed to the edge server and connected to the live video stream. Online image detection is achieved using a fixed frame extraction interval to obtain the image classification detection results.
[0011] Based on the results of image classification, different AI recognition models are used to detect various objects in the image;
[0012] Select the corresponding calibration object based on the type of object in the image;
[0013] Based on the shape and outline of the marker in the image, an image transformation method is used to adaptively fine-tune around it to form a closed electronic fence area.
[0014] When constructing and labeling image classification datasets, deep learning image labeling software (such as Labelme or Labelimg) is used for labeling, and the label type is text (txt or xml) files. For example, a class label file (flags.txt) is created for the dataset to be labeled, and the classes of the dataset to be labeled are written line by line in the flags.txt file, such as high risk, medium risk, and low risk.
[0015] Specifically, when using the constructed image classification dataset to divide and train the image classification model: 20% of the images in the image classification dataset are divided as the validation set, and 80% of the images are divided as the training set;
[0016] The constructed image classification model is based on a convolutional neural network (CNN) model, which automatically extracts image features by learning from a large image dataset and classifies images based on these features;
[0017] The specific process includes: data preprocessing, feature extraction, fully connected layer classification, and output prediction;
[0018] The structure of an image classification model includes an input layer, a convolutional layer, an activation function, a pooling layer, a fully connected layer, an output layer, and a loss function.
[0019] Among them, based on the image classification results, when using different AI recognition models to detect various objects in the image:
[0020] For high-risk images, semantic image segmentation is used to segment the edge contours of each object. For medium- and low-risk images, object detection is used to detect the position and confidence of various objects.
[0021] The image semantic segmentation method used assigns a semantic label to each pixel in the image to achieve accurate segmentation and classification of each object region in the image;
[0022] The object detection method used not only identifies the main objects in the image, but also determines their specific locations in the image through bounding boxes.
[0023] Among them, when selecting the corresponding calibration object according to the type of various objects in the image, the selected calibration object is one that can represent the main object or feature in the image;
[0024] The selected calibration objects can be easily and accurately identified in the image; the selected calibration objects have clear outlines, obvious features, and sufficient contrast.
[0025] Specifically, when a closed electronic fence region is adaptively formed around a marker based on its shape and contour in the image using image transformation:
[0026] The image transformation method used is proportional stretching or linear transformation;
[0027] Furthermore, the formed electronic fence area is at a distance from the edge of the marker, and this distance can be configured or fine-tuned manually;
[0028] For cases where the marker is not obvious or the outline of the marker is difficult to detect in the image, an edge feature point extraction method is introduced on the basis of AI recognition to form feature points around the marker, which are combined into a closed polygon to wrap the object inside. Then, an image transformation formula is introduced to automatically form an electronic fence area.
[0029] Finally, based on the ratio of the generated electronic fence area to the calibrated object location area, combined with the tolerance coefficient initially input by humans, adaptive area fine-tuning is achieved.
[0030] The distance between the formed electronic fence area and the edge of the marker is measured directly in pixels. To ensure safety or avoid false alarms, an additional safety margin is set.
[0031] The specific method for automatically generating electronic fence areas based on calibrated objects is as follows:
[0032] First, draw the outline or positioning area A of the calibration object, and obtain the coordinates P(x) of the center pixel of the calibration object. p ,y p The location of the centroid is obtained using the centroid calculation formula, serving as a feature point.
[0033] The formula for calculating the centroid is as follows:
[0034]
[0035] In the formula, x i With y i It determines the position of each pixel within the outline area of the calibrated object; then it finds the four corner vertices of the area, namely X1(x min ,y),X2(x,y max ),X3(x max ,y),X4(x,y max ), where x min y min x max y max The region represents the nearest and farthest pixel positions along the X and Y axes of the image;
[0036] Then, find the two farthest pixels in the calibration object contour region or positioning region, and calculate their Euclidean distance on the image, denoted as d.
[0037]
[0038] Then, a tolerance coefficient r for the image risk level is defined manually, such as r = 1.5 for high risk, r = 1.2 for medium risk, and r = 1 for low risk. This configuration can be used as an adaptive fine-tuning optimization option.
[0039] Subsequently, it is determined whether a segmented or detected region is a regular shape. Shape fitting algorithms (such as least squares) fit the extracted contours to standard shapes (such as circles, rectangles, etc.).
[0040] If the outline is irregular, then the electronic fence area is:
[0041]
[0042] If the outline is a regular circle, then the electronic fence area is:
[0043]
[0044] If the outline is a regular rectangle or trapezoid, then the electronic fence area is:
[0045]
[0046] The method for fine-tuning the generated electronic fence area is as follows:
[0047] Calculate the ratio R between the area of the generated electronic fence and the area of the calibrated object.
[0048]
[0049] The vertex coordinates of the electronic fence area are:
[0050] ((x1,y1),(x2,y2),…,(x m ,y m ));
[0051] The vertex coordinates of the calibration object are:
[0052] ((x′1,y′1),(x′2,y′2),…,(x′ n ,y′ n ));
[0053] According to R, the tolerance coefficient r^*=r / R is updated at this time. The electronic fence area is scaled proportionally, and the offset correction parameter is manually configured. The left and right translation parameter is set to a, and the up and down translation parameter is set to b. Under the condition that the boundary still contains the calibration object, the new electronic fence area S^*=r^**((Sa)+b) is achieved, realizing adaptive area fine-tuning.
[0054] Specifically, when conducting the inspection, the field of view of the image should include areas or equipment in the work and production environment that pose safety hazards, and the image resolution should be no less than 1920*1080.
[0055] The image classification dataset should contain images of various hazardous areas in the mining field.
[0056] An apparatus for automatically generating electronic fences based on the risk level of mine markers, comprising an image acquisition device, a communication transmission device, a data processing device, and a data storage device, for realizing an automatic generation method of electronic fences based on the risk level of mine markers;
[0057] The image acquisition device is a close-range high-definition camera, which can capture high-definition images of various working conditions in the mining field. Dust-proof material is used on the surface of the camera to prevent dust from adhering to the mine and affecting the image quality.
[0058] The communication transmission equipment includes a 5G transmitter, a Wi-Fi transmitter, a USB transmitter, and an Ethernet transmitter;
[0059] The data processing device is an AI edge computing server, which has a certain computing power and memory to complete AI image segmentation and detection based on SAM2 and calibration object region detection based on YOLO.
[0060] The data storage device is an SD card or a hard disk, used to store images for image classification and calibration object positioning.
[0061] This invention discloses an automatic electronic fence generation method based on the risk level of mine markers. The invention uses a close-range high-definition camera to pre-collect images of various dangerous areas and establish an image dataset. Through image classification + AI recognition + feature point calculation + image transformation detection, the risk level of the image and the dangerous areas it contains are intelligently judged. By locating the image markers, an electronic fence of a certain range is automatically generated around the markers. This electronic fence has the characteristics of flexibility and adaptability, and is not affected by external environmental interference. At the same time, it also has the advantages of stability, efficiency, safety and reliability.
[0062] This invention addresses the issues of insufficient generalization in manually set electronic fence areas and the complexity and accuracy of algorithmic models in adaptively adjusting electronic fence positions using artificial intelligence technology. Furthermore, considering the challenges of data acquisition, algorithm deployment, and slow model iteration in the mining industry, it designs a method for automatically generating electronic fences based on risk grading rules. This method systematically achieves automatic adjustment of electronic fences by introducing image classification, large-scale visual model AI recognition, feature point extraction, and formulaic processing templates. This avoids key problems such as poor model accuracy and area failure caused by changes in external environment and operating conditions. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a flowchart illustrating the present invention.
[0065] Figure 2 This is a schematic diagram of the outline of the rule-defined object and the automatically generated electronic fence area of the present invention.
[0066] Figure 3 This is a schematic diagram of the irregular marker outline and automatically generated electronic fence area of the present invention. Detailed Implementation
[0067] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, but should not be construed as limiting the present invention.
[0068] Please see Figures 1-3 ,in Figure 1 This is a flowchart illustrating the present invention. Figure 2This is a schematic diagram of the outline of the rule-defined object and the automatically generated electronic fence area of the present invention. Figure 3 This is a schematic diagram of the irregular marker outline and automatically generated electronic fence area of the present invention.
[0069] This invention provides a method for automatically generating electronic fences based on the risk level of mine markers, including the problems solved by the aforementioned solution.
[0070] S1. First, collect environmental images of personnel working and producing in the mining field that pose safety hazards, form an image classification dataset and label it. The labeling criteria are high-risk images, medium-risk images, and low-risk images.
[0071] In this specific implementation, when constructing and labeling an image classification dataset, deep learning image labeling software (such as Labelme or Labelimg) is used for labeling, and the label type is a text (txt or xml) file. For example, a category label file (flags.txt) for the dataset to be labeled is created, and the categories of the dataset to be labeled, such as high risk, medium risk, and low risk, are written line by line in flags.txt.
[0072] S2. Divide the constructed image classification dataset and train the image classification model;
[0073] In this specific implementation, the selected image classification model uses the YOLOv8-s algorithm for detection. Specifically, the image to be detected is input into the YOLOv8-s model. Then, an affine transformation is performed on the image to adjust it to the input size specified by the model. A suitable model loading method is selected based on the hardware and framework used. The preprocessed image is then input into the YOLOv8-s model for forward propagation calculation. The model outputs a series of prediction results, each containing information such as the image's category and confidence level. Images are then classified according to different levels of danger.
[0074] Furthermore, when using the constructed image classification dataset to divide and train the image classification model: 20% of the images in the image classification dataset are divided as the validation set, and 80% of the images are divided as the training set;
[0075] The constructed image classification model is based on a convolutional neural network (CNN) model, which automatically extracts image features by learning from a large image dataset and classifies images based on these features;
[0076] The specific process includes: data preprocessing, feature extraction, fully connected layer classification, and output prediction;
[0077] The structure of an image classification model includes an input layer, a convolutional layer, an activation function, a pooling layer, a fully connected layer, an output layer, and a loss function.
[0078] S3. Use alternative production environment images for annotation to form a test set, and use the test set to infer the image classification model, then display and evaluate the model results;
[0079] S4. Deploy the image classification model to the edge server and connect it to the live video stream. Use a fixed frame extraction interval to achieve online image detection and obtain the image classification detection results.
[0080] S5. Based on the image classification results, use different AI recognition models to detect various objects in the image;
[0081] In this specific implementation, the AI recognition model uses YoloV8-s and SAM2. Specifically, the image to be detected is input into the YoloV8-s / SAM2 model. Then, an affine transformation is performed on the image to adjust it to the input size specified by the model. An appropriate model loading method is selected based on the hardware and framework used. The preprocessed image is then input into the YoloV8-s / SAM2 model for forward propagation calculation. The model outputs a series of prediction results, each containing information such as the category, bounding box, and confidence score for each object. Notably, SAM2 also returns a region mask for object segmentation, enabling the localization or segmentation of objects within the image.
[0082] For high-risk images, semantic image segmentation is used to segment the edge contours of each object. For medium- and low-risk images, object detection is used to detect the position and confidence of various objects.
[0083] The image semantic segmentation method used assigns a semantic label to each pixel in the image to achieve accurate segmentation and classification of each object region in the image;
[0084] The object detection method used not only identifies the main objects in the image, but also determines their specific locations in the image through bounding boxes.
[0085] S6. Select the corresponding calibration object according to the type of various objects in the image;
[0086] In this specific embodiment, the selected calibrator is one that can represent the main object or feature in the image;
[0087] The selected calibration objects are easily and accurately identifiable in the images; they possess clear outlines, distinct features, and sufficient contrast. For example, in high-risk images of belt conveyors, the calibration objects are rollers, idlers, and motors. These have clear edges and distinct texture features in the images. In high-risk images of tunneling faces, the calibration objects are the tunneling machine and various support equipment such as bolts, cables, and scaffolding. These are key elements ensuring the safety of tunneling operations. Using these devices as calibration objects ensures that the calibration results accurately reflect the actual conditions of the tunneling face.
[0088] S7. Based on the shape and outline of the marker in the image, use image transformation to adaptively fine-tune around it to form a closed electronic fence area;
[0089] In this specific embodiment, the image transformation method used is proportional stretching / scaling or linear transformation;
[0090] Furthermore, the formed electronic fence area is at a distance from the edge of the marker, and this distance can be configured or fine-tuned manually;
[0091] For cases where the marker is not obvious or the outline of the marker is difficult to detect in the image, an edge feature point extraction method is introduced on the basis of AI recognition to form feature points around the marker, which are combined into a closed polygon to wrap the object inside. Then, an image transformation formula is introduced to automatically form an electronic fence area.
[0092] Finally, based on the ratio of the generated electronic fence area to the calibrated object location area, combined with the tolerance coefficient initially input by humans, adaptive area fine-tuning is achieved.
[0093] The distance between the formed electronic fence area and the edge of the marker is specifically defined as follows: on the image plane, the distance can be directly measured in pixels. In this case, "a certain distance" might be a fixed pixel value, such as 5 pixels, 10 pixels, etc. In some applications, to ensure safety or avoid false alarms, an additional safety margin may be set. This margin can be determined based on experience, industry standards, or user needs. This distance can be configured or fine-tuned manually.
[0094] The specific method for automatically generating electronic fence areas based on calibrated objects is as follows:
[0095] First, draw the outline or positioning area A of the calibration object, and obtain the coordinates P(x) of the center pixel of the calibration object. p ,y p The location of the centroid is obtained using the centroid calculation formula, serving as a feature point.
[0096] The formula for calculating the centroid is as follows:
[0097]
[0098] In the formula, x i With y i It determines the position of each pixel within the outline area of the calibrated object; then it finds the four corner vertices of the area, namely X1(x min ,y),X2(x,y max ),X3(x max ,y),X4(x,y max ), where x min y min x max y max The region represents the nearest and farthest pixel positions along the X and Y axes of the image;
[0099] Then, find the two farthest pixels in the calibration object contour region or positioning region, and calculate their Euclidean distance on the image, denoted as d.
[0100]
[0101] Then, a tolerance coefficient r for the image risk level is defined manually, such as r = 1.5 for high risk, r = 1.2 for medium risk, and r = 1 for low risk. This configuration can be used as an adaptive fine-tuning optimization option.
[0102] Subsequently, it is determined whether a segmented or detected region is a regular shape. Shape fitting algorithms (such as least squares) fit the extracted contours to standard shapes (such as circles, rectangles, etc.).
[0103] If the outline is irregular, then the electronic fence area is:
[0104]
[0105] If the outline is a regular circle, then the electronic fence area is:
[0106]
[0107] If the outline is a regular rectangle or trapezoid, then the electronic fence area is:
[0108]
[0109] The method for fine-tuning the generated electronic fence area is as follows:
[0110] Calculate the ratio R between the area of the generated electronic fence and the area of the calibrated object.
[0111]
[0112] The vertex coordinates of the electronic fence area are:
[0113] ((x1,y1),(x2,y2),…,(x m ,y m ));
[0114] The vertex coordinates of the calibration object are:
[0115] ((x′1,y′1),(x′2,y′2),…,(x′ n ,y′ n ));
[0116] According to R, the tolerance coefficient r^*=r / R is updated at this time. The electronic fence area is scaled proportionally, and the offset correction parameter is manually configured. The left and right translation parameter is set to a, and the up and down translation parameter is set to b. Under the condition that the boundary still contains the calibration object, the new electronic fence area S^*=r^**((Sa)+b) is achieved, realizing adaptive area fine-tuning.
[0117] Specifically, when conducting the inspection, the field of view of the image should include areas or equipment in the work and production environment that pose safety hazards, and the image resolution should be no less than 1920*1080.
[0118] The image classification dataset should contain images of various hazardous areas in the mining field.
[0119] During online detection, video is captured by a camera, frames are extracted to form images, and then fed into an image classification model and an AI recognition model. Since the production environment and camera angles do not change significantly, images can be generated every 10 minutes based on the actual situation.
[0120] An apparatus for automatically generating electronic fences based on the risk level of mine markers, comprising an image acquisition device, a communication transmission device, a data processing device, and a data storage device, for realizing an automatic generation method of electronic fences based on the risk level of mine markers;
[0121] The image acquisition device is a close-range high-definition camera, which can capture high-definition images of various working conditions in the mining field. Dust-proof material is used on the surface of the camera to prevent dust from adhering to the mine and affecting the image quality.
[0122] The communication transmission equipment includes a 5G transmitter, a Wi-Fi transmitter, a USB transmitter, and an Ethernet transmitter;
[0123] The data processing device is an AI edge computing server, which has a certain computing power and memory to complete AI image segmentation and detection based on SAM2 and calibration object region detection based on YOLO.
[0124] The data storage device is an SD card or a hard disk, used to store images for image classification and calibration object positioning.
[0125] Using the automatic electronic fence generation method based on the risk level of mine markers according to this invention, in practical application, images of the working environment of personnel in the mining area are first collected, especially locations with potential safety hazards, such as the tail motor of a belt conveyor, the side protective nets, the contact point between the roller and the idler roller, the mining area of the coal bunker, and explosive areas. These images form an image classification training dataset and are labeled as high-risk, medium-risk, and low-risk environments. This image classification dataset is then divided and an image classification model is trained, with 80% of the images used for training and 20% used for validation. Additionally, some images of the production environment are selected and labeled as...
[0126] Test set. After the classification model is trained, it uses a labeled test set for inference, performs online detection, and displays the classification model results. For classified images, different AI recognition models are then used. For example, for high-risk area images, an image semantic segmentation model is introduced to segment the edge contours of objects in the image, such as rollers. Dangerous areas are drawn based on these contours, and then an electronic fence area is automatically formed around the object according to an image transformation formula. The image transformation formula differs for different types and shapes of objects. For low-risk images, an object detection model is used to roughly locate all objects in the image. Appropriate objects are selected as markers based on their type, and an image transformation is performed around the marker's detection box to automatically generate an electronic fence area. For markers that are not closed, open, or have incomplete edge contours, fixed feature points are placed around the marker to form a closed polygon that encloses the marker. An electronic fence area is then automatically formed outside the closed polygon using an image transformation formula.
[0127] This invention has the following innovations:
[0128] 1. Automatic generation of risk levels:
[0129] Existing technologies for adjusting the location of electronic fences often rely on complex artificial intelligence models, which require substantial data and computing resources for training and updating. This technical solution, however, introduces risk classification rules to achieve automatic generation and adjustment of electronic fence locations. These rules, based on the specific environmental and working conditions of the mining industry, can more accurately identify potential safety risks, thereby dynamically adjusting the location and extent of the electronic fence. This innovation not only reduces reliance on large amounts of data but also improves the accuracy and adaptability of the model. For example, through image classification, hazardous areas in several mining scenarios, such as tunneling faces, coal bunkers, sealed walls, and belt conveyors, can be classified based on potential risk factors, the likelihood of accidents, and the severity of accident consequences. Taking belt conveyors as an example, high-risk areas are located at the head and tail of the conveyor, and at the contact points between the conveyor belt and rollers / idlers, where mechanical injuries such as entanglement and crushing are prone to occur. Medium-risk areas may be along the conveyor belt and in maintenance passages below the conveyor belt, where there may be a risk of personnel falling.
[0130] 2. Integrated application of image classification, large-scale visual model AI recognition, feature extraction, and formulaic template processing:
[0131] After understanding real-world mining production scenarios through image classification, and combining this with large-scale visual model AI recognition techniques, such as object detection or semantic segmentation, the system can quickly identify different areas and objects within the mining environment.
[0132] Feature extraction technology can extract key information to guide the adjustment of electronic fences; while formulaic processing templates, such as defining the linear transformation relationship of images under different levels and object shapes, ensure the repeatability and consistency of the entire process.
[0133] 3. It solves the problems of high data acquisition difficulty and algorithm deployment difficulty in the mining field:
[0134] Due to the unique environment and operating conditions in the mining industry, data acquisition often faces numerous challenges. This technical solution, by introducing risk classification rules and an integrated technical processing workflow, effectively reduces the demand for and reliance on data. Simultaneously, by optimizing algorithm design and simplifying the deployment process, it solves the problem of difficult algorithm deployment in the mining field. This enables this technical solution to be better applied and promoted in complex environments such as mines.
[0135] The present invention has the following beneficial effects:
[0136] Enhancing safety and risk warning capabilities: By automatically identifying high-risk, medium-risk, and low-risk areas in the mining environment, this method can quickly respond to and mark potential safety hazards, thereby improving the safety of mining operations. For high-risk areas, the method accurately delineates dangerous zones using an image semantic segmentation model and automatically generates electronic fences around them, effectively preventing accidents caused by personnel accidentally entering or equipment malfunctions.
[0137] Enhanced Intelligence and Automation: This method utilizes AI technology for image classification, semantic segmentation, and target detection, achieving intelligent and automated mine safety management and reducing the need for manual intervention and judgment. Previously, electronic fence areas required manual identification, i.e., manually drawing frames, which lacked generalization and could not be applied to multiple scenarios. Automatically generated electronic fences, however, can be updated in real time and dynamically adjusted according to changes in the mining environment, improving the efficiency and accuracy of safety management.
[0138] The above description discloses only one preferred embodiment of the present invention, and should not be construed as limiting the scope of the present invention. Those skilled in the art will understand that all or part of the processes of the above embodiments can be implemented, and equivalent changes made in accordance with the claims of the present invention are still within the scope of the invention.
Claims
1. A method for automatically generating an electronic fence based on the risk level of mine markers, characterized in that it comprises the following steps: First, collect images of environments with potential safety hazards in the production of mine field personnel, form an image classification data set and label it, the labeling standard is high-risk image, medium-risk image and low-risk image; Use the formed image classification data set to divide and train an image classification model; Use alternative production environment images to label and form a test set, and use the test set to infer the image classification model, display and evaluate the model results; Deploy the image classification model to the edge server and access the live video stream, use a fixed frame extraction interval to realize online picture detection and obtain the image classification detection results; Based on the results of image classification, use different AI recognition models to detect various objects in the image; According to the types of various objects in the image, select the corresponding calibration object; According to the shape contour of the calibration object in the image, use image transformation to form a closed electronic fence area around it; The method is applied to a device for automatically generating an electronic fence based on the risk level of mine markers, and the device comprises an image acquisition device, a communication transmission device, a data processing device and a data storage device; The image acquisition device is a close-range high-definition camera for acquiring high-definition images of various working conditions in the mine field, and a dustproof material is used on the surface of the camera.
2. The method for automatically generating an electronic fence based on the risk level of mine markers according to claim 1, characterized in that when forming an image classification data set and labeling, a deep learning image label labeling software is used for labeling, and the labeling type is a text txt or xml file.
3. The method for automatically generating an electronic fence based on the risk level of mine markers according to claim 2, characterized in that when dividing and training an image classification model using the formed image classification data set: 20% of the images in the image classification data set are divided as a validation set, and 80% of the images are divided as a training set; The constructed image classification model is a model based on convolutional neural network (CNN), which automatically extracts the features of the image by learning a large number of image data sets, and classifies the image according to these features; The specific process includes data preprocessing, feature extraction, full connection layer classification and output prediction; The image classification model structure includes input layer, convolution layer, activation function, pooling layer, full connection layer, output layer and loss function.
4. The method for automatically generating an electronic fence based on the risk level of mine markers according to claim 3, characterized in that based on the results of image classification, different AI recognition models are used to detect various objects in the image: For high-risk images, use image semantic segmentation to segment the edge contour of each object, and for medium and low-risk images, use target detection to detect the position and confidence of each object; The image semantic segmentation assigns a semantic label to each pixel in the image to achieve accurate division and classification of each object region in the image. The target detection not only identifies the main objects in the image, but also determines their specific positions in the image through the bounding box.
5. The method of claim 4, wherein, According to the type of various objects in the image, the corresponding calibration object is selected, and the selected calibration object can represent the main object or feature in the image; The selected calibration object can be easily and accurately identified in the image, and has a clear outline, obvious features and sufficient contrast.
6. The method of claim 5, wherein, According to the shape outline of the calibration object in the image, an image transformation method is used to form a closed electronic fence area around it; The image transformation method is proportional stretching and scaling or linear transformation; And the distance between the formed electronic fence area and the edge of the marker is configured or fine-tuned by human; For the case where the calibration object is not obvious or the outline of the calibration object is difficult to detect in the image, an edge feature point extraction method is introduced on the basis of AI recognition to form feature points around the calibration object, combine them into a closed polygon to wrap the object inside, and then introduce an image transformation formula to automatically form an electronic fence area; Finally, according to the ratio of the generated electronic fence area to the calibration object position area, and combined with the initial human input tolerance coefficient, the adaptive area fine-tuning is realized.
7. The method of claim 6, wherein, The distance between the formed electronic fence area and the edge of the marker is directly measured in pixels, and an additional safety margin is set to ensure safety or avoid false positives.
8. The method of claim 7, wherein, The specific way of automatically generating an electronic fence area according to the calibration object is as follows: First, draw the calibration object contour region or positioning region A, and obtain the calibration object center pixel point coordinate position P(x p ,y p ) as a feature point, which is obtained by a centroid calculation formula, The centroid calculation formula is as follows: In the formula, With is the location of each pixel in the calibration object profile area; then find the four corner vertices in the area, respectively, X1(x min ,y), X2(x max ,y), X3(x max ,y), X4(x max ,y), wherein x min , y min , x max , y max represent the nearest and farthest pixel positions of the area in the X and Y directions of the image Then, find the two pixels of the farthest distance in the calibration object contour region or the positioning region, and calculate their Euclidean distance in the image, denoted as , After that, define a tolerance coefficient of the image risk level artificially , such as high risk =1.5, medium risk =1.2, and low risk =1, which can be used as an adaptive fine-tuning optimization option; Subsequently, it is determined whether a segmented or detected region is a regular shape, and a shape fitting algorithm (e.g., least square method) fits the extracted contour to a standard shape (e.g., circle, rectangle, etc.); if it is an irregular contour, then the e-fence region is: If it is a regular circular contour, then the e-fence region is: If the regular rectangular or trapezoidal profile, then the electronic fence area:
9. The method for automatically generating an electronic fence based on mine marker risk level according to claim 8, characterized in that, The way of fine-tuning the generated electronic fence area is as follows: The ratio R of the calculated electronic fence area to the area of the calibration object, wherein the vertex coordinates of the electronic fence area are: The vertex coordinates of the calibration object are: According to R, at this time the tolerance coefficient r^*=r / R is updated, at this time the electronic fence area is scaled proportionally, and the left and right translation parameters are set as a and the up and down translation parameters are set as b by artificially configuring the offset correction parameters, under the condition that the boundary still contains the calibration object, the new electronic fence area S^*=r^**((S-a)+b) is realized to achieve adaptive area fine-tuning.
10. The method of claim 9, wherein, During detection, the image field of view should contain the area or equipment with safety hazards in the work environment, and the image resolution should not be less than 1920*1080; The image classification data set should contain images of various dangerous areas in the mine field.
Citation Information
Patent Citations
Electronic fence area generation system based on hazard source monitoring and personnel positioning
CN113115225A
Electronic fence dividing method and system for work of sanitation workers
CN119521132A