An identity recognition method, device, equipment and readable storage medium
By printing ArUco markings on workers' clothing and combining target detection and image coding recognition technologies, the accuracy and difficulty of worker identification in construction scenarios have been solved, achieving efficient and low-cost identification.
Patent Information
- Application Number
- CN202110552187.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-20
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2041-05-20
AI Technical Summary
In construction scenarios, existing technologies struggle to effectively identify workers' identities. ReID models, sensor solutions, and facial recognition solutions all have significant drawbacks in this context, failing to accurately distinguish worker identities.
By printing ArUco markings on workers' uniforms, the system uses surveillance video to identify target numbers on the uniforms and retrieves associated worker identity information from a database. This is combined with target detection algorithms and image encoding recognition technology for identification.
It improves the accuracy of identity recognition, reduces the difficulty of recognition, and has the advantages of dynamic updates, low deployment difficulty, high recognition accuracy, low cost and easy integration into existing construction site management systems.
Smart Images

Figure CN115376173B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of identity recognition, and in particular to an identity recognition method, device, equipment and readable storage medium. BACKGROUND
[0002] In order to strengthen the safety supervision work of the construction site, more and more construction units begin to introduce intelligent safety monitoring systems to monitor the construction site through monitoring cameras and intelligent analysis, such as capturing safety events such as not wearing a safety helmet and not wearing a reflective vest; however, from the perspective of the construction unit, it is more desirable to know who is involved in the safety event through the intelligent safety monitoring system; however, identifying the identity information of the worker is a very difficult problem.
[0003] In the prior art, a pedestrian re-identification ReID model is usually used for worker identity recognition, which mainly learns the appearance feature information of the person through training of a deep learning model, and then obtains the identity information of the worker through information comparison. In addition, there are also schemes that use sensors to solve the identity recognition problem. Workers or wear or wear electronic tags, and data reading devices are set at each position that needs to be managed, so that when the worker passes through the identification range, the data reading device uploads the read electronic tag information to the control terminal, so that the control terminal judges the identity information of the worker through the electronic tag information. In addition, in other scenarios, there are also schemes for identity determination through face recognition.
[0004] However, the above three schemes have very obvious defects in the construction scene; first, for the ReID model scheme, the model learns the appearance feature information, but in the real construction scene, the workers are mostly dressed in uniform and have similar body shapes, so there is no big difference between the workers in terms of appearance, and the ReID model cannot be applied; second, for the sensor scheme, the scheme needs hardware support, has a relatively high deployment cost, and the sensor is limited by distance conditions and is suitable for a scene of 5-10 meters, but in the construction scene, it usually faces a long-distance and large-operation scene, so from the perspective of deployment and application, the scheme has great disadvantages; finally, for the face recognition scheme, it is also not suitable for the construction scene, because the workers mostly wear safety helmets for work, and the cameras on the construction site are mostly set up high, with a significant pitch angle, so the face is not visible in most cases, making the scheme basically infeasible.
[0005] In summary, in the construction scene, how to effectively and accurately identify the identity information of the worker becomes a technical problem that needs to be solved by those skilled in the art. SUMMARY
[0006] The application aims to provide an identity recognition method, device, equipment and readable storage medium, which can greatly improve the accuracy of identity recognition and greatly reduce the difficulty of identity recognition task.
[0007] According to one aspect of the application, an identity recognition method is provided, which comprises:
[0008] acquiring a monitoring video of a construction site and extracting a target frame picture from the monitoring video;
[0009] cutting out a portrait area of a worker from the target frame picture;
[0010] identifying a target ArUco marker on the worker's clothing from the portrait area and identifying a target digital number from the target ArUco marker;
[0011] acquiring a target association record containing the target digital number from a preset database and sending target worker identity information contained in the target association record to a preset terminal.
[0012] Optionally, before the acquiring a monitoring video of a construction site and extracting a target frame picture from the monitoring video, the method further comprises:
[0013] acquiring entry information of a worker entering the construction site; wherein the entry information comprises worker face information and an ArUco marker on the worker's clothing;
[0014] acquiring worker identity information associated with the worker face information from the database;
[0015] identifying a digital number from the ArUco marker in the entry information;
[0016] deleting a historical association record containing the digital number from the database and storing the worker identity information and the digital number as a new association record in the database.
[0017] Optionally, the cutting out a portrait area of a worker from the target frame picture comprises:
[0018] drawing a marking box for marking the area where the worker is located in the target frame picture by using a target detection algorithm;
[0019] acquiring position information of the marking box; wherein the position information comprises horizontal and vertical coordinates of a center point of the marking box, a width of the marking box and a height of the marking box;
[0020] cutting out the portrait area of the worker from the target frame picture by using the position information.
[0021] Optionally, the target detection algorithm is used to draw a mark frame for marking the area where the worker is located in the target frame, comprising:
[0022] According to the preset N scaling ratios, the target frame is scaled into N feature maps with different sizes;
[0023] M anchor boxes with different sizes are set for each size of the feature map;
[0024] Six-dimensional feature information of each pixel point in the target feature map under the target anchor box is calculated through convolution operation; wherein, the six-dimensional feature information includes: the probability p that the pixel point belongs to the background, the probability q that the pixel point belongs to the worker, the horizontal offset x of the mark frame center point, the vertical offset y of the mark frame center point, the width coefficient w of the mark frame and the height coefficient h of the mark frame;
[0025] The pixel point with the probability q that the pixel point belongs to the worker greater than the preset threshold is set as the target pixel point of the target feature map under the target anchor box;
[0026] According to the position information of the target pixel point in the target feature map, the scaling ratio corresponding to the target feature map, the size of the target anchor box and the six-dimensional feature information of the target pixel point, a mark frame for marking the area where the worker is located is drawn in the target frame.
[0027] Optionally, the position information of the mark frame is obtained; wherein, the position information includes: the horizontal and vertical coordinates of the mark frame center point, the width of the mark frame and the height of the mark frame, comprising:
[0028] According to the position information of the target pixel point in the target feature map, the position information of the real pixel point corresponding to the target pixel point in the target frame is calculated according to the scaling ratio corresponding to the target feature map;
[0029] The x in the six-dimensional feature information of the target pixel point is multiplied by the scaling ratio to obtain the real horizontal offset, and the y in the six-dimensional feature information of the target pixel point is multiplied by the scaling ratio to obtain the real vertical offset;
[0030] The position information of the real pixel point in the target frame is offset according to the real horizontal offset and the real vertical offset to obtain the horizontal and vertical coordinates of the mark frame center point;
[0031] Multiply the w in the six-dimensional feature information of the target pixel point by the width size of the target anchor frame to obtain the width of the mark frame, and multiply the h in the six-dimensional feature information of the target pixel point by the height size of the target anchor frame to obtain the height of the mark frame.
[0032] Optionally, the identifying the target ArUco marker located on the worker's clothing from the portrait area comprises:
[0033] Performing a binaryzation operation on the portrait area to convert the portrait area into a black-and-white image.
[0034] Extracting a candidate contour frame from the black-and-white image by using an edge contour detection algorithm.
[0035] Screening a quadrilateral candidate contour frame from the candidate contour frame as a target contour frame.
[0036] Performing an affine transformation operation on the target contour frame to obtain a square contour frame, and taking the square contour frame as the target ArUco marker.
[0037] Optionally, the identifying the target digital number from the target ArUco marker comprises:
[0038] Dividing the target ArUco marker into a grid of AxA, and counting the black-and-white color ratio of each grid unit; wherein A is a positive integer.
[0039] Representing the grid unit with a high black color ratio by 0 and the grid unit with a high white color ratio by 1 to determine the binary encoding result corresponding to the target ArUco marker.
[0040] Looking up the target digital number corresponding to the binary encoding result from a preset mapping table.
[0041] In order to achieve the above purpose, the present application further provides an identity recognition device, which specifically comprises the following components:
[0042] An extraction module is configured to acquire a monitoring video of a construction site and extract a target frame picture from the monitoring video.
[0043] An intercepting module is configured to intercept a portrait area of a worker from the target frame picture.
[0044] An identifying module is configured to identify a target ArUco marker located on the worker's clothing from the portrait area, and identify a target digital number from the target ArUco marker.
[0045] A processing module is configured to acquire a target association record containing the target digital number from a preset database, and send target worker identity information contained in the target association record to a preset terminal.
[0046] To achieve the above object, the present application further provides a computer device, which specifically comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned identity recognition method when executing the computer program.
[0047] To achieve the above object, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the above-mentioned identity recognition method when executed by a processor.
[0048] The identity recognition method, device, equipment and readable storage medium provided by the present application can recognize the identity of workers through ArUco markers printed on worker clothes, greatly improve the accuracy of identity recognition and greatly reduce the difficulty of the recognition task, and fundamentally solve the problem of worker identity recognition in construction sites. The present application has the advantages of dynamic updating, low deployment difficulty and high recognition accuracy; in the present application, the reflective vest printed with ArUco markers can solve the problem of identity recognition, and has no dependence on other hardware, and has the advantage of low cost compared with the sensor scheme; the ArUco marker recognition scheme adopted by the present application has high robustness and no special data requirements, while the ReID model needs a large number of labeled training samples for learning, and the model is greatly affected by the environment and image features; in addition, the present application proposes an end-to-end identity recognition method, which can be seamlessly connected to any existing construction site management system, and has the advantages of universality and easy migration. BRIEF DESCRIPTION OF DRAWINGS
[0049] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not intended to limit the scope of the application. Moreover, the same reference numerals are used throughout the same figures. In the drawings:
[0050] Figure 1 An optional flowchart of the identity recognition method provided for embodiment one;
[0051] Fig. 2(a) is a schematic view of printing ArUco markers on the front of the safety reflective vest in embodiment one;
[0052] Fig. 2(b) is a schematic view of printing ArUco markers on the back of the safety reflective vest in embodiment one;
[0053] Figure 3 A schematic diagram of the gridded ArUco marker in Example 1;
[0054] Figure 4 A schematic diagram of an optional component structure of the identity recognition device provided in Example 2;
[0055] Figure 5 A schematic diagram of an optional hardware architecture of the computer device provided in Example 3. DETAILED DESCRIPTION
[0056] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application. Based on the examples in the present application, all other examples obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0057] Example 1
[0058] The embodiment of the present application provides an identity recognition method, as shown in the figure, which specifically comprises the following steps: Figure 1
[0059] Step S101: Obtain the monitoring video of the construction site, and extract the target frame picture from the monitoring video.
[0060] Specifically, before step S101, the method further comprises:
[0061] Step A1: Obtain the entry information of the worker entering the construction site; wherein the entry information comprises: worker face information and an ArUco marker located on the worker's clothing;
[0062] In the embodiment, ArUco (Augmented Reality from University of Cordoba) markers are used as a means of feature augmentation; ArUco markers are similar to two-dimensional codes, and are a way of encoding digital information into an image; an ArUco marker is a square with a black background (ground color), and a white image in the square, which is used to represent the uniqueness of the ArUco marker; an ArUco marker can encode numbers from 1 to 999 in an image, and the number in the ArUco marker can be obtained through an image encoding recognition algorithm; ArUco markers are direction-independent, and are a robust, fast-executing, and highly accurate identification method. As shown in FIGS. 2(a) and 2(b), in the embodiment, ArUco markers are printed on the front and back of the safety reflective vest, and corresponding number labels are printed next to the ArUco markers. It should be noted that in actual applications, ArUco markers can also be printed on safety helmets and / or other clothing worn by workers.
[0063] Existing ArUco markers are generally used in positioning scenarios and are not applied to identity recognition. In the embodiment, the problem of identity recognition can be solved by simply printing ArUco markers on the clothing worn by workers.
[0064] Step A2: obtaining worker identity information associated with the worker face information from a preset database;
[0065] In the embodiment, the face information and identity information of each worker are collected in advance; the worker identity information at least includes name, ID number, mobile phone number, affiliated unit, and address; since the face information and identity information of workers are relatively fixed and unchanged, the face information and identity information of each worker can be associated and stored in a preset database in advance.
[0066] Step A3: identifying the number from the ArUco marker in the entry information;
[0067] Since the number can be identified from the ArUco marker by using an existing image encoding recognition algorithm, the process of identifying the number from the ArUco marker is not described here.
[0068] Step A4: deleting a historical association record containing the number from the database, and storing the worker identity information and the number as a new association record in the database.
[0069] Since in the construction scene, workers may mix wearing safety reflective clothing and randomly wearing safety helmets, which may cause the workers and the ArUco markers (digital numbers) not to have a one-to-one correspondence relationship; therefore, in this embodiment, the worker face information and the ArUco marker located on the worker's clothing need to be reacquired each time the worker passes through the gate to enter the construction site, and the digital number in the ArUco marker is identified, so as to reestablish the correspondence relationship between the worker identity information associated with the worker face information and the digital number. Therefore, in this embodiment, the association relationship between the digital number and the worker identity information is continuously updated in the preset database.
[0070] Further, the target frame picture is extracted from the monitoring video, specifically including:
[0071] The monitoring video is video decoded, and a target frame picture is extracted from the video decoded monitoring video at a set time interval; wherein the target frame picture is an RGB three-channel picture.
[0072] For example: the target frame picture is a 3*1080*1920 picture, wherein 3 is the number of channels, and 1080*1920 is the pixel information of the picture.
[0073] In this embodiment, when a safety event occurs in the construction site and the identity of the worker causing the safety event needs to be identified, the monitoring video can be obtained by the camera installed in the construction site, and the target frame picture is extracted from the monitoring video to identify the identity information of the worker from the target frame picture.
[0074] Step S102: cutting out a portrait area where the worker is located from the target frame picture.
[0075] Specifically, step S102 includes:
[0076] Step B1: drawing a marking box for marking the area where the worker is located in the target frame picture by using a target detection algorithm;
[0077] Preferably, the target detection algorithm in this embodiment adopts a YOLOv5 (You Only Look Once Version 5) model; the YOLOv5 model has the characteristics of fast prediction speed and high detection accuracy; by using a large amount of real construction scene data to fine-tune the YOLOv5 model, the effect and generalization of the YOLOv5 model in the construction scene are ensured.
[0078] Step B2: obtaining position information of the marking box; wherein the position information includes horizontal and vertical coordinates of a center point of the marking box, a width of the marking box, and a height of the marking box;
[0079] Step B3: using the position information to cut out the portrait area of the worker from the target frame picture.
[0080] Further, step B1 specifically comprises:
[0081] Step B11: scaling the target frame picture into N different sizes of feature maps according to a preset N scaling ratios; wherein N is a positive integer.
[0082] In actual application, since the input size of the model needs to be fixed, the target frame picture needs to be resized to modify the size of the target frame picture to 3*608*352 before the model is calculated. Compared with the commonly used square image input, the embodiment adopts a rectangular image (608*352) as input. This input size can adapt to the length and width ratio of the monitoring video stream data in the construction scene, ensure the maximum retention of the original image information, and at the same time, compared with the square input (608*608), the rectangular size can greatly reduce the calculation overhead and improve the model inference speed. In addition, the target frame picture will be normalized, that is, the value of each pixel point will be reduced by the mean value and divided by the standard deviation, so that the data has a specific 0 center data distribution, which facilitates the effective convergence of the model in the training stage. Then, the target frame picture is learned through the stacking of convolutional layers and pooling layers to process the target frame picture with an input of 3*608*352 into three feature maps (C*W*H, C is the number of channels, W is the width, and H is the height) with sizes of 128*152*88, 256*76*44, and 512*38*22 respectively. In the embodiment, compared with the commonly used 8, 16, and 32 times downsampling, the embodiment increases the feature map size according to the characteristics of small targets in the construction scene, and performs 4, 8, and 16 times downsampling on the target frame picture, so that the model has better attention to image detail features and improves the prediction effect of small targets. That is, in the embodiment, the target frame picture is scaled to three feature maps with sizes of 152*88, 76*44, and 38*22 according to the scaling ratios of 4, 8, and 16 times.
[0083] Since different size feature maps learn different degrees of image feature information, in order to fully utilize the image feature information, the image feature information of different size feature maps is fully fused, so that the large size feature map can also learn the image feature information contained in the small size feature map. Preferably, the original 16 times down-sampled feature map is restored to an 8 times down-sampled feature map by 2 times up-sampling, and the restored 8 times down-sampled feature map is merged with the original 8 times down-sampled feature map by bit-by-bit addition, so that the original 8 times down-sampled feature map contains the image feature information in the original 16 times down-sampled feature map; similarly, the original 8 times down-sampled feature map is restored to a 4 times down-sampled feature map by 2 times up-sampling, and the restored 4 times down-sampled feature map is merged with the original 4 times down-sampled feature map by bit-by-bit addition, so that the original 4 times down-sampled feature map contains the image feature information in the original 8 times down-sampled feature map; and for the original 16 times down-sampled feature map, no fusion is performed.
[0084] Step B12: setting M different size anchor boxes for each size feature map respectively; wherein M is a positive integer.
[0085] Preferably, three anchor boxes with size of 10*20, 15*30 and 25*50 are set for the feature map with size of 128*152*88; three anchor boxes with size of 30*60, 50*50 and 60*100 are set for the feature map with size of 256*76*44; and three anchor boxes with size of 100*100, 150*200 and 300*300 are set for the feature map with size of 512*38*22.
[0086] Step B13: calculating six-dimensional feature information of each pixel point in the target anchor box in the target feature map by convolution operation; wherein the six-dimensional feature information includes: probability p that the pixel point belongs to the background, probability q that the pixel point belongs to the worker, horizontal offset x of the center point of the bounding box, vertical offset y of the center point of the bounding box, width coefficient w of the bounding box and height coefficient h of the bounding box.
[0087] Step B14: setting the pixel point whose probability q that the pixel point belongs to the worker is greater than a preset threshold as a target pixel point of the target feature map in the target anchor box.
[0088] Step B15: according to the position information of the target pixel point in the target feature map, the scaling ratio corresponding to the target feature map, the size of the target anchor box and the six-dimensional feature information of the target pixel point, a bounding box for marking the area where the worker is located is drawn in the target frame picture.
[0089] Since multiple anchor boxes of different sizes are set for each size of feature map in the embodiment, multiple bounding boxes of different sizes will exist in the target frame picture; in order to reduce the number of bounding boxes, after step B1, the method further comprises:
[0090] According to the probability q that the corresponding pixel of each bounding box in the target frame picture belongs to the worker, all the bounding boxes are sorted in descending order to obtain a result sequence;
[0091] Starting from the first bounding box in the result sequence, it is sequentially judged whether the intersection over union of the (D+1)th bounding box and the Dth bounding box is greater than 0.5, if yes, the (D+1)th bounding box is deleted, if not, the judgment is continued.
[0092] Further, step B2 specifically comprises:
[0093] Step B21: according to the position information of the target pixel point in the target feature map, the position information of the real pixel point corresponding to the target pixel point in the target frame picture is calculated according to the scaling ratio corresponding to the target feature map;
[0094] Step B22: the x in the six-dimensional feature information of the target pixel point is multiplied by the scaling ratio to obtain a real horizontal offset, and the y in the six-dimensional feature information of the target pixel point is multiplied by the scaling ratio to obtain a real vertical offset;
[0095] Step B23: the position information of the real pixel point in the target frame picture is offset according to the real horizontal offset and the real vertical offset to obtain the horizontal and vertical coordinates of the center point of the bounding box;
[0096] Step B24: the w in the six-dimensional feature information of the target pixel point is multiplied by the width size of the target anchor box to obtain the width of the bounding box, and the h in the six-dimensional feature information of the target pixel point is multiplied by the height size of the target anchor box to obtain the height of the bounding box.
[0097] For example, for a target feature map with a size of 152*88, the scaling ratio of the target feature map is 4, when the size of the anchor box is 10*20, and the six-dimensional feature information of the target pixel point with a position information of (10, 10) is (p = 0.1, q = 0.9, x = 0.5, y = -0.3, w = 1.2, h = 1.5), according to the position information (10, 10) of the target pixel point and the scaling ratio 4 corresponding to the target feature map, the position information of the real pixel point of the target pixel point in the target frame picture is determined as (40, 40); the real horizontal offset of the marking box center point is 0.5*4 = 2, and the real vertical offset of the marking box center point is -0.3*4 = -1.2; therefore, the horizontal and vertical coordinates of the marking box center point = (40+2, 40-1.2) = (42, 38.8); in addition, the width of the marking box = 1.2*10 = 12, and the height of the marking box = 1.5*20 = 30.
[0098] Step S103: identifying a target ArUco marker located on the worker's clothing from the portrait area, and identifying a target digital number from the target ArUco marker.
[0099] Specifically, the target ArUco marker located on the worker's clothing is identified from the portrait area, including:
[0100] Step C1: performing a binaryzation operation on the portrait area to convert the portrait area into a black and white image;
[0101] Step C2: extracting a candidate contour frame from the black and white image by using an edge contour detection algorithm;
[0102] Since the edge of the ArUco marker has obvious black and white color changes, the local area with obvious brightness changes can be found from the black and white image by using the edge contour detection algorithm, so as to obtain the candidate contour frame;
[0103] Step C3: screening a quadrilateral candidate contour frame from the candidate contour frame as a target contour frame;
[0104] In the embodiment, all the candidate contour frames obtained by the edge contour detection algorithm are not ArUco markers, but are screened by filtering; by polygon approximation on all the candidate contour frames, and eliminating the candidate contour frames whose polygon approximation results are not quadrilaterals, that is, only the candidate contour frames whose polygon approximation results are quadrilaterals are taken as the target contour frames; in the embodiment, the target contour frame is a square, a rectangle, a parallelogram or a trapezoid;
[0105] Step C4: performing an affine transformation operation on the target contour frame to obtain a square contour frame, and taking the square contour frame as the target ArUco marker;
[0106] In this embodiment, in order to better identify the digital number in the ArUco marker, an affine transformation operation is performed according to the four vertices of the target contour frame to transform the rectangular, parallelogram, trapezoidal target contour frame into a square.
[0107] It should be further noted that when multiple square contour frames are identified from the clothes of a worker, the largest square contour frame is taken as the target ArUco marker; in order to improve the recognition accuracy, if the size of the square contour frame is less than a preset threshold, the square contour frame is not taken as the target ArUco marker.
[0108] Further, the target digital number is identified from the target ArUco marker, specifically comprising:
[0109] Step D1: dividing the target ArUco marker into an A×A grid, and counting the black and white color ratio of each grid unit; wherein A is a positive integer;
[0110] Preferably, the value of A is 8, that is, the target ArUco marker is divided into an 8×8 grid, and a total of 64 grid units are obtained;
[0111] Step D2: representing the grid unit with a high black ratio with 0 and the grid unit with a high white ratio with 1 to determine the binary encoding result corresponding to the target ArUco marker;
[0112] In this embodiment, the square contour after affine transformation is divided into a grid, and the black and white color ratio is counted in each grid unit, and the bit of the grid unit is determined according to the one with a high ratio;
[0113] Since the outermost circle of the ArUco marker is black, in order to reduce redundant information, only the black and white color ratio of the (A-2)×(A-2) grid in the middle of the target ArUco marker is used to determine the (A-2)×(A-2) binary encoding result; taking the value of A as 8 as an example, the grid in the outermost layer of the target ArUco marker is removed, and only the 6×6 grid in the center is used to determine the 36-bit binary encoding result; for example, as shown in the target ArUco marker Figure 3 The binary encoding result of the target ArUco marker is: 100110100011000001000111110011011110.
[0114] Step D3: finding the target digital number corresponding to the binary encoding result from a preset mapping table.
[0115] In the embodiment, the binary code corresponding to each number is recorded in the mapping table in advance, so that the number can be obtained by extracting the binary code from the ArUco marker.
[0116] Step S104: obtaining a target association record containing the target number from a preset database, and sending target worker identity information contained in the target association record to a preset terminal.
[0117] In actual application, the portrait area and the target worker identity information can be sent to the preset terminal together; since the number corresponding to the ArUco marker is printed on the safety reflective vest, the worker can verify the result by the number printed on the safety reflective vest.
[0118] Compared with the prior art, the method for identifying the identity of the construction worker by using the ArUco marker has the advantages of dynamic updating, low deployment difficulty and high identification accuracy; in the embodiment, the safety reflective vest printed with the ArUco marker can solve the problem of identity recognition, and has no dependence on other hardware, and has the advantage of low cost compared with the sensor scheme; the ArUco marker identification scheme has high robustness and no special requirement for data, while the ReID model needs a large number of labeled training samples for learning, and the model is greatly affected by the environment and image features; in addition, the embodiment provides an end-to-end identity recognition method, which can be seamlessly connected to any existing construction site management system, and has the advantages of universality and easy migration.
[0119] Embodiment two
[0120] The embodiment of the present application provides an identity recognition device, as shown in the figure, which specifically comprises the following components: Figure 4
[0121] The extraction module 401 is used for obtaining the monitoring video of the construction site, and extracting the target frame picture from the monitoring video;
[0122] The intercepting module 402 is used for intercepting the portrait area of the worker from the target frame picture;
[0123] The identification module 403 is used for identifying the target ArUco marker on the worker's clothes from the portrait area, and identifying the target number from the target ArUco marker;
[0124] The processing module 404 is configured to acquire a target association record containing the target digital number from a preset database, and send target worker identity information contained in the target association record to a preset terminal.
[0125] Specifically, the device further comprises:
[0126] The recording module is configured to acquire entry information of a worker entering the construction site, wherein the entry information comprises worker face information and an ArUco marker located on a worker's clothing; acquire worker identity information associated with the worker face information from the database; identify a digital number from the ArUco marker in the entry information; delete a historical association record containing the digital number from the database, and store the worker identity information and the digital number as a new association record in the database.
[0127] Further, the intercepting module 402 specifically comprises:
[0128] The drawing unit is configured to draw a marking box for marking a worker's area in the target frame by using a target detection algorithm.
[0129] The acquisition unit is configured to acquire position information of the marking box, wherein the position information comprises horizontal and vertical coordinates of a center point of the marking box, a width of the marking box, and a height of the marking box.
[0130] The intercepting unit is configured to intercept a portrait area where the worker is located from the target frame by using the position information.
[0131] Still further, the drawing unit is specifically configured to:
[0132] scale the target frame into N feature maps of different sizes according to a preset N kinds of scaling ratios; set M anchor boxes of different sizes for each size of the feature map; calculate six-dimensional feature information of each pixel point in the target feature map under the target anchor box through convolution operation; wherein the six-dimensional feature information comprises a probability p that the pixel point belongs to the background, a probability q that the pixel point belongs to the worker, a horizontal offset x of the center point of the marking box, a vertical offset y of the center point of the marking box, a width coefficient w of the marking box, and a height coefficient h of the marking box; set the pixel point whose probability q that it belongs to the worker is greater than a preset threshold as a target pixel point of the target feature map under the target anchor box; draw a marking box for marking a worker's area in the target frame according to position information of the target pixel point in the target feature map, a scaling ratio corresponding to the target feature map, a size of the target anchor box, and six-dimensional feature information of the target pixel point.
[0133] Further, the acquisition unit is specifically configured to:
[0134] According to the position information of the target pixel point in the target feature map, a scaling ratio corresponding to the target feature map is used to calculate position information of a real pixel point corresponding to the target pixel point in the target frame picture; the x in the six-dimensional feature information of the target pixel point is multiplied by the scaling ratio to obtain a real horizontal offset, and the y in the six-dimensional feature information of the target pixel point is multiplied by the scaling ratio to obtain a real vertical offset; the position information of the real pixel point in the target frame picture is offset according to the real horizontal offset and the real vertical offset to obtain horizontal and vertical coordinates of the center point of the mark box; the w in the six-dimensional feature information of the target pixel point is multiplied by a width size of the target anchor box to obtain a width of the mark box, and the h in the six-dimensional feature information of the target pixel point is multiplied by a height size of the target anchor box to obtain a height of the mark box.
[0135] Further, the processing module 404 is specifically configured to:
[0136] The human portrait region is subjected to a binaryzation operation to convert the human portrait region into a black-and-white image; an edge contour detection algorithm is used to extract a candidate contour box from the black-and-white image; a quadrilateral candidate contour box is selected from the candidate contour box as a target contour box; an affine transformation operation is performed on the target contour box to obtain a square contour box, and the square contour box is taken as the target ArUco marker.
[0137] Further, the processing module 404 is further configured to:
[0138] The target ArUco marker is divided into A×A grids, and a black-and-white color ratio of each grid unit is counted; A is a positive integer; a grid unit with a high black color ratio is represented by 0, and a grid unit with a high white color ratio is represented by 1, to determine a binary coding result corresponding to the target ArUco marker; the target digital number corresponding to the binary coding result is found from a preset mapping table.
[0139] Embodiment three
[0140] The embodiment also provides a computer device, such as a smartphone, a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a cabinet server (including a single server or a server cluster composed of multiple servers), etc. that can execute programs. As shown in the figure, the computer device 50 of the embodiment at least includes but is not limited to a memory 501 and a processor 502 which can be connected to each other in communication through a system bus. It should be noted that, Figure 5 the computer device 50 of the embodiment can further include a bus interface 503, a display interface 504, an input interface 505, a storage interface 506, a communication interface 507, and a power supply 508, etc.Figure 5 Only the computer device 50 with components 501-502 is shown, but it should be understood that not all of the illustrated components are required, and that more or fewer components can alternatively be implemented.
[0141] In this embodiment, the memory 501 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), 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 memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 501 can be an internal storage unit of the computer device 50, such as a hard disk or a memory of the computer device 50. In other embodiments, the memory 501 can also be an external storage device of the computer device 50, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 50. Of course, the memory 501 can also include both an internal storage unit and an external storage device of the computer device 50. In this embodiment, the memory 501 is generally used to store an operating system and various application software installed on the computer device 50. In addition, the memory 501 can also be used to temporarily store various data that has been output or will be output.
[0142] The processor 502 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 502 is generally used to control the overall operation of the computer device 50.
[0143] Specifically, in this embodiment, the processor 502 is configured to execute a program of an identity recognition method stored in the memory 501, and the program of the identity recognition method, when executed, implements the following steps:
[0144] obtaining a monitoring video of a construction site, and extracting a target frame picture from the monitoring video;
[0145] cutting out a portrait area of a worker from the target frame picture;
[0146] identifying a target ArUco marker located on a worker's clothing from the portrait area, and identifying a target digital number from the target ArUco marker;
[0147] Obtain a target association record containing the target digital number from a preset database, and send target worker identity information contained in the target association record to a preset terminal.
[0148] The specific embodiment process of the above method steps can be referred to the first embodiment, which will not be repeated here.
[0149] Embodiment four
[0150] The embodiment also provides a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card memory (for example, an SD or DX memory, etc.), 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 memory, a magnetic disk, an optical disk, a server, an App application mall, etc., which stores a computer program, and the computer program is executed by a processor to implement the following method steps:
[0151] Obtain a monitoring video of a construction site, and extract a target frame picture from the monitoring video;
[0152] Cut out a portrait area of a worker from the target frame picture;
[0153] Identify a target ArUco marker on a worker's clothing from the portrait area, and identify a target digital number from the target ArUco marker;
[0154] Obtain a target association record containing the target digital number from a preset database, and send target worker identity information contained in the target association record to a preset terminal.
[0155] The specific embodiment process of the above method steps can be referred to the first embodiment, which will not be repeated here.
[0156] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0157] The above embodiment numbers of the present application are only for description, not representing the advantages and disadvantages of the embodiments.
[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and the necessary general hardware platform, of course, can also be realized by hardware, but in many cases, the former is a better embodiment.
[0159] The above are only preferred embodiments of the present application, and do not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation made by using the content 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. An identity recognition method, characterized in that, The method includes: Acquire surveillance video of the construction site and extract the target frame from the surveillance video; Extract the image region of the worker from the target frame; Identify the target ArUco mark located on the worker's clothing from the portrait area, and identify the target number from the target ArUco mark; Retrieve a target association record containing the target number from a preset database, and send the target worker identity information contained in the target association record to a preset terminal; The method further includes: Each time a worker enters the construction site, their facial information and the ArUco tag on their clothing must be retrieved again. Retrieve worker identity information associated with the worker's facial information from the database; wherein, the worker's facial information and worker identity information are pre-stored in the database in association. Identify the numerical designation from the ArUco mark; Delete the historical associated record containing the numerical ID from the database, and store the worker's identity information and the numerical ID as a new associated record in the database.
2. The identity recognition method according to claim 1, characterized in that, Extracting the image region of the worker from the target frame includes: A target detection algorithm is used to draw a bounding box in the target frame to indicate the area where the worker is located. Obtain the position information of the marker frame; wherein, the position information includes: the horizontal and vertical coordinates of the center point of the marker frame, the width of the marker frame, and the height of the marker frame; The location information is used to extract the image area of the worker from the target frame.
3. The identity recognition method according to claim 2, characterized in that, The step of using a target detection algorithm to draw a bounding box in the target frame to mark the area where the worker is located includes: The target frame image is scaled and processed into N different sizes of feature maps according to N preset scaling ratios. Set M different anchor boxes for each feature map size; The six-dimensional feature information of each pixel in the target feature map under the target anchor box is calculated by convolution operation; wherein, the six-dimensional feature information includes: the probability p of the pixel belonging to the background, the probability q of the pixel belonging to the worker, the horizontal offset x of the center point of the marker box, the vertical offset y of the center point of the marker box, the width coefficient w of the marker box, and the height coefficient h of the marker box; Pixels whose probability q of belonging to a worker is greater than a preset threshold are set as target pixels of the target feature map under the target anchor box; Based on the position information of the target pixel in the target feature map, the scaling ratio corresponding to the target feature map, the size of the target anchor frame, and the six-dimensional feature information of the target pixel, a marker frame for marking the area where the worker is located is drawn in the target frame.
4. The identity recognition method according to claim 3, characterized in that, The step of obtaining the position information of the marker frame; wherein, the position information includes: the horizontal and vertical coordinates of the center point of the marker frame, the width of the marker frame, and the height of the marker frame, including: Based on the position information of the target pixel in the target feature map, and according to the scaling ratio corresponding to the target feature map, the position information of the real pixel corresponding to the target pixel in the target frame is calculated. The x-value of the six-dimensional feature information of the target pixel is multiplied by the scaling ratio to obtain the true horizontal offset, and the y-value of the six-dimensional feature information of the target pixel is multiplied by the scaling ratio to obtain the true vertical offset. In the target frame, the position information of the real pixel is offset according to the real horizontal offset and the real vertical offset to obtain the horizontal and vertical coordinates of the center point of the marker box; The width of the label frame is obtained by multiplying the w in the six-dimensional feature information of the target pixel by the width of the target anchor frame, and the height of the label frame is obtained by multiplying the h in the six-dimensional feature information of the target pixel by the height of the target anchor frame.
5. The identity recognition method according to claim 1, characterized in that, The process of identifying the target ArUco mark located on the worker's clothing from the portrait area includes: The portrait region is binarized to convert it into a black and white image; Candidate bounding boxes are extracted from the black and white image using an edge contour detection algorithm; Quadrilateral candidate contour boxes are selected from the candidate contour boxes to serve as the target contour box; An affine transformation is performed on the target outline to obtain a square outline, and the square outline is used as the target ArUco marker.
6. The identity recognition method according to claim 1, characterized in that, The step of identifying the target number from the target ArUco marker includes: The target ArUco marker is divided into an A×A grid, and the black and white ratio of each grid cell is calculated; where A is a positive integer; The grid cells with a high proportion of black are represented by 0 and the grid cells with a high proportion of white are represented by 1, so as to determine the binary encoding result corresponding to the target ArUco mark; The target number corresponding to the binary encoding result is found in the preset mapping table.
7. An identity recognition device, characterized in that, The device includes: The extraction module is used to acquire the monitoring video of the construction site and extract the target frame from the monitoring video; The cropping module is used to crop out the human image area where the worker is located from the target frame image; The recognition module is used to identify target ArUco marks located on workers' clothing from the human image area, and to identify target numerical codes from the target ArUco marks; The processing module is used to retrieve a target association record containing the target number from a preset database and send the target worker identity information contained in the target association record to a preset terminal; The device further includes: The recording module is used to re-acquire worker facial information and ArUco tags on worker clothing each time a worker enters the construction site; retrieve worker identity information associated with the worker's facial information from the database; wherein, the worker's facial information and worker identity information are pre-stored in the database in association; identify a numerical ID from the ArUco tag; delete historical association records containing the numerical ID from the database, and store the worker's identity information and the numerical ID as a new association record in the database.
8. A computer device, the computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Site monitoring method and device based on image analysis and readable storage medium
CN109344679A
Bridge deformation monitoring method and device based on visual perception, and equipment
CN110634138A