Community identification method and apparatus, electronic device, and storage medium
By performing spatiotemporal segmentation and raw image analysis on the video archives of the individuals to be identified, the problem of low accuracy in community identification was solved, and more accurate community relationship identification was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
- Filing Date
- 2023-02-07
- Publication Date
- 2026-06-23
AI Technical Summary
Existing community identification technologies suffer from low accuracy, mainly because the group tags are not finely segmented within a unit of time, leading to misidentification of community relationships.
By spatiotemporally segmenting the archival data of multiple individuals to be identified, the first community relationship is determined using the spatiotemporal segmentation results, and the second community relationship is determined based on the original captured images, thereby improving the recognition accuracy.
Determining community relationships at a more granular data level improves the accuracy of community identification.
Smart Images

Figure CN116166833B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to a community identification method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, community identification for different individuals mainly utilizes archival data to label groups of people within the same camera and time frame. These labels are then used to identify individuals within their respective communities. However, since these group labels are calculated solely based on the spatiotemporal dimensions of archival data, their accuracy depends heavily on the time frame. If the time frame is too large, individuals without community relationships may be identified as having them; conversely, if the time frame is too small, individuals with community relationships may be identified as not having them. Therefore, current community identification methods suffer from low accuracy. Summary of the Invention
[0003] This invention provides a community identification method aimed at addressing the low accuracy problem in existing community identification methods. By spatiotemporally segmenting the archival data of multiple individuals to be identified, the method determines a first community relationship among them. Then, it uses this first community relationship to determine a second community relationship among multiple original captured images. Because the second community relationship is further determined using the original captured images, community relationships can be identified at a finer data level, leading to more accurate community relationship identification and thus improving the accuracy of community relationship identification.
[0004] Firstly, the main objective of this invention is to provide a community identification method, comprising:
[0005] Acquire the image archive data of multiple individuals to be identified;
[0006] The captured archive data is spatiotemporally segmented to obtain spatiotemporal segmentation results, and the first community relationship between multiple individuals to be identified is determined based on the spatiotemporal segmentation results.
[0007] Based on the first community relationship, original images of multiple individuals to be identified are determined, and a second community relationship between the multiple individuals to be identified is determined based on the original images.
[0008] Optionally, the spatiotemporal segmentation processing of the captured archive data to obtain the spatiotemporal segmentation result includes:
[0009] The spatiotemporal trajectories of the multiple individuals to be identified are determined based on the captured data of the multiple individuals to be identified.
[0010] Based on the spatiotemporal trajectory, the captured archive data of multiple individuals to be identified are spatiotemporally segmented to obtain spatiotemporal segmentation results.
[0011] Optionally, the step of performing spatiotemporal segmentation processing on the captured archive data of multiple persons to be identified based on the spatiotemporal trajectory to obtain spatiotemporal segmentation results includes:
[0012] Determine the starting point and step size for segmentation on the spatiotemporal trajectory;
[0013] Based on the segmentation starting point and segmentation step size, the spatiotemporal trajectory is segmented to determine the segmentation region of the spatiotemporal trajectory;
[0014] The spatiotemporal segmentation result of the captured archive data is determined based on the segmentation region of the spatiotemporal trajectory.
[0015] Optionally, the first community relationship includes a first peer relationship, and determining the first community relationship among multiple individuals to be identified based on the spatiotemporal segmentation results includes:
[0016] The relationship between the individuals to be identified that are located in the same spatiotemporal segmentation result is determined as the first peer relationship.
[0017] Optionally, the step of determining the original images of multiple individuals to be identified based on the first community relationship, and determining the second community relationship between the multiple individuals to be identified based on the original images, includes:
[0018] Among the multiple individuals to be identified, the target individuals who share the same first peer relationship are determined;
[0019] Based on the shooting archive data corresponding to the target personnel who have the same first peer relationship, the original shooting images of at least two target personnel who have the same first peer relationship are determined.
[0020] The second community relationship between the target individuals is determined based on the original captured images.
[0021] Optionally, determining the second community relationship between the target individuals based on the original captured images includes:
[0022] The human outlines of each of the target persons are determined in the original captured images;
[0023] Based on the human bounding box of each target person, determine the distance between each target person and the human attributes corresponding to each target person;
[0024] The second community relationship between the target individuals is determined based on the distance between them and the corresponding human attributes of each target individual.
[0025] Optionally, the human body attributes include human body width and human body height. Determining the second community relationship between the target individuals based on the distance between them and their corresponding human body attributes includes:
[0026] A first judgment condition is determined based on the width of the human body corresponding to the two target persons, and a second judgment condition is determined based on the height of the two human bodies;
[0027] A second community relationship between the two target individuals is determined based on the distance between them, the first judgment condition, and the second judgment condition.
[0028] Secondly, embodiments of the present invention provide a community identification device, comprising:
[0029] The acquisition module is used to acquire the image archive data of multiple individuals to be identified;
[0030] The first processing module is used to perform spatiotemporal segmentation on the captured archive data, obtain spatiotemporal segmentation results, and determine the first community relationship between multiple individuals to be identified based on the spatiotemporal segmentation results.
[0031] The second processing module is used to determine the original images of multiple individuals to be identified based on the first community relationship, and to determine the second community relationship between the multiple individuals to be identified based on the original images.
[0032] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the community identification method described above.
[0033] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the community identification method described above.
[0034] In this embodiment of the invention, photographic archive data of multiple individuals to be identified are acquired; the photographic archive data is spatiotemporally segmented to obtain spatiotemporal segmentation results, and a first community relationship among the multiple individuals to be identified is determined based on the spatiotemporal segmentation results; original photographic images of the multiple individuals to be identified are determined based on the first community relationship, and a second community relationship among the multiple individuals to be identified is determined based on the original photographic images. By spatiotemporally segmenting the photographic archive data of multiple individuals to be identified, determining the first community relationship among the multiple individuals to be identified using the spatiotemporal segmentation results, and determining the second community relationship among the multiple individuals to be identified based on the first community relationship using multiple original photographic images, the community relationship can be determined at a more granular data level, resulting in more accurate community relationship identification and thus improving the accuracy of community relationship identification. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0036] Figure 1 A flowchart of a community identification method provided in an embodiment of the present invention;
[0037] Figure 2 This is a structural diagram of the community identification device provided in an embodiment of the present invention;
[0038] Figure 3 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0040] Please refer to Figure 1 , Figure 1 This is a flowchart of a community identification method provided in an embodiment of the present invention, such as... Figure 1 As shown, a specific embodiment of the present invention provides a community identification method, including:
[0041] 101. Obtain the image archive data of multiple individuals to be identified.
[0042] In this embodiment of the invention, cameras positioned at different shooting locations can acquire image data of individuals appearing at various shooting locations at different times. This image data is then archived to obtain image file data for each individual. The aforementioned image data is portrait image data. The cameras capture images at the shooting locations to obtain raw images. Person detection is then performed on the raw images to obtain portrait image data for each individual. Each portrait image data set includes the shooting location, shooting time, and portrait data.
[0043] The individuals to be identified can be user-specified individuals or all individuals appearing at various shooting locations. When the individuals to be identified are user-specified individuals, the community identification method of this embodiment can be used in scenarios involving community identification of a specified group of people. When the individuals to be identified are all individuals appearing at various shooting locations, the community identification method of this embodiment can be used in scenarios involving community identification and the establishment of a community relationship database for all individuals.
[0044] After obtaining image data of individuals at different times and locations, the image similarity between two sets of images can be calculated. Based on the image similarity, individuals are clustered, resulting in multiple clusters of image data. Within each cluster, image data meeting the requirements for image quality and angle are selected as representative images. Archives are created based on the corresponding image data of these representative images, resulting in initial archives for each individual. Based on the image similarity between the representative images and other images within the same cluster, images with similarity less than a threshold are filtered out. Images with similarity greater than or equal to the threshold are added to their corresponding initial archives, resulting in the final archives. Each archive corresponds to one individual and includes their archive data, including the shooting location, shooting time, and image data.
[0045] Specifically, the image data of each person at different times and locations is used to extract the portrait data of each person, denoted as b. n {b1, b2, b3, ..., b n}, where n represents the number of portrait data points, and for portrait data b n {b1, b2, b3, ..., b n Perform n:n image similarity calculations to obtain a similarity set sim ij{sim 11 , sim 12 , sim 13 , ..., sim ij}, where sim ij Represents human image data b i and portrait data b j The image similarity between the images can be Euclidean distance similarity or cosine similarity; in this embodiment of the invention, cosine similarity is preferred. Clustering is performed based on the image similarity to obtain {hectare 1, hectare 2, ..., hectare N}, where N represents N image data hectares. Each image data hectare includes all image data from the same clustering result. For each image data hectare, image data with acceptable image quality and angle can be selected as representative image data. Specifically, image data with image quality greater than or equal to an image quality threshold and angle within a preset angle range can be selected as representative image data. Archiving is performed on each image data hectare to obtain an initial shooting archive set aidN{aid1, aid2, aid3, ..., aidN}. The initial shooting archive set includes N initial shooting archives, each containing image data from the corresponding image data hectare.
[0046] For the initial captured files, a preset file aggregation threshold 'a' can be used. sim Perform filtering to convert sim ij -a sim >0 is used as a retention condition. sim that satisfies the retention condition ij Then, the sims that do not meet the retention criteria will be retained. ij Then discard it. Specifically, it can be based on the similarity set sim ij {sim 11 , sim 12 , sim 13 , ..., sim ij} to determine the image similarity between representative portrait data in the initial shooting archive. ij sim that meets the retention conditions ij This indicates that the i-th representative portrait data is sufficiently similar to the j-th representative portrait data and can be retained; otherwise, the sim image does not meet the retention criteria. ij This indicates that the i-th representative portrait data is not similar to the j-th representative portrait data and can be discarded, thus obtaining the intermediate shooting archive data a. m {a1, a2, a3, ..., a m}, where a m This represents portrait photography data, where m represents the number of portrait photography data items retained in the intermediate shooting archive data. The portrait photography data includes the shooting location, shooting time, and portrait data.
[0047] After obtaining intermediate shooting archive data a m {a1, a2, a3, ..., a m After that, based on the initial set of captured files aidN{aid1, aid2, aid3, ..., aidN}, the archiving threshold β is set. ij Calculate the image similarity between all portrait data and the representative portrait data in the intermediate shooting archive data, and set the image similarity to satisfy sim. ij -β ij Image data with a similarity greater than 0 is retained; specifically, images that meet the sim... ij -β ij Image data with a similarity greater than 0 and the highest image similarity is retained. In one possible implementation, the similarity set sim can be reused. ij {sim 11 , sim 12 , sim 13 , ..., sim ij}, in the similarity set sim ij {sim 11 , sim 12 , sim 13 , ..., sim ij Searching for intermediate shooting archive data in} m {a1, a2, a3, ..., a m Related image similarity sim ij Image similarity satisfies sim ij -β ij Image data with a similarity greater than 0 is retained; specifically, images that meet the sim... ij -β ij The image data of the person with the highest similarity (>0) is retained. This yields the final image archive data a. k {a1, a2, a3, ..., a k}, a k This represents the portrait photography data, where k represents the number of portrait photography data items retained in the final shooting archive. The portrait photography data includes the shooting location, shooting time, and portrait data.
[0048] The video archive data of the aforementioned multiple individuals to be identified can be represented by a set aidM{aid1, aid2, aid3, ..., aidM}, where M represents the number of individuals to be identified, and aidM represents the video archive data of the Mth individual. k {a1, a2, a3, ..., a k}
[0049] 102. Perform spatiotemporal segmentation on the captured archive data to obtain spatiotemporal segmentation results, and determine the first community relationship between multiple individuals to be identified based on the spatiotemporal segmentation results.
[0050] In this embodiment of the invention, among the shooting files of multiple persons to be identified, it can be determined whether any two shooting files of persons to be identified have the same shooting location. If the shooting files of two persons to be identified have the same shooting location, it can be determined whether the two persons to be identified have an overlap within a preset time.
[0051] Specifically, the captured archival data can be spatiotemporally segmented by setting a preset start location and time range, resulting in multiple spatiotemporal segments with no overlap in location or time. If some or all of the individuals to be identified appear in the same time segment, it indicates that they were at the same location at the same time, thus establishing a primary community relationship among them. This primary community relationship can be a peer relationship or a companion relationship, among others.
[0052] 103. Based on the first community relationship, determine the original images of multiple individuals to be identified, and determine the second community relationship between the multiple individuals to be identified based on the original images.
[0053] In this embodiment of the invention, for individuals to be identified who share the same first community relationship, the corresponding original captured image can be retrieved. The individuals to be identified who share the same first community relationship can be some or all of a plurality of individuals to be identified. When all of the plurality of individuals to be identified share the same first community relationship, then the individuals to be identified who share the same first community relationship are all of the individuals to be identified. When some of the plurality of individuals to be identified share the same first community relationship, then the individuals to be identified who share the same first community relationship are those individuals who share the same first community relationship.
[0054] After obtaining the original images of individuals with the same primary social group relationship, it can be determined whether all individuals with the same primary social group relationship appear in the same original image. If only some individuals with the same primary social group relationship appear in the same original image, the relationship between these individuals can be defined as a secondary social group relationship. This secondary social group relationship includes those of colleagues, companions, and those of contact.
[0055] Furthermore, based on the image information of the individuals to be identified in the same original image, it can be determined whether the relationship between the individuals to be identified in the same original image is a second community relationship. For example, the position of each individual to be identified in the original image can be calculated, and the distance between each individual to be identified in the original image can be determined based on the position of each individual to be identified in the original image. The relationship between individuals to be identified whose distance is less than a preset distance can be determined as a second community relationship.
[0056] In this embodiment of the invention, photographic archive data of multiple individuals to be identified are acquired; the photographic archive data is spatiotemporally segmented to obtain spatiotemporal segmentation results, and a first community relationship among the multiple individuals to be identified is determined based on the spatiotemporal segmentation results; original photographic images of the multiple individuals to be identified are determined based on the first community relationship, and a second community relationship among the multiple individuals to be identified is determined based on the original photographic images. By spatiotemporally segmenting the photographic archive data of multiple individuals to be identified, determining the first community relationship among the multiple individuals to be identified using the spatiotemporal segmentation results, and determining the second community relationship among the multiple individuals to be identified based on the first community relationship using multiple original photographic images, the community relationship can be determined at a more granular data level, resulting in more accurate community relationship identification and thus improving the accuracy of community relationship identification.
[0057] It is understood that in the specific embodiments of this application, data such as images of people, shooting locations, and shooting archive data are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0058] Optionally, in the step of performing spatiotemporal segmentation on the captured archive data to obtain spatiotemporal segmentation results, the spatiotemporal trajectories of multiple individuals to be identified can be determined based on the captured archive data of multiple individuals to be identified; the captured archive data of multiple individuals to be identified can be spatiotemporally segmented based on the spatiotemporal trajectories to obtain spatiotemporal segmentation results.
[0059] In this embodiment of the invention, the image archive data a of each person to be identified k {a1, a2, a3, ..., a k The dataset contains data on k portrait shots, each including the shooting location, shooting time, and portrait data. Based on the shooting location and shooting time, the image archive data a can be obtained. k {a1, a2, a3, ..., a kThe corresponding spatiotemporal trajectory P includes trajectory points corresponding to the shooting location and shooting time. The spatiotemporal trajectory P can be obtained through {p1, p2, p3, ..., p...} k The trajectory point p is represented as follows: i =(camera) i , t i camera i t represents the location where the i-th person's portrait data was taken. i This represents the shooting time of the i-th portrait data.
[0060] The trajectory P can be divided according to preset rules to obtain a set of divided regions {RT1, RT2, RT3, ..., RT...}. v}, the set of regions to be divided is {RT1, RT2, RT3, ..., RT}. v The dataset includes v segmentation regions. The preset rules can be either manually set segmentation start point and segmentation step size T, or the segmentation start point can be determined based on the start point of the spatiotemporal trajectory P, and the segmentation step size T can be determined based on the length of the spatiotemporal trajectory P. The trajectory P is segmented using the segmentation start point and segmentation step size T to obtain the set of segmentation regions {RT1, RT2, RT3, ..., RT...}. v}, where RT1={p1, p2, p3, ..., p T}, RT v ={p k-T p k-T+1 p k-T+2 , ..., pk}.
[0061] It can be based on the set of partitioned regions {RT1, RT2, RT3, ..., RT...} v Mapping to a k {a1, a2, a3, ..., a k In}, thus affecting a k {a1, a2, a3, ..., a k Perform spatiotemporal partitioning to obtain the spatiotemporal partitioning result {aT1, aT2, aT3, ..., aT}. v The spatiotemporal partitioning result includes v spatiotemporal partitions.
[0062] Optionally, in the step of performing spatiotemporal segmentation on the captured archival data of multiple individuals to be identified based on the spatiotemporal trajectory to obtain the spatiotemporal segmentation result, the segmentation starting point and segmentation step size can be determined on the spatiotemporal trajectory; the spatiotemporal trajectory can be segmented based on the segmentation starting point and segmentation step size to determine the segmentation area of the spatiotemporal trajectory; and the spatiotemporal segmentation result of the captured archival data can be determined based on the segmentation area of the spatiotemporal trajectory.
[0063] In this embodiment of the invention, for a spatiotemporal trajectory P M {p 1,M p 2,M p 3,M , ..., p k,M}, can P M The first trajectory point p 1,M = (camera1, t1) is used as the segmentation starting point. Based on the segmentation starting point, a preset unit time is used as the segmentation step size T, and the segmentation range is the segmentation range before and after the segmentation starting point, for the spatiotemporal trajectory P. M The segment is divided to obtain the segmented region RT1. Based on the segmentation starting point, it slides 2T in the time sequence direction to obtain a new segmentation starting point. Based on the new segmentation starting point, a preset unit time is used as the segmentation step size T, and the segmentation range is the segmentation range before and after the new segmentation starting point. The spatiotemporal trajectory P is then segmented. M The segment is divided into segments, resulting in segmented region RT2. This process is repeated to obtain the final segmented region RT. v .
[0064] After obtaining the spacetime trajectory P M {p 1,M p 2,M p 3,M , ..., p k,M The set {RT1, RT2, RT3, ..., RT} v After that, the spacetime trajectory P M {p 1,M p 2,M p 3,M , ..., p k,M The set {RT1, RT2, RT3, ..., RT} v The data is mapped to the image archive data of all persons to be identified, aidM{aid1, aid2, aid3, ..., aidM}, to obtain the spatiotemporal segmentation result {aT1, aT2, aT3, ..., aT}. v}
[0065] Optionally, the first community relationship includes the first peer relationship. In the step of determining the first community relationship between multiple individuals to be identified based on the spatiotemporal segmentation results, the relationship between individuals to be identified located in the same spatiotemporal segment can be determined as the first peer relationship.
[0066] In this embodiment of the invention, the first community relationship includes a first peer relationship, which can be defined as the relationship between individuals to be identified located in the same spatiotemporal segment. It should be noted that the first peer relationship only describes the peer relationship between individuals to be identified at the spatiotemporal level.
[0067] Optionally, in the steps of determining the original images of multiple individuals to be identified based on the first community relationship and determining the second community relationship between the multiple individuals to be identified based on the original images, target individuals with the same first peer relationship can be identified among the multiple individuals to be identified; based on the shooting file data corresponding to the target individuals with the same first peer relationship, original images of at least two target individuals with the same first peer relationship can be determined; and the second community relationship between each target individual can be determined based on the original images.
[0068] In this embodiment of the invention, individuals sharing the same first peer relationship can be identified as target individuals, and their corresponding original images can be retrieved based on these target individuals. The target individuals can be some or all of a plurality of individuals to be identified. When all individuals to be identified share the same first peer relationship, the target individuals are all of the individuals to be identified. When some individuals to be identified share the same first peer relationship, the target individuals are those individuals sharing the same first peer relationship. After identifying the target individuals, the corresponding original images can be obtained using the shooting location and shooting time from the shooting archive data. The original images can be understood as large-scale images, which may include the facial data of multiple individuals.
[0069] After obtaining the original images of the target individuals, it can be used to determine whether all individuals with the same first peer relationship appear in the same original image. If only some individuals with the same first peer relationship appear in the same original image, the relationship between these individuals can be defined as a second community relationship. The aforementioned second community relationships include second peer relationships, companion relationships, and contact relationships.
[0070] Furthermore, based on the image information of the individuals to be identified in the same original image, it can be determined whether the relationship between the individuals to be identified in the same original image is a second community relationship. For example, the position of each individual to be identified in the original image can be calculated, and the distance between each individual to be identified in the original image can be determined based on the position of each individual to be identified in the original image. The relationship between individuals to be identified whose distance is less than a preset distance can be determined as a second community relationship.
[0071] Optionally, in the step of determining the second community relationship between each target person based on the original captured image, the human bounding box of each target person can be determined in the original captured image; the distance between each target person and the corresponding human attributes of each target person can be determined based on the human bounding box of each target person; and the second community relationship between each target person can be determined based on the distance between each target person and the corresponding human attributes of each target person.
[0072] In this embodiment of the invention, target detection is performed on the original captured image to obtain the human bounding boxes (startX, startY, endX, endY) of each target person, where (startX, startY) represents the coordinates of the upper left corner of the human bounding box and (endX, endY) represents the coordinates of the lower right corner of the human bounding box. The position of each target person can be determined based on the human bounding boxes (startX, startY, endX, endY), and the distance between each target person can be determined based on the position of each target person. The human attributes corresponding to each target person can be determined based on the human bounding boxes corresponding to each target person.
[0073] Specifically, the location of the target person is the coordinate of the center point of the human bounding box, which can be calculated using the following formula:
[0074]
[0075] After obtaining the location of each target person, the distance between each pair of target persons can be calculated. The distance between target persons can be calculated using the following formula:
[0076]
[0077] Where, distance AB x represents the distance between target person A and target person B. a and y a Indicates the location of target person A, x b and y b This indicates the location of target person B.
[0078] Optionally, the human body attributes include human body width and human body height. In the step of determining the second community relationship between each target person based on the distance between each target person and the human body attributes corresponding to each target person, a first judgment condition can be determined based on the human body width of two target persons, and a second judgment condition can be determined based on the human body height of two target persons; the second community relationship between the two target persons is determined based on the distance between the two target persons, the first judgment condition, and the second judgment condition.
[0079] In this embodiment of the invention, the aforementioned human body width can be determined by the width of the human body frame, and the aforementioned human body height can be determined by the height of the human body frame. Specifically, the aforementioned human body width can be calculated using the following formula:
[0080]
[0081] Where, distanceW AThis indicates the width of the target person's body.
[0082] The above-mentioned human height can be calculated using the following formula:
[0083]
[0084] Where, distanceH A This indicates the height of the target person.
[0085] Because the two individuals are in the same line of work, they need to be on the same Y-axis coordinate system. In order to prevent Y-axis overlap due to occlusion during photography, they also need to be within a certain distance on the X-axis coordinate system.
[0086] The first judgment condition mentioned above is used to determine whether the target personnel have a second peer relationship or a companion relationship, and the second judgment condition mentioned above is used to determine whether the target personnel have a contact relationship.
[0087] Specifically, the first judgment condition mentioned above can be determined based on the human body width, human body height, and the difference values in the Y-axis coordinate system and the X-axis coordinate system. The difference value in the Y-axis coordinate system is used to describe the front-to-back difference between two target individuals, and the difference value in the X-axis coordinate system is used to describe the left-to-right difference between two target individuals.
[0088] The difference value distanceY in the Y-axis coordinate system AB The calculation can be performed using the following formula:
[0089] distanceY AB =|y a -y b |∈ corresponds to the distance between A and B on the Y-axis
[0090] The difference value distanceX in the X-axis coordinate system AB The calculation can be performed using the following formula:
[0091] distanceX AB =|x a -x b |∈ corresponds to the distance between A and B on the X-axis
[0092] The first judgment condition determines whether the target individuals have a second-order parallel relationship or a companion relationship. If the difference between the two target individuals in the X-axis coordinate system is less than a first threshold, and the difference between the two target individuals in the Y-axis coordinate system is less than a second threshold, then the relationship between the two target individuals can be determined as a second-order parallel relationship. The first threshold is determined based on the human body width, and the second threshold is determined based on the difference in the Y-axis coordinate system. More specifically, the first threshold can be half the sum of the human body widths of the two target individuals, and the second threshold can be 1 / 30 of the height of one of the target individuals. When the distance between the two target individuals is less than half the sum of their human body widths, and the difference in the Y-axis coordinate system is less than 1 / 30 of the height of one of the target individuals, then the relationship between the two target individuals can be determined as a second-order parallel relationship.
[0093] For example, the difference value distanceX between target person A and target person B in the X-axis coordinate system. AB Less than (distanceW) A +distanceW B ) / 2, the difference value in the Y-axis coordinate system, distanceY AB Less than distanceH A or distanceH B If one-thirtieth of the result is obtained, then the relationship between target person A and target person B can be determined to be a second peer relationship or a companion relationship.
[0094] The second judgment condition mentioned above can be determined based on the distance between the two target persons, their body width, and their body height. The second judgment condition is used to determine whether the target persons are in contact. The contact relationship refers to the entire range of movement of the person. Specifically, the distance between the two target persons can be less than twice the body width on the left and right, or less than the sum of the body widths of the two target persons, or less than half the body height.
[0095] For example, for target person A and target person B, the distance between target person A and target person B is... AB Less than (distanceW) A +distanceW B And the distance between target person A and target person B. AB Less than distanceH A or distanceH B If half of the data is obtained, then the relationship between target person A and target person B can be determined to be a contact relationship.
[0096] like Figure 2 As shown, an embodiment of the present invention provides a community identification device, including:
[0097] The acquisition module 201 is used to acquire the image archive data of multiple persons to be identified;
[0098] The first processing module 202 is used to perform spatiotemporal segmentation processing on the captured archive data to obtain spatiotemporal segmentation results, and determine the first community relationship between multiple individuals to be identified based on the spatiotemporal segmentation results.
[0099] The second processing module 203 is used to determine the original images of multiple persons to be identified based on the first community relationship, and to determine the second community relationship between the multiple persons to be identified based on the original images.
[0100] Optionally, the first processing module 202 is further configured to determine the spatiotemporal trajectory of the multiple persons to be identified based on the captured archive data of the multiple persons to be identified; and to perform spatiotemporal segmentation processing on the captured archive data of the multiple persons to be identified based on the spatiotemporal trajectory to obtain the spatiotemporal segmentation result.
[0101] Optionally, the first processing module 202 is further configured to determine the segmentation starting point and segmentation step size on the spatiotemporal trajectory; perform segmentation processing on the spatiotemporal trajectory according to the segmentation starting point and the segmentation step size to determine the segmentation region of the spatiotemporal trajectory; and determine the spatiotemporal segmentation result of the captured archive data according to the segmentation region of the spatiotemporal trajectory.
[0102] Optionally, the first processing module 202 is further configured to determine the relationship between the persons to be identified located in the same spatiotemporal segment as a first peer relationship.
[0103] Optionally, the second processing module 203 is further configured to identify target individuals with the same first peer relationship among the plurality of individuals to be identified; determine original captured images of at least two target individuals with the same first peer relationship based on the captured image archive data corresponding to the target individuals with the same first peer relationship; and determine a second community relationship between each of the target individuals based on the original captured images.
[0104] Optionally, the second processing module 203 is further configured to determine the human body bounding boxes of each of the target persons in the original captured image; determine the distance between each of the target persons and the human body attributes corresponding to each of the target persons based on the human body bounding boxes of each of the target persons; and determine the second community relationship between each of the target persons based on the distance between each of the target persons and the human body attributes corresponding to each of the target persons.
[0105] Optionally, the human body attributes include human body width and human body height. The second processing module 203 is further configured to determine a first judgment condition based on the human body widths corresponding to the two target individuals, and to determine a second judgment condition based on the human body heights of the two target individuals; and to determine a second community relationship between the two target individuals based on the distance between the two target individuals, the first judgment condition, and the second judgment condition.
[0106] It should be noted that the community identification device provided in the specific embodiments of the present invention is a device corresponding to the community identification method described above. All embodiments of the community identification method described above are applicable to this community identification device. Each embodiment of the community identification device has a corresponding module corresponding to the steps in the community identification method described above, which can achieve the same or similar beneficial effects. To avoid excessive repetition, it will not be described in detail here.
[0107] like Figure 3 As shown, a specific embodiment of the present invention also provides an electronic device, including a memory 302, a processor 301, and a computer program stored in the memory 302 and executable on the processor 301, wherein the processor 301 executes the computer program to implement the steps of the community identification method described above.
[0108] Specifically, processor 301 calls the computer program stored in memory 302 and performs the following steps:
[0109] Acquire the image archive data of multiple individuals to be identified;
[0110] The captured archive data is spatiotemporally segmented to obtain spatiotemporal segmentation results, and the first community relationship between multiple individuals to be identified is determined based on the spatiotemporal segmentation results.
[0111] Based on the first community relationship, original images of multiple individuals to be identified are determined, and a second community relationship between the multiple individuals to be identified is determined based on the original images.
[0112] Optionally, the spatiotemporal segmentation processing of the captured archive data performed by processor 301 to obtain spatiotemporal segmentation results includes:
[0113] The spatiotemporal trajectories of the multiple individuals to be identified are determined based on the captured data of the multiple individuals to be identified.
[0114] Based on the spatiotemporal trajectory, the captured archive data of multiple individuals to be identified are spatiotemporally segmented to obtain spatiotemporal segmentation results.
[0115] Optionally, the process executed by processor 301 to perform spatiotemporal segmentation processing on the captured file data of multiple persons to be identified based on the spatiotemporal trajectory, to obtain spatiotemporal segmentation results, includes:
[0116] Determine the starting point and step size for segmentation on the spatiotemporal trajectory;
[0117] Based on the segmentation starting point and segmentation step size, the spatiotemporal trajectory is segmented to determine the segmentation region of the spatiotemporal trajectory;
[0118] The spatiotemporal segmentation result of the captured archive data is determined based on the segmentation region of the spatiotemporal trajectory.
[0119] Optionally, the first community relationship includes a first peer relationship, and the step of determining the first community relationship between multiple individuals to be identified based on the spatiotemporal segmentation result executed by the processor 301 includes:
[0120] The relationship between the individuals to be identified that are located in the same spatiotemporal segmentation result is determined as the first peer relationship.
[0121] Optionally, the processor 301's execution of determining the original images of multiple individuals to be identified based on the first community relationship, and determining the second community relationship between the multiple individuals to be identified based on the original images, includes:
[0122] Among the multiple individuals to be identified, the target individuals who share the same first peer relationship are determined;
[0123] Based on the shooting archive data corresponding to the target personnel who have the same first peer relationship, the original shooting images of at least two target personnel who have the same first peer relationship are determined.
[0124] The second community relationship between the target individuals is determined based on the original captured images.
[0125] Optionally, the process of determining the second community relationship between the target individuals based on the original captured images, performed by processor 301, includes:
[0126] The human outlines of each of the target persons are determined in the original captured images;
[0127] Based on the human bounding box of each target person, determine the distance between each target person and the human attributes corresponding to each target person;
[0128] The second community relationship between the target individuals is determined based on the distance between them and the corresponding human attributes of each target individual.
[0129] Optionally, the human body attributes include human body width and human body height. The process executed by processor 301 to determine the second community relationship between the target individuals based on the distance between them and the corresponding human body attributes includes:
[0130] A first judgment condition is determined based on the width of the human body corresponding to the two target persons, and a second judgment condition is determined based on the height of the two human bodies;
[0131] A second community relationship between the two target individuals is determined based on the distance between them, the first judgment condition, and the second judgment condition.
[0132] The electronic device provided in this embodiment of the invention can implement all the processes of the community identification method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, further details are omitted here. The computer-readable storage medium provided in this embodiment of the invention stores a computer program. When executed by a processor, this computer program implements all the processes of the community identification method or the application-side community identification method provided in this embodiment of the invention, and can achieve the same technical effects. To avoid repetition, further details are omitted here.
[0133] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the community identification method or application-side community identification method provided in this invention and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0134] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0135] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0136] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. All equivalent structural transformations made under the concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.
Claims
1. A community identification method, characterized in that, include: Acquire the image archive data of multiple individuals to be identified, including the shooting location, shooting time, and facial image data; The captured archive data is processed by spatiotemporal segmentation to obtain multiple spatiotemporal segmentation results. If some or all of the persons to be identified appear in the same spatiotemporal segmentation result, it means that some or all of the persons to be identified appeared in the same location at the same time. Determine the first community relationship among multiple individuals to be identified based on the spatiotemporal segmentation results, including determining the relationship between individuals to be identified located in the same spatiotemporal segmentation result as a first peer relationship; Based on the first community relationship, original images of multiple individuals to be identified are determined, and a second community relationship between the multiple individuals to be identified is determined based on the original images. The method includes identifying target individuals with the same first peer relationship from among multiple individuals to be identified; determining the same original captured image containing at least two target individuals with the same first peer relationship based on the captured image file data corresponding to the target individuals with the same first peer relationship; determining the body outline of each target individual in the same original captured image; determining the distance between each target individual and the corresponding human attributes of each target individual based on the body outline of each target individual; the human attributes include body width and body height; determining a first judgment condition based on the body width of two target individuals, and determining a second judgment condition based on the body height of two target individuals; and so on. Based on the distance between the two target individuals, the first judgment condition, and the second judgment condition, a second community relationship is determined between the two target individuals. The second community relationship includes a second peer relationship and a contact relationship. Specifically, if the difference between the X coordinates of the two target individuals is less than a first threshold and the difference between the Y coordinates of the two target individuals is less than a second threshold, then the relationship between the two target individuals is determined to be a second peer relationship. The first threshold is determined based on the width of the target individuals' bodies, and the second threshold is determined based on the height of the target individuals' bodies. If the distance between the two target individuals is less than the sum of the widths of the two target individuals' bodies and the distance between the two target individuals is less than half of the height of the target individuals' bodies, then the relationship between the two target individuals is determined to be a contact relationship.
2. The community identification method according to claim 1, characterized in that, The process of performing spatiotemporal segmentation on the captured archive data to obtain spatiotemporal segmentation results includes: The spatiotemporal trajectories of the multiple individuals to be identified are determined based on the captured data of the multiple individuals to be identified. Based on the spatiotemporal trajectory, the captured archive data of multiple individuals to be identified are spatiotemporally segmented to obtain spatiotemporal segmentation results.
3. The community identification method according to claim 2, characterized in that, The step of performing spatiotemporal segmentation processing on the captured archive data of multiple persons to be identified based on the spatiotemporal trajectory to obtain spatiotemporal segmentation results includes: Determine the starting point and step size for segmentation on the spatiotemporal trajectory; Based on the segmentation starting point and the segmentation step size, the spatiotemporal trajectory is segmented to determine the segmentation region of the spatiotemporal trajectory; The spatiotemporal segmentation result of the captured archive data is determined based on the segmentation region of the spatiotemporal trajectory.
4. A community identification device, characterized in that, include: The acquisition module is used to acquire the shooting archive data of multiple persons to be identified, including the shooting location, shooting time, and facial image data; The first processing module is used to perform spatiotemporal segmentation processing on the captured archive data to obtain multiple spatiotemporal segmentation results. If some or all of the persons to be identified appear in the same spatiotemporal segmentation result, it means that some or all of the persons to be identified appeared in the same location at the same time. Determine the first community relationship among multiple individuals to be identified based on the spatiotemporal segmentation results, including determining the relationship between individuals to be identified located in the same spatiotemporal segmentation result as a first peer relationship; The second processing module is used to determine the original images of multiple persons to be identified based on the first community relationship, and to determine the second community relationship between the multiple persons to be identified based on the original images. The method includes identifying target individuals with the same first peer relationship from among multiple individuals to be identified; determining the same original captured image containing at least two target individuals with the same first peer relationship based on the captured image file data corresponding to the target individuals with the same first peer relationship; determining the body outline of each target individual in the same original captured image; determining the distance between each target individual and the corresponding human attributes of each target individual based on the body outline of each target individual; the human attributes include body width and body height; determining a first judgment condition based on the body width of two target individuals, and determining a second judgment condition based on the body height of two target individuals; and so on. Based on the distance between the two target individuals, the first judgment condition, and the second judgment condition, a second community relationship is determined between the two target individuals. The second community relationship includes a second peer relationship and a contact relationship. Specifically, if the difference between the X coordinates of the two target individuals is less than a first threshold and the difference between the Y coordinates of the two target individuals is less than a second threshold, then the relationship between the two target individuals is determined to be a second peer relationship. The first threshold is determined based on the width of the target individuals' bodies, and the second threshold is determined based on the height of the target individuals' bodies. If the distance between the two target individuals is less than the sum of the widths of the two target individuals' bodies and the distance between the two target individuals is less than half of the height of the target individuals' bodies, then the relationship between the two target individuals is determined to be a contact relationship.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the community identification method as described in any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the community identification method as described in any one of claims 1 to 3.