Construction area personnel detection method and device, storage medium and program product

By identifying target image types in the construction area and using corresponding models for personnel detection, the problem of low accuracy in personnel target detection under the influence of light and weather conditions is solved, achieving high-precision detection in different operating environments and improving construction safety. sex.

CN118609164APending Publication Date: 2024-09-06JIANGSU XCMG CONSTRUCTION MACHINERY RESEARCH INSTITUTE LTD +1

Patent Information

Application Number
CN202410695821.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The existing technology has low accuracy in detecting personnel targets under the influence of light and weather conditions, and is difficult to meet the construction needs in different operating environments.

Method used

By obtaining the target image of the construction area, the image type is identified based on the brightness information and average gradient information, and the corresponding model (first model and second model) is used to identify the person. The first model targets images that are too bright or too dark, and the second model The model targets normal images to improve detection accuracy.

Benefits of technology

It improves the accuracy of human target detection under light and weather conditions, meets construction needs in different operating environments, and enhances construction safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609164A
    Figure CN118609164A
Patent Text Reader

Abstract

The invention provides a construction area personnel detection method and device, a storage medium and a program product, and relates to the field of image processing. The method comprises the steps of obtaining a target image of a construction area; identifying the type of the target image based on the brightness information and the average gradient information of the target image; under the condition that the target image is the target image of the first type, identifying a person in the target image by using a first model, the first model being obtained by training based on a sample image of the first type; and under the condition that the target image is the target image of the second type, a second model is used to identify a person in the target image, and the second model is obtained based on training of the sample image of the second type. Compared with the method of adopting one model to perform personnel identification on the image of the construction area, the method has the advantages that the identification precision is higher, in addition, the image brightness and the average gradient are considered, the problem that the personnel target detection precision is not high under the influence of light and weather conditions is solved, and the construction requirements in different working environments are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to a method, device, storage medium and program product for detecting personnel in a construction area. Background Art

[0002] Excavators are widely used in industrial production, resource mining, construction and other fields. The harsh working conditions and working environment commonly encountered by excavators, the repetitive and high-intensity work of excavator operators, and the shortage of manpower all bring huge challenges to industrial production. Based on this, construction machinery continues to evolve towards intelligence and digitalization, and construction safety is the primary consideration for unmanned operation. Therefore, high-precision detection of obstacles such as personnel in the construction area is particularly important.

[0003] Personnel detection is one of the research directions of computer vision and has a wide range of applications in the fields of intelligent driving, security monitoring, etc. In recent years, deep learning target detection algorithms have developed rapidly, and some algorithms can achieve good detection results. Considering the special needs of construction safety and the complexity of personnel detection, algorithms are required to be able to accurately identify personnel targets under different postures, distances, occlusions, light and weather conditions. Summary of the invention

[0004] A technical problem to be solved by the present disclosure is to provide a method, device, storage medium and program product for detecting personnel in a construction area, which can solve the problem of low accuracy of personnel target detection under the influence of light and weather conditions in related technologies and meet the construction needs in different working environments.

[0005] According to one aspect of the present disclosure, a method for detecting personnel in a construction area is proposed, including: acquiring a target image of the construction area; identifying the type of the target image based on brightness information and average gradient information of the target image; when the target image is a target image of a first type, identifying personnel in the target image using a first model, the first model being trained based on sample images of the first type; when the target image is a target image of a second type, identifying personnel in the target image using a second model, the second model being trained based on sample images of the second type.

[0006] In some embodiments, the distance between the personnel and the construction equipment is identified; and when the distance is less than a threshold, an alarm mechanism is activated.

[0007] In some embodiments, the brightness information includes a brightness coefficient, and based on the brightness information and average gradient information of the target image, identifying the type of the target image includes: when the brightness coefficient is greater than 1, identifying the target image as a first type of target image; when the brightness coefficient is less than or equal to 1 and the average gradient information is less than or equal to a gradient threshold, identifying the target image as a first type of target image; when the brightness coefficient is less than or equal to 1 and the average gradient information is greater than the gradient threshold, identifying the target image as a second type of target image.

[0008] In some embodiments, the brightness coefficient is determined based on the degree of deviation of the image brightness value and the average deviation of all pixels of the target image from the mean, and the average deviation is determined based on the degree of deviation of the image brightness value.

[0009] In some embodiments, identifying the distance between the person and the construction equipment includes: identifying the distance according to the size of the detection box containing the person output by the first model or the second model.

[0010] In some embodiments, the first model is trained based on the first type of sample images and includes: reducing the resolution of the first type of sample images; using a small convolutional neural network to process the first type of sample images with reduced resolution to obtain hyperparameters suitable for the differentiable image processing module; using the first type of sample images to train the differentiable image processing module, wherein during the training process, the loss function of the differentiable image processing module satisfies the convergence condition, thereby obtaining a trained first model.

[0011] In some embodiments, training of the second model based on the second type of sample images includes: setting training parameters of the second model and loading the second type of sample images; initializing the network structure of the second model; training the second model using the second type of sample images, wherein, during the training process, the loss function of the second model satisfies the convergence condition, thereby obtaining a trained second model.

[0012] In some embodiments, an image sample set of a construction area is constructed; persons in some sample images in the image sample set are annotated to obtain a first annotation file; a third model is trained using the some sample images and the first annotation file; a second annotation file is generated based on the third model for other sample images in the image sample set except the some sample images; and the image sample set is divided into a first type of sample images and a second type of sample images.

[0013] In some embodiments, a data enhancement method is used to perform data enhancement on the image sample set.

[0014] According to another aspect of the present disclosure, a construction area personnel detection device is also proposed, including: an image acquisition module, configured to acquire a target image of a construction area; a type recognition module, configured to identify the type of the target image based on the brightness information and average gradient information of the target image; a personnel recognition module, configured to, when the target image is a target image of the first type, identify personnel in the target image using a first model, the first model being trained based on a sample image of the first type; and when the target image is a target image of the second type, identify personnel in the target image using a second model, the second model being trained based on a sample image of the second type.

[0015] According to another aspect of the present disclosure, a construction area personnel detection device is also proposed, including: a memory; and a processor coupled to the memory, the processor being configured to execute the above-mentioned construction area personnel detection method based on instructions stored in the memory.

[0016] According to another aspect of the present disclosure, a computer-readable storage medium is also provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the above-mentioned method for detecting personnel in a construction area is implemented.

[0017] According to another aspect of the present disclosure, a computer program product is also proposed, including a computer program or instructions, and when the computer program or instructions are executed by a processor, the above-mentioned construction area personnel detection method is implemented.

[0018] In the disclosed embodiment, based on the brightness information and average gradient information of the target image, it is identified whether the target image is the first type of image or the second type of image. Thus, different models are used for personnel recognition for different types of images. Compared with using one model to recognize personnel in images of the construction area, the recognition accuracy is higher. In addition, since this embodiment takes into account the image brightness and average gradient, that is, the light and weather conditions at the construction site, it also solves the problem of low accuracy in personnel target detection under the influence of light and weather conditions in related technologies, thereby meeting the construction needs under different working environments.

[0019] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0021] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0022] Figure 1It is a flowchart of some embodiments of the construction area personnel detection method disclosed in the present invention;

[0023] Figure 2 Schematic diagrams of the flow of other embodiments of the method for detecting personnel in a construction area disclosed in the present invention;

[0024] Figure 3 Schematic diagrams of the flow of other embodiments of the method for detecting personnel in a construction area disclosed in the present invention;

[0025] Figure 4 Schematic diagrams of the flow of other embodiments of the method for detecting personnel in a construction area disclosed in the present invention;

[0026] Figure 5 Schematic diagrams of the flow of other embodiments of the method for detecting personnel in a construction area disclosed in the present invention;

[0027] Figure 6 Schematic diagrams of the flow of other embodiments of the method for detecting personnel in a construction area disclosed in the present invention;

[0028] Figure 7 Schematic diagrams of the flow of other embodiments of the method for detecting personnel in a construction area disclosed in the present invention;

[0029] Figure 8 It is a schematic diagram of the structure of some embodiments of the construction area personnel detection device disclosed in the present invention;

[0030] Fig. 9 It is a schematic diagram of the structure of some other embodiments of the construction area personnel detection device disclosed in the present invention;

[0031] Fig.10 It is a schematic diagram of the structure of some other embodiments of the construction area personnel detection device disclosed in the present invention;

[0032] Fig.11 Schematic diagrams of the structures of other embodiments of the construction area personnel detection device disclosed in the present invention. DETAILED DESCRIPTION

[0033] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0034] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0035] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0036] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0037] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0038] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0039] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0040] The light and weather changes in the actual working environment have the greatest impact on the detection accuracy. In order to overcome the difficulty of pedestrian detection under excavator construction conditions, the present disclosure provides a construction area personnel detection solution that can improve the accuracy of personnel target detection under the influence of light and weather conditions. The following will introduce the solution of the present disclosure by taking a specific embodiment as an example.

[0041] Figure 1 1 is a flowchart of some embodiments of the method for detecting personnel in a construction area disclosed in the present invention, and the embodiment includes steps S11-S14.

[0042] In step S11, a target image of the construction area is acquired.

[0043] In some embodiments, the target image is captured by an image capture device, such as a camera.

[0044] In some embodiments, the target image is preprocessed, for example, the target image is converted into an OpenCV image format, and the image is preprocessed such as resizing, channel conversion, and normalization.

[0045] In step S12, the type of the target image is identified based on the brightness information and the average gradient information of the target image.

[0046] In some embodiments, the target image includes a first type of image and a second type of image. The first type of image is, for example, an image that is too bright, an image that is too dark, an image that has normal brightness but is foggy, etc. The second type of image includes a normal image. The image is divided into two types of images, so that different models can be used for subsequent processing of different types of images to improve recognition accuracy.

[0047] When the brightness coefficient is greater than 1, the target image is identified as the first type of target image; when the brightness coefficient is less than or equal to 1 and the average gradient information is less than or equal to the gradient threshold, the target image is identified as the first type of target image; when the brightness coefficient is less than or equal to 1 and the average gradient information is greater than the gradient threshold, the target image is identified as the second type of target image. Figure 3 Take 40 ...

[0048] The brightness coefficient is determined based on the degree of deviation of the image brightness value and the average deviation of all pixels of the target image from the mean, and the average deviation is determined based on the degree of deviation of the image brightness value.

[0049] In this step, the image brightness can reflect the light when the image is collected, and the average gradient of the image can reflect the weather information when the image is collected.

[0050] In step S13, when the target image is a target image of the first type, a first model is used to identify a person in the target image, where the first model is trained based on sample images of the first type.

[0051] In some embodiments, the first model is trained using a deep neural network model, for example, a model optimized based on the IA-YOLO algorithm.

[0052] In step S14, when the target image is a target image of the second type, a second model is used to identify a person in the target image, where the second model is trained based on sample images of the second type.

[0053] In some embodiments, the second model is trained using a deep neural network model, such as the YOLO series, such as YOLOv6-YOLOv9.

[0054] In the above embodiment, based on the brightness information and average gradient information of the target image, it is identified whether the target image is an image of the first type or an image of the second type. Thus, different models are used for different types of images to identify personnel. Compared with using one model to identify personnel in images of the construction area, the recognition accuracy is higher. In addition, since this embodiment takes into account the image brightness and average gradient, that is, the light and weather conditions at the construction site, it also solves the problem of low accuracy in personnel target detection under the influence of light and weather conditions in related technologies, and meets the construction needs under different working environments.

[0055] In other embodiments of the present disclosure, Figure 2 As shown, this embodiment also includes step S21 and step S22.

[0056] In step S21, the distance between the person and the construction equipment is identified.

[0057] In some embodiments, the distance is identified based on the size of the detection box containing the person output by the first model or the second model.

[0058] For example, the distance between a person and an excavator is estimated based on the size of the detection box.

[0059] In step S22, when the distance is less than the threshold, an alarm mechanism is activated.

[0060] For example, when a person appears within the working radius of an excavator, the alarm mechanism is activated, and the decision-making module then schedules the excavator to stop working.

[0061] In this embodiment, dual models are used to perform targeted detection on images of different working environments to identify the distance between personnel and construction equipment, so that the alarm mechanism can be activated in a timely manner. This is of great significance in an unmanned construction environment and can effectively improve construction safety.

[0062] Figure 3 1 is a flowchart of some other embodiments of the method for detecting personnel in a construction area disclosed in the present invention, and the embodiment includes steps S121-S14.

[0063] In step S121, the image brightness value deviation degree and the brightness coefficient are calculated.

[0064] In some embodiments, the degree of deviation of each pixel point in the grayscale image of the target image from the mean is calculated, and the result is ensured in the matrix S to obtain the degree of deviation d of the image brightness value. The mean is, for example, 128.

[0065] For example, according to the formula The degree of deviation of the image brightness value d is obtained, where S(i, j) represents the value of the i-row and j-column coordinates in the matrix, M represents the width of the image, and N represents the height of the image.

[0066] Then calculate the average deviation m of all pixels from the mean. For example, according to the formula The average deviation m is calculated, hist is the histogram of the grayscale image, which is a statistic of the grayscale distribution of the image. It is a vector of 256 rows and 1 column. Each value represents the frequency of occurrence of the grayscale value, and p ranges from 0 to 255.

[0067] Using the formula k=|d| / m, we get the brightness coefficient k.

[0068] In step S122, the brightness of the image is determined. If k>1 and d>0, step S123 is executed. If it is too dark, if k>1 and d≤0, step S24 is executed. If k≤1, step S125 is executed.

[0069] In step S123, it is determined that the image is too bright, and then step S13 is performed.

[0070] In step S124, it is determined that the image is too dark, and then step S13 is performed.

[0071] In step S125, it is determined that the image brightness is normal, and then step S126 is performed.

[0072] In the above steps, according to the brightness information of the image, it can be determined whether the image is too bright, too dark or has normal brightness.

[0073] In step S126, the image average gradient is calculated.

[0074] The image average gradient is used to determine whether the image is foggy. The average gradient reflects the clarity and texture changes of the image. The larger the average gradient, the clearer the image. The foggy or blurred images are filtered by setting the threshold. There are many operators for the average gradient. For example, the Laplace operator is the simplest isotropic differential operator with rotation invariance. The Laplace transform of a two-dimensional image function is an isotropic second-order derivative, defined as:

[0075]

[0076] In a two-dimensional function f(x,y), the second-order differences in the x and y directions are:

[0077]

[0078] The Laplace operation template is as follows:

[0079] 0 1 0 1 -4 1 0 1 0

[0080] In step S127, it is determined whether the image average gradient is less than or equal to the gradient threshold, if so, step S128 is executed, otherwise, step S129 is executed.

[0081] For example, if the average gradient of the image is greater than 800, the image is considered to be a normal image, and if the average gradient of the image is less than or equal to 800, the image is considered to be a foggy image.

[0082] In step S128, it is determined that the image is a foggy image, and then step S13 is performed.

[0083] In step S129, it is determined that the image is a normal image, and then step S14 is performed.

[0084] In step S13, the first model is used to identify people in the target image.

[0085] In step S14, the second model is used to identify people in the target image.

[0086] The first model is a special model. The training process of the first model is as follows: Figure 4 As shown, the second model is a general model, and the training process of the second model is as follows. Figure 5 shown.

[0087] In the above embodiment, for overly bright images, overly dark images, foggy images or normal images, corresponding models are used to detect human targets, that is, the corresponding model is enabled for detection based on the working environment conditions, thereby avoiding redundant design of multiple models, and being able to effectively improve the accuracy without increasing the image inference cost, thereby ensuring real-time detection.

[0088] By analyzing the problem of personnel detection at the construction site, it is found that the influence of light and weather changes have a great impact on the model detection accuracy. Simply training samples in all situations with one model will increase many model false detections. In the embodiment of the present disclosure, a target detection framework combining two models is adopted, one model is for detection under normal conditions, and the other model is for detection under conditions such as bright light, dark light, fog, etc. Figure 4 and Figure 5 For example, two appropriate deep learning target detection algorithm models are selected to train the first model and the second model respectively. The selection of the algorithm model should comprehensively evaluate the model accuracy and reasoning cost, such as storage space occupancy, computing time, etc.

[0089] Figure 4 1 is a flowchart of some other embodiments of the method for detecting personnel in a construction area disclosed in the present invention, and the embodiment includes steps S41-S43.

[0090] In step S41, the resolution of the sample image of the first type is reduced.

[0091] The sample image is a high-resolution input image. After reducing the resolution of the high-resolution input image, a low-resolution input image is obtained.

[0092] In some embodiments, the annotation file format of the sample image is converted to match the algorithm, the algorithm configuration file is modified, and the training parameters are adjusted to perform model training.

[0093] In step S42, a small convolutional neural network is used to process the sample images of the first type with reduced resolution to obtain hyperparameters suitable for the differentiable image processing module.

[0094] In some embodiments, the first model is a special case model, which should be able to adaptively process conditions such as weak light, strong light, and bad weather. For example, based on the IA-YOLO algorithm, the YOLOv3 detector in IA-YOLO is replaced with other detectors with higher precision. The IA-YOLO has been proven to be superior to previous methods in detection effects in foggy and low-light environments. In this embodiment, a fully differentiable image processing module (DIP) is used to restore potential information by removing weather-related information from the YOLO detector, and the hyperparameters of the detector are predicted by a small convolutional neural network (CNN-PP). CNN-PP adaptively predicts the hyperparameters of DIP based on the brightness, color, hue, and weather information of the input image. The DIP module performs defogging, white balance, filtering, hue adjustment, contrast, sharpening, and other processing on the image.

[0095] In step S43, the differentiable image processing module is trained using the first type of sample images, wherein during the training process, if the loss function of the differentiable image processing module satisfies the convergence condition, a trained first model is obtained.

[0096] After obtaining the first model, the model accuracy can be evaluated using the test data set, and the model can be iteratively optimized based on the test questions.

[0097] In this embodiment, a special case model is trained for images under conditions such as weak light, strong light, and bad weather, which can be better suitable for target recognition in special situations.

[0098] Figure 5 1 is a flowchart of some other embodiments of the method for detecting personnel in a construction area disclosed in the present invention, and the embodiment includes steps S51-S53.

[0099] In step S51, the training parameters of the second model are set, and sample images of the second type are loaded.

[0100] In some embodiments, the second model may select the YOLO series, such as YOLOv6-YOLOv9, etc. First, the algorithm model configuration file and the data set configuration file are set, and the backbone, neck, and head of the network structure can be optimized and designed according to the characteristics of the data set, and the network width and depth can be adjusted.

[0101] In step S52, the network structure of the second model is initialized.

[0102] In some embodiments, the network weight parameters are initialized using a pre-trained model.

[0103] In step S53, the second model is trained using sample images of the second type, wherein during the training process, if the loss function of the second model satisfies a convergence condition, a trained second model is obtained.

[0104] In this step, the model is trained using the normal light and weather condition dataset. The loss is calculated based on the predictions and annotations, and the weights of the model are updated using backpropagation to minimize the loss. Different learning rates, optimization algorithms (such as SGD, Adam), and other hyperparameters are tried to ensure that the model converges effectively. The learning rate scheduler is used to adjust the learning rate during the training process. Monitor the performance of the model on an independent validation dataset and evaluate the accuracy, recall, and F1 score of the model to avoid overfitting.

[0105] After training the basic model, the model can be further distilled to compress the model and improve deployment efficiency; on the other hand, it can further improve the generalization ability of the model.

[0106] The knowledge distillation loss formula is:

[0107] L KD =KL(p t cls ||p s cls )+KL(p t reg ||p s reg )

[0108] Among them, p t cls and p s cls are the category predictions of the teacher model and the student model, respectively, t reg and p s reg are bounding box regression predictions, and K is a coefficient. The overall loss function is expressed as:

[0109] L total =L det +αL KD

[0110] Among them, L det is the detection loss calculated using the predictions and labels.

[0111] After obtaining the second model, if the loss function curve of the training process meets the requirements, the algorithm converges, and the accuracy of the validation set during the training process meets expectations, the test data set is used to evaluate the accuracy of the model and analyze the problems. The algorithm is iteratively optimized according to the problem until a satisfactory model is obtained.

[0112] In this embodiment, a general case model is trained for images under normal light, weather conditions, etc., which effectively improves the detection accuracy and enhances the model's adaptability to different scenarios without increasing the reasoning time.

[0113] Before training the model disclosed in this paper, it is necessary to construct and annotate the construction scene personnel detection dataset, such as Figure 6 As shown, Figure 6 Schematic diagram of the flow of other embodiments of the method for detecting personnel in a construction area disclosed in the present invention, including steps S61-S65.

[0114] In step S61, an image sample set of the construction area is constructed.

[0115] In some embodiments, pictures or videos containing human targets are obtained through open source data sets such as COCO and PASCAL VOC, collecting online construction scene videos, collecting construction site data, etc., and the videos are cut into pictures at a certain frame interval to construct an image sample set.

[0116] The image sample set should fully consider various factors that may be faced at the construction site, such as light effects, weather changes, target background interference, target distance, occlusion, whether a helmet is worn, target posture, etc. These factors have an impact on the detection accuracy. In order to ensure scene diversity, image samples in various scenes should be collected. Collect enough data and divide it into training set and test set according to the proportion, which are used for model training and accuracy evaluation respectively.

[0117] In step S62, people in some sample images in the image sample set are annotated to obtain a first annotation file.

[0118] For example, use the image annotation tool LabelImg to label the person target in the image.

[0119] In step S63, the third model is trained using the portion of sample images and the first annotation file.

[0120] For example, after a certain number of labeled samples are obtained, a basic person detection model is trained, which can also be the second model.

[0121] In step S64, based on the third model, a second annotation file of other sample images in the image sample set except the part of sample images is generated.

[0122] For example, a semi-automatic labeling tool is designed based on the basic personnel detection model trained. That is, the labeling file is automatically generated using the model, and then the model inference result is converted into an XML-formatted labeling file, which is directly opened in LabelImg. The automatic labeling result is manually reviewed and corrected to obtain the final labeling result, which can greatly improve work efficiency.

[0123] In some embodiments, a data enhancement method is used to perform data enhancement on the image sample set.

[0124] For example, data enhancement methods such as cropping, flipping, adding noise, and affine transformation (translation, scaling, and rotation) can be used to expand the sample set to improve the robustness of the algorithm. Data enhancement methods such as image brightness adjustment and simulating the influence of fog can also be used to expand the data set of personnel detection under the influence of dark light, bright light, and fog.

[0125] In step S65, the image sample set and the corresponding annotation files are classified into types.

[0126] In some embodiments, the set of image samples is divided into a first type of sample images and a second type of sample images.

[0127] For example, the sample set is divided into two data sets: normal light and weather conditions and special light and weather conditions, and then divided into training set and test set, which are used for building and testing two models respectively.

[0128] In the above embodiment, when the number of labeled samples reaches a certain level, the training personnel detect the basic model, and infer the unlabeled images, save the inference result txt file, and convert it into LabelImg xml data set format, and manually review the automatic labeling results. Through the semi-automatic labeling tool, the efficiency of target detection sample labeling can be improved and the burden of manual labeling can be reduced. In addition, the present disclosure directly detects the original image, the processing flow is simpler, and the scene adaptability is stronger.

[0129] Figure 7 1 is a flowchart of some other embodiments of the method for detecting personnel in a construction area disclosed in the present invention, and the embodiment includes steps S71-S74.

[0130] In step S71, a set of image samples is constructed and annotated.

[0131] This step improves the efficiency of target detection sample labeling by designing a semi-automatic labeling tool.

[0132] In step S72, the image sample set is divided into over-bright images, over-dark images, foggy images and normal images.

[0133] The image sample set is judged according to certain rules on image brightness, whether it is affected by fog, etc., and the corresponding model is enabled for target detection based on the operating environment.

[0134] In step S73, model training and accuracy evaluation are performed.

[0135] Based on actual working conditions, two appropriate deep learning target detection algorithm models are selected to train the general case model and the special case model respectively. The model accuracy is evaluated using their respective test data sets, and the models are iteratively optimized according to the test questions. The selection of the algorithm model should comprehensively evaluate the model accuracy and reasoning cost, such as storage space occupancy, computing time, etc.

[0136] In step S74, the software is integrated and applied.

[0137] In some embodiments, the trained model is integrated into the software for deployment. Initialize the person target detection node, subscribe to the camera image topic, convert the image data into the OpenCV image format, and perform preprocessing such as resizing, channel conversion, and normalization on the image. Load two algorithm model files, the general case model and the special case model.

[0138] The designed rules are used to judge the image working environment conditions, that is, the image brightness and whether there is fog. The corresponding model is enabled to infer the input image, and the inference result is post-processed by non-maximum suppression to remove repeated and overlapping bounding boxes, and the category scores are thresholded to filter out weak predictions to obtain the target detection result.

[0139] The software is deployed on the industrial computer and applied to the real-time monitoring of personnel targets in the excavator construction area to ensure construction safety. The target detection results are published, and the distance to the personnel is estimated based on the size of the detection frame. When a person appears within the working radius of the excavator, the alarm mechanism is activated.

[0140] In the above embodiment, a multi-model fusion target detection framework is designed for the actual working conditions of the construction site of engineering machinery. By collecting the personnel data set of the actual working scene, a special situation detection model is designed for images with low recognition accuracy such as too dark, too bright, fog, etc., and the dual model is used for targeted detection, which can meet the construction needs under different working environments. The algorithm is universal and robust, and can ensure the safety of construction site operations. In addition, according to the working environment conditions, the corresponding model is enabled for detection, avoiding the redundant design of multiple models, and can effectively improve the accuracy without increasing the image reasoning cost, ensuring real-time detection.

[0141] Figure 8 Schematic diagram of the structure of some embodiments of the construction area personnel detection device disclosed in the present invention, which includes an image acquisition module 810, a type recognition module 820 and a personnel recognition module 830.

[0142] The image acquisition module 810 is configured to acquire a target image of the construction area.

[0143] In some embodiments, the image acquisition module 810 is configured to acquire sample images of the construction area.

[0144] The image acquisition module 810 is also configured to construct an image sample set of the construction area; annotate the personnel in some sample images in the image sample set to obtain a first annotation file; train a third model using the some sample images and the first annotation file; generate a second annotation file for other sample images in the image sample set except the some sample images based on the third model; and divide the image sample set into a first type of sample images and a second type of sample images.

[0145] In some embodiments, the image acquisition module 810 is further configured to perform data enhancement on the image sample set using a data enhancement method.

[0146] The type identification module 820 is configured to identify the type of the target image based on the brightness information and the average gradient information of the target image.

[0147] In some embodiments, the type identification module 820 is further configured to identify the type of the sample image based on brightness information and average gradient information of the sample image.

[0148] The type includes a first type and a second type. The first type is, for example, an overly bright image type, an overly dark image type, a foggy image type, etc. The second type includes a normal type, that is, the image brightness is normal and there is no fog.

[0149] In some embodiments, when the brightness coefficient is greater than 1, the target image is identified as a target image of the first type; when the brightness coefficient is less than or equal to 1 and the average gradient information is less than or equal to the gradient threshold, the target image is identified as a target image of the first type; when the brightness coefficient is less than or equal to 1 and the average gradient information is greater than the gradient threshold, the target image is identified as a target image of the second type.

[0150] In some embodiments, the brightness coefficient is determined based on the degree of deviation of the image brightness value and the average deviation of all pixels of the target image from the mean, and the average deviation is determined based on the degree of deviation of the image brightness value.

[0151] The personnel identification module 830 is configured to, when the target image is a target image of the first type, identify the person in the target image using a first model, the first model being trained based on a sample image of the first type; and, when the target image is a target image of the second type, identify the person in the target image using a second model, the second model being trained based on a sample image of the second type.

[0152] In the above embodiment, based on the brightness information and average gradient information of the target image, it is identified whether the target image is an image of the first type or an image of the second type. Thus, different models are used for different types of images to identify personnel. Compared with using one model to identify personnel in images of the construction area, the recognition accuracy is higher. In addition, since this embodiment takes into account the image brightness and average gradient, that is, the light and weather conditions at the construction site, it also solves the problem of low accuracy in personnel target detection under the influence of light and weather conditions in related technologies, and meets the construction needs under different working environments.

[0153] In other embodiments of the present disclosure, Fig. 9 As shown, the construction area personnel detection device also includes a distance recognition module 910 and an early warning module 920.

[0154] The distance identification module 910 is configured to identify the distance between a person and the construction equipment.

[0155] For example, the distance is identified based on the size of the detection box containing the person output by the first model or the second model.

[0156] The early warning module 920 is configured to activate an alarm mechanism when the distance is less than a threshold.

[0157] In this embodiment, dual models are used to perform targeted detection on images of different working environments to identify the distance between personnel and construction equipment, so that the alarm mechanism can be activated in a timely manner. This is of great significance in an unmanned construction environment and can effectively improve construction safety.

[0158] In other embodiments of the present disclosure, Fig.10 As shown, the construction area personnel detection device also includes a model training module 1010.

[0159] The model training module 1010 is configured to reduce the resolution of the sample image of the first type; use a small convolutional neural network to process the sample image of the first type with the reduced resolution to obtain hyperparameters suitable for the differentiable image processing module; use the sample image of the first type to train the differentiable image processing module, wherein during the training process, the loss function of the differentiable image processing module satisfies the convergence condition, and the trained first model is obtained.

[0160] The model training module 1010 is also configured to set the training parameters of the second model and load the second type of sample images; initialize the network structure of the second model; and train the second model using the second type of sample images, wherein, during the training process, if the loss function of the second model satisfies the convergence condition, a trained second model is obtained.

[0161] In this embodiment, a target detection framework combining two models is adopted, wherein one model is for detection under normal conditions, and the other model is for detection under bright light, dark light, fog, etc. Compared with simply training samples in all conditions through one model, the model false detection rate is reduced.

[0162] Fig.11 Schematic diagram of the structure of some other embodiments of the construction area personnel detection device disclosed in the present invention. The construction area personnel detection device 1100 includes a memory 1110 and a processor 1120. Among them: the memory 1110 can be a disk, a flash memory or any other non-volatile storage medium. The memory is used to store the instructions in the above embodiments. The processor 1120 is coupled to the memory 1110 and can be implemented as one or more integrated circuits, such as a microprocessor or a microcontroller. The processor 1120 is used to execute the instructions stored in the memory.

[0163] In some embodiments, the processor 1120 is coupled to the memory 1110 via a BUS 1130. The construction area personnel detection device 1100 can also be connected to an external storage device 1150 via a storage interface 1140 to call external data, and can also be connected to a network or another computer system (not shown) via a network interface 1160. No further detailed description will be given here.

[0164] In this embodiment, the memory stores data instructions, and the processor processes the instructions, which effectively improves the adaptability to the scene, and improves the detection accuracy while ensuring real-time performance. At the same time, the solution can be extended to other types of target detection conditions through appropriate adjustments, and has wider universality.

[0165] In other embodiments, a computer-readable storage medium stores computer program instructions, which implement the steps of the methods in the above-mentioned embodiments when executed by a processor. It should be understood by those skilled in the art that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0166] In some embodiments, a computer program product is protected, including a computer program or an instruction, which implements the above method when the computer program or instruction is executed by a processor. The computer program product includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication system, or installed from a storage device, or installed from a ROM. When the computer program is executed by the CPU, the above functions defined in the method of the embodiment of the present disclosure are executed.

[0167] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0168] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0170] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0171] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0172] Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A method for detecting personnel in a construction area, comprising: Acquire target images of the construction area; Based on the brightness information and average gradient information of the target image, identifying the type of the target image; In a case where the target image is a target image of the first type, identifying a person in the target image using a first model, wherein the first model is trained based on sample images of the first type; as well as In the case that the target image is a target image of the second type, a second model is used to identify a person in the target image, where the second model is trained based on sample images of the second type.

2. The method for detecting personnel in a construction area according to claim 1, further comprising: identifying the distance between the personnel and the construction equipment; as well as When the distance is less than a threshold, an alarm mechanism is activated.

3. The method for detecting personnel in a construction area according to claim 1, wherein: The brightness information includes a brightness coefficient, and the identifying the type of the target image based on the brightness information and the average gradient information of the target image includes: When the brightness coefficient is greater than 1, identifying the target image as a target image of the first type; When the brightness coefficient is less than or equal to 1 and the average gradient information is less than or equal to a gradient threshold, identifying the target image as a target image of the first type; and When the brightness coefficient is less than or equal to 1 and the average gradient information is greater than the gradient threshold, the target image is identified as the second type of target image.

4. The method for detecting personnel in a construction area according to claim 3, wherein: The brightness coefficient is determined based on the degree of deviation of the image brightness value and the average deviation of all pixels of the target image from the mean, and the average deviation is determined based on the degree of deviation of the image brightness value.

5. The method for detecting personnel in a construction area according to claim 2, wherein: The identifying the distance between the person and the construction equipment comprises: The distance is identified according to the size of the detection box including the person output by the first model or the second model.

6. The method for detecting personnel in a construction area according to any one of claims 1 to 5, wherein: The first model is trained based on the sample images of the first type and includes: reducing the resolution of the sample images of the first type; Using a small convolutional neural network, processing the sample images of the first type with reduced resolution to obtain hyperparameters suitable for a differentiable image processing module; and The differentiable image processing module is trained using the sample images of the first type, wherein during the training process, if the loss function of the differentiable image processing module satisfies a convergence condition, the trained first model is obtained.

7. The method for detecting personnel in a construction area according to any one of claims 1 to 5, wherein: The second model is trained based on the second type of sample images and includes: Setting training parameters of the second model and loading sample images of the second type; Initializing the network structure of the second model; and The second model is trained using the sample images of the second type, wherein during the training process, if the loss function of the second model satisfies a convergence condition, then a trained second model is obtained.

8. The method for detecting personnel in a construction area according to any one of claims 1 to 5, further comprising: Construct a sample set of images of the construction area; Annotating persons in some sample images in the image sample set to obtain a first annotation file; Using the partial sample images and the first annotation file, training a third model; Based on the third model, generating a second annotation file of other sample images in the image sample set except the part of sample images; as well as The image sample set is divided into sample images of the first type and sample images of the second type.

9. The method for detecting personnel in a construction area according to claim 8, further comprising: The data enhancement method is used to perform data enhancement on the image sample set.

10. A construction area personnel detection device, comprising: An image acquisition module is configured to acquire a target image of a construction area; A type identification module, configured to identify the type of the target image based on brightness information and average gradient information of the target image; as well as a person recognition module, configured to, when the target image is a target image of the first type, recognize a person in the target image using a first model, wherein the first model is trained based on sample images of the first type; In the case that the target image is a target image of the second type, a second model is used to identify a person in the target image, where the second model is trained based on sample images of the second type.

11. A construction area personnel detection device, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the construction area personnel detection method according to any one of claims 1 to 9 based on instructions stored in the memory.

12. A computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method for detecting personnel in a construction area as claimed in any one of claims 1 to 9.

13. A computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the method for detecting personnel in a construction area according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Construction safety detection method and system based on tiny-YOLOv3

    CN110807429A

  • Hydrogen-sensitive adhesive tape color change detection method based on improved image adaptive YOLO

    CN114612470A

  • Grab ship unloader collision early warning system based on target detection and image processing

    CN116259030A

  • Detecting device, detection method, and computer program product

    US20150042805A1

  • Personnel detection method and apparatus, device, and storage medium

    WO2024012607A2

Cited By

  • Automatic labeling method and system for standardization of low-voltage distribution safety operation

    CN119516457A

  • A method and system for automatically labeling low-voltage power distribution safety operation specifications

    CN119516457B

  • Safety helmet wearing identification method and device

    CN120932181A