CN111723844A - Method and system for determining clustering center and method and device for determining picture type - Google Patents

Method and system for determining clustering center and method and device for determining picture type Download PDF

Info

Publication number
CN111723844A
CN111723844A CN202010424027.9A CN202010424027A CN111723844A CN 111723844 A CN111723844 A CN 111723844A CN 202010424027 A CN202010424027 A CN 202010424027A CN 111723844 A CN111723844 A CN 111723844A
Authority
CN
China
Prior art keywords
picture
target object
person
cluster
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202010424027.9A
Other languages
Chinese (zh)
Inventor
刘向阳
仇雪雅
唐大闰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Minglue Artificial Intelligence Group Co Ltd
Original Assignee
Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Minglue Artificial Intelligence Group Co Ltd filed Critical Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority to CN202010424027.9A priority Critical patent/CN111723844A/en
Publication of CN111723844A publication Critical patent/CN111723844A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method for determining a clustering center, which comprises the steps of obtaining a picture containing a target object; detecting target objects in the pictures, and extracting the characteristics of the region of the target object in each picture; clustering the characteristics of the region of the target object to form M clusters; and marking the type of the corresponding cluster center for each cluster respectively. The invention also discloses a method for determining the type corresponding to the picture, which comprises the steps of obtaining the picture containing the target object; detecting a target object in the picture, and extracting the characteristics of the region of the target object in the picture; and determining a cluster to which the characteristics of the region of the target object belong according to a predetermined cluster center, and determining the type corresponding to the picture as the type of the cluster center of the cluster.

Description

Method and system for determining clustering center and method and device for determining picture type
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, a system, a storage medium, and an electronic apparatus for determining a clustering center, and a method, an apparatus, a storage medium, and an electronic apparatus for determining a corresponding type of a picture based on the determined clustering center.
Background
In daily work, each industry needs to supervise, manage and give an early warning to the operation standardization of workers and operators and the wearing standardization of the personnel coming in and going out. These supervision and management involve the need for personnel to perform garment normative supervision and inspection, posture supervision and inspection, and the like.
Taking the daily work supervision and inspection in the kitchen as an example, a real-time monitoring kitchen operation room is generally adopted to manually confirm whether related workers wear working clothes as required. With the development of automatic detection and identification technology, the supervision process is gradually automated and intelligentized. However, the following disadvantages still remain.
Since the work clothes of each store/restaurant are not uniform, there is no uniform model to identify the respective clothes. In the existing related scheme, a mode of specially collecting clothing photo samples in advance is adopted to store the samples. In the supervision process, the characteristics of the picture of the worker in the shot picture of the working scene are compared with the characteristics of the sample picture, and then whether the worker wears the working clothes or not is judged.
In the actual monitoring and checking process, due to the working behavior of workers, the angles of the shot pictures are various, and the angle difference between the shot pictures and the pre-collected sample pictures is large; meanwhile, the working clothes of each shop are of various types and are frequently updated, a large number of sample photos are collected in advance and timely, and the requirement on an administrator is high; in addition, except for the shooting angle, in the daily actual supervision and inspection process, the pictures acquired in different time periods are greatly influenced by light rays. These factors directly affect the timeliness and accuracy of the supervised examination.
Therefore, for the solution in the above related art, to improve the accuracy of detection and judgment, a system administrator is required to provide a large number of sample pictures in time according to the characteristics of each store, including: under the various angle shooting angles, under the various shooting light conditions, staff of multiple stature characteristics wore, the sample of multiple clothing type etc.. If the sample is not ready, the accuracy of the automatic detection is low.
Therefore, how to improve the automation degree of sample collection and reduce the manual dependence degree of constructing a detection reference becomes an important aspect that influences the accuracy of automatic supervision and inspection and improves usability.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present invention provide a method, a system, a storage medium, and an electronic device for determining a cluster center, where a clustering method is adopted to obtain a target picture, and then the target picture is clustered and labeled to form a determined cluster center, so that manual dependence and workload of collecting samples in a detection standard forming process are reduced, and accuracy of subsequent detection and identification is improved.
The embodiment of the invention provides a method for determining a cluster center, which comprises the following steps,
acquiring a picture containing a target object;
detecting target objects in the pictures, and extracting the characteristics of the region of the target object in each picture;
clustering the characteristics of the region of the target object to form M clusters, wherein M is an integer greater than or equal to 1;
and marking the type of the corresponding cluster center for each cluster respectively.
The embodiment also provides a method for determining a type corresponding to a picture, which includes,
acquiring a picture containing a target object;
detecting a target object in the picture, and extracting the characteristics of the region of the target object in the picture;
according to the cluster center determined by the method in the embodiment one, similarity distances from the characteristics of the region of the target object to the cluster centers of M clusters of the cluster centers are calculated respectively;
and when at least one similarity distance is judged to be smaller than a preset threshold value, determining that the characteristics of the region of the target object belong to the cluster, and determining that the type corresponding to the picture is the type of the cluster center of the cluster.
The embodiment of the present invention further provides a system for determining a clustering center, including:
the image acquisition module is used for acquiring an image containing a target object;
the feature extraction module is used for detecting the target objects in the pictures and extracting the features of the regions of the target objects in each picture;
a clustering module configured to cluster features of the region of the target object to form M clusters, wherein M is an integer greater than or equal to 1;
and the marking module is set to mark the type of the corresponding cluster center for each cluster.
An embodiment of the present invention further provides a device for determining a type corresponding to a picture, including:
the acquisition module acquires a picture containing a target object;
the feature extraction module is used for detecting the target object in the picture and extracting the feature of the region of the target object in the picture;
the type determining module is arranged for calculating similarity distances from the characteristics of the region of the target object to the clustering centers of M clusters of the clustering centers according to the clustering centers determined by any one of the methods; and when at least one similarity distance is judged to be smaller than a preset threshold value, determining that the characteristics of the region of the target object belong to the cluster, and determining that the type corresponding to the picture is the type of the cluster center of the cluster.
An embodiment of the present invention further provides a storage medium, where a computer program is stored in the storage medium, where the computer program is configured to execute any one of the above methods for determining a cluster center when the computer program runs.
An embodiment of the present invention further provides a storage medium, where a computer program is stored in the storage medium, where the computer program is configured to execute any one of the above methods for determining a type corresponding to a picture when the computer program runs.
An embodiment of the present invention further provides an electronic apparatus, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute any one of the above methods for determining a cluster center.
An embodiment of the present invention further provides an electronic apparatus, which includes a memory and a processor, where the memory stores a computer program, and the processor is configured to execute any one of the above methods for determining a type corresponding to a picture.
According to the embodiment of the invention, the clustering centers are established according to the scheme, and the type of each clustering center is adopted to represent the type of the work or life scene picture to be identified, so that the manual dependence and workload of collecting samples in the forming process of the detection standard are reduced, and the accuracy of subsequent detection and identification is improved. Furthermore, based on the determined clustering center, the pictures of the working (living) scene are identified, the clustering to which the pictures belong is determined, the type corresponding to the pictures is further determined, and the identification accuracy is improved.
Drawings
Fig. 1 is a flowchart of a method for determining a cluster center according to an embodiment;
fig. 2 is a flowchart of a method for determining a type corresponding to a picture according to a second embodiment;
fig. 3 is a flowchart of a method for determining a cluster center according to a third embodiment;
fig. 4 is a flowchart of a method for determining a type corresponding to a picture according to a fourth embodiment;
fig. 5 is a structural diagram of a system for determining a cluster center according to the ninth embodiment;
fig. 6 is a block diagram of an apparatus for determining a type corresponding to a picture according to a tenth embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Example one
The present embodiment provides a method for determining a cluster center, which is illustrated in fig. 1, and includes,
step 101, acquiring a picture containing a target object;
102, detecting target objects in the pictures, and extracting the characteristics of the region of the target object in each picture;
103, clustering the characteristics of the region of the target object to form M clusters, wherein M is an integer greater than or equal to 1;
and 104, marking the type of the corresponding cluster center for each cluster respectively.
Optionally, the step 104 of marking each cluster with the type of its corresponding cluster center includes:
calculating similarity distances between the characteristics of the region of the target object in the acquired picture and the centers of the M clusters;
determining the characteristics of X target objects with the closest similarity distance aiming at the clustering center of each cluster, determining X pictures corresponding to the X characteristics as the representatives of the clustering center, wherein X is an integer greater than or equal to 1;
marking the type of the clustering center corresponding to the X pictures;
wherein, when the target object is a person, the type of the cluster center includes at least one of: a person wearing the predetermined garment, a person not wearing the predetermined garment, not a person;
or, when the target object is a person, the type of the cluster center includes at least one of: the person in the first posture, the person in the second posture, and not the person.
Optionally, the detecting a target object in the picture in step 102 includes:
when the target object is a person, detecting the person in the picture by adopting a pedestrian detection algorithm;
when the target object is a person, the extracting the feature of the region of the target object in each picture includes: and extracting the characteristics of the regions of N persons in all the pictures by adopting a deep neural network algorithm, wherein N is greater than or equal to M.
Optionally, when the type of the cluster center includes at least one of: the person wearing the predetermined garment, the person not wearing the predetermined garment, or not the person, the M is determined based on at least one of: the type of the garment, the angle of picture taking;
when the type of the cluster center includes at least one of: the person in the first pose, the person in the second pose, and not the person, the M is determined based on at least one of: the kind of gesture that may be involved, the angle of picture taking.
After the preset number of pictures are automatically acquired, the acquired pictures are detected, feature extracted and clustered to form cluster centers containing M clusters, and finally, the types of the cluster centers are respectively marked by the administrator aiming at the M clusters to form the cluster centers required by the application detection of the administrator. This clustering center will be used in the subsequent embodiment two for the type determination corresponding to the relevant (working/living scene) pictures.
In the embodiment, the determination process of the clustering center reduces the workload of collecting the application sample picture by the application system administrator. Only the type marking is carried out on the representative pictures corresponding to the M clusters, and the related workload of forming the detection reference of the application detection scene is greatly reduced. Meanwhile, pictures obtained based on actual working or living scenes are taken as the basis of detection, extraction and clustering, and are the sample sources of the application scenes closest to the final actual detection. The type of the subsequent actual application scene picture is determined based on the established clustering center, so that the accuracy of detection and identification (type determination) is greatly improved.
Optionally, each administrator may periodically or temporarily trigger re-execution of the determination scheme of the cluster center according to a replacement or addition condition of an actual sample in an actual application scenario, and correspondingly update the cluster center.
Example two
The present embodiment provides a method for determining a type corresponding to a picture, the flow of which is shown in fig. 2, including
Step 201, acquiring a picture containing a target object;
step 202, detecting a target object in the picture, and extracting the characteristics of the region of the target object in the picture;
step 203, according to the clustering centers determined by the method in the first embodiment, calculating similarity distances from the features of the region of the target object to the clustering centers of the M clusters of the clustering centers respectively;
and when at least one similarity distance is judged to be smaller than a preset threshold value, determining that the characteristics of the region of the target object belong to the cluster, and determining that the type corresponding to the picture is the type of the cluster center of the cluster.
Optionally, when it is determined that the type corresponding to the picture is a preset unqualified type, the method further includes step 204 of sending an alarm message to prompt a manager, where the alarm message includes the picture.
EXAMPLE III
The embodiment of the invention aims at the working scene of the kitchen, and aims to detect whether a worker in the kitchen wears a working clothes as required. Taking the determination method of the corresponding clustering center as an example, the obtained picture is a picture of a working scene of a kitchen, the detected target object is a person, and the region feature of the target object in the extracted picture corresponds to the region feature of the person in the extracted picture.
The embodiment of the invention provides a method for determining a clustering center, the flow of which is shown in fig. 3, and the method comprises the following steps:
301, acquiring a work scene picture of a kitchen;
optionally, acquiring a corresponding picture through a monitoring video shot by a camera installed in a kitchen; or directly shooting a picture of the work in the kitchen;
step 302, detecting a person in the picture by using a pedestrian detection algorithm;
optionally, detecting a person in the picture using yoloV3 algorithm;
wherein, the yoloV3 algorithm is the third edition of a YOLO (you Only Look one) series target detection algorithm;
wherein, the picture of the person detected in step 302 may also include a picture with a detection error; i.e., including photographs that partially do not contain people;
step 303, extracting the characteristics of the human region in the picture for the picture with the detected human;
optionally, extracting features of the human region in the picture by using a deep neural network, for example, extracting features of the human region in the picture by removing a backbone network of a full connection layer by using a resnet50 and vgg16 algorithms;
the respet 50 algorithm, Deep Residual Learning for Image Recognition, is a depth Residual network Learning algorithm for Image Recognition.
The vgg16 algorithm, Very Deep probabilistic Networks for Large-Scale image recognition, is a Deep Convolutional neural network for Large-Scale image recognition.
When the picture subjected to feature extraction includes a picture which is not a person, step 304, correspondingly extracting features of a relevant area in the picture;
i.e., allowing steps 302 and/or 304 to identify or extract features using correlation techniques to occur in the presence of individual misidentifications or false extractions. The picture of the person and the characteristics of the region of the person in the embodiment of the invention are not absolutely accurate and objective, but are the results identified or extracted by the related technical scheme aiming at the target of the person. Those skilled in the art will understand from the above description.
Wherein, in each picture, the characteristics of at least 1 person region are extracted; alternatively, if the number of persons included in one picture is plural, features of regions of plural persons may be extracted; the number of personal region features extracted from each picture can be determined according to preset rules;
step 304, clustering the extracted features of at least n personal areas to form M clusters;
optionally, the clustering adopts a K-means (K-means) clustering algorithm to form M clusters; when the K-means algorithm is employed, the parameter K in the algorithm is equal to M.
Wherein, in the present example, M is determined based on at least one of the following factors: the type of the work clothes and the angle of picture shooting. For example, if there are 3 types of work clothes in a restaurant and 3 cameras are installed in a kitchen, M is set to an integer greater than or equal to 3 × 3 — 9;
for another example, if a restaurant has 3 kinds of work uniforms, 2 cameras are installed in a kitchen, and pictures can be taken at 4 positions, i.e., front, rear, left, and right, of a person, M may be set to 3 × 2 × 4 — 24; namely, 24 clustering centers are formed after clustering; alternatively, M is set to other values.
In step 304, the number of n may be set according to the selected clustering algorithm and the number of M.
Optionally, n is twice M, or greater; the larger the number of n, the more accurate the cluster center is finally formed.
305, calculating similarity distances between the characteristics of the human region extracted in the step 303 and the clustering centers of the M clusters in sequence;
step 306, aiming at each cluster, sequencing the similarity distance from the cluster center of each cluster, and selecting X pictures or less than X pictures corresponding to the features of the area of the front X persons closest to each cluster as the representative of the cluster center;
when more than 1 feature in the features of the area of the current X persons belongs to the same photo, the number of the selected corresponding photos is less than X. When the features of the area of the current X persons belong to different photos, respectively, the number of the selected corresponding photos is equal to X.
Step 307, marking the type of the corresponding clustering center of the selected X pictures or less than X pictures;
for example, in this embodiment, the type of the cluster center includes at least one of the following: a person wearing the predetermined garment, a person not wearing the predetermined garment, not a person;
optionally, step 307 may send the selected pictures to a restaurant manager, prompting him to mark for each picture its type as: a person wearing the predetermined garment, a person not wearing the predetermined garment, or not.
Optionally, if the corresponding X or less than X pictures of a cluster center are marked as different types by restaurant management personnel, selecting the type with the largest number as the type of the cluster center of the cluster. For example, if 8 persons marked as wearing predetermined clothes and 2 persons not wearing predetermined clothes are present in 10 corresponding pictures of one cluster center, the type of the cluster center of the cluster is determined as "person wearing predetermined clothes".
Optionally, in step 307, the type of the cluster center corresponding to the selected picture may also be marked through other operation manners.
It can be seen that, through steps 301-.
Optionally, for different restaurants, step 301 is to obtain corresponding pictures from the monitoring videos shot by the cameras installed at the back of each restaurant; or directly shooting a picture of the work in the kitchen;
accordingly, steps 302-307 are all corresponding processes performed on the picture of the restaurant; in step 307, the type of the clustering center corresponding to the X pictures or less than the X pictures is marked correspondingly according to the condition of the restaurant working clothes by the manager of the restaurant. Finally, for each restaurant, its own cluster center is determined. The value of M may or may not be the same for different restaurants.
Alternatively, if the data of multiple restaurants are processed in a centralized manner, the acquired picture will carry the identification information of each restaurant, the generated clustering center also carries the identification of each restaurant, and the relevant parameters such as n, M, X, k in the process of establishing the clustering center of each restaurant can be set individually. The skilled person will know how to implement this on the basis of the above description.
It can be seen that after a preset number of pictures are automatically acquired, the acquired pictures are detected, feature extracted and clustered to form cluster centers containing M clusters, and finally, managers of various restaurants mark the types of the cluster centers respectively aiming at the M clusters to form the cluster centers of the kitchen clothes. The cluster center is used for determining the type corresponding to the kitchen work scene picture in the subsequent fourth embodiment.
In the embodiment, the determination process of the cluster center reduces the workload of each restaurant administrator for collecting the kitchen clothing sample pictures of the store, and only needs to mark the types of the representative pictures corresponding to the M clusters, so that the related workload for forming the detection reference of the store is greatly reduced. Meanwhile, the picture obtained based on the real-time kitchen working scene is taken as the basis of detection, extraction and clustering, and is the sample source closest to the final practical detection application scene (embodiment four). The type of the subsequent actual application scene picture is determined based on the established clustering center, so that the accuracy of detection and identification (type determination) is greatly improved.
Alternatively, each restaurant may periodically or temporarily trigger re-execution of the determination scheme of the restaurant cluster center according to the replacement or addition of its own clothing.
Example four
In the embodiment of the invention, aiming at a kitchen work scene, whether a kitchen worker wears a work clothes as required is detected, and the type corresponding to the picture of the worker acquired in the work scene is further determined based on the clustering center determined in the third embodiment.
An embodiment of the present invention provides a method for determining a type corresponding to a picture, where a flow of the method is shown in fig. 4, and the method includes:
step 401, acquiring a picture of a worker;
step 402, detecting a person in the picture, and extracting the characteristics of the region of the person in the picture;
optionally, detecting a person in the picture using yoloV3 algorithm;
optionally, extracting features of the human region in the picture by using a deep neural network, for example, removing a backbone network of a full connection layer by using a resnet50 and vgg16 algorithm, and extracting features of the human region in the picture;
optionally, extracting features of a region of a person in the picture; or extracting the characteristics of the areas of a plurality of persons in the picture; the execution may be performed according to a preset rule, and is not limited to one or more.
Step 403, according to the clustering centers determined in the third embodiment, calculating similarity distances from the features of the human region to the clustering centers of M clusters of the clustering centers respectively; that is, M similarity distances, a1, a2, …, Am, are calculated for the features of the region of the person to the cluster centers of the M clusters.
And 404, when at least one similarity distance is judged to be smaller than a preset threshold value, determining that the characteristics of the human region belong to the cluster, and determining that the type corresponding to the picture of the worker is the type of the cluster center of the cluster.
For example, when a2 is smaller than a preset threshold, the feature of the region of the person belongs to the cluster corresponding to a2, and the type of the cluster center of the cluster is obtained, and the type corresponding to the picture corresponding to the feature of the region is the type of the cluster center of the cluster.
For example, a picture of the cook B cutting vegetables while wearing the spring work clothes is taken, and after the step 404 is performed, it is determined that the type of the cluster center corresponding to the picture is "person wearing predetermined clothing".
Optionally, the method further includes 405, when it is determined that the type of the working scene corresponding to the picture of the worker is a preset unqualified type, sending an alarm message to prompt a manager, where the alarm message includes the picture of the worker.
For example, the preset unqualified type is 'a person not wearing the preset clothes', a picture that a chef B takes off a coat due to the heat of the day and wears a T-shirt of the chef B to make a dish is taken, after the step 404 is executed, the type corresponding to the picture is determined to be 'the person not wearing the preset clothes', the fact that a worker does not wear the work clothes according to the requirement is shown, then the step 405 is executed, a warning message is sent, and the fact that the unqualified condition exists is prompted, wherein the warning message comprises the shot picture.
Optionally, the alarm message may be sent to a monitoring client in the restaurant, or sent to a handheld terminal or a mobile phone of a restaurant manager through a wireless network; the particular manner of alerting exemplified by the present embodiment is not limited.
Optionally, according to the alarm message, when determining that the clothing is newly added in the local store, the administrator may trigger the third embodiment to perform again, and update and determine the clustering center.
EXAMPLE five
The embodiment of the invention aims at the hotel guest welcoming work scene, and detects whether guest welcoming workers keep standing as required. Taking the determination method of the corresponding clustering center as an example, the obtained picture is a picture of a working scene of the welcome receptionist, the detected target object is a person, and the region feature of the target object in the extracted picture corresponds to the region feature of the person in the extracted picture.
The embodiment of the invention provides a method for determining a clustering center, which has a basic working process consistent with that of the third embodiment, and only adjusts relevant details as follows, wherein the method comprises the following steps:
step 301, obtaining a work scene picture of a receptionist welcome; can be obtained by a camera arranged at a corresponding position;
in step 303, when the features of the human region in the picture are extracted, the specific algorithm for extracting the features of the human region in the picture is adjusted to extract the features of the human joint points by using an openpos (openpos: real Multi-Person 2D position Estimation using Part affinity fields, real-time Estimation of two-dimensional poses of multiple persons in local similar domains) algorithm, because the features representing the postures are the position relationship of the joint points of the human body;
in step 304, the values of n and M are set as corresponding values according to the scene correspondence of the embodiment;
in step 306, the value of X is set to a corresponding value according to the scene correspondence of this embodiment;
in step 307, the type of the cluster center formed in this embodiment at least includes one of the following types: a person in a qualified posture (standing), a person in an unqualified posture, not a person;
on the other hand, according to the description of the third embodiment, a person skilled in the art can determine a corresponding implementation;
it can be seen that M clusters are also formed through the above steps, and after the type of each cluster center is marked, the cluster center for the scene of this embodiment is correspondingly determined.
EXAMPLE six
In the embodiment of the invention, aiming at a hotel guest reception working scene, whether a guest reception worker keeps standing as a target as required is detected, and the type corresponding to the picture of the worker acquired in the working scene is further determined based on the clustering center determined in the fifth embodiment.
The embodiment of the invention provides a method for determining a type corresponding to a picture, wherein a basic working process of the method is consistent with that of the fourth embodiment, and only relevant details are adjusted as follows, and the method comprises the following steps:
in step 401, acquiring a picture of a worker, wherein the picture corresponds to acquiring a work scene picture of a reception member welcome;
in step 402, when the features of the human region in the picture are extracted, the specific algorithm for extracting the features of the human region in the picture is adjusted to extract the features of the human joint points by using an openpos (openpos: real Multi-Person 2D position Estimation using Part Affinity Fields, real-time Estimation of Multi-Person two-dimensional posture in a local similar domain) algorithm, because the features representing the posture are the position relationship of the joint points of the human body;
in step 403, the clustering centers determined according to the fifth embodiment are corresponded, the similarity distances between the clustering centers and the M clustering centers are respectively calculated, and the types corresponding to the pictures of the staff are determined.
In step 405, if the preset unqualified type can be "people with unqualified posture", an alarm is correspondingly performed.
EXAMPLE seven
The embodiment of the invention aims at a mask wearing scene, and the clustering center is established to detect whether people (staff, passengers, customers and the like) wear masks according to requirements. The method for determining the corresponding clustering center is, for example, the obtained picture is a picture of a person or a picture of a head of the person, the detected target object is the head of the person, and the region feature of the target object in the extracted picture corresponds to the region feature of the head of the person in the extracted picture.
The embodiment of the invention provides a method for determining a clustering center, which has a basic working process consistent with that of the third embodiment, and only adjusts relevant details as follows, wherein the method comprises the following steps:
in step 301, a picture of a person is obtained; can be obtained by a camera arranged at a corresponding position;
in step 302, the yoloV3 algorithm is used for detecting the head of the person in the picture;
in step 303, when the features of the human region in the picture are extracted, the features of the human region related to the head of the human are set to be extracted corresponding to the features of the human extracted in the resnet50 and vgg16 algorithms;
in step 304, the values of n and M are set as corresponding values according to the scene correspondence of the embodiment;
in step 306, the value of X is set to a corresponding value according to the scene correspondence of this embodiment;
in step 307, the type of the cluster center formed in this embodiment at least includes one of the following types: a person with a mask, a person without a mask, not the head.
On the other hand, according to the description of the third embodiment, a person skilled in the art can determine a corresponding implementation;
it can be seen that M clusters are also formed through the above steps, and after the type of each cluster center is marked, the cluster center for the scene of this embodiment is correspondingly determined.
Example eight
In the embodiment of the invention, aiming at the scene of mask wearing person inspection, whether the person wearing the mask as required is detected as a target, and the type corresponding to the picture (the picture of the person coming in and going out of the scene) containing the person is further determined based on the determined clustering center in the seventh embodiment.
The embodiment of the invention provides a method for determining a type corresponding to a picture, wherein a basic working process of the method is consistent with that of the fourth embodiment, and only relevant details are adjusted as follows, and the method comprises the following steps:
in step 401, acquiring a picture of a person, wherein the picture corresponds to the picture of the person passing by or the person staying at the person;
in step 402, when the features of the human region in the picture are extracted, the features of the human region extracted in the algorithm corresponding to resnet50 and vgg16 are set as the features of the extracted head region;
in step 403, the clustering centers determined according to the seventh embodiment are used, the similarity distances between the clustering centers and the M clustering centers are respectively calculated, and the type corresponding to the picture containing the person is determined.
In step 405, if the preset unqualified type is "people without mask", an alarm is given correspondingly.
Based on the third to eighth embodiments, it can be seen that, according to the scheme described in the first embodiment, pictures of different working or living scenes are correspondingly obtained, the detection algorithm is adjusted to detect the corresponding target object, and after the feature extraction algorithm is adjusted to correspondingly extract the required features, the clustering centers corresponding to different application requirements can be determined.
Further, based on the determined clustering center, the corresponding picture type is determined according to the scheme described in the second embodiment, so that different detection application requirements are met.
Example nine
An embodiment of the present invention provides a system 50 for determining a cluster center, the structure of which is shown in fig. 5, including:
a picture acquisition module 501 configured to acquire a picture including a target object;
a feature extraction module 502 configured to detect the target objects in the pictures and extract features of regions of the target objects in each picture;
a clustering module 503 configured to cluster the features of the region of the target object to form M clusters, where M is an integer greater than or equal to 1;
a labeling module 504 configured to label each cluster with the type of its corresponding cluster center.
Optionally, wherein the labeling module 504 labels, for each cluster, a type of its corresponding cluster center, including:
calculating similarity distances between the characteristics of the region of the target object in the acquired picture and the centers of the M clusters;
determining the characteristics of X target objects with the closest similarity distance aiming at the clustering center of each cluster, determining X pictures corresponding to the X characteristics as the representatives of the clustering center, wherein X is an integer greater than or equal to 1;
marking the type of the clustering center corresponding to the X pictures;
wherein, when the target object is a person, the type of the cluster center includes at least one of: a person wearing the predetermined garment, a person not wearing the predetermined garment, not a person;
or, when the target object is a person, the type of the cluster center includes at least one of: the person in the first posture, the person in the second posture, and not the person.
Optionally, the feature extraction module 502 detects a target object in the picture, including:
when the target object is a person, detecting the person in the picture by adopting a pedestrian detection algorithm;
when the target object is a person, the extracting the feature of the region of the target object in each picture includes: and extracting the characteristics of the regions of N persons in all the pictures by adopting a deep neural network algorithm, wherein N is greater than or equal to M.
Optionally, when the type of the cluster center includes at least one of: the person wearing the predetermined garment, the person not wearing the predetermined garment, or not the person, the M is determined based on at least one of: the type of the garment, the angle of picture taking;
when the type of the cluster center includes at least one of: the person in the first pose, the person in the second pose, and not the person, the M is determined based on at least one of: the kind of gesture that may be involved, the angle of picture taking.
Example ten
An embodiment of the present invention provides an apparatus 60 for determining a type corresponding to a picture, which is shown in fig. 6 and includes:
an obtaining module 601, which obtains a picture containing a target object;
the feature extraction module 602 detects a target object in the picture, and extracts features of a region of the target object in the picture;
a type determining module 603 configured to calculate similarity distances from the features of the region of the target object to the clustering centers of M clusters of the clustering centers, respectively, according to the clustering centers determined by any one of the above methods; and when at least one similarity distance is judged to be smaller than a preset threshold value, determining that the characteristics of the region of the target object belong to the cluster, and determining that the type corresponding to the picture is the type of the cluster center of the cluster.
Optionally, the apparatus further includes an alarm module 604 configured to send an alarm message to prompt a manager when it is determined that the type corresponding to the picture is a preset unqualified type, where the alarm message includes the picture.
An embodiment of the present invention provides a storage medium, in which a computer program is stored, where the computer program is configured to execute any one of the above methods for determining a cluster center when the computer program runs.
An embodiment of the present invention provides a storage medium, where a computer program is stored in the storage medium, where the computer program is configured to execute any one of the above methods for determining a type corresponding to a picture when the computer program runs.
An embodiment of the present invention further provides an electronic apparatus, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute any one of the above methods for determining a cluster center.
An embodiment of the present invention further provides an electronic apparatus, which includes a memory and a processor, where the memory stores a computer program, and the processor is configured to execute any one of the above methods for determining a type corresponding to a picture.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A method for determining a cluster center includes,
acquiring a picture containing a target object;
detecting target objects in the pictures, and extracting the characteristics of the region of the target object in each picture;
clustering the characteristics of the region of the target object to form M clusters, wherein M is an integer greater than or equal to 1;
and marking the type of the corresponding cluster center for each cluster respectively.
2. The method of claim 1, wherein,
the marking of the type of the corresponding cluster center for each cluster comprises:
calculating similarity distances between the characteristics of the region of the target object in the acquired picture and the centers of the M clusters;
determining the characteristics of X target objects with the closest similarity distance aiming at the clustering center of each cluster, determining X pictures corresponding to the X characteristics as the representatives of the clustering center, wherein X is an integer greater than or equal to 1;
marking the type of the clustering center corresponding to the X pictures;
when the target object is a person, the type of the cluster center includes at least one of: a person wearing the predetermined garment, a person not wearing the predetermined garment, not a person;
or, when the target object is a person, the type of the cluster center includes at least one of: the person in the first posture, the person in the second posture, and not the person.
3. The method according to claim 1 or 2,
the detecting the target object in the picture comprises:
when the target object is a person, detecting the person in the picture by adopting a pedestrian detection algorithm;
when the target object is a person, the extracting the feature of the region of the target object in each picture includes: and extracting the characteristics of the regions of N persons in all the pictures by adopting a deep neural network algorithm, wherein N is greater than or equal to M.
4. The method of claim 2, wherein,
when the type of the cluster center includes at least one of: the person wearing the predetermined garment, the person not wearing the predetermined garment, or not the person, the M is determined based on at least one of: the type of the garment, the angle of picture taking;
when the type of the cluster center includes at least one of: the person in the first pose, the person in the second pose, and not the person, the M is determined based on at least one of: the kind of gesture that may be involved, the angle of picture taking.
5. A method for determining the type corresponding to a picture includes
Acquiring a picture containing a target object;
detecting a target object in the picture, and extracting the characteristics of the region of the target object in the picture;
calculating similarity distances of the features of the region of the target object to the cluster centers of the M clusters of the cluster centers, respectively, according to the cluster centers determined by the method according to any one of claims 1 to 4;
and when at least one similarity distance is judged to be smaller than a preset threshold value, determining that the characteristics of the region of the target object belong to the cluster, and determining that the type corresponding to the picture is the type of the cluster center of the cluster.
6. The method of claim 5, further comprising,
when the type corresponding to the picture is determined to be a preset unqualified type;
and sending an alarm message to prompt a manager, wherein the alarm message comprises the picture.
7. A system for determining a cluster center, comprising,
the image acquisition module is used for acquiring an image containing a target object;
the feature extraction module is used for detecting the target objects in the pictures and extracting the features of the regions of the target objects in each picture;
a clustering module configured to cluster features of the region of the target object to form M clusters, wherein M is an integer greater than or equal to 1;
and the marking module is set to mark the type of the corresponding cluster center of each cluster respectively.
8. A device for determining the type corresponding to a picture is characterized by comprising,
the acquisition module acquires a picture containing a target object;
the feature extraction module is used for detecting the target object in the picture and extracting the feature of the region of the target object in the picture;
a type determination module, configured to calculate similarity distances from the features of the region of the target object to the clustering centers of M clusters of the clustering centers, respectively, according to the clustering centers determined by the method of any one of claims 1 to 4; and when at least one similarity distance is judged to be smaller than a preset threshold value, determining that the characteristics of the region of the target object belong to the cluster, and determining that the type corresponding to the picture is the type of the cluster center of the cluster.
9. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 4 when executed.
10. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 5 to 6 when executed.
CN202010424027.9A 2020-05-19 2020-05-19 Method and system for determining clustering center and method and device for determining picture type Withdrawn CN111723844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010424027.9A CN111723844A (en) 2020-05-19 2020-05-19 Method and system for determining clustering center and method and device for determining picture type

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010424027.9A CN111723844A (en) 2020-05-19 2020-05-19 Method and system for determining clustering center and method and device for determining picture type

Publications (1)

Publication Number Publication Date
CN111723844A true CN111723844A (en) 2020-09-29

Family

ID=72564752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010424027.9A Withdrawn CN111723844A (en) 2020-05-19 2020-05-19 Method and system for determining clustering center and method and device for determining picture type

Country Status (1)

Country Link
CN (1) CN111723844A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113837138A (en) * 2021-09-30 2021-12-24 重庆紫光华山智安科技有限公司 Dressing monitoring method, system, medium and electronic terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113837138A (en) * 2021-09-30 2021-12-24 重庆紫光华山智安科技有限公司 Dressing monitoring method, system, medium and electronic terminal
CN113837138B (en) * 2021-09-30 2023-08-29 重庆紫光华山智安科技有限公司 Dressing monitoring method, dressing monitoring system, dressing monitoring medium and electronic terminal

Similar Documents

Publication Publication Date Title
CN105701467B (en) A kind of more people's abnormal behaviour recognition methods based on human figure feature
CN108805900B (en) Method and device for determining tracking target
CN111898486B (en) Monitoring picture abnormality detection method, device and storage medium
Lin et al. Collaborative pedestrian tracking and data fusion with multiple cameras
CN108647557A (en) Information processing equipment, information processing method and storage medium
CN111325048B (en) Personnel gathering detection method and device
CN112396658A (en) Indoor personnel positioning method and positioning system based on video
CN112150514A (en) Pedestrian trajectory tracking method, device and equipment of video and storage medium
CN111160307A (en) Face recognition method and face recognition card punching system
CN110245592A (en) A method of for promoting pedestrian's weight discrimination of monitoring scene
CN109255360A (en) A kind of objective classification method, apparatus and system
CN115100716A (en) Intelligent community pedestrian tracking and positioning method and system
CN111723844A (en) Method and system for determining clustering center and method and device for determining picture type
CN110580708B (en) Rapid movement detection method and device and electronic equipment
CN113965733A (en) Binocular video monitoring method, system, computer equipment and storage medium
CN111753587B (en) Ground falling detection method and device
CN112104838A (en) Image distinguishing method, monitoring camera and monitoring camera system thereof
CN113628251B (en) Smart hotel terminal monitoring method
US20230076241A1 (en) Object detection systems and methods including an object detection model using a tailored training dataset
Lin et al. Collaborative pedestrian tracking with multiple cameras: Data fusion and visualization
CN114581959A (en) Work clothes wearing detection method based on clothes style feature extraction
CN112767452A (en) Active sensing method and system for camera
CN111832451A (en) Airworthiness monitoring process supervision system and method based on video data processing
CN108981718B (en) Pedestrian positioning method and system
Ferreira et al. Human detection and tracking using a Kinect camera for an autonomous service robot

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20200929

WW01 Invention patent application withdrawn after publication