Gait recognition method, electronic device and computer readable storage medium
By generating sequence maps containing auxiliary information such as location information and image sequence number, the problem of high coupling between images and processing terminals is solved, the efficiency of gait recognition is improved, and it can adapt to changes in terminal and algorithm versions.
Patent Information
- Application Number
- CN202210954465.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-08-09
AI Technical Summary
In existing technologies, the information corresponding to an image is highly coupled with the processing terminal, resulting in low efficiency for different processing terminals to perform gait recognition on the same target.
By extracting a set of sub-images from an image sequence, auxiliary information including location information and image sequence number is generated and added to the stitched image to form a sequence diagram, so that the processing terminal can determine the gait based on the auxiliary information.
It reduces the coupling between image information and the processing terminal, improves the efficiency of the processing terminal in gait recognition, and adapts to changes in the terminal or updates in the algorithm version.
Smart Images

Figure CN115457649B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a gait recognition method, an electronic device and a computer readable storage medium. BACKGROUND
[0002] As a kind of biometric characteristics, gait has the characteristics of being difficult to hide or disguise, with the continuous development of image processing field, gait recognition is more and more valued, in the prior art, when the processing terminal carries out gait recognition on target, it is necessary to extract and recognize the features of the image, determine the target in the image, obtain the information corresponding to the image in order to carry out gait recognition, when the processing terminal changes or the version of the recognition algorithm changes, due to the high coupling degree of the information corresponding to the image and the processing terminal, other terminals need to extract and recognize the features of the image again, so that the efficiency of different processing terminals for gait recognition of the same target is low.Therefore, how to reduce the coupling degree of the information corresponding to the image and the processing terminal and improve the efficiency of the processing terminal for gait recognition becomes a problem to be solved. SUMMARY
[0003] The technical problem solved by the present application is to provide a gait recognition method, an electronic device and a computer readable storage medium, which can reduce the coupling degree of the information corresponding to the image and the processing terminal and improve the efficiency of the processing terminal for gait recognition.
[0004] To solve the above technical problem, the first aspect of the present application provides a gait recognition method, comprising: obtaining an image sequence, obtaining a plurality of sub-images including a to-be-tested target from a plurality of original images of the image sequence, to obtain a sub-image set composed of a plurality of sub-images; generating auxiliary information corresponding to the sub-image set based on the position information of each sub-image in the corresponding original image and the image sequence number of the original image corresponding to each sub-image; performing splicing processing on each sub-image in the sub-image set to obtain a spliced image corresponding to the to-be-tested target, and adding the auxiliary information corresponding to the sub-image set to the spliced image to obtain a sequence image corresponding to the to-be-tested target; in response to the processing terminal obtaining the sequence image, so that the corresponding processing terminal determines the gait corresponding to the to-be-tested target based on each sub-image in the sequence image and the auxiliary information.
[0005] To solve the above technical problem, the second aspect of the present application provides an electronic device, which comprises a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method of the first aspect described above.
[0006] To solve the above technical problems, the third aspect of the present application provides a computer readable storage medium, which stores program data, and the program data is executed by a processor to implement the method of the first aspect.
[0007] The above scheme obtains the image sequence, acquires a plurality of sub-images including the to-be-detected target from a plurality of original images of the image sequence, the plurality of sub-images form a sub-image set, generates auxiliary information corresponding to the sub-image set by using position information of each sub-image in the corresponding original image and an image sequence number corresponding to the original image, performs splicing processing on each sub-image in the sub-image set to obtain a spliced image corresponding to the to-be-detected target, and adds the auxiliary information corresponding to the sub-image set to the spliced image to obtain a sequence image corresponding to the to-be-detected target. Therefore, the sequence image includes the auxiliary information, which reduces the coupling degree of the image corresponding information and the processing terminal, and the auxiliary information includes the position information and the image sequence number. When the processing terminal changes or the version of the recognition algorithm changes, any processing terminal can determine the position of the sub-image in the original image corresponding to the image sequence number based on the auxiliary information after obtaining the sequence image, so that the processing terminal can determine the gait corresponding to the to-be-detected target based on the sequence image after obtaining the sequence image, thereby improving the efficiency of gait recognition by the processing terminal. BRIEF DESCRIPTION OF DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. Among them:
[0009] Figure 1 is a flowchart of an embodiment of the gait recognition method of the present application;
[0010] Figure 2 is a flowchart of another embodiment of the gait recognition method of the present application;
[0011] Figure 3 is Figure 2 is an application scenario diagram of an embodiment corresponding to step S201 in the present application;
[0012] Figure 4 is Figure 2 is an application scenario diagram of an embodiment corresponding to step S205 in the present application;
[0013] Figure 5 is Figure 2 is an application scenario diagram of another embodiment corresponding to step S205 in the present application;
[0014] Figure 6is a structural schematic diagram of an embodiment of an electronic device of the present application.
[0015] Figure 7 is a structural schematic diagram of an embodiment of a computer readable storage medium of the present application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0017] The terms "system" and "network" are often used interchangeably herein. The term "and / or" herein is only a description of the associated relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents an "or" relationship between the front and rear associated objects. In addition, "multiple" herein means two or more than two.
[0018] The gait recognition method provided by the present application is applied to recognizing the gait of a to-be-tested target. The gait recognition method provided by the present application generates a sequence diagram including auxiliary information, thereby reducing the coupling degree of image corresponding information and a processing terminal, so that the sequence diagram can be used by the current processing terminal and other processing terminals. The execution subject of the process of generating the sequence diagram including auxiliary information is the current processing terminal, and the other processing terminals include processing terminals different from the current processing terminal.
[0019] Please refer to Figure 1 , Figure 1 is a flowchart of an embodiment of the gait recognition method of the present application. The method comprises:
[0020] S101: Obtain an image sequence, obtain a plurality of sub-images including a to-be-tested target from a plurality of original images of the image sequence, and obtain a sub-image set composed of a plurality of sub-images.
[0021] Specifically, an image sequence composed of a plurality of original images is obtained, sub-images including a to-be-tested target are extracted from a plurality of original images, and a sub-image set composed of a plurality of sub-images is obtained.
[0022] In an application scenario, video data is obtained, video frames in the video data are extracted to obtain an image sequence, a target in the original image is determined by using a target recognition algorithm, a plurality of sub-images including the target to be detected are obtained from a plurality of original images in the image sequence, and the plurality of sub-images are arranged in sequence to obtain a sub-image set composed of the plurality of sub-images.
[0023] In another application scenario, an image sequence continuously collected for a monitoring area is obtained, a target in the original image is determined by using a target recognition algorithm, a target recognition box is output, pixels in the target recognition box are extracted from a plurality of original images in the image sequence, a plurality of sub-images including the target to be detected are obtained, and the plurality of sub-images are arranged in sequence to obtain a sub-image set composed of the plurality of sub-images.
[0024] In another application scenario, an image sequence continuously collected for a monitoring area is obtained, a target in the original image is determined by using a target recognition algorithm, a target recognition box is output, pixels in the target recognition box are extracted from a plurality of original images in the image sequence, a plurality of sub-images including the target to be detected are obtained, and the plurality of sub-images are arranged in sequence to obtain a sub-image set composed of the plurality of sub-images.
[0025] Specifically, the position information of each sub-image in the corresponding original image and the image sequence number of the original image corresponding to each sub-image in the sub-image set are determined, and the auxiliary information corresponding to the sub-image set is generated by using the position information of the original image corresponding to each sub-image and the image sequence number.
[0026] In an application mode, the original image corresponds to a video frame in the video data, the frame sequence number corresponding to the video frame is used as the image sequence number of the original image, the position of the target recognition box in the original image is determined based on the target recognition box output by the target recognition algorithm, the position information of each sub-image in the corresponding original image and the image sequence number of the corresponding original image are obtained, and the position information of each sub-image in the corresponding original image and the image sequence number of the corresponding original image are arranged in order from small to large according to the image sequence number to obtain the auxiliary information corresponding to the sub-image set.
[0027] In another application mode, the image sequence number of the original image is set in order from small to large according to the time of collection, the position of the feature point on the target recognition box in the original image is determined based on the target recognition box output by the target recognition algorithm, the feature point is located on the edge of the target recognition box, and the position of the feature point is used as the corresponding position information of the sub-image in the original image, the position information of each sub-image in the corresponding original image and the image sequence number of the corresponding original image are obtained, and the position information of each sub-image in the corresponding original image and the image sequence number of the corresponding original image are arranged in order from small to large according to the image sequence number to obtain the auxiliary information corresponding to the sub-image set.
[0028] Optionally, the auxiliary information further comprises a sub-image set corresponding auxiliary frame header, wherein the auxiliary frame header comprises but is not limited to a flag corresponding to gait recognition, the number of sub-images in the sub-image set, and the image size corresponding to the original image corresponding to the sub-image, wherein the flag is used to distinguish gait recognition from face recognition, fingerprint recognition, etc., and the image size corresponds to the display resolution of the original image.
[0029] In an application scenario, the target recognition frame is a rectangle, a point at the diagonal position of the target recognition frame is taken as a feature point, the position information of each sub-image corresponding to the feature point on the target recognition frame in the original image is determined based on the position of the feature point, a flag corresponding to gait recognition is obtained, the number of sub-images in the sub-image set is determined, and the resolution of the original image corresponding to the sub-image is determined, the auxiliary frame header corresponding to the sub-image set is generated based on the flag, the number of sub-images, and the resolution of the original image, the position information of each sub-image in the corresponding original image and the image sequence number of the corresponding original image are arranged after the auxiliary frame header in the order from small to large according to the image sequence number, and the auxiliary information corresponding to the sub-image set is obtained.
[0030] Further, when the auxiliary information is encoded together with the sub-image to obtain a sequence image, any processing terminal can determine that the sequence image is used for gait recognition based on the flag in the auxiliary information, and can determine the accurate position of the sub-image in the original image based on the image size and the position information of the original image in the auxiliary information, so as to determine the gait of the target to be measured based on each sub-image and its position in the original image, thereby improving the efficiency of gait recognition by the processing terminal.
[0031] S103: The sub-images in the sub-image set are spliced to obtain a spliced image corresponding to the target to be measured, and the auxiliary information corresponding to the sub-image set is added to the spliced image to obtain a sequence image corresponding to the target to be measured.
[0032] Specifically, the sub-images in the sub-image set are spliced to obtain a spliced image, and the auxiliary information corresponding to the sub-image set is spliced together with the spliced image to obtain a sequence image corresponding to the target to be measured.
[0033] In an application mode, the sub-images in the sub-image set are arranged in the order from small to large according to the image sequence number of the corresponding original image, the arranged images are image encoded to obtain a spliced image, and the auxiliary information is encoded after the spliced image to obtain a sequence image corresponding to the target to be measured.
[0034] In another application mode, the auxiliary information is converted into binary information corresponding to the auxiliary information, each sub-image in the sub-image set is sequentially spliced in the order of image sequence number from small to large, and coded into a spliced image, the binary information is added to a preset field of the spliced image, and a sequence image corresponding to the target to be detected is obtained. The preset field is a spare field reserved during coding.
[0035] Specifically, the auxiliary information is converted into binary information, so as to write the binary information into the image, sequentially splice each sub-image in the sub-image set in the order of image sequence number from small to large, and code into a spliced image in a preset image format. A spare field is reserved for the binary information as a preset field during the coding process, and then the binary information is added to the preset field of the spliced image, so as to obtain a sequence image corresponding to the target to be detected. The sequence image necessarily includes the auxiliary information, and the position of the auxiliary information in the sequence image is determined, so as to quickly locate the auxiliary information by any processing terminal and utilize the auxiliary information.
[0036] In an application scenario, each sub-image in the sub-image set is sequentially spliced in the order of image sequence number from small to large, and coded into a spliced image in a JPEG format. The JPEG format image reserves application program reserved marks, including Application1-Application15, during coding. Any application program reserved mark is used as a preset field, the binary information corresponding to the auxiliary information is written into the preset field, and a sequence image corresponding to the target to be detected is obtained.
[0037] S104: In response to the processing terminal obtaining the sequence image, the corresponding processing terminal determines the gait of the target to be detected based on each sub-image in the sequence image and the auxiliary information.
[0038] Specifically, if the current processing terminal obtains the sequence image, the current processing terminal analyzes the gait of the target to be detected based on the sub-image in the sequence image and the position of the sub-image in the original image, and determines the gait of the target to be detected.
[0039] Further, if other terminals different from the current processing terminal obtain the sequence image, the other processing terminals determine the image sequence number of the original image corresponding to each sub-image in the sequence image based on the auxiliary information in the sequence image, determine the position of the sub-image in the original image in the original image matched with the image sequence number, so as to reduce the consumption of processing terminal resources caused by target identification without re-identifying the target in the original image. The other processing terminals analyze the gait of the target to be detected based on the sub-image in the sequence image and the position of the sub-image in the original image, and determine the gait of the target to be detected.
[0040] Optionally, when the version of the identification algorithm corresponding to the processing terminal changes, the processing terminal determines the image sequence number of the original image corresponding to each sub-image in the sequence diagram based on the auxiliary information in the sequence diagram, determines the position of the sub-image in the original image in the original image matched by the image sequence number, thereby not needing to identify the target in the original image again, and the processing terminal analyzes the gait of the target to be measured based on the sub-image in the sequence diagram and the position of the sub-image in the original image, and determines the gait corresponding to the target to be measured based on the updated algorithm version.
[0041] The above scheme obtains an image sequence, obtains a plurality of sub-images including a target to be measured from a plurality of original images in the image sequence, obtains a sub-image set composed of the plurality of sub-images, generates auxiliary information corresponding to the sub-image set by using the position information of each sub-image in the corresponding original image and the image sequence number corresponding to the original image, performs splicing processing on each sub-image in the sub-image set to obtain a spliced image corresponding to the target to be measured, and adds the auxiliary information corresponding to the sub-image set to the spliced image to obtain a sequence diagram corresponding to the target to be measured. Therefore, the sequence diagram includes auxiliary information, which reduces the coupling degree of the image corresponding information and the processing terminal, and the auxiliary information includes position information and an image sequence number. When the processing terminal changes or the version of the identification algorithm changes, any processing terminal can determine the position of the sub-image in the original image corresponding to the image sequence number based on the auxiliary information after obtaining the sequence diagram, so that the processing terminal can determine the gait corresponding to the target to be measured based on the sequence diagram after obtaining the sequence diagram, thereby improving the efficiency of gait recognition by the processing terminal.
[0042] Referring to Figure 2 , Figure 2 is a flowchart of another embodiment of the gait recognition method of the present application. The method includes:
[0043] S201: Obtain an image sequence, and obtain a plurality of sub-images including a target to be measured from a plurality of original images in the image sequence to obtain a sub-image set composed of the plurality of sub-images.
[0044] Specifically, referring to Figure 3 , Figure 3 is Figure 2 corresponding to step S201, the image sequence can be obtained based on video data after frame extraction, or can be obtained based on a continuous exposure image acquisition device. The target to be measured is identified in a plurality of original images for image training, and sub-images including the target to be measured are extracted from the original images, as shown in Figure 3 , four original images compose an image sequence, the target to be measured is identified, and the pixels in the dashed line box are extracted to obtain a plurality of sub-images including the target to be measured, and then a sub-image set composed of the plurality of sub-images is obtained.
[0045] In an application scenario, a target recognition algorithm is used to recognize a to-be-detected target in an original image, a target recognition frame is used to mark the recognized target, pixels in the target recognition frame are extracted to obtain a sub-image including the to-be-detected target, and a plurality of sub-images form a sub-image set corresponding to the to-be-detected target.
[0046] In S202, position information of each sub-image in the corresponding original image is generated based on an image size of the original image corresponding to each sub-image.
[0047] Specifically, the original image corresponds to an image size of the original image, a coordinate system corresponding to the image size is established, and thus the position of each sub-image in the coordinate system of the original image corresponding to each sub-image is determined, and the position information of the original image corresponding to each sub-image is generated.
[0048] It can be understood that the coordinate system corresponding to the original image usually takes the lower left corner of the original image as the origin of the coordinate system and takes a unit size corresponding to the image size as the scale of the coordinate system. When the image size is the display resolution, the unit size is a single pixel.
[0049] In an application mode, the sub-image includes pixels in the target recognition frame in the corresponding original image, and the image size corresponds to the display resolution of the original image. Based on the image size of the original image corresponding to each sub-image, the position information of each sub-image in the corresponding original image is generated, including: based on the display resolution of the original image corresponding to each sub-image, determining, in the original image corresponding to each sub-image, a pixel coordinate corresponding to a feature point on the target recognition frame corresponding to each sub-image; and based on the pixel coordinate, generating the position information of each sub-image in the corresponding original image.
[0050] Specifically, a pixel coordinate system corresponding to the original image is established based on the display resolution of the original image corresponding to the original image, and a single pixel is taken as the scale of the coordinate system, so as to ensure that the pixel coordinate systems corresponding to the original images in the image sequence are all the same, so that the coordinate systems of the entire sequence image are unified with each other, the pixel coordinate corresponding to the feature point on the target recognition frame corresponding to each sub-image is determined in the pixel coordinate system of the original image corresponding to each sub-image, and the position information of each sub-image in the corresponding original image is generated based on the pixel coordinate of the feature point, so as to position the position of the target detection frame in the original image through the feature point on the target detection frame, reduce the data amount of the position information, and improve the efficiency of positioning the position of the target detection frame in the original image.
[0051] In an application scenario, the target recognition frame is a rectangle, and based on the display resolution of the original image corresponding to each sub-image, the pixel coordinates corresponding to the feature points on the target recognition frame corresponding to each sub-image are determined in the original image corresponding to each sub-image, including: based on the display resolution of the original image corresponding to each sub-image, the pixel coordinates corresponding to the feature points on the preset corner of the target recognition frame corresponding to each sub-image are determined in the original image corresponding to each sub-image; wherein the preset corner includes two corners on the diagonal of the target recognition frame, and the coordinate system corresponding to the pixel coordinates is related to the display resolution.
[0052] Specifically, the target recognition frame is a rectangle, so that the two angles on the diagonal of the target recognition frame are taken as the preset corner, and then the target recognition frame can be restored based on the preset corner, the data amount of the position information is reduced, the pixel coordinate system is established based on the display resolution of the original image corresponding to each sub-image, and the pixel coordinates corresponding to the feature points on the preset corner of the target recognition frame corresponding to the sub-image are determined. Therefore, the coordinate system corresponding to the pixel coordinates is related to the display resolution, so that the pixel coordinate systems of all original images corresponding to the sub-images are unified, and after the original image corresponding to the sub-image is obtained, the target detection frame corresponding to the to-be-detected target can be located in the original image based on the image size of the original image and the pixel coordinates of the two corners of the sub-image, thereby effectively reducing the data processing amount.
[0053] In a specific application scenario, the display resolution of the original image is 1920x1080, the pixel coordinate system is established based on the display resolution, and the image sequence shown in Figure 3 For example, the image sequence shown in the above is taken as an example, the detection frame serial numbers of the target detection frames from top to bottom are 1-4, the preset corner is the pixel coordinates corresponding to the upper left corner and the lower right corner, the image serial number of the original image corresponding to the target detection frame with the detection frame serial number of 1 is 378, the left upper coordinate of the detection frame is (1670, 7), and the right lower coordinate of the detection frame is (1916, 639). The image serial number of the original image corresponding to the target detection frame with the detection frame serial number of 2 is 380, the left upper coordinate of the detection frame is (1596, 14), and the right lower coordinate of the detection frame is (1909, 655). The image serial number of the original image corresponding to the target detection frame with the detection frame serial number of 3 is 382, the left upper coordinate of the detection frame is (1572, 18), and the right lower coordinate of the detection frame is (1884, 642). The image serial number of the original image corresponding to the target detection frame with the detection frame serial number of 4 is 384, the left upper coordinate of the detection frame is (1568, 10), and the right lower coordinate of the detection frame is (1843, 638).
[0054] S203: Based on the number of sub-images in the sub-image set and the image size of the original image corresponding to the sub-image, a secondary frame header corresponding to the sub-image set is determined.
[0055] Specifically, the number of sub-images in the sub-image set and the image size of the original image corresponding to the sub-image are taken as information included in the auxiliary frame header, and the auxiliary frame header corresponding to the sub-image set is generated, wherein the auxiliary frame header includes a plurality of bytes, each byte is predefined as a data storage location, and the processing terminal can obtain the number of sub-images and the image size of the original image corresponding to the sub-images based on the auxiliary frame header after obtaining the auxiliary information.
[0056] In an application mode, based on the number of sub-images in the sub-image set and the image size of the original image corresponding to the sub-image, the auxiliary frame header corresponding to the sub-image set is determined, including: obtaining an identification code and a flag bit corresponding to gait recognition; based on the identification code and the number of sub-images in the sub-image set, a standard frame header corresponding to the sub-image set is generated, based on the flag bit, the number of sub-images in the sub-image set and the image size of the original image corresponding to the sub-image, an extended frame header corresponding to the sub-image set is generated; based on the standard frame header and the extended frame header, the auxiliary frame header corresponding to the sub-image set is determined.
[0057] Specifically, the gait recognition corresponds to an identification code and a flag bit, and the identification code and the flag bit are matched with the gait recognition to distinguish from other identification modes and types. The processing terminal reads the identification code and / or flag bit, and can determine that the corresponding data in the auxiliary frame header is related to the gait recognition.
[0058] Further, the identification code and the number of sub-images in the sub-image set are added to the predefined data storage location to generate a standard frame header corresponding to the sub-image set, the flag bit, the number of sub-images in the sub-image set and the image size of the original image corresponding to the sub-image are added to the predefined data storage location to generate an extended frame header corresponding to the sub-image set, and the standard frame header and the extended frame header are arranged in sequence to obtain the auxiliary frame header corresponding to the sub-image set.
[0059] In a specific application scenario, the above process refers to Table 1 and Table 2 shown as follows. The byte with byte number 0 in the standard frame header is used to add an identification code 0x11 corresponding to gait recognition. 0x11 corresponds to the auxiliary information of gait recognition, so as to be distinguished from other types of auxiliary information. The bytes with byte numbers 2-3 are used to add the total length of the auxiliary frame header and sub-image data. The byte with byte number 4 is used to store the accurate total length when the frame length value overflows. The byte with byte number 5 is used to add a checksum for data verification. The other bytes are reserved and can be customized. The extended frame header is connected after the standard frame header. The bytes with byte numbers 8-15 are used to add a flag corresponding to gait recognition. The byte with byte number 16 is used to add an image type, wherein the image type corresponds to an original image, including but not limited to an RGB image and a grayscale image. The byte with byte number 17 is used to add the number of sub-images in the sub-image set. The bytes with byte numbers 18-19 are used to add the height of the display resolution of the original image. The bytes with byte numbers 20-21 are used to add the width of the display resolution of the original image. The bytes with byte numbers 22-23 are reserved and can be customized.
[0060] It should be noted that the arrangement form of the standard frame header and the auxiliary frame header is not limited to Table 1 and Table 2. The number of bytes and the content added in the bytes can be customized to obtain the auxiliary frame header corresponding to the sub-image set composed of the standard frame header and the extended frame header.
[0061] Table 1: Standard frame header
[0062]
[0063] Table 2: Extended frame header
[0064]
[0065] S204: Based on the auxiliary frame header, the image sequence numbers of the original images corresponding to each sub-image in the sub-image set, and the position information of each sub-image in the sub-image set in the corresponding original image, the auxiliary information corresponding to the sub-image set is generated.
[0066] Specifically, based on the image sequence numbers and position information of the original images corresponding to each sub-image in the sub-image set, sub-image information corresponding to the sub-image is generated. The sub-image information is arranged in the order of the image sequence numbers and the position information, so that the terminal can determine the image sequence numbers and the position information of the sub-image in order after parsing the auxiliary information.
[0067] In an application mode, the auxiliary information corresponding to the sub-image set is generated based on the auxiliary frame header, the image sequence numbers of the original images corresponding to each sub-image in the sub-image set, and the position information of each sub-image in the corresponding original image in the sub-image set, including: generating the sub-image information corresponding to each sub-image based on the image sequence numbers of the original images corresponding to each sub-image and the position information of each sub-image in the corresponding original image; arranging the standard frame header and the extended frame header in order, and arranging the sub-image information corresponding to each sub-image in the sub-image set in order of increasing image sequence number after the extended frame header to generate the auxiliary information corresponding to the sub-image set.
[0068] Specifically, when the target recognition frame is a rectangle, the position information includes the pixel coordinates of the feature points of the preset corners, the image sequence numbers corresponding to each sub-image and the position information are spliced as the sub-image information corresponding to each sub-image respectively, the standard frame header and the extended frame header are arranged in order, and the sub-image information corresponding to each sub-image in the sub-image set is arranged in order of increasing image sequence number after the extended frame header to generate the auxiliary information corresponding to the sub-image set, so that the processing terminal can determine that the auxiliary information is related to gait recognition after parsing the auxiliary information, determine the number of images and the image size, and then determine the image sequence numbers and the position information corresponding to each sub-image in order, so as to quickly locate the position of the sub-image in the original image and improve the efficiency of gait recognition by the processing terminal.
[0069] In a specific application scenario, please refer to Table 3 and Table 4 as shown below, the sub-image information corresponding to each sub-image is added after the extended frame header in order of increasing image sequence number, as shown in Table 3, the byte after the byte with byte number 24 is used to add the sub-image information corresponding to each sub-image in order of increasing image sequence number, as shown in Table 4, the sub-image information corresponding to each sub-image is arranged in order of increasing image sequence number.
[0070] Table 3: Auxiliary information
[0071] 0-7 8-23 24-… Standard frame header Extended frame header Sub-picture information
[0072] Table 4: Sub-image information
[0073] 0-3 4-5 6-7 8-9 10-11 Picture number X Y W h …… Picture number X Y W h
[0074] It should be noted that the arrangement form of the auxiliary information and the sub-image information is not limited to that shown in Table 3 and Table 4, and the number of bytes and the content added in the byte can be customized.
[0075] S205: Splicing the auxiliary information corresponding to the sub-image set and each sub-image in the sub-image set to obtain a sequence image corresponding to the target to be measured.
[0076] Specifically, each sub-image in the sub-image set is spliced in ascending order of image sequence number to obtain a spliced image, and the spliced image is combined with the auxiliary information to obtain a sequence image corresponding to the target to be detected, so that the sequence image necessarily includes the auxiliary information, and the coupling degree of the sub-image information and the auxiliary frame header with the processing terminal is reduced.
[0077] In an application mode, before the auxiliary information corresponding to the sub-image set and each sub-image in the sub-image set are spliced to obtain a sequence image corresponding to the target to be detected, the auxiliary information is further converted into binary information corresponding to the auxiliary information.
[0078] Specifically, the auxiliary information is converted into binary information to facilitate writing the binary information into the image, wherein when the auxiliary information includes the auxiliary frame header and the sub-image information, both the auxiliary frame header and the sub-image information are converted into binary information.
[0079] In an application scenario, please refer to Figure 3 , for example, the sub-image set shown in Figure 3 , after determining the standard frame header and the extended frame header corresponding to the sub-image set shown in Figure 3 , the standard frame header and the extended frame header are converted into binary information, and the sub-image information corresponding to the four sequence images is also converted into binary information. For convenience of representation, the binary representation is hexadecimal number, the standard frame header and the extended frame header are arranged as shown in Table 1 and Table 2, the standard frame header is: 11 00 48 00 00e8 0000, the flag in the extended frame header is: 47 41 49 54 53 45 51 53, the image type in the extended frame header is 00 and 04 respectively, the height of the original image in the extended frame header is: 80 01, the width of the original image in the extended frame header is: e0 00, and the image sequence number and the pixel coordinates corresponding to each sub-image in the sub-image information are: 7a 01 00 00 86 06 07 00 7c 077f 02(id:378)7c 01 00 00 3c 06 0e 00 75 07 8f 02(id:380)7e 01 00 00 24 06 1200 5c 07 82 02(id:382)80 01 00 00 20 06 0a 00 33 07 7e 02(id:384), wherein id is the image sequence number of the original image corresponding to the sub-image.
[0080] Further, the auxiliary information corresponding to the sub-image set and each sub-image in the sub-image set are spliced to obtain a sequence image corresponding to the target to be detected, including: splicing each sub-image in the sub-image set in order from small to large according to the image sequence number, and encoding into a spliced image; adding the binary information to the preset field of the spliced image to obtain the sequence image corresponding to the target to be detected; wherein the preset field is a spare field reserved during encoding.
[0081] Specifically, referring to Figure 4 , Figure 4 is Figure 2 the application scenario diagram of an embodiment corresponding to step S205 in Figure 4 , each sub-image in the sub-image set is spliced in order from small to large according to the image sequence number, and encoded into a spliced image as shown in , a spare field for binary information is reserved as a preset field during the encoding process, and then the binary information is added to the preset field of the spliced image to obtain a sequence image corresponding to the target to be detected, so that the sequence image necessarily includes the auxiliary information, and the position of the auxiliary information in the sequence image is determined, so as to facilitate any processing terminal to quickly locate the auxiliary information and utilize the auxiliary information to integrate the auxiliary information together on the basis of splicing multiple sub-images into one image, which increases the coupling between the target detection frame and the auxiliary information, and ensures the integrity and portability of the information.
[0082] Figure 5 , Figure 5 is Figure 2 the application scenario diagram of another embodiment corresponding to step S205 in Figure 5 , each sub-image in the sub-image set is spliced in order from small to large according to the image sequence number, and encoded into a spliced image in JPEG format, the JPEG format image includes a file header and a file tail, and the spliced image is arranged at a position corresponding to a frame in , each frame corresponds to a plurality of segments, including an additional segment header, a segment length, and the auxiliary information added after the segment length, wherein the JPEG format image reserves application program reserved markers during encoding, including Application1-Application15, for example, the auxiliary information is added in Application15 to obtain a sequence image in JPEG format, so that the sequence image can be applied to a conventional image processing terminal, and necessarily includes the auxiliary information.
[0083] S206: in response to the processing terminal obtaining the sequence image, so that the corresponding processing terminal determines the gait corresponding to the target to be detected based on each sub-image and the auxiliary information in the sequence image.
[0084] Specifically, the processing terminals include a current processing terminal and other processing terminals, and the current processing terminal and the other processing terminals include respective identification models, versions of the identification models being updated with changes in model parameters.
[0085] In an application mode, in response to the current processing terminal obtaining the sequence image, the current processing terminal causes the identification model corresponding thereto to determine the gait of the target to be measured and the gait feature value corresponding to the gait based on the respective sub-images corresponding to the sequence image and the positions of the respective sub-images in the corresponding original images; in response to the other processing terminals obtaining the sequence image, the other processing terminals determine the image sequence numbers of the original images corresponding to the respective sub-images based on the auxiliary information included in the sequence image, and determine the positions of the respective sub-images in the corresponding original images in the original images matched by the image sequence numbers, so that the identification models corresponding to the other processing terminals determine the gait of the target to be measured and the gait feature value corresponding to the gait based on the respective sub-images corresponding to the sequence image and the positions of the respective sub-images in the corresponding original images; in response to the parameters of the identification model corresponding to any processing terminal being updated, the processing terminal determines the image sequence numbers of the original images corresponding to the respective sub-images based on the auxiliary information included in the sequence image, and determines the positions of the respective sub-images in the corresponding original images in the original images matched by the image sequence numbers, so that the identification model corresponding to the processing terminal updates the gait of the target to be measured and the gait feature value corresponding to the gait based on the respective sub-images corresponding to the sequence image and the positions of the respective sub-images in the corresponding original images; wherein the gait feature value corresponds to the parameters of the identification model and the gait of the target to be measured.
[0086] Specifically, the current processing terminal has determined the positions of the sub-images in the original images when generating the position information, and after the current processing terminal obtains the sequence image, the identification model corresponding thereto determines the gait of the target to be measured and the gait feature value corresponding to the gait based on the respective sub-images corresponding to the sequence image and the positions of the respective sub-images in the corresponding original images, the gait feature value corresponding to the parameters of the identification model and the gait and including evaluation values in terms of stability, periodicity, rhythm, directionality and coordination, so that the gait feature value is more accurate and the identification model is more accurate. Figure 4 Taking the sequence image shown in FIG. 3 as an example, the identification model of the current processing terminal identifies the biological features of the target to be measured, and determines that the target to be measured is crossing the road and the gait of the target to be measured when crossing the road in combination with the positions of the sub-images in the original images, and determines the gait feature value based on the parameters of the identification model.
[0087] Further, after the other processing terminal obtains the sequence diagram, the image sequence number of the original image corresponding to each sub-image is determined based on the auxiliary information included in the sequence diagram, and the position of each sub-image in the corresponding original image is determined in the original image matched with the image sequence number, so that target detection on the target to be measured is not needed again, and the position of each sub-image in the corresponding original image can be determined based on the auxiliary information. The corresponding recognition model of the other processing terminal determines the gait corresponding to the target to be measured and the gait feature value corresponding to the gait based on each sub-image corresponding to the sequence diagram and the position of each sub-image in the corresponding original image, and the efficiency of gait recognition is improved.
[0088] It should be noted that after the parameters of the recognition model corresponding to any processing terminal are updated, the evaluation mode of the recognition model on the stability, periodicity, rhythm, directionality and coordination of the gait feature value may change. Therefore, after the parameters of the recognition model are updated, the image sequence number of the original image corresponding to each sub-image is determined based on the auxiliary information included in the sequence diagram, and the position of each sub-image in the corresponding original image is determined in the original image matched with the image sequence number, so that target detection on the target to be measured is not needed again, and the position of each sub-image in the corresponding original image can be determined based on the auxiliary information. The corresponding recognition model of the other processing terminal determines the gait corresponding to the target to be measured and the gait feature value corresponding to the gait based on each sub-image corresponding to the sequence diagram and the position of each sub-image in the corresponding original image, and the adaptability to different versions of the recognition model, that is, different recognition algorithms is improved.
[0089] In this embodiment, the auxiliary information is integrated together on the basis of splicing multiple sub-images into one image, so that the coupling between the target detection frame and the auxiliary information is increased, and the integrity and migration of the information are ensured. The auxiliary information includes a standard frame header, an extended frame header and sub-image information, and the coupling degree of the auxiliary information with the processing terminal is low, so that any processing terminal can determine the position of each sub-image in the corresponding original image based on the auxiliary information, and determine or update the gait of the target to be measured and the gait feature value corresponding to the gait.
[0090] Please refer to Figure 6 , Figure 6 is a structural schematic diagram of an embodiment of an electronic device of the present application. The electronic device 60 includes a memory 601 and a processor 602 coupled with each other. The memory 601 stores program data (not shown in the figure), and the processor 602 invokes the program data to implement the method in any of the above embodiments. For related content, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0091] Please refer to Figure 7 , Figure 7is a structural schematic diagram of an embodiment of a computer readable storage medium of the present application, the computer readable storage medium 70 stores program data 700, the program data 700 is executed by a processor to implement the method in any of the above embodiments, for related content, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0092] It should be noted that the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0093] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0094] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and various program codes that can store media.
[0095] If the technical solutions of the present application involve personal information, the product applying the technical solutions of the present application has been explicitly informed of the personal information processing rules before processing the personal information, and has obtained the personal independent consent. If the technical solutions of the present application involve sensitive personal information, the product applying the technical solutions of the present application has obtained the personal independent consent before processing the sensitive personal information, and at the same time meets the requirement of "explicit consent". For example, at the personal information collection device such as camera, a clear and prominent mark is set to inform that it has entered the personal information collection range and will collect personal information. If the individual voluntarily enters the collection range, it is considered to agree to collect personal information. Or, on the device for processing personal information, the personal information processing rules are informed by using obvious marks / information, and the personal authorization is obtained by means of pop-up information or asking the individual to upload his / her personal information. The personal information processing rules can include personal information processor, personal information processing purpose, processing method and personal information type, etc.
[0096] The above is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A gait recognition method, characterized in that, The method includes: Obtain an image sequence, and from multiple original images in the image sequence, obtain multiple sub-images including the target to be tested, to obtain a set of sub-images composed of multiple sub-images; Based on the position information of each sub-image in the corresponding original image, and the image sequence number of the original image corresponding to each sub-image, auxiliary information corresponding to the sub-image set is generated; Each of the sub-images in the sub-image set is stitched together to obtain a stitched image corresponding to the target under test. The auxiliary information corresponding to the sub-image set is added to the stitched image to obtain a sequence image corresponding to the target under test. In response to a processing terminal obtaining the sequence image, the corresponding processing terminal determines the gait corresponding to the target under test based on each of the sub-images in the sequence image and the auxiliary information. The processing terminal includes a current processing terminal and other processing terminals, each with its own recognition model. When the current processing terminal obtains the sequence image, its corresponding recognition model determines the gait and gait feature values corresponding to the target under test based on each of the sub-images in the sequence image and their positions in their respective original images. When other processing terminals obtain the sequence image, they determine the image number of each sub-image in the original image based on the auxiliary information included in the sequence image, and determine the position of each sub-image in the original image matched by the image number. This allows the recognition model of the other processing terminal to determine the gait and gait feature values corresponding to the target under test based on each of the sub-images in the sequence image and their positions in their respective original images.
2. The gait recognition method according to claim 1, characterized in that, The step of generating auxiliary information corresponding to the set of sub-images based on the position information of each sub-image in its corresponding original image and the image sequence number of the original image corresponding to each sub-image includes: Based on the image size of the original image corresponding to each sub-image, the position information of each sub-image in the corresponding original image is generated; Based on the number of sub-images in the sub-image set and the image size of the original image corresponding to the sub-image, determine the auxiliary frame header corresponding to the sub-image set; Based on the auxiliary frame header, the image sequence number of the original image corresponding to each sub-image in the sub-image set, and the position information of each sub-image in the sub-image set in the corresponding original image, auxiliary information corresponding to the sub-image set is generated.
3. The gait recognition method according to claim 2, characterized in that, The sub-image includes pixels within the target recognition box in the corresponding original image, and the image size corresponds to the display resolution of the original image; The step of generating the position information of each sub-image in the corresponding original image based on the image size of each sub-image includes: Based on the display resolution of the original image corresponding to each of the sub-images, the pixel coordinates corresponding to the feature points on the target recognition box corresponding to each of the sub-images are determined in the original image corresponding to each of the sub-images; Based on the pixel coordinates, the position information of each sub-image in the corresponding original image is generated.
4. The gait recognition method according to claim 3, characterized in that, The target recognition box is rectangular. The step of determining the pixel coordinates of the feature points on the target recognition box corresponding to each sub-image in the original image corresponding to each sub-image, based on the display resolution of the original image corresponding to each sub-image, includes: Based on the display resolution of the original image corresponding to each of the sub-images, the pixel coordinates corresponding to the feature points of the preset corners of the target recognition box corresponding to each of the sub-images are determined in the original image corresponding to each of the sub-images; The preset corners include the two corners on the diagonal of the target recognition frame, and the coordinate system corresponding to the pixel coordinates is related to the display resolution.
5. The gait recognition method according to claim 2, characterized in that, The step of determining the auxiliary frame header corresponding to the sub-image set based on the number of sub-images in the sub-image set and the image size of the original image corresponding to the sub-images includes: Obtain the identification code and flag bits corresponding to gait recognition; Based on the identification code and the number of sub-images in the sub-image set, a standard frame header corresponding to the sub-image set is generated; based on the flag bit, the number of sub-images in the sub-image set, and the image size of the original image corresponding to the sub-image, an extended frame header corresponding to the sub-image set is generated. Based on the standard frame header and the extended frame header, the auxiliary frame header corresponding to the sub-image set is determined.
6. The gait recognition method according to claim 5, characterized in that, The step of generating auxiliary information corresponding to the sub-image set based on the auxiliary frame header, the image sequence number of the original image corresponding to each sub-image in the sub-image set, and the position information of each sub-image in the sub-image set in the corresponding original image includes: Based on the image sequence number of the original image corresponding to each sub-image and the position information of each sub-image in the corresponding original image, sub-image information corresponding to each sub-image is generated; Arrange the standard frame header and the extended frame header in sequence, and arrange the sub-image information corresponding to each sub-image in the sub-image set in ascending order of image number after the extended frame header to generate auxiliary information corresponding to the sub-image set.
7. The gait recognition method according to any one of claims 1-6, characterized in that, Before performing the stitching process on each of the sub-images in the sub-image set to obtain the stitched image corresponding to the target under test, and adding the auxiliary information corresponding to the sub-image set to the stitched image to obtain the sequence image corresponding to the target under test, the method further includes: The auxiliary information is converted into binary to obtain the binary information corresponding to the auxiliary information; The step of stitching together the sub-images in the sub-image set to obtain a stitched image corresponding to the target under test, and adding the auxiliary information corresponding to the sub-image set to the stitched image to obtain a sequence image corresponding to the target under test, includes: The sub-images in the sub-image set are sequentially stitched together in ascending order of image number and encoded into the stitched image. The binary information is added to a preset field of the stitched image to obtain the sequence image corresponding to the target to be tested; wherein, the preset field is a reserved empty field during encoding.
8. The gait recognition method according to claim 1, characterized in that, Also includes: In response to the parameter update of the recognition model corresponding to any processing terminal, based on the auxiliary information included in the sequence diagram, the image number of the original image corresponding to each sub-image is determined, and the position of each sub-image in the corresponding original image is determined in the original image matched by the image number, so that the recognition model of the corresponding processing terminal updates the gait corresponding to the target under test and the gait feature value corresponding to the gait based on each sub-image corresponding to the sequence diagram and the position of each sub-image in the corresponding original image; The gait feature values correspond to the parameters of the recognition model and the gait of the target being tested.
9. An electronic device, characterized in that, include: A memory and a processor are coupled to each other, wherein the memory stores program data, and the processor invokes the program data to perform the method as described in any one of claims 1-8.
10. A computer-readable storage medium storing program data thereon, characterized in that, When the program data is executed by the processor, the method as described in any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Gait recognition method and device, computer equipment and storage medium
CN111950321A