Reflective clothing identification method, device, computer equipment and readable storage medium

By combining the pedestrian detection model and reflective clothing classification model, the accuracy of reflective clothing recognition in the construction site environment is improved, and the problem of high error detection rate in the existing technology is solved, ensuring the safety of construction personnel.

CN112347989BActive Publication Date: 2024-12-24GLODON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011376363.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2024-12-24
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

The prior art has a high error detection rate when identifying reflective clothing on construction sites, resulting in insufficient identification accuracy and it is difficult to accurately determine whether construction personnel wear reflective clothing.

Method used

The combination of pedestrian detection model and reflective clothing classification model is adopted to improve the accuracy of identification by obtaining character images, detecting pedestrian areas and performing three-classification, including wearing, unwrapped and not including pedestrians.

Benefits of technology

It effectively reduces the false detection rate, improves the accuracy of the recognition of reflective clothing, and ensures that it can accurately determine whether construction workers wear reflective clothing in the construction site environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112347989B_ABST
    Figure CN112347989B_ABST
Patent Text Reader

Abstract

The present application provides a reflective clothing recognition method, device, computer equipment and readable storage medium. The method comprises: obtaining a person image; determining a pedestrian region image in the person image through a pedestrian detection model; and determining the classification of the pedestrian region image through a reflective clothing classification model, wherein the classification comprises a first category representing that the pedestrian has worn a reflective clothing, a second category representing that the pedestrian does not wear a reflective clothing, and a third category representing that the pedestrian region image does not contain a pedestrian image. The present invention can improve the accuracy of reflective clothing recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of pattern recognition technology, and in particular to a reflective clothing recognition method, device, computer equipment, and readable storage medium. Background Art

[0002] With the development of the construction industry, construction equipment on construction sites has become increasingly large-scale, and construction scenes have become more complex, which in turn has led to an increase in potential construction risks. Therefore, the safety of construction workers on construction sites has become particularly important. Reflective vests, due to their high reflectivity, serve as a warning and can protect construction workers during daytime and nighttime construction. Therefore, it is necessary to automatically identify whether construction workers are wearing reflective vests and promptly issue an alarm if any workers are not wearing reflective vests.

[0003] Existing techniques for identifying reflective clothing first capture an image of a construction site and then determine whether workers in the image are wearing reflective clothing. The inventors discovered that construction sites present certain unique characteristics compared to conventional image recognition. Construction sites are large and complex, and existing reflective clothing recognition methods can easily misidentify non-pedestrians as workers, resulting in a high false positive rate and poor recognition accuracy.

[0004] Therefore, how to improve the accuracy of reflective clothing recognition has become a technical problem that needs to be solved urgently in this field. Summary of the Invention

[0005] The purpose of this application is to provide a reflective clothing identification method, device, computer equipment and readable storage medium to solve the above-mentioned technical problems in the prior art.

[0006] On the one hand, to achieve the above-mentioned purpose, the present application provides a method for identifying reflective clothing.

[0007] The reflective clothing recognition method includes: acquiring a person image; determining a pedestrian region image in the person image using a pedestrian detection model; and determining a classification of the pedestrian region image using a reflective clothing classification model, wherein the classification includes a first category indicating that the pedestrian is wearing reflective clothing, a second category indicating that the pedestrian is not wearing reflective clothing, and a third category indicating that the pedestrian region image does not contain a pedestrian image.

[0008] Furthermore, before determining the classification of the pedestrian area image through the reflective clothing classification model, the method also includes: obtaining a training person image; determining a training pedestrian area image in the training person image through the pedestrian detection model; and training an initial reflective clothing classification model through the training pedestrian area image to obtain the reflective clothing classification model.

[0009] Furthermore, determining the pedestrian area image in the character image through the pedestrian detection model includes: determining the number of segments of the character image; segmenting the character image according to the number of segments to obtain at least two sub-character images after segmentation; enlarging the sub-character image to a preset size; and determining the pedestrian area image in the enlarged sub-character image through the pedestrian detection model.

[0010] Furthermore, the step of determining the number of segments of the character image includes: determining the minimum pedestrian size corresponding to the character image; and determining the number of segments based on the minimum pedestrian size, wherein the smaller the minimum pedestrian size, the larger the number of segments.

[0011] Furthermore, the step of determining the number of segments of the person image includes: obtaining currently available recognition resources and recognition speed requirements; and determining the number of segments according to the recognition resources and the recognition speed requirements.

[0012] Furthermore, the step of dividing the character image according to the number of divisions to obtain at least two sub-character images includes: determining the maximum pedestrian size corresponding to the character image; determining the division intersection size according to the maximum pedestrian size; dividing the character image according to the number of divisions and the division intersection size to obtain at least two sub-character images after division, wherein the intersection of adjacent sub-character images is greater than or equal to the division intersection size.

[0013] Furthermore, before the steps of determining the pedestrian area image in the person image through the pedestrian detection model and determining the classification of the pedestrian area image through the reflective clothing classification model, the method also includes: determining the scene type to which the person image belongs; constructing an initial pedestrian detection model and an initial reflective clothing classification model; obtaining person images under the scene type as a training set; and training the initial pedestrian detection model and the initial reflective clothing classification model through the training set to obtain the pedestrian detection model and reflective clothing classification model corresponding to the scene type.

[0014] On the other hand, to achieve the above-mentioned purpose, the present application provides a reflective clothing identification device.

[0015] The reflective clothing recognition device includes: an acquisition module for acquiring a person image; a detection module for determining a pedestrian area image in the person image using a pedestrian detection model; and a classification module for determining the classification of the pedestrian area image using a reflective clothing classification model, wherein the classification includes a first category indicating that the pedestrian is wearing reflective clothing, a second category indicating that the pedestrian is not wearing reflective clothing, and a third category indicating that the pedestrian area image does not contain a pedestrian image.

[0016] On the other hand, to achieve the above objectives, the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0017] On the other hand, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned method when executed by a processor.

[0018] The reflective clothing recognition method, device, computer device, and readable storage medium provided by this application first obtain a person image, then determine a pedestrian area image in the person image using a pedestrian detection model; finally, determine the classification of the pedestrian area image using a reflective clothing classification model, which includes a first category indicating that the pedestrian is wearing reflective clothing, a second category indicating that the pedestrian is not wearing reflective clothing, and a third category indicating that the pedestrian area image does not include a pedestrian. Ultimately, it is determined whether the pedestrian in the person image is wearing reflective clothing, thereby achieving reflective clothing recognition. Through the present invention, pedestrians in the person image are detected using the pedestrian detection model to obtain a pedestrian area image, and the pedestrian area image is classified using a reflective clothing classification model based on three categories. The two aspects are combined to detect pedestrians using the pedestrian detection model, so that the reflective clothing classification model can classify based on the pedestrian area image, improving the classification accuracy of the reflective clothing classification model. The pedestrian detection model combined with the reflective clothing classification model based on the three categories can suppress the false detection rate of the pedestrian detection model, thereby effectively improving the overall recognition accuracy of the reflective clothing recognition method. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0020] Figure 1 This is a flow chart of the reflective clothing identification method provided in Example 1 of the present application;

[0021] Figure 2 A schematic diagram of character image segmentation provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of determining the number of cuts provided in an embodiment of the present application;

[0023] Figure 4 This is a block diagram of a reflective clothing recognition device provided in Example 2 of the present application;

[0024] Figure 5This is a hardware structure diagram of the computer device provided in Example 3 of this application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of this application more clear, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0026] The inventors have studied the reflective clothing recognition methods in the related art and found that in the reflective clothing recognition methods in the related art, non-pedestrians, such as construction equipment, are often identified as staff, and it is determined that the "staff" is not wearing reflective clothing and an alarm is issued. The false detection rate is high and the recognition accuracy needs to be improved.

[0027] In order to improve the accuracy of the reflective clothing recognition method, the present application proposes a reflective clothing recognition method, apparatus, computer equipment and readable storage medium. In the reflective clothing recognition method proposed in the present application, a pedestrian detection model and a reflective clothing classification model are preset. Among them, the pedestrian detection model is used to detect pedestrian area images from the person image, and the reflective clothing classification model is used to classify the pedestrian area image, that is, to determine whether the pedestrian area image belongs to the category of pedestrian wearing reflective clothing, not wearing reflective clothing, or not including pedestrians. Specifically, when a person image is received and it is necessary to identify whether a pedestrian in the person image is wearing a reflective vest, a trained pedestrian detection model and a reflective vest classification model are obtained; then, the pedestrian area image in the person image is determined through the pedestrian detection model. Specifically, the input of the pedestrian detection model can be determined based on the person image and input into the pedestrian detection model to obtain the output of the pedestrian detection model, and then the pedestrian area image in the person image is determined based on the output of the pedestrian detection model; finally, the classification of the pedestrian area image is determined through the reflective vest classification model. Specifically, the input of the reflective vest classification model can be determined based on the pedestrian area image and input into the reflective vest classification model to obtain the output of the reflective vest classification model, and then the classification of the pedestrian area image is determined based on the output of the reflective vest classification model. The classification includes a first category representing that the pedestrian is wearing a reflective vest, a second category representing that the pedestrian is not wearing a reflective vest, and a third category representing that the pedestrian area image does not include a pedestrian, that is, it is determined that the pedestrian area image corresponds to the first category, the second category, or the third category.

[0028] It can be seen from this that the reflective clothing recognition method provided in this application realizes reflective clothing recognition through the pedestrian detection model and the reflective clothing classification model to determine whether the pedestrian in the character image is wearing reflective clothing. It does not simply superimpose the pedestrian detection model and the reflective clothing classification model to recognize reflective clothing, but effectively combines the pedestrian detection model and the reflective clothing classification model to achieve the purpose of improving the recognition accuracy. Among them, the pedestrian area image detected by the pedestrian detection model has image features that can effectively reflect whether the pedestrian is wearing reflective clothing and reduce the interference of other area image content on the reflective clothing classification model, thereby facilitating the reflective clothing classification model to classify whether the pedestrian is wearing reflective clothing through the pedestrian area image, thereby improving the classification accuracy of the reflective clothing classification model. At the same time, the output of the reflective clothing classification model can reflect three classifications of the pedestrian area image. In addition to determining the two categories of whether the pedestrian is wearing reflective clothing, it can also determine the category where the pedestrian area image does not include pedestrians. That is, when the pedestrian detection model mistakenly detects a pedestrian and detects a non-pedestrian as a pedestrian area image, the reflective clothing classification model can identify this category, thereby suppressing the impact of the pedestrian detection model's mistaken detection on the accuracy of the reflective clothing recognition method. By combining the two technical features of the pedestrian detection model detecting the pedestrian area image and the reflective clothing classification model classifying the pedestrian area image, the technical effects are complementary, thereby effectively improving the recognition accuracy of the reflective clothing recognition method.

[0029] Specific embodiments of the reflective clothing identification method, device, computer equipment, and readable storage medium provided in this application will be described in detail below.

[0030] Example 1

[0031] The embodiment of the present application provides a reflective clothing recognition method, through which the presence of pedestrians wearing reflective clothing in images of people captured by monitoring devices such as cameras is recognized. This method can improve the accuracy of reflective clothing recognition and promptly issue an alarm when a pedestrian is identified as not wearing reflective clothing, thereby improving the accuracy of the alarm. Specifically, Figure 1 This is a flow chart of the reflective clothing identification method provided in Example 1 of this application, as shown in FIG. Figure 1 As shown, the reflective clothing recognition method provided in this embodiment includes the following steps S101 to S103.

[0032] Step S101: Acquire a person image.

[0033] Specifically, the person image can be obtained by reading person image data from a database of person images to be identified, or by receiving monitoring image data output by an upstream monitoring system. Alternatively, a client can be provided to receive person images input by a user. A person image can include one, two, or multiple pedestrians.

[0034] After acquiring person images, they can be filtered and preprocessed. For example, filtering out images with substandard resolution, duplicate images, or problematic images due to equipment failure can be performed to avoid wasting recognition resources. Preprocessing can include cropping and resizing the images to ensure uniformity. For example, for some images captured from a fixed location, some edges of the image are unlikely to be pedestrians, so these edges can be cropped to reduce data processing. Images captured by different devices can be resized to the same size for processing, reducing the complexity of the subsequent recognition model. For example, camera surveillance video can be collected from a specific construction site, with frames captured at predetermined intervals and cleaned, including discarding blurry or poorly captured images.

[0035] Step S102: Determine a pedestrian region image in the person image using a pedestrian detection model.

[0036] Step S103: Determine the classification of the pedestrian area image using the reflective clothing classification model.

[0037] The classification includes a first category representing pedestrians wearing reflective clothing, a second category representing pedestrians not wearing reflective clothing, and a third category representing pedestrian area images that do not contain pedestrian images.

[0038] Among them, in this reflective clothing recognition method, the models used include a pedestrian detection model and a reflective clothing classification model. The pedestrian detection model and the reflective clothing classification model can be constructed based on the artificial intelligence algorithms in the existing technology. For example, the pedestrian detection model is constructed using a target detection network, such as the EfficientDet series network, SSD network and YOLO network. Among them, the EfficientDet series network can flexibly select the network structure size according to hardware resources. The larger the network structure, the better its performance. Therefore, the appropriate network structure size can be selected according to the equipment situation. For another example, a pedestrian reflective clothing classification model is constructed using a classification network, such as Mobilenet, Resnet and Efficientnet. This application does not limit the specific network algorithms used in the pedestrian detection model and the reflective clothing classification model, and any feasible algorithm model in the existing technology can be used for implementation. Regarding the detailed theories and formulas for the algorithm implementation, please refer to the relevant content in the existing technology, and this application will not elaborate on this.

[0039] Specifically, an initial pedestrian detection model and an initial reflective clothing classification model are pre-built, and then a training data set is obtained to train and optimize the initial pedestrian detection model and the initial reflective clothing classification model. The trained models, i.e., the pedestrian detection model and the reflective clothing classification model, are stored. Thus, in step S102, the pedestrian detection model is obtained from the corresponding storage location, and in step S103, the reflective clothing classification model is obtained from the corresponding storage location.

[0040] A reflective clothing recognition system implementing this reflective clothing recognition method can execute the steps of acquiring a pedestrian detection model and a reflective clothing classification model upon system startup. This allows the system to quickly invoke the pedestrian detection model and reflective clothing classification model for recognition after acquiring a person image, thereby improving recognition speed. Alternatively, different pedestrian detection models and reflective clothing classification models can be set based on different dimensional features of the person image, such as the scene to which the person image belongs, the person image size, and the person image resolution. Then, when executing steps S102 and S103 after acquiring a person image, the corresponding pedestrian detection model and reflective clothing classification model can be acquired based on the acquired person image, thereby improving recognition accuracy.

[0041] Specifically, in the above step S102, the input of the pedestrian detection model is determined based on the person image and input into the pedestrian detection model, and the output of the pedestrian detection model can be obtained, and then the pedestrian area image in the person image is determined based on the output of the pedestrian detection model. Among them, when determining the input of the pedestrian detection model based on the person image, according to the structure of the pedestrian detection model, the person image can be directly used as the input of the pedestrian detection model, or the eigenvalues ​​of the person image can be extracted to form a eigenvector as the input of the pedestrian detection model. Regardless of which method is used, the input of the pedestrian detection model is determined based on the person image and input into the pedestrian detection model, and then the output of the pedestrian detection model can be obtained. The output can be pixel data forming the pedestrian area image, and / or position data representing the position of the pedestrian area image in the person image. In short, the pedestrian area image in the person image can be determined based on the output of the pedestrian detection model. In this application, the pedestrian area image determined here is defined as the pedestrian area image.

[0042] In step S103, the classification includes a first category indicating that a pedestrian is wearing reflective clothing, a second category indicating that a pedestrian is not wearing reflective clothing, and a third category indicating that the pedestrian area image does not include a pedestrian. The input of the reflective clothing classification model can be determined based on the pedestrian area image and input into the reflective clothing classification model. The output of the reflective clothing classification model can then be used to determine the classification of the pedestrian area image. When determining the input of the reflective clothing classification model based on the pedestrian area image, depending on the structure of the reflective clothing classification model, the pedestrian area image can be directly used as the input of the reflective clothing classification model, or feature vectors can be extracted from the feature values ​​of the pedestrian area image to form the feature vectors that serve as the input of the reflective clothing classification model. Regardless of the method, the input of the reflective clothing classification model is determined based on the pedestrian area image and input into the reflective clothing classification model. The output of the reflective clothing classification model can then be obtained.

[0043] The output of the reflective clothing classification model can be probability data. For example, the reflective clothing classification model outputs a first probability and a second probability, wherein the magnitude of the first probability is used to characterize whether the pedestrian area image includes a pedestrian. When the first probability reaches a first threshold, it characterizes that the pedestrian area image includes a pedestrian. When the first probability does not reach the first threshold, it characterizes that the pedestrian area image does not include a pedestrian. The magnitude of the second probability is used to characterize whether the pedestrian in the pedestrian area image is wearing a reflective vest. When the second probability reaches a second threshold, it characterizes that the pedestrian is wearing a reflective vest. When the second probability does not reach the second threshold, it characterizes that the pedestrian is not wearing a reflective vest. Therefore, in step S103, the category corresponding to the pedestrian area image can be determined based on the relationship between the first probability and the first threshold and the relationship between the second probability and the second threshold, specifically which of the first category, the second category, or the third category it belongs to.

[0044] The output of the reflective clothing classification model can also be category data. For example, the output vector of the reflective clothing classification model is a two-dimensional vector. When the two-dimensional vector is 11, it indicates that the pedestrian in the pedestrian area image is wearing reflective clothing; when the two-dimensional vector is 00, it indicates that the pedestrian in the pedestrian area image is not wearing reflective clothing; when the two-dimensional vector is 01 or 10, it indicates that the pedestrian area image does not include pedestrians. Therefore, in step S103, the category corresponding to the pedestrian area image can be determined according to the specific value of the two-dimensional vector, specifically which of the first category, the second category or the third category it belongs to.

[0045] Alternatively, the output of the reflective clothing classification model may also be other data types, which is not limited in this application.

[0046] In the reflective clothing recognition method provided in this embodiment, a person image is first acquired. Then, a pedestrian detection model is used to determine a pedestrian region image within the person image. Finally, a reflective clothing classification model is used to determine the classification of the pedestrian region image. The classification includes a first category indicating that the pedestrian is wearing reflective clothing, a second category indicating that the pedestrian is not wearing reflective clothing, and a third category indicating that the pedestrian region image does not include a pedestrian. Ultimately, it is determined whether the pedestrian in the person image is wearing reflective clothing, thereby achieving reflective clothing recognition. The reflective clothing recognition method provided in this embodiment includes detecting pedestrians in the person image using the pedestrian detection model to obtain a pedestrian region image. The reflective clothing classification model based on the three-category classification method classifies the pedestrian region image. These two aspects are combined to detect pedestrians using the pedestrian detection model, enabling the reflective clothing classification model to classify based on the pedestrian region image, thereby improving the classification accuracy of the reflective clothing classification model. The pedestrian detection model, combined with the reflective clothing classification model based on the three-category classification model, can reduce the false detection rate of the pedestrian detection model, thereby effectively improving the overall recognition accuracy of the reflective clothing recognition method.

[0047] Optionally, in one embodiment, before determining the pedestrian area image in the person image through the pedestrian detection model and determining the classification of the pedestrian area image through the reflective clothing classification model, the initial pedestrian detection model and the initial reflective clothing classification model can be trained respectively to obtain the pedestrian detection model and the reflective clothing classification model.

[0048] Specifically, for the pedestrian detection model, a first training dataset is obtained to construct a first training sample. The first training sample includes a person image and a pedestrian region image within the person image. An input vector for inputting into the initial pedestrian detection model is constructed based on the person image, and an output vector of the initial pedestrian detection model is constructed based on the pedestrian region image. The initial pedestrian detection model is then trained. For example, the first training data may include a surveillance video captured by a monitoring device. Multiple frames of images are captured from the surveillance video as person images. Pedestrians are labeled using the object detection and annotation tool LabelImg to obtain a pedestrian region image within the person image, i.e., the first training sample.

[0049] For the reflective clothing classification model, a second training dataset is obtained to construct a second training sample. The second training sample includes a pedestrian region image and the category corresponding to the pedestrian region image. An input vector for inputting into the initial reflective clothing classification model is constructed based on the pedestrian region image, and an output vector for the initial reflective clothing classification model is constructed based on the category corresponding to the pedestrian region image. The initial reflective clothing classification model is then trained. For example, the first training sample is used as the second training dataset, and the pedestrian region images therein are divided into two categories based on whether or not reflective clothing is worn, namely the first category and the second category. A randomly sized area is also cut out of a random location in the person image that does not include pedestrians, and is also used as a pedestrian region image, corresponding to the third category. Thus, pedestrian region images of three categories are obtained, namely the second training sample. By jointly constructing the first and second training samples, the training effect is improved, and the accuracy of the trained pedestrian detection model and reflective clothing classification model is improved.

[0050] Optionally, in one embodiment, before determining the classification of the pedestrian area image through the reflective clothing classification model, the reflective clothing recognition method further includes: obtaining a training person image; determining a training pedestrian area image in the training person image through the pedestrian detection model, wherein when the training pedestrian area image determined by the pedestrian detection model does not include a pedestrian, the category corresponding to the training pedestrian area image is the third category; and training the initial reflective clothing classification model through the training pedestrian area image to obtain a reflective clothing classification model.

[0051] Specifically, when determining the training pedestrian area image in the training person image through the pedestrian detection model, the input of the pedestrian detection model is determined according to the training person image, which is input into the pedestrian detection model to obtain the output of the pedestrian detection model, and the pedestrian area image in the training person image is determined according to the output of the pedestrian detection model to obtain the training pedestrian area image. When the initial reflective clothing classification model is trained through the training pedestrian area image to obtain the reflective clothing classification model, the training category corresponding to the training pedestrian area image is determined according to whether there are pedestrians in the training pedestrian area image and whether the pedestrians are wearing reflective clothing. For example, the training category corresponding to the training pedestrian area image can be determined by manual calibration, or the detection results of the pedestrian detection model can be visualized to analyze the false detection situation. For some objects similar to the human body, they are easily mistakenly detected as pedestrians, so that the detected training pedestrian area image does not actually include pedestrians. Therefore, when the training pedestrian area image contains pedestrians, the training category corresponding to the training pedestrian area image can be determined according to whether there are pedestrians in the training pedestrian area image and whether the pedestrians are wearing reflective clothing. For example, the training category corresponding to the training pedestrian area image can be determined by manual calibration, or the detection results of the pedestrian detection model can be visualized to analyze the false detection situation. For some objects similar to the human body, they are easily mistakenly detected as pedestrians, so that the detected training pedestrian area image does not actually include pedestrians. Therefore, when the training pedestrian area image contains pedestrians, the training category corresponding to the training pedestrian area image can be determined according to the training pedestrian area image. When there are pedestrians wearing reflective vests, the training category corresponding to the training pedestrian area image is the first category. When there are pedestrians in the training pedestrian area image and they are not wearing reflective vests, the training category corresponding to the training pedestrian area image is the second category. When there are no pedestrians in the training pedestrian area image, the training category corresponding to the training pedestrian area image is the third category. Then, based on the person images and the training pedestrian area images from the same source, the input of the initial reflective vest classification model is determined, and the output of the initial reflective vest classification model is determined according to the training category. The initial reflective vest classification model is trained to obtain a reflective vest classification model.

[0052] By adopting the reflective clothing recognition method provided in this embodiment, when training the reflective clothing classification model, the pedestrian area image output by the pedestrian detection model is used for training, which can improve the ability to suppress the false detection rate of the pedestrian detection model.

[0053] Optionally, in one embodiment, determining a pedestrian area image in a person image through a pedestrian detection model includes: determining the number of segments of the person image; segmenting the person image according to the number of segments to obtain at least two sub-person images after segmentation; enlarging the sub-person image to a preset size; and determining a pedestrian area image in the enlarged sub-person image through the pedestrian detection model.

[0054] Specifically, in this embodiment, the number of segments to be segmented into a person image is first determined. The person image is then segmented to obtain sub-person images that meet the required number of segments. The segmented sub-person images are then enlarged to a preset size and detected by a pedestrian detection model. When determining the number of segments to be segmented into a person image, the smaller the pedestrian in the person image, the greater the number of segments, and the smaller the resulting sub-person images. This allows the pedestrian's features to be magnified when the sub-person images are enlarged to the preset size. In the step of determining the pedestrian region image in the enlarged sub-person image using the pedestrian detection model, a sub-input vector can be constructed based on the sub-person image. The sub-input vector is input into the pedestrian detection model to obtain a sub-output vector, and the pedestrian region image in the sub-person image is determined based on the sub-output vector. The degree of enlargement of the sub-person image, i.e., the preset size, can be determined based on the network structure of the pedestrian detection model. The stronger the processing capability of the network structure, the larger the preset size. The sub-person images are uniformly enlarged to the standard size for constructing the input vector for the pedestrian detection model, i.e., the preset size, thereby reducing the complexity of the pedestrian detection model.

[0055] When the pedestrian detection model detects pedestrians in a person image, if the pedestrian is too small, it is easy to be missed. The traditional strategy to improve the detection of small targets is to construct an image pyramid and amplify local features to improve the ability to recall small targets, but resource consumption and inference time are doubled. The reflective clothing recognition method provided by this embodiment is used to first segment the person image, and then the pedestrian detection model detects the segmented sub-person image. Image segmentation is equivalent to enlarging the size of the pedestrian in the person image, which can increase the pixels of the small target (i.e., pedestrian), that is, the amplification of the pedestrian features is achieved, the detection accuracy of the pedestrian detection model is increased, the probability of small target pedestrians being missed is reduced, and the accuracy of reflective clothing recognition is further improved.

[0056] Optionally, in one embodiment, when determining the number of segments to be segmented into a person image, a marker may be obtained from the person image. The size of the marker may reflect the size of the person in the person image. Optionally, the person may be used as the marker, and the number of segments to be segmented into the person image may be determined based on the size of the marker. Specifically, a correlation between the size of the marker and the number of segments may be preset. After determining the size of the marker, the number of segments may be determined based on this correlation. The smaller the marker, the larger the number of segments to be segmented into the person image.

[0057] Optionally, in one embodiment, the step of determining the number of segments of the character image includes: determining the minimum pedestrian size corresponding to the character image; and determining the number of segments based on the minimum pedestrian size, wherein the smaller the minimum pedestrian size, the larger the number of segments.

[0058] Specifically, multiple historical images of the device that generates the person image are obtained. For example, historical images of the monitoring device that generates the person image in the construction site scene are obtained. The size of the pedestrians in each historical image is detected to obtain the minimum pedestrian size corresponding to the person image. The number of segments is then determined based on the minimum pedestrian size. The smaller the minimum pedestrian size, the more segments are segmented. This allows the pedestrians in the sub-person image obtained after segmentation to be enlarged to a preset size, and to be enlarged to a degree that enables the pedestrian detection model to accurately detect them.

[0059] Specifically, historical images from surveillance equipment can be pre-acquired as training person images. After determining the initial number of segments based on the minimum pedestrian size, the training person images are segmented using this initial number of segments and enlarged to a preset size. The images are then tested using the pedestrian detection model and the accuracy of the test results is verified. If the accuracy does not meet the required accuracy, the number of segments is adjusted and retested until the accuracy meets the required level. This number of segments is then used as the final number of segments for segmenting the person images. Furthermore, as the number of segments increases, the detection and inference time increases. Therefore, the number of segments and inference time can be balanced based on actual needs.

[0060] By adopting the reflective clothing recognition method provided in this embodiment and determining the number of segments using the minimum pedestrian size corresponding to the human image, the accuracy of pedestrian area image detection can be improved while avoiding an increase in detection time due to too many segments.

[0061] Optionally, in one embodiment, the step of determining the number of segments of the person image includes: obtaining currently available recognition resources and recognition speed requirements; and determining the number of segments according to the recognition resources and recognition speed requirements.

[0062] Specifically, when determining the number of segments to be segmented, in addition to the minimum person size, the currently available recognition resources and recognition speed requirements must also be considered. Given the same minimum person size and recognition speed requirements, the more recognition resources available, the greater the number of segments to be segmented. Given the same minimum person size and recognition resources, the lower the recognition speed requirement, the greater the number of segments to be segmented. A strategy for determining the number of segments can be preset, which determines the number of segments based on the minimum person size, recognition resources, and recognition speed. Thus, in this step, after obtaining the currently available recognition resources and recognition speed requirements, the parameters for the minimum person size, recognition resources, and recognition speed are input into the aforementioned strategy to determine the number of segments.

[0063] When using the reflective clothing recognition method provided in this embodiment, resource conditions and recognition speed requirements are considered when determining the number of segments, so that the number of sub-person images can take into account both the accuracy and operating efficiency of the reflective clothing recognition method.

[0064] Optionally, in one embodiment, the number of segments of the character image changes dynamically, such as Figure 3 As shown, the number of cuts (i.e., the number of cuts) can be dynamically set according to the size of pedestrians to be identified in the actual scenario (i.e., the minimum pedestrian size), resource conditions, and recognition speed requirements. Among them, the cutting direction can be specified, such as horizontal and vertical cutting.

[0065] Optionally, in one embodiment, when the character image is segmented according to the segmentation quantity to obtain at least two sub-character images, adjacent sub-character images after segmentation have an intersection.

[0066] Specifically, if Figure 2 As shown, the number of segments is 2, and the character image is segmented into two parts, P1 and P2, and the two parts P1 and P2 have an intersection P3.

[0067] By adopting the reflective clothing recognition method provided in this embodiment, adjacent sub-person images are made to intersect, which can prevent a pedestrian from being cut off due to being on the cutting line, thereby preventing missed detection, thereby improving the accuracy of reflective clothing recognition.

[0068] Further optionally, the step of segmenting the character image according to the number of segments to obtain at least two sub-character images includes: determining the maximum pedestrian size corresponding to the character image; determining the segmentation intersection size according to the maximum pedestrian size; segmenting the character image according to the number of segments and the segmentation intersection size to obtain at least two sub-character images after segmentation, wherein the intersection of adjacent sub-character images is greater than or equal to the segmentation intersection size.

[0069] Specifically, multiple historical images of a device that is the source of a person image are obtained. For example, historical images of a monitoring device that forms a person image in a construction site scene are obtained. The size of pedestrians in each historical image is detected to obtain the maximum pedestrian size corresponding to the person image. Then, the segmentation intersection size is determined based on the maximum pedestrian size. The larger the maximum pedestrian size, the larger the segmentation intersection, so that no pedestrians are segmented into different sub-person images in the sub-person images obtained after segmentation. Specifically, multiple historical images of a monitoring device can be obtained in advance. After determining the initial segmentation intersection size based on the maximum pedestrian size, the historical images are segmented using the initial segmentation intersection size. It is determined whether there are any pedestrians segmented in the segmented sub-person images. If so, the segmentation intersection size is adjusted. In addition, as the segmentation intersection size increases, the portion of the image that is repeatedly processed also increases, resulting in an increase in detection and inference time. Therefore, the segmentation intersection size and inference time can be balanced according to actual needs.

[0070] By adopting the reflective clothing recognition method provided in this embodiment, the size of the segmentation intersection is determined by using the maximum pedestrian size corresponding to the character image, which can avoid missing detections caused by segmenting pedestrians into different sub-character images, improve the accuracy of pedestrian area image detection, and at the same time avoid the increase in detection time caused by too large segmentation intersection.

[0071] Optionally, in one embodiment, before determining the pedestrian area image in the person image through the pedestrian detection model and determining the classification of the pedestrian area image through the reflective clothing classification model, the method also includes: determining the scene type to which the person image belongs, and obtaining the pedestrian detection model and reflective clothing classification model corresponding to the scene type.

[0072] Specifically, scene types can be divided according to different scenes, for example, scene types include hospitals, construction sites, theaters and other scenes. Scene types can also be divided according to the characteristics of the scene, for example, scene types include indoor scene types and outdoor scene types. The correspondence between typical objects and scene types can be preset, for example, white coats correspond to hospitals, safety helmets correspond to construction sites, 3D glasses correspond to theaters, etc., to identify which typical objects are included in the person image, and then determine the scene type based on the identified typical objects. Alternatively, in this step, the scene type to which the person image belongs can be determined based on its source. At the same time, a combination of multiple pedestrian detection models and reflective clothing classification models are preset to adapt to the corresponding scene types, so that the corresponding pedestrian detection model and reflective clothing classification model are obtained according to the scene type.

[0073] By adopting the reflective clothing recognition method provided in this embodiment, the reflective clothing recognition model is set according to the scene type, and a pedestrian detection model and a reflective clothing classification model that are multi-adaptive to the scene type to which the person image belongs are obtained to recognize the person image, which can improve the accuracy of reflective clothing recognition.

[0074] Further optionally, in one embodiment, the step of obtaining a pedestrian detection model and a reflective clothing classification model corresponding to the scene type includes: constructing an initial pedestrian detection model and an initial reflective clothing classification model; obtaining a person image under the scene type as a training set; and training the initial pedestrian detection model and the initial reflective clothing classification model using the training set to obtain a pedestrian detection model and a reflective clothing classification model corresponding to the scene type.

[0075] When using the reflective clothing recognition method provided in this embodiment, when training the initial pedestrian detection model and the initial reflective clothing classification model, a training set is constructed using person images in the same scene type for training the initial pedestrian detection model and the initial reflective clothing classification model. The initial pedestrian detection model and the initial reflective clothing classification model corresponding to the scene type are obtained. This allows the trained initial pedestrian detection model and the initial reflective clothing classification model to better adapt to a specific scene type, thereby improving the accuracy of reflective clothing recognition.

[0076] By adopting the above-mentioned embodiment provided by this application, when the application scenario is a construction site, a data set can be collected for the actual construction site, and data analysis and algorithm training can be performed to obtain a pedestrian detection model and a reflective clothing classification model, which is conducive to improving the accuracy of reflective clothing recognition.

[0077] By adopting the above-mentioned embodiments provided in this application, the method can be directly deployed on the edge device, with a small model, fast inference speed and high real-time performance.

[0078] Using the above-mentioned embodiments provided by this application, it is more reasonable to perform reflective clothing identification based on pedestrian detection. Furthermore, adding a reflective clothing classification model after the pedestrian detection model can suppress false detections. Simultaneously, rapid iterative optimization can be performed on construction sites, and the cost of optimizing the classification model is much lower than optimizing the detection model.

[0079] By adopting the above embodiment provided by the present application and adding the step of image segmentation feature amplification, missed detections can be effectively reduced.

[0080] Example 2

[0081] Corresponding to the above-mentioned embodiment 1, embodiment 2 of the present application provides a reflective clothing identification device. The corresponding technical feature details and corresponding technical effects can be referred to the above-mentioned embodiment 1 and will not be repeated in this embodiment. Figure 4 This is a block diagram of the reflective clothing recognition device provided in Example 2 of this application, as shown in FIG. Figure 4 As shown, the device includes: an acquisition module 201, a detection module 202 and a classification module 203.

[0082] The acquisition module 201 is used to acquire a person image; and is used to determine a pedestrian area image in the person image through a pedestrian detection model; and the classification module 203 is used to determine the classification of the pedestrian area image through a reflective clothing classification model, wherein the classification includes a first category representing that the pedestrian is wearing reflective clothing, a second category representing that the pedestrian is not wearing reflective clothing, and a third category representing that the pedestrian area image does not contain a pedestrian image.

[0083] Optionally, in one embodiment, the device further includes: a first acquisition module, used to acquire a training person image before the classification module 203 determines the classification of the pedestrian area image through the reflective clothing classification model; a first determination module, used to determine the training pedestrian area image in the training person image through the pedestrian detection model; and a first training module, used to train the initial reflective clothing classification model through the training pedestrian area image to obtain the reflective clothing classification model.

[0084] Optionally, in one embodiment, the classification module 203 includes: a first determination unit, used to determine the number of segments of the character image; a segmentation unit, used to segment the character image according to the number of segments to obtain at least two sub-character images after segmentation; an enlargement unit, used to enlarge the sub-character image to a preset size; and a second determination unit, used to determine the pedestrian area image in the enlarged sub-character image through the pedestrian detection model.

[0085] Optionally, in one embodiment, when the first determination unit determines the number of segments of the character image, the specific steps performed include: determining the minimum pedestrian size corresponding to the character image; determining the number of segments based on the minimum pedestrian size, wherein the smaller the minimum pedestrian size, the larger the number of segments.

[0086] Optionally, in one embodiment, when determining the number of segments of the person image, the first determination unit specifically performs the following steps: obtaining currently available recognition resources and recognition speed requirements; and determining the number of segments according to the recognition resources and the recognition speed requirements.

[0087] Optionally, in one embodiment, when the segmentation unit segments the character image according to the segmentation number to obtain at least two sub-character images, the specific steps performed include: determining the maximum pedestrian size corresponding to the character image; determining the segmentation intersection size according to the maximum pedestrian size; segmenting the character image according to the segmentation number and the segmentation intersection size to obtain at least two sub-character images after segmentation, wherein the intersection of adjacent sub-character images is greater than or equal to the segmentation intersection size.

[0088] Optionally, in one embodiment, the device further includes: a second determination module for determining the scene type to which the person image belongs before the detection module 202 determines the pedestrian area image in the person image through the pedestrian detection model and the classification module 203 determines the classification of the pedestrian area image through the reflective clothing classification model; a construction module for constructing an initial pedestrian detection model and an initial reflective clothing classification model; a second acquisition module for acquiring person images under the scene type as a training set; and a second training module for training the initial pedestrian detection model and the initial reflective clothing classification model through the training set to obtain the pedestrian detection model and the reflective clothing classification model corresponding to the scene type.

[0089] Example 3

[0090] This embodiment 3 also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Figure 5 As shown, the computer device 01 of this embodiment includes at least but not limited to: a memory 012 and a processor 011 which can be interconnected via a system bus. Figure 5 It should be pointed out that Figure 5 The computer device 01 is shown only with components memory 012 and processor 011 , but it should be understood that implementation of all of the components shown is not a requirement and more or fewer components may alternatively be implemented.

[0091] In this embodiment, the memory 012 (i.e., a readable storage medium) includes flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, the memory 012 may be an internal storage unit of the computer device 01, such as the hard disk or memory of the computer device 01. In other embodiments, the memory 012 may also be an external storage device of the computer device 01, such as a plug-in hard disk equipped on the computer device 01, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Of course, the memory 012 may also include both the internal storage unit of the computer device 01 and its external storage device. In this embodiment, the memory 012 is generally used to store the operating system and various application software installed on the computer device 01, such as the program code of the reflective clothing recognition device in Example 2. In addition, the memory 012 can also be used to temporarily store various types of data that have been output or are to be output.

[0092] In some embodiments, the processor 011 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 011 is generally used to control the overall operation of the computer device 01. In this embodiment, the processor 011 is used to execute program code stored in the memory 012 or process data, such as a reflective clothing recognition method.

[0093] Example 4

[0094] This fourth embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic storage device, a disk, an optical disk, a server, an App store, etc., which stores a computer program that, when executed by a processor, implements the corresponding function. The computer-readable storage medium of this embodiment is used to store a reflective clothing recognition device, and when executed by a processor, implements the reflective clothing recognition method of the first embodiment.

[0095] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0096] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method.

[0098] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A reflective clothing identification method, characterized in that: include: Get the person image; Determine a minimum pedestrian size and a maximum pedestrian size corresponding to the character image; Determining the number of segments of the person image according to the minimum pedestrian size, wherein the smaller the minimum pedestrian size is, the larger the number of segments is; Determine the size of the segmentation intersection according to the maximum pedestrian size; The character image is segmented according to the segmentation number and the segmentation intersection size to obtain at least two segmented sub-character images, wherein the intersection of adjacent sub-character images is greater than or equal to the segmentation intersection size; Enlarging the sub-character image to a preset size; Determine a pedestrian region image in the enlarged sub-person image by using a pedestrian detection model; The classification of the pedestrian area image is determined by a reflective clothing classification model, wherein the classification includes a first category characterizing that pedestrians are wearing reflective clothing, a second category characterizing that pedestrians are not wearing reflective clothing, and a third category characterizing that the pedestrian area image does not contain a pedestrian image.

2. The reflective clothing identification method according to claim 1, characterized in that: Before determining the classification of the pedestrian area image by using the reflective clothing classification model, the method further includes: Get training person images; Determine a training pedestrian region image in the training person image by using the pedestrian detection model; The initial reflective clothing classification model is trained using the training pedestrian area image to obtain the reflective clothing classification model.

3. The reflective clothing identification method according to claim 1, characterized in that: The step of determining the number of segments of the character image comprises: Obtain currently available recognition resources and recognition speed requirements; The number of segments is determined according to the recognition resources and the recognition speed requirement.

4. The reflective clothing identification method according to claim 1, characterized in that: Before the steps of determining a pedestrian region image in the person image by using a pedestrian detection model and determining the classification of the pedestrian region image by using a reflective clothing classification model, the method further includes: Determining the scene type to which the character image belongs; Build an initial pedestrian detection model and an initial reflective clothing classification model; Obtaining character images in the scene type as a training set; The initial pedestrian detection model and the initial reflective clothing classification model are trained using the training set to obtain a pedestrian detection model and a reflective clothing classification model corresponding to the scene type.

5. A reflective clothing identification device, characterized in that: include: An acquisition module, used for acquiring a person image; a detection module, used to determine a minimum pedestrian size and a maximum pedestrian size corresponding to the character image, determine the number of segments of the character image according to the minimum pedestrian size, wherein the smaller the minimum pedestrian size, the larger the number of segments, determine the segmentation intersection size according to the maximum pedestrian size, segment the character image according to the segmentation number and the segmentation intersection size, obtain at least two segmented sub-character images, wherein the intersection of adjacent sub-character images is greater than or equal to the segmentation intersection size, enlarge the sub-character image to a preset size, and determine the pedestrian region image in the enlarged sub-character image through a pedestrian detection model; and The classification module is used to determine the classification of the pedestrian area image through a reflective clothing classification model, wherein the classification includes a first category representing that the pedestrian is wearing reflective clothing, a second category representing that the pedestrian is not wearing reflective clothing, and a third category representing that the pedestrian area image does not contain a pedestrian image.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • A method and a device for detecting the wearing of a seat belt

    CN109086716A

  • Safety dressing detection method and device, computer equipment and readable storage medium

    CN111428641A