WO2021128883A1 - Systems and methods for managing portrait data - Google Patents

Systems and methods for managing portrait data Download PDF

Info

Publication number
WO2021128883A1
WO2021128883A1 PCT/CN2020/110156 CN2020110156W WO2021128883A1 WO 2021128883 A1 WO2021128883 A1 WO 2021128883A1 CN 2020110156 W CN2020110156 W CN 2020110156W WO 2021128883 A1 WO2021128883 A1 WO 2021128883A1
Authority
WO
WIPO (PCT)
Prior art keywords
cluster
feature
dataset
new
datasets
Prior art date
Application number
PCT/CN2020/110156
Other languages
French (fr)
Inventor
Dian WANG
Xuewu RUAN
Daoli ZHOU
Xiang DENG
Original Assignee
Zhejiang Dahua Technology 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
Priority claimed from CN201911341089.7A external-priority patent/CN111091106B/en
Priority claimed from CN202010085148.5A external-priority patent/CN111309946B/en
Application filed by Zhejiang Dahua Technology Co., Ltd. filed Critical Zhejiang Dahua Technology Co., Ltd.
Publication of WO2021128883A1 publication Critical patent/WO2021128883A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23211Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with adaptive number of clusters

Definitions

  • the present disclosure generally relates to data processing, and in particular, to systems and methods for managing portrait data.
  • the portrait data management may generally aim to cluster all portraits of a same person into one file via a similarity match operation. For example, the portrait data of a portrait may be distributed into a cluster whose center is closest to the portrait data. When the data size of the cluster is large, the accuracy of the clustering may be easily affected. At the same time, when the portrait data of the same person increases, an original cluster center may be no longer representative, and a fault tolerance rate of the clustering may decrease.
  • the portrait data of a same person may be of various types due to different capture angles and scenes, which makes the portrait data difficult to archive. Therefore, it is desirable to provide systems and methods for effectively managing portrait data.
  • a system may be provided.
  • the system may include at least one storage device including a set of instructions and at least one processor in communication with the at least one storage device.
  • the at least one processor may be configured to cause the system to: obtain a representative feature dataset of each of one or more clusters, each of the one or more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster; obtain a target feature dataset of a target portrait; determine first similarities between the target feature dataset and the representative feature datasets of the one or more clusters; in response to determining that the first similarities fail to satisfy a first condition, add a new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determine second similarities between the target feature dataset and the feature datasets of
  • the at least one processor may be configured to cause the system to: determine a representative value of the combined cluster; and designate a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster.
  • the at least one second cluster may be same as the at least one first cluster.
  • the first condition may include that one or more of the first similarities exceed a first threshold.
  • the second condition may include that one or more of the second similarities exceed a second threshold.
  • the first threshold may be smaller than the second threshold.
  • a system may be provided.
  • the system may include at least one storage device including a set of instructions and at least one processor in communication with the at least one storage device.
  • the at least one processor may be configured to cause the system to perform an updating process based on a first feature dataset of a first portrait.
  • the updating process may include: adding one or more first new feature datasets of one or more first new portraits satisfying a first condition into a cluster including the first feature dataset; initiating an iterative process for the cluster, the iterative process comprising a plurality of cycles and each of the plurality of cycles comprising: for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and terminating the iterative process until there is no second new feature dataset satisfying the second condition.
  • the at least one processor may cause the system to: designate the first feature dataset in the cluster as an initial dataset; determine at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a first distance threshold; for each of the at least one first reference feature dataset, determine at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a second distance threshold; and designate the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
  • the at least one processor may cause the system to: for each of the at least one second reference feature dataset in the cluster, designate the second reference feature dataset in the cluster as an initial dataset; determine at least one third reference feature dataset with at least one third vector distance to the initial dataset smaller than the first distance threshold; and for each of the at least one third reference feature dataset, determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the second distance threshold; and designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
  • the first condition may include that a vector distance between the first feature dataset and each of the one or more first new feature datasets is smaller than a third distance threshold.
  • the second condition may include that a vector distance between the one of the one or more first new feature datasets and each of the one or more second new feature datasets is smaller than the third distance threshold.
  • a method may be provided.
  • the method may be implemented on a computing device including at least one processor, at least one storage medium, and a communication platform connected to a network.
  • the method may include: obtaining a representative feature dataset of each of one or more clusters, each of the one or more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster; obtaining a target feature dataset of a target portrait; determining first similarities between the target feature dataset and the representative feature datasets of the one or more clusters; in response to determining that the first similarities fail to satisfy a first condition, adding a new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determining second similarities between the target feature dataset and the feature datasets of one or more portraits in the at least one
  • the method may further include: determining a representative value of the combined cluster; and designating a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster.
  • the at least one second cluster may be same as the at least one first cluster.
  • the first condition may include that one or more of the first similarities exceed a first threshold.
  • the second condition may include that one or more of the second similarities exceed a second threshold.
  • the first threshold may be smaller than the second threshold.
  • a method may be provided.
  • the method may be implemented on a computing device including at least one processor, at least one storage medium, and a communication platform connected to a network.
  • the method may include performing an updating process based on a first feature dataset of a first portrait.
  • the updating process may include: adding one or more first new feature datasets of one or more first new portraits satisfying a first condition into a cluster including the first feature dataset; and initiating an iterative process for the cluster, the iterative process including a plurality of cycles and each of the plurality of cycles including: for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and terminating the iterative process until there is no second new feature dataset satisfying the second condition.
  • the determining one or more first new feature datasets of one or more first new portraits satisfying a first condition may include: designating the first feature dataset in the cluster as an initial dataset; determining at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a first distance threshold; for each of the at least one first reference feature dataset, determining at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a second distance threshold; and designating the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
  • the determining one or more second new feature datasets of one or more second new portraits satisfying a second condition may include: for each of the at least one second reference feature dataset in the cluster, designate the second reference feature dataset in the cluster as an initial dataset; determine at least one third reference feature dataset with at least one vector distance to the initial dataset smaller than the first distance threshold; and for each of the at least one third reference feature dataset, determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the second distance threshold; and designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
  • the first condition may include that a vector distance between the first feature dataset and each of the one or more first new feature datasets is smaller than a third distance threshold.
  • the second condition may include that a vector distance between the one of the one or more first new feature datasets and each of the one or more second new feature datasets is smaller than the third threshold.
  • a non-transitory computer readable medium may include executable instructions that, when executed by at least one processor, direct the at least one processor to perform a method.
  • the method may include: obtaining a representative feature dataset of each of one or more clusters, each of the one or more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster; obtaining a target feature dataset of a target portrait; determining first similarities between the target feature dataset and the representative feature datasets of the one or more clusters; in response to determining that the first similarities fail to satisfy a first condition, adding a new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determining second similarities between the target feature dataset and the feature dataset
  • a non-transitory computer readable medium may include executable instructions that, when executed by at least one processor, direct the at least one processor to perform a method.
  • the method may include: performing an updating process based on a first feature dataset of a first portrait, the updating process comprising: adding one or more first new feature datasets of one or more first new portraits satisfying a first condition into a cluster including the first feature dataset; and initiating an iterative process for the cluster, the iterative process comprising a plurality of cycles and each of the plurality of cycles comprising: for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and terminating the iterative process until there is no second new feature dataset satisfying the second condition.
  • FIG. 1 is a schematic diagram illustrating an exemplary portrait data management system according to some embodiments of the present disclosure
  • FIG. 2 is a block diagram illustrating an exemplary portrait data management system according to some embodiments of the present disclosure
  • FIG. 3 is a block diagram illustrating an exemplary portrait data management system according to some embodiments of the present disclosure
  • FIG. 4 is a flowchart illustrating an exemplary process for portrait data management according to some embodiments of the present disclosure
  • FIG. 5 is a flowchart illustrating an exemplary process for managing portrait data according to some embodiments of the present disclosure
  • FIG. 6 is a flowchart illustrating an exemplary process for determining one or more first new feature datasets of one or more first new portraits according to some embodiments of the present disclosure
  • FIG. 7 is a flowchart illustrating an exemplary process for determining one or more second new feature datasets of one or more second new portraits according to some embodiments of the present disclosure
  • FIG. 8 is a flowchart illustrating an image clustering process according to some embodiments of the present disclosure.
  • FIG. 9 is a flowchart illustrating cosine similarity comparison in some embodiments of the present disclosure.
  • FIG. 10 is a block diagram illustrating an image clustering device according to some embodiments of the present disclosure.
  • FIG. 11 is a flowchart illustrating an optimization process for created files according to some embodiments the present disclosure.
  • FIG. 12 is a flowchart illustrating a process for optimizing files having been created in a database according to some embodiments of the present disclosure.
  • FIG. 13 is a block diagram illustrating a file optimization device according to some embodiments of the present disclosure.
  • system, ” “unit, ” “module, ” and/or “block” used herein are one method to distinguish different components, elements, parts, sections or assemblies of different levels in ascending order. However, the terms may be displaced by another expression if they achieve the same purpose.
  • the modules (or units, blocks, units) described in the present disclosure may be implemented as software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage devices.
  • a software module may be compiled and linked into an executable program. It will be appreciated that software modules can be callable from other modules or from themselves, and/or can be invoked in response to detected events or interrupts.
  • Software modules configured for execution on computing devices can be provided on a computer readable medium, such as a compact disc, a digital video disc, a flash drive, a magnetic disc, or any other tangible medium, or as a digital download (and can be originally stored in a compressed or installable format that requires installation, decompression, or decryption prior to execution) .
  • Such software code can be stored, partially or fully, on a memory device of the executing computing device, for execution by the computing device.
  • Software instructions can be embedded in a firmware, such as an EPROM.
  • hardware modules e.g., circuits
  • circuits can be included of connected or coupled logic units, such as gates and flip-flops, and/or can be included of programmable units, such as programmable gate arrays or processors.
  • the modules or computing device functionality described herein are preferably implemented as hardware modules, but can be software modules as well. In general, the modules described herein refer to logical modules that can be combined with other modules or divided into units despite their physical organization or storage.
  • the flowcharts used in the present disclosure illustrate operations that systems implement according to some embodiments of the present disclosure. It is to be expressly understood, the operations of the flowcharts may be implemented not in order. Conversely, the operations may be implemented in inverted order, or simultaneously. Moreover, one or more other operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.
  • An aspect of the present disclosure relates to systems and methods for portrait data management.
  • the system may obtain a plurality of clusters (or files) for one or more persons (e.g., at least one cluster may correspond to a person) .
  • the system may add one or more first new portraits satisfying a first condition into the cluster.
  • the first condition may be that a similarity between a first new feature dataset of a first new portrait and a representative feature dataset of the cluster is greater than a threshold.
  • the system may add one or more second new portraits satisfying a second condition into the cluster.
  • the second condition may be that a similarity between a first new feature dataset of a first new portrait and a second new feature dataset of a second new portrait is greater than a threshold.
  • the system may combine different clusters (or files) for a same person, thereby avoiding the problem that one person has different clusters (or files) .
  • the addition of the first new portrait (s) into the cluster based on the representative feature dataset of the cluster, and the addition of the second new portrait (s) into the cluster based on the feature dataset of a newly added first new portrait may be performed in parallel, thus greatly increasing the efficiency of the clustering.
  • the system may obtain one or more clusters having been clustered and a target feature dataset of a target portrait to be clustered.
  • the one or more clusters may be clustered based on the process described above.
  • the system may determine first similarities between the target feature dataset and representative feature dataset (s) of the one or more clusters.
  • the system may add a new cluster to gather the target feature dataset of the target portrait.
  • the system may determine second similarities between the target feature dataset and feature datasets of one or more portraits in the at least one first cluster.
  • the system may add the new cluster to gather the target feature dataset of the target portrait.
  • the system may combine the target portrait and the at least one second cluster to form a combined cluster.
  • FIG. 1 is a schematic diagram illustrating an exemplary portrait data management system 100 according to some embodiments of the present disclosure.
  • the portrait data management system 100 may be executed in a mobile terminal, a computer terminal, or a similar computing device. As shown in FIG. 1, the portrait data management system 100 may include one or more processors 102 and a storage device 104.
  • the processor 102 may process data and/or information obtained from other devices or system components. For example, the processor 102 may execute program instructions based on the data, the information, and/or processing result (s) to perform one or more functions described in the present disclosure. In some embodiments, the processor 102 may include one or more sub-processing devices (e.g., a single-core processing device or a multi-core processing device) .
  • sub-processing devices e.g., a single-core processing device or a multi-core processing device
  • the processor 102 may include a central processing unit (CPU) , an application specific integrated circuit (ASIC) , an application specific instruction processor (ASIP) , a graphics processor (GPU) , a physical processor (PPU) , a digital signal processor (DSP) , a field programmable gate array (FPGA) , an editable logic circuit (PLD) , a controller, a microcontroller unit, a reduced instruction set computer (RISC) , a microprocessor, or the like, or any combination thereof.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • ASIP application specific instruction processor
  • GPU graphics processor
  • PPU physical processor
  • DSP digital signal processor
  • FPGA field programmable gate array
  • PLD editable logic circuit
  • controller a controller
  • microcontroller unit a reduced instruction set computer (RISC)
  • RISC reduced instruction set computer
  • the storage device 104 may be configured to store data and/or instructions.
  • the storage device 104 may store computer programs, for example, software programs, modules of application software.
  • the storage device 104 may store computer programs corresponding to portrait data management (e.g., image/portrait clustering, file combination and/or optimization) in some embodiments of the present disclosure.
  • the processor 102 may execute various functional applications and data processing by running the computer programs stored in the storage device 104 to implement the portrait data management.
  • the storage device 104 may include one or more storage components, each of which may be an independent device or a part of other devices.
  • the storage device 104 may include a random access memory (RAM) (e.g., a high-speed RAM) , a read only memory (ROM) , a mass storage, a removable memory, a volatile read-write memory, a non-volatile memory, a flash memory, or the like, or any combination thereof.
  • RAM random access memory
  • ROM read only memory
  • mass storage may include a magnetic disk, an optical disk, a solid-state disk, etc.
  • the storage device 104 may further include a storage remotely provided with respect to the processor 102, and the remote storage may be connected to the portrait data management system 100 through a network.
  • the network may include but is not limited to Internet, Intranet, a local area network, a mobile communication network, or any combination thereof.
  • the storage device 104 may be implemented on a cloud platform.
  • the portrait data management system 100 may also include a transmission device (not shown in FIG. 1) and an input and output device (not shown in FIG. 1) for communication functions.
  • a transmission device not shown in FIG. 1
  • an input and output device not shown in FIG. 1
  • the structure shown in FIG. 1 is merely for illustration purposes, which may not limit the structure of the portrait data management system 100.
  • the portrait data management system 100 may also include more or fewer components than those shown in FIG. 1, or include a configuration different from that shown in FIG. 1.
  • the transmission device may be configured to receive or transmit data via the network.
  • a specific example of the network may include a wireless network provided by a communication provider of the portrait data management system 100.
  • the transmission device may include a Network Interface Controller (NIC) connected to other network devices through a base station to communicate with the Internet.
  • NIC Network Interface Controller
  • the transmission device may be a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.
  • RF Radio Frequency
  • Data may refer to the digital representation of information.
  • the data may include various types, for example, binary data, text data, image data, video data, etc.
  • An instruction may refer to a program that can control a device or component to perform a specific function.
  • FIG. 2 is a block diagram illustrating an exemplary portrait data management system 200 according to some embodiments of the present disclosure.
  • the portrait data management system 200 may be an example of the portrait data management system 100.
  • the portrait data management system 200 may include a first obtainment module 210, a second obtainment module 220, and a clustering module 230.
  • the first obtainment module 210 may be configured to obtain a representative feature dataset of each of one or more clusters.
  • Each of the one or more clusters may include one or more portraits and one or more feature datasets corresponding to the one or more portraits.
  • the representative feature dataset of a cluster may be selected from the one or more feature datasets in the cluster.
  • the second obtainment module 220 may be configured to obtain a target feature dataset of a target portrait to be clustered.
  • the clustering module 230 may be configured to determine first similarities between the target feature dataset and the representative feature dataset (s) of the one or more clusters. In response to determining that the first similarities fail to satisfy a first condition, the clustering module 230 may add a new cluster to gather the target feature dataset of the target portrait. In response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, the clustering module 230 may determine second similarities between the target feature dataset and feature dataset (s) of one or more portraits in the at least one first cluster. In response to determining that the second similarities fail to satisfy a second condition, the clustering module 230 may add the new cluster to gather the target feature dataset of the target portrait.
  • the clustering module 230 may combine the target portrait and the at least one second cluster to form a combined cluster.
  • the clustering module 230 may also be configured to determine a representative value of the combined cluster, and designate a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster.
  • the at least one second cluster may be the same as the at least one first cluster.
  • the first condition may include that one or more of the first similarities exceed a first threshold (also referred to as “first similarity threshold” ) .
  • the second condition may include that one or more of the second similarities exceed a second threshold (also referred to as “second similarity threshold” ) .
  • the first threshold and the second threshold may be determined based on a calculation algorithm.
  • the first threshold may be smaller than the second threshold.
  • the first threshold may exceed or equal the second threshold.
  • FIG. 3 is a block diagram illustrating an exemplary portrait data management system 300 according to some embodiments of the present disclosure.
  • the portrait data management system 300 may be an example of the portrait data management system 100.
  • the portrait data management system 300 may include an update module 310 and an iteration module 320.
  • the update module 310 may be configured to perform an updating process based on a first feature dataset of a first portrait.
  • the updating process may include adding one or more first new feature datasets of one or more first new portraits satisfying a third condition into a cluster including the first feature dataset.
  • the updating process may also include initiating an iterative process for the cluster.
  • the iterative process may include a plurality of cycles and each of the plurality of cycles may include: for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a fourth condition into the cluster; and terminating the iterative process until there is no second new feature dataset satisfying the fourth condition.
  • the third condition may include that a vector distance between the first feature dataset and each of the one or more first new feature datasets is smaller than a third threshold.
  • the fourth condition may include that a vector distance between the one of the one or more first new feature datasets and each of the one or more second new feature datasets is smaller than the third threshold.
  • the update module 310 may designate the first feature dataset in the cluster as an initial dataset and determine at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a fourth threshold. For each of the at least one first reference feature dataset, the update module 310 may determine at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a fifth threshold. Further, the update module 310 may designate the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
  • the iteration module 320 may designate the second reference feature dataset in the cluster as an initial dataset and determine at least one third reference feature dataset with at least one third vector distance to the initial dataset smaller than the third threshold. For each of the at least one third reference feature dataset, the iteration module 320 may determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the fourth threshold. The iteration module 320 may designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
  • the modules in the portrait data management system 200 or 300 may be connected to or communicated with each other via a wired connection or a wireless connection.
  • the wired connection may include a metal cable, an optical cable, a hybrid cable, or the like, or any combination thereof.
  • the wireless connection may include a Local Area Network (LAN) , a Wide Area Network (WAN) , a Bluetooth, a ZigBee, a Near Field Communication (NFC) , or the like, or any combination thereof.
  • LAN Local Area Network
  • WAN Wide Area Network
  • Bluetooth a Bluetooth
  • ZigBee ZigBee
  • NFC Near Field Communication
  • Two or more of the modules may be combined into a single module, and any one of the modules may be divided into two or more units. For example, the first obtainment module 210, the second obtainment module 220, and the clustering module 230 described in FIG.
  • the second obtainment module 220 and the clustering module 230 may be two modules, or integrated into one module configured to both obtain the target feature dataset of the target portrait and distribute the target feature dataset of the target portrait into a cluster.
  • each module may share a storage module or each module may have its own storage module.
  • FIG. 4 is a flowchart illustrating an exemplary process 400 for portrait data management according to some embodiments of the present disclosure.
  • the process 400 may be implemented by the portrait data management system 200.
  • the portrait data management system 200 may obtain a representative feature dataset of each of one or more clusters (also referred to as “portrait cluster, ” “image cluster” ) .
  • each cluster may include one or more portraits and one or more feature datasets (also referred to as “feature data, ” “portrait feature datasets” ) corresponding to the one or more portraits.
  • the one or more portraits in the cluster may correspond to a person.
  • the one or more portraits in the cluster may correspond to a person in a particular scene.
  • a cluster may only include one or more portraits of student A and one or more feature datasets corresponding to the portrait (s) of student A.
  • a feature dataset corresponding to a portrait may refer to a representation of a feature of the portrait.
  • the feature of the portrait may include a feature of a face of the portrait containing a feature of the eyes of the portrait, a feature of the mouth of the portrait, a feature of the nose of the portrait, a feature of the ears of the portrait, a feature of the hands of the portrait, or the like, or any combination thereof.
  • the feature dataset corresponding to the portrait may be represented by a vector or a data point.
  • the representative feature dataset of the cluster may be selected from all the feature datasets in the cluster.
  • a feature dataset of a portrait in the cluster having the maximum similarity to a representative value of the cluster may be designated as the representative feature dataset of the cluster.
  • the representative value of the cluster may be an average representation of all the feature datasets in the cluster.
  • the representative value of the cluster may be determined by vectorizing the feature dataset (s) in the cluster.
  • the representative value of the cluster may be an average of the vector (s) .
  • the cluster (s) described above may be determined based on the process 500 described in FIG. 5, the descriptions of which may be not repeated herein.
  • the portrait data management system 200 may obtain a target feature dataset (also referred to as “feature dataset to be processed” ) of a target portrait.
  • the target feature dataset may refer to a feature dataset of a portrait to be clustered.
  • the target feature dataset may be directly obtained by the data management system 200.
  • the target portrait may be first obtained by the data management system 200, and then the target feature dataset may be extracted by the data management system 200 from the target portrait.
  • the portrait data management system 200 may determine first similarities between the target feature dataset and the representative feature dataset (s) of the cluster (s) .
  • the portrait data management system 200 may determine a first similarity between the target feature dataset and the representative feature dataset of each cluster.
  • the portrait data management system 200 may vectorize the representative feature dataset and the target feature dataset, and then determine a distance (also referred to as “vector distance” ) between the vectors.
  • the distance may include a Euclidean distance, a Mahalanobis distance, a Manhattan distance, etc.
  • the first similarity may be quantified and/or determined based on the distance. For example, the larger the distance is, the smaller the first similarity may be.
  • a distance between two vectors may be represented by a cosine of an included angle between the two vectors.
  • the relationship between the first similarity and the vector distance may be indicated by, for example, a table, a function, or the like.
  • the portrait data management system 200 may determine whether the first similarities satisfy a first condition.
  • the portrait data management system 200 may add a new cluster to gather the target feature dataset of the target portrait in 441.
  • the first condition may relate to a first similarity threshold or other conditions.
  • the first condition may be that at least one first similarity is larger than the first similarity threshold (e.g., 70%) .
  • the first similarity threshold e.g. 70%
  • the first similarity between two feature datasets and a certain representative feature dataset of a cluster is 80%, which is larger than the first similarity threshold, the first similarities may be regarded as satisfying the first condition.
  • that the first similarity between two feature datasets is larger than the first similarity threshold may represent that a vector distance corresponding to the two feature datasets is smaller than a first distance threshold.
  • the vector distance corresponding to two feature datasets may be represented by the cosine of the angle between two vectors corresponding to the two feature datasets, and thus the first condition may be that, among the angles corresponding to the target feature dataset and the representative feature datasets, at least one angle has a cosine value that is larger than a first cosine threshold.
  • that the first similarities fail to satisfy the first condition represents that the target feature dataset fail to match any one of the representative feature dataset (s) and cannot be distributed into any of the cluster (s) corresponding to the representative feature dataset (s) .
  • the portrait data management system 200 may add the new cluster to gather the target feature dataset of the target portrait.
  • the target feature dataset may correspond to Xiao Ming’s portrait.
  • the existing clusters may include three clusters, e.g., a cluster corresponding to Xiao Gang’s portrait (s) , a cluster corresponding to Xiao Hong’s portrait (s) , and a cluster corresponding to Xiao Li’s portrait (s) .
  • the portrait data management system 200 may establish the new cluster to gather the portrait of Xiao Ming and the feature dataset corresponding to Xiao Ming’s portrait.
  • the portrait data management system 200 may determine second similarities between the target feature dataset and feature dataset (s) of one or more portraits in the at least one first cluster in 442.
  • that the first similarities satisfy the first condition represents that the target feature dataset matches representative feature dataset (s) corresponding to the at least one first cluster.
  • the process of determining the second similarities may be similar to the process of determining the first similarities.
  • the portrait data management system 200 may first vectorize the certain feature dataset and the target feature dataset, and then determine a distance between the vectors.
  • Exemplary distances may include a Euclidean distance, a Mahalanobis distance, a Manhattan distance, etc.
  • the second similarity may be quantified and/or determined based on the distance. For example, the larger the distance is, the smaller the second similarity may be.
  • a distance between two vectors may be represented by a cosine of an included angle between the two vectors.
  • the relationship between the second similarity and the vector distance may be indicated by, for example, a table, a function, or the like.
  • the portrait data management system 200 may determine whether the second similarities satisfy a second condition.
  • the portrait data management system 200 may add the new cluster to gather the target feature dataset of the target portrait in 444.
  • the second condition may relate to a second similarity threshold or other conditions. For example, if at least one second similarity is greater than the second similarity threshold (or a corresponding vector distance is smaller than a second distance threshold, or a corresponding cosine of an angle is larger than a second cosine threshold) , the second similarities may be regarded as satisfying the second condition.
  • the first similarity threshold may be smaller than the second similarity threshold.
  • the first similarity threshold may exceed or equal the second similarity threshold.
  • the firs similarities and the second similarities may be determined based on a same calculation algorithm.
  • that the second similarities fail to satisfy the second condition represents that the target feature dataset fails to match any one of feature dataset (s) corresponding to the first cluster (s) and cannot be distributed into any one of the first cluster (s) .
  • the portrait data management system 200 may add the new cluster to gather the target feature dataset of the target portrait.
  • the process for adding the new cluster may be similar to the process for adding the new cluster described in 441, the descriptions of which may be not repeated herein.
  • the portrait data management system 200 may combine the target portrait and at least one second cluster to form a combined cluster in 445.
  • the at least one second cluster described herein refers to the cluster (s) whose corresponding similarities satisfying the second condition.
  • the second cluster (s) may be part of the first cluster (s) .
  • the second cluster (s) may be the same as the first cluster (s) .
  • That the second similarities satisfy the second condition represents that the target feature dataset matches feature dataset (s) corresponding to the second cluster (s) .
  • the target feature dataset may correspond to A’s portrait.
  • the existing clusters may include three clusters, i.e., a first cluster corresponding to Xiao Gang’s portrait (s) , a second cluster corresponding to Xiao Hong’s portrait (s) , and a third cluster corresponding to Xiao Li’s portrait (s) .
  • the portrait data management system 200 may combine the A’s portrait and the Xiao Hong’s portrait (s) and the Xiao Li’s portrait (s) to form the combined cluster.
  • the portrait data management system 200 may determine a representative value of the combined cluster.
  • the representative value of the combined cluster may be an average representation of all the feature datasets corresponding to the portraits in the combined cluster.
  • the combined cluster may include feature datasets with representations (e.g., vectors) A1, A2, A3, and A4, respectively, and the representative value of the combined cluster may be represented by (A1+A2+A3+A4) /4.
  • the portrait data management system 200 may designate a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster. In some embodiments, the portrait data management system 200 may determine a representative data point corresponding to the representative value. The portrait data management system 200 may designate a feature dataset of a portrait in the combined cluster whose corresponding data point has the smallest distance to the representative data point as the representative feature dataset of the combined cluster.
  • FIG. 5 is a flowchart illustrating an exemplary process 500 for managing portrait data according to some embodiments of the present disclosure.
  • the process 500 may be implemented by the portrait data management system 300.
  • the portrait data management system 300 may perform an updating process based on a first feature dataset of a first portrait.
  • the portrait data management system 300 may obtain a plurality of clusters from the storage device 104 or an external storage device.
  • the plurality of clusters may each correspond to a person (e.g., at least one cluster may correspond to one person) and include a plurality of feature datasets of the corresponding person.
  • each cluster may have an initial representative feature dataset.
  • the portrait data management system 300 may also determine representative feature datasets (which may be the same as or different from the initial representative feature datasets) of the clusters by performing clustering analysis on the clusters.
  • the first feature dataset may be one of the determined representative feature datasets of the clusters. More detailed descriptions of determining the representative feature datasets of the clusters may be found elsewhere in the present disclosure. See, for example, FIG. 4 and the descriptions thereof.
  • the updating process may include adding one or more first new feature datasets of one or more first new portraits satisfying a third condition into a first cluster including the first feature dataset.
  • the third condition may relate to a third similarity threshold or other conditions.
  • the third condition may be that the similarity between the first feature dataset and the first new feature dataset exceeds the third similarity threshold (e.g., 80%) .
  • that the similarity between the first feature dataset and the first new feature dataset exceeds the third similarity threshold may represent that a vector distance between two vectors corresponding to the first feature dataset and the first new feature dataset is smaller than a third distance threshold and/or a cosine of an included angle between the two vectors is larger than a third angle threshold.
  • the portrait data management system 300 may determine the first new feature dataset (s) according to the process 600 described in FIG. 6, the descriptions of which may be not repeated herein. Mere by way of example, provided that the first feature dataset is a feature dataset of Xiao Ming’s portrait, if both of a feature dataset of a portrait A and a feature dataset of a portrait B satisfy the third condition, the portrait data management system 300 may add the feature dataset of the portrait A and the feature dataset of the portrait B into the cluster including the feature dataset of Xiao Ming’s portrait.
  • the portrait data management system 300 may further add one or more second new feature datasets of one or more second new portraits satisfying a fourth condition into the first cluster.
  • the fourth condition may relate to the third similarity threshold or other conditions.
  • the fourth condition may be that the similarity between the first new feature dataset and the second new feature dataset exceeds the third similarity threshold (e.g., 80%) .
  • that the similarity between the first new feature dataset and the second new feature dataset exceeds the third similarity threshold may represent that a vector distance between two feature vectors corresponding to the first new feature dataset and the second new feature dataset is smaller than the third distance threshold or a cosine of an included angle between the two vectors is larger than the third angle threshold.
  • the portrait data management system 300 may determine the second new feature dataset (s) according to the process 700 described in FIG. 7, the descriptions of which may be not repeated herein. In some embodiments, for each of the one or more first new feature dataset in the first cluster, the portrait data management system 300 may add all of its corresponding second new feature datasets into the first cluster.
  • the portrait data management system 300 may determine whether no more second new feature dataset satisfies the fourth condition. In response to determining that no more second new feature dataset satisfies the fourth condition, that is, the portrait data management system 300 has executed the operation 520 for all of the first new feature dataset (s) , the process 500 may terminate. In response to determining that there is still at least one second new feature dataset that satisfies the second condition, the portrait data management system 300 may proceed to the operation 520 to continue to adding the second new feature (s) for the one or more first new feature datasets in the first cluster.
  • FIG. 6 is a flowchart illustrating an exemplary process 600 for determining the one or more first new feature datasets of the one or more first new portraits according to some embodiments of the present disclosure.
  • the portrait data management system 300 may designate the first feature dataset in the first cluster as an initial dataset.
  • the portrait data management system 300 may vectorize the feature datasets of the plurality of clusters and the initial dataset, and then determine vector distance between each of the vectors corresponding to the feature datasets of the plurality of clusters and the vector corresponding to the initial dataset. The larger a vector distance is, the less similar two feature datasets corresponding to the vector distance may be.
  • a distance between two vectors may be represented by a cosine of an included angle between the two vectors. The larger the cosine of the included angle is, the smaller the distance between the two vectors may be and the more similar the two vectors may be.
  • the portrait data management system 300 may determine at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a fourth distance threshold among the plurality of clusters.
  • the portrait data management system 300 may determine at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a fifth distance threshold among the plurality of clusters in 630.
  • the fifth distance threshold may be the same as or different from the fourth distance threshold.
  • the fifth distance threshold is smaller or larger than the fourth distance threshold.
  • the fifth distance threshold may be the same as the fourth distance threshold.
  • the third distance threshold described in FIG. 5 may be twice the fourth distance threshold or the fifth distance threshold.
  • the portrait data management system 300 may designate the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
  • FIG. 7 is a flowchart illustrating an exemplary process 700 for determining the one or more second new feature datasets of the one or more second new portraits according to some embodiments of the present disclosure.
  • the portrait data management system 300 e.g., the iteration module 320
  • Each iteration of the iterative process may be implemented based on the process 700.
  • the portrait data management system 300 may designate the second reference feature dataset in the cluster as an initial dataset in 710.
  • the portrait data management system 300 may determine at least one third reference feature dataset with at least one third vector distance to the initial dataset smaller than the fourth distance threshold in 720.
  • a third vector distance may be similar to the first vector distance or the second vector distance described in FIG. 6, and the descriptions of which may be not repeated herein.
  • the portrait data management system 300 may determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the fifth distance threshold in 730.
  • a fourth vector distance may be similar to the first vector distance or the second vector distance described in FIG. 6, and the descriptions of which may be not repeated herein.
  • the portrait data management system 300 may designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
  • FIG. 8 is a flowchart illustrating an image clustering process 800 according to some embodiments of the present disclosure. As shown in FIG. 8, the process may include the following operations.
  • a feature dataset (e.g., a facial feature dataset) of an image including a portrait or face to be processed may be compared with representative feature datasets (e.g., representative facial feature datasets) of representative images in N image clusters (also referred to as one or more clusters described elsewhere in the present disclosure) to determine K target image clusters (also referred to as at least one first cluster described elsewhere in the present disclosure) in the N image clusters.
  • First similarities between the facial feature dataset of the image to be processed and the facial feature datasets of the representative images in the K target image clusters may be greater than or equal to a first threshold (also referred to as “similarity threshold” ) .
  • Each image cluster may include a group of images related to a same identity, and the representative image in the image cluster may be an image used to indicate the same identity in the group of images included in the image cluster.
  • the facial feature dataset of the image to be processed may include a facial feature dataset of a person or portrait in the image to be processed.
  • the embodiments may be applied to scenarios where facial feature comparison is needed, for example, an entrance of a train station where identities of passengers are verified, various scenarios where fees are paid, etc.
  • the facial feature dataset of the image to be processed may be first compared with the facial feature datasets of the representative images instead of comparing the facial feature dataset of the image to be processed with the facial feature datasets of all images in the N image clusters.
  • the K target image clusters may be filtered out, such that the amount of the comparison may be reduced and the efficiency of the comparison may be improved.
  • the facial feature dataset of the image to be processed may be compared with facial feature datasets of images in the K target image clusters to determine M target image clusters (also referred to as “at least one second cluster” described elsewhere in the present disclosure) in the K target image clusters. Second similarities between facial feature dataset (s) of at least one image in the M target image clusters and the facial feature dataset of the image to be processed may be greater than or equal to a second threshold. As used herein, M>0.
  • the M target image clusters may be considered as the result of the second comparison.
  • the facial feature dataset of the image to be processed may belong to the target image cluster including the specific image.
  • a feature dataset of the person in a snapshot image may fail to match feature datasets of all cluster centers associated with the same person, causing a problem of multiple files (or clusters) for the person.
  • the second comparison may avoid or reduce the problem of the multiple files for the person while the image clustering process is implemented in real time and/or in large scale.
  • the first threshold may be smaller than the second threshold.
  • the first threshold may be a threshold for initial filtering.
  • the second threshold may be a threshold for determining whether the facial feature dataset of the image to be processed and the facial feature datasets of the target image clusters correspond to the same identity.
  • the image to be processed may be clustered into some or all of the M target image clusters.
  • the image to be processed may be clustered into all target image clusters or into one or more of the target image clusters.
  • the plurality of the target image clusters may be target image clusters of the same person, which may be combined for processing.
  • the facial feature dataset of the image to be processed may be compared with the facial feature datasets of the representative images in the N image clusters to determine the K target image clusters in the N image clusters.
  • the first similarities between the facial feature dataset of the image to be processed and the facial feature datasets of the representative images in the K target image clusters may be greater than or equal to the first threshold.
  • Each image cluster may include a group of images related to the same identity, and the representative image in the image cluster may be the image used to indicate the same identity in the group of images included in the image cluster.
  • the facial feature dataset of the image to be processed may be further compared with the facial feature datasets of the images in the K target image clusters to determine the M target image clusters in the K target image clusters.
  • the second similarities between the facial feature dataset (s) of the at least one image in the M target image clusters and the facial feature dataset of the image to be processed may be greater than or equal to the second threshold.
  • the image to be processed may be distributed into some or all of the M target image clusters. Therefore, the image to be processed may be distributed into the target image clusters accurately, and a technical problem of inaccurate image clustering may be solved and an effect of the accurate clustering may be achieved.
  • an executive body of the above operations may be a mobile terminal, a computer terminal, or a similar computing device.
  • the process may further include: obtaining the representative image in each image cluster by performing the following operations on each of the N image clusters.
  • Each image cluster may be considered as a current image cluster when the following operations are performed.
  • a feature point (also referred to as “data point” ) of a facial feature dataset of each image in the current image cluster may be determined.
  • the feature point may correspond to a feature value that can be used to identify a distribution of the facial feature dataset of each image in the current image cluster in the coordinate system.
  • a feature point closest to other feature points among the feature points of the facial feature datasets of all the images in the current image cluster may be determined as a representative feature point.
  • an image corresponding to the representative feature point may be determined as a representative image in the current image cluster.
  • the feature point of the facial feature dataset of each image may form a cluster in the coordinate system.
  • a feature point closest to other feature points among the feature points of the current image cluster may be determined as the representative feature point, that is, a cluster center in a cluster.
  • An image corresponding to the cluster center may be a representative image.
  • an amount of the comparison may be reduced and the efficiency of clustering may be improved.
  • the facial feature dataset of the image to be processed may be compared with the facial feature datasets of the representative images in the N image clusters and the K target image clusters in the N image clusters may be determined according to the following operations.
  • a coordinate point (also referred to as “feature point) corresponding to the facial feature dataset of the image to be processed in a coordinate system may be determined.
  • the coordinate point of the facial feature dataset of the image to be processed may correspond to a feature value that can be used to identify the feature distribution of the facial feature dataset of the image to be processed in the coordinate system.
  • a directed line segment in the coordinate system may be determined by connecting an origin point in the coordinate system to the coordinate point of the facial feature dataset of the image to be processed and a feature vector of the facial feature dataset of the image to be processed may be obtained.
  • coordinate points of the facial feature datasets of the representative images in the N image clusters in the coordinate system may be determined.
  • the coordinate points of the facial feature datasets of the representative images may correspond to the feature values that can be used to identify a feature distribution of the facial feature datasets of the representative images in the coordinate system.
  • the K target image clusters may be determined from the N image clusters according to the feature vector of the facial feature dataset of the image to be processed.
  • the cosines of the angles between the feature vector of the facial feature dataset of the image to be processed and the feature vectors of the facial feature datasets of the representative images of the K target image clusters may be respectively greater than the first threshold.
  • the comparison of the cosines of the angles between the vector of the facial feature dataset of the image to be processed and the vectors of the facial feature datasets of the representative images in the K target image clusters may be implemented using cosine similarity.
  • FIG. 9 is a flowchart illustrating cosine similarity comparison in some embodiments of the present disclosure. As shown in FIG. 9, a face image may be illustrated as an example of the image to be processed, and the process may include the following operations.
  • a face image snapshotted by a camera in real time may be obtained.
  • a facial feature dataset of the face image may be extracted.
  • cosine similarities between the facial feature dataset and representative facial feature datasets of cluster centers (representative images) having been clustered may be compared, and k cluster centers whose corresponding cosine similarities are greater than or equal to the first threshold L1 may be extracted first.
  • the value of k may be determined. If k ⁇ 1, the process may proceed to 905; if k ⁇ 1, the process may proceed to 909.
  • cosine similarities between the facial feature dataset and all cluster members (including the cluster centers) of the k clusters may be compared again.
  • Cluster members whose corresponding cosine similarities are greater than or equal to the second threshold L2 may be designated as H (which correspond to M target image clusters) .
  • H the value of H is greater than 1 may be determined. If H ⁇ 1, the process may proceed to 907; if H ⁇ 1, the process may proceed to 908.
  • the face image may be clustered in a cluster having a cluster member with the highest similarity, and a cluster center of the cluster may be updated. Whether the matched cluster members (i.e., the H cluster members) in the comparison are from the same cluster may be determined. If the matched cluster members are not from the same cluster, clusters that the matched cluster members belong to may be combined, a cluster center of which may be updated.
  • a new cluster may be created, and the face image may be set as a cluster center of the cluster.
  • a new cluster may be created, and the face image may be set as a cluster center of the cluster.
  • the similarity threshold L1 corresponding to the representative images may be set to be smaller than the similarity threshold L2 corresponding to the cluster members.
  • L1 may be used for the initial filtering, and L2 may be the similarity threshold used for identifying the face images of a same person.
  • a manner for updating the representative image may include calculating an average value of the facial feature datasets of all images in a cluster and selecting an image with the highest cosine similarity to the average value as a new representative image.
  • the dimension of the extracted facial feature datasets may be reduced to satisfy the rationality of memory consumption.
  • the image to be processed may be distributed by using the cosine similarity, thereby improving the efficiency and accuracy of the clustering.
  • the facial feature dataset of the image to be processed may be compared with the facial feature datasets of the images in the K target image clusters and the M target image clusters in the K target image clusters may be determined according to the following operations.
  • the coordinate point of the facial feature dataset of the image to be processed in the coordinate system may be determined.
  • the coordinate point of the facial feature dataset of the image to be processed may correspond to a feature value that can be used to identify the feature distribution of the facial feature dataset the image to be processed in the coordinate system.
  • the directed line segment in the coordinate system may be determined by connecting the origin point in the coordinate system to the coordinate point of the facial feature dataset of the image to be processed and the feature vector of the facial feature dataset of the image to be processed may be obtained.
  • vectors (also referred to as “feature vectors” ) between the coordinate points of the facial feature datasets of the images in the K target image clusters and the origin point in the coordinate system may be determined and the feature vectors of the facial feature datasets of the images in the K target image clusters may be obtained.
  • the M target image clusters from the K target image clusters may be determined according to the feature vector of the facial feature dataset of the image to be processed.
  • the cosine (s) of angle (s) between the feature vector of the facial feature dataset of the image to be processed and the feature vectors of the facial feature dataset (s) of the at least one image of the M target image clusters may be greater than or equal to the second threshold.
  • image clusters clustered based on the image to be processed may be further filtered by comparing the facial feature dataset of the image to be processed with the facial feature datasets of the images in the K target image clusters using the cosine similarity, which may improve the accuracy of the clustering, and avoid or minimize a problem of multiple files for one person while the image clustering process is implemented in real time and/or in large scale.
  • the image to be processed may be distributed into some or all of the M target image clusters according to the following operations.
  • the feature vector of the facial feature dataset of each image in the M target image clusters may be obtained.
  • an image cluster having an image with the largest cosines of the angles between the feature vectors of the facial feature datasets in the M target image clusters and the feature vector of the facial feature dataset of the image to be processed may be determined as an image cluster to be clustered.
  • Some or all of the target image clusters may include the image cluster to be clustered.
  • the image to be processed may be distributed into the image cluster to be clustered.
  • the image cluster (s) to be clustered may be determined from a plurality of clusters by comparing the feature values, which may further reduce the amount of the comparing and improve the efficiency of the clustering.
  • the process may further include the following operations.
  • image cluster (s) corresponding to the facial feature dataset of the image to be processed may be created.
  • a new cluster may be created, thereby accurately achieving one file for one person.
  • the process may further include the following operations.
  • an average value of the feature vectors of the facial feature datasets of some or all of the images in the M target image clusters may be determined.
  • an image corresponding to a feature vector with the smallest included angle to a feature vector corresponding to the average value may be determined as the representative image.
  • the image to be processed may be updated as the representative image of some or all of the target image cluster.
  • an image that meets additional requirements may be determined as the representative image, for example, an image with a clearer facial feature dataset.
  • the process may further include the following operations.
  • some or all of the target image clusters are a plurality of image clusters, some or all of the target image clusters may be combined into one image cluster to re-determine the representative image.
  • the plurality of image clusters that match the image to be processed may be considered as clusters of a same object, and the image clusters may be combined, thereby achieving one file for one person.
  • the occurrence of multiple files for one person may be avoided or minimized while the image clustering process is implemented in real time and/or in large scale.
  • the problem of the multiple files for one person resulting from that the feature dataset of the real-time snapshot image fails to match any feature dataset of the cluster centers due to unreasonable selection of the representative images of the clusters or calculation errors, may be avoided by using the twice similarity comparisons based on the first threshold and the second threshold.
  • the cluster combination process may be implemented, thereby making an improvement on the problem of occurred multiple files for one person.
  • FIG. 10 is a block diagram illustrating an image clustering device according to some embodiments of the present disclosure. As shown in FIG. 10, the device may include a first determination module 1020, a second determination module 1040, and a clustering module 1060.
  • the first determination module 1020 may be configured to compare a feature dataset (e.g., a facial feature dataset) of an image including a portrait to be processed with representative feature datasets of representative images in N image clusters to determine K target image clusters (also referred to as “at least one first cluster” described elsewhere in the present disclosure) in the N image clusters.
  • a feature dataset e.g., a facial feature dataset
  • K target image clusters also referred to as “at least one first cluster” described elsewhere in the present disclosure
  • First similarities between the facial feature dataset of the image to be processed and the facial feature datasets of the representative images in the K target image clusters may be greater than or equal to a first threshold.
  • Each image cluster may include a group of images related to a same identity, and the representative image in the image cluster may be an image used to indicate the same identity in the group of images included in the image cluster.
  • N ⁇ K>0 More detailed descriptions of comparing the feature dataset of the image to be processed with the representative feature datasets and determining the K target image cluster
  • the second determination module 1040 may be configured to compare the facial feature dataset of the image to be processed with facial feature datasets of images in the K target image clusters to determine M target image clusters (also referred to as “at least one second cluster” described elsewhere in the present disclosure) in the K target image clusters. Second similarities between facial feature dataset (s) of at least one image in the M target image clusters and the facial feature dataset of the image to be processed may be greater than or equal to a second threshold. As used herein, M>0. More detailed descriptions of comparing the facial feature dataset of the image to be processed with the facial feature datasets of images in the K target image clusters and determining the M target image clusters may be found elsewhere in the present disclosure. See, for example, FIGs. 8-9 and the descriptions thereof.
  • the clustering module 1060 may be configured to cluster the image to be processed into some or all of the M target image clusters.
  • the clustering module 1060 may cluster the image to be processed into all target image clusters or one or more of the target image clusters. More detailed descriptions of clustering the image to be processed into some or all of the M target image clusters may be found elsewhere in the present disclosure. See, for example, FIGs. 8-9 and the descriptions thereof.
  • the device may include a processing module (not shown in FIG. 10) .
  • the processing module may be configured to obtain the representative image in each image cluster. More detailed descriptions of obtaining the representative image may be found elsewhere in the present disclosure. See, for example, FIGs. 8-9 and the descriptions thereof.
  • the device may also include a creation module. After the facial feature dataset of the image to be processed is compared with the facial feature datasets of the representative images in the N image clusters and the K target image clusters in the N image clusters are determined, the creation module may be configured to create image cluster (s) corresponding to the facial feature dataset of the image to be processed.
  • the device may also include a third determination module.
  • the third determination module may be configured to determine an average value of the feature vectors of the facial feature datasets of some or all images in the M target image clusters, and determine an image corresponding to a feature vector with the smallest included angle to a feature vector corresponding to the average value as the representative image.
  • the device may also include a combination module. After the image to be processed is clustered into some or all of the M target image clusters, if some or all of the target image clusters are a plurality of image clusters, the combination module may be configured to combine some or all of the target image clusters into one image cluster to re-determine the representative image.
  • FIG. 11 is a flowchart illustrating an optimization process 1100 for created files according to some embodiments the present disclosure. As shown in FIG. 11, the process may include the following operations.
  • N file data (also referred as “N clusters” ) that has been created in a database may be obtained.
  • the N file data may include image features corresponding to initial main-file images and image features corresponding to initial sub-file images of the N files.
  • the initial main-file images may represent images of target persons.
  • N may be an integer greater than 1.
  • the image features corresponding to the initial main-file images of the N files may be used as initial cluster centers and changed N file data may be obtained by performing cluster analysis on the N file data.
  • the changed N file data may include image features corresponding to target main-file images and image features corresponding to target sub-file images of the changed N files.
  • the target main-file images may be the same as or different from the initial main-file images.
  • the image features corresponding to the initial main-file images of each file may be used as the initial cluster centers and a cluster center of each file may be re-determined by performing the cluster analysis.
  • the clustering manner may be various.
  • the image features of the main-file images of the N files may be determined as the initial cluster centers, respectively.
  • the cluster analysis may be performed on the N file data to obtain the changed N file data according to a clustering algorithm, for example, a K-means clustering algorithm, a K center point clustering algorithm, a system clustering manner, etc.
  • the changed N files may be designated as reference files respectively, and the changed N file data may be re-filed according to the reference files.
  • each image in each file of the N files may be used as a reference image and the similarity comparison may be performed between file data in other files and the reference image. If a similarity is within a range, it may be determined that two files may belong to the same person and be combined into one file.
  • the changed N files with the same image features may be combined to obtain M files.
  • N may be greater than or equal to M.
  • An image with a central data point also referred to as “representative data point”
  • the image feature corresponding to the target main-file image of each file of the changed N files may be used as the reference image feature and the similarity comparison may be performed between the reference image feature and the image features corresponding to the target main-file images of other changed N files.
  • target main-file images and target sub-file images in the two files may be combined into one file.
  • two images may be combined into the same file twice.
  • the target main-file images in the two files may be used as target main-file images of the combined file, or one of the target main-file images may be used as a target main-file image of the combined file and the other may be used as a target sub-file image.
  • each file on which the following operations are performed may be designated as a current file.
  • a weighted average of image features of all images in the current target file may be determined.
  • An image whose image feature value having the smallest distance to the weighted average value among all images of the current target file may be designated as a target main-file image of the current target file.
  • a current target file may include an image A, an image B, an image C, and an image D.
  • a weighted average of image features of the images A, B, C and D may be wherein
  • w 1 , w 2 , w 3 , w 4 are weights corresponding to the images A, B, C, and D respectively and may be the same or different.
  • the distance between the images A, B, C, and D, and the weighted average may be respectively determined as:
  • An image corresponding to the minimum distance may be selected as a target main image.
  • target main-file images or the target sub-file images corresponding to the image features with the similarities to the first reference image feature greater than or equal to the predetermined threshold are combined into the reference file may include the following operations.
  • the target main-file images and the target sub-file images of the file corresponding to the target main-file image may be combined into the reference file.
  • the target sub-file images with the similarities to the first reference image feature greater than or equal to the predetermined threshold may be combined into the reference file.
  • the file in order to further improve the accuracy of the file optimization, may be further optimized with the image features corresponding to the target sub-file images of the reference file as the reference image features.
  • the image features corresponding to the added target sub-file images of the reference file may be determined as second reference image features.
  • Image features with similarities to the second reference image features greater than or equal to the predetermined threshold may be searched from the changed (N-1) files.
  • the target main-file images or the target sub-file images corresponding to the searched image features may be combined into the reference file, and the added target sub-file images may be marked as searched.
  • the process described above may be repeatedly implemented until the added target sub-file images are all marked as searched and no more image feature having a similarity to the second reference image feature greater than or equal to the predetermined threshold is found from the changed (N-1) files.
  • FIG. 12 is a flowchart illustrating a process 1200 for optimizing files having been created in a database according to some embodiments of the present disclosure. As shown in FIG. 12, the process may include the following operations.
  • data (also referred to as “created file data” ) of files having been created may be used as clustering data.
  • a main-file image of a file may be used as a cluster center for cluster analysis.
  • the created file data including main-file images and sub-file feature datasets may be obtained.
  • the cluster analysis may be performed by using all feature datasets of the main-file images as initial cluster centers.
  • the clustering manner may include but is not limited to a K-means clustering manner, a K-center point clustering manner, a system clustering manner, etc. Taking a K-mean clustering manner as an example, the K-means clustering manner may include the following operations.
  • Each point corresponding to a feature dataset of an image may be assigned to the nearest cluster center point to form a corresponding cluster in operation A.
  • An average of each dimension of data in the cluster may be calculated to obtain a new cluster center in operation B.
  • the operations A and B may be repeated until the cluster center no longer changes.
  • the clustering data may be obtained and a full cluster of each cluster center may be determined. If a cluster center after the cluster analysis is not an existing data point, a new cluster center may be finally determined by using the nearest existing feature data point as the cluster center.
  • one data point in the full cluster of the cluster center may be designated as an initial point (if the point is searched, the search may not be repeated)
  • a twice distance threshold may be designated as a radius
  • data point (s) of the cluster center within the twice distance threshold may be searched
  • the data point (s) of the cluster center may be added to a sub-cluster of the cluster center
  • the data point (i.e., the initial point) may be marked as searched.
  • a similarity between feature datasets may be quantified by distance including but being not limited to a Euclidean distance, a cosine distance, etc. Taking the Euclidean distance as an example, the smaller the distance is, the more similar the portrait feature datasets may be.
  • a cluster center X is similar to a sub-cluster data point Y
  • Y is within a distance threshold from X
  • the sub-cluster data point Y is similar to a cluster center Z
  • Z is within the distance threshold from Y
  • Z may be within the twice distance threshold from the cluster center X.
  • whether all sub-clusters of the cluster center have been searched may be determined. If all data points in the sub-clusters of the cluster center are searched, the operation 1206 may be triggered; otherwise, the operation 1205 may be triggered.
  • one data point in the sub-cluster of the cluster center may be designated as an initial point (if the point is searched, the search may not be repeated) , and data point (s) of the cluster center within the twice distance threshold to the initial data point may be searched and added to the sub-cluster (s) of cluster center, and the data point (i.e., the initial point) may be marked as searched. Then the operation 1204 may be triggered.
  • a file corresponding to the person may be filed, which may include one or more cluster centers and sub-clusters of data points within the cluster.
  • whether the full cluster of the cluster center has been searched may be determined. If data points in the full cluster of the cluster center are searched, the operation 1208 may be triggered; otherwise, the operation 1203 may be triggered.
  • the file combination and optimization may be completed.
  • a database may include images A, B, C, D, E, X, Y, and Z, and be divided into three files. Some embodiments of the present disclosure may be described below.
  • a and C are not similar, A and C are main-file images;
  • B is similar to A and is a sub-file of A
  • D and E are similar to A and C, are more similar to C, and are sub-files of C;
  • X, Y, and Z are similar to each other, but not similar to A, B, C, D, and E, and X is a main-file image.
  • Cluster analysis may be performed with A, C, and X as initial cluster centers and obtain a new full cluster with cluster centers B, D, and Y, a sub-file A of B, sub-files C, and E of D, and sub-files X and Z of Y. ( “Operation 1” for short) .
  • the cluster center B may be selected to begin a search.
  • a distance threshold may be designated as a radius to obtain a sub-cluster of data points A and C, and B may be marked as searched. ( “Operation 2” for short) .
  • the sub-cluster of data point A may be designated as an initial point, and the distance threshold may be designated as a radius to obtain a sub-cluster of the cluster center B and D within the distance threshold, and A may be marked as searched.
  • the above operations 2 and 3 may be combined.
  • the cluster center data point B may be used as an initial point, and the twice distance threshold may be designated as the radius to directly search the data points of the cluster centers. ( “Operation 3” for short) .
  • the cluster center D may be selected to begin a search to obtain a sub-cluster of the data points A, C, and E, and D may be marked as searched. ( “Operation 4” for short) .
  • the cluster centers B and D may be traversed and searched through the operation 2 to operation 5.
  • the cluster centers B and D may be determined to be in the same file, and the corresponding file of the person may be formed (including 2 cluster centers B and D, and sub-clusters with the data points C, D, and E within the cluster) . ( “operation 6” for short) .
  • the cluster center Y may be selected to begin a search.
  • the distance threshold may be designated as the radius to obtain a sub-cluster of data points X, Z, and Y may be marked as a searched state. ( “Operation 7” for short) .
  • the data points X, Z of the sub-cluster may be designated as initial points, and the distance threshold may be designated as a radius to obtain only one sub-cluster of the cluster center Y. No new cluster center may be found, and X, Z may be marked searched. ( “Operation 8” for short) .
  • the cluster center Y may be traversed and searched through the operation 7 to the operation 8.
  • the cluster center Y may be determined to be in the same file, and the corresponding file of the person may be formed (including 1 cluster center Y, and the sub-cluster of data points X and Z) . ( “Operation 9” for short) .
  • All data points may be traversed and searched, and the file combination and optimization may be completed.
  • FIG. 13 is a block diagram illustrating the file optimization device according to some embodiments of the present disclosure. As shown in FIG. 13, the device may include an obtainment module 1320, a cluster analysis module 1340, and a processing module 1360.
  • the obtainment module 1320 may be configured to obtain N file data (also referred to as “N clusters” ) that has been created in a database.
  • the N file data may include image features corresponding to initial main-file images and image features corresponding to initial sub-file images of the N files.
  • the initial main-file images may represent images of target persons.
  • N may be an integer greater than 1.
  • the cluster analysis module 1340 may be configured to use the image features corresponding to the initial main-file images of the N files as initial cluster centers and obtain changed N file data by performing cluster analysis on the N file data.
  • the changed N file data may include image features corresponding to target main-file images and image features corresponding to target sub-file images of the changed N files.
  • the target main-file images may be the same as or different from the initial main-file images.
  • the processing module 1360 may be configured to designate the changed N files as reference files respectively, and re-file the changed N file data according to the reference files.
  • the process e.g., the processes 400-900, 1100, or 1200
  • objects e.g., vehicles, particular places (e.g., buildings, a factories) other than the portrait or face.
  • feature datasets (e.g., a feature of a license plate of a vehicle, a feature of a color of the vehicle, a feature of a type of the vehicle) of one or more vehicles in a plurality of images may be determined, and the plurality of images may be clustered into one or more clusters (e.g., each cluster may include at least one image correspond to a same vehicle) based on similarities of the feature datasets according to the processes.
  • aspects of the present disclosure may be illustrated and described herein in any of a number of patentable classes or context including any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof. Accordingly, aspects of the present disclosure may be implemented entirely hardware, entirely software (including firmware, resident software, micro-code, etc. ) or combining software and hardware implementation that may all generally be referred to herein as a “unit, ” “module, ” or “system. ” Furthermore, aspects of the present disclosure may take the form of a computer program product embodied in one or more computer readable media having computer readable program code embodied thereon.
  • a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including electro-magnetic, optical, or the like, or any suitable combination thereof.
  • a computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that may communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer readable signal medium may be transmitted using any appropriate medium, including wireless, wireline, optical fiber cable, RF, or the like, or any suitable combination of the foregoing.
  • Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB. NET, Python or the like, conventional procedural programming languages, such as the "C" programming language, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP, dynamic programming languages such as Python, Ruby and Groovy, or other programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN) , or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider) or in a cloud computing environment or offered as a service such as a Software as a Service (SaaS) .
  • LAN local area network
  • WAN wide area network
  • SaaS Software as a Service

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed herein is a system. The system may obtain a representative feature dataset of each of one or more clusters (410); and obtain a target feature dataset of a target portrait (420); and determine first similarities between the target feature dataset and the representative feature datasets of the one or more clusters (430); determine whether the first similarities satisfy a first condition (440); if at least one of the first similarities corresponding to at least one first cluster of the one or more clusters does not satisfy the first condition, the system may add a new cluster to gather the target feature dataset of the target portrait (441); if at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, the system may determine second similarities between the target feature dataset and the feature datasets of one or more portraits in the at least one first cluster (442); determine whether the second similarities satisfy a second condition (443); if at least one of the second similarities corresponding to at least one second cluster does not satisfy the second condition, the system may add a new cluster to gather the target feature dataset of the target portrait (444); if at least one of the second similarities corresponding to at least one second cluster satisfies the second condition, the system may combine the target portrait and the at least one second cluster whose corresponding similarities satisfying the second condition to form a combined cluster (445).

Description

SYSTEMS AND METHODS FOR MANAGING PORTRAIT DATA
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims priority to Chinese Patent Application No. 201911341089.7 filed on December 23, 2019 and Chinese Patent Application No. 202010085148.5 filed on February 10, 2020, the entire contents of which are hereby incorporated by reference.
TECHNICAL FIELD
The present disclosure generally relates to data processing, and in particular, to systems and methods for managing portrait data.
BACKGROUND
With the development of data processing technology, various data processing techniques have been widely used in portrait data management. The portrait data management may generally aim to cluster all portraits of a same person into one file via a similarity match operation. For example, the portrait data of a portrait may be distributed into a cluster whose center is closest to the portrait data. When the data size of the cluster is large, the accuracy of the clustering may be easily affected. At the same time, when the portrait data of the same person increases, an original cluster center may be no longer representative, and a fault tolerance rate of the clustering may decrease. In addition, the portrait data of a same person may be of various types due to different capture angles and scenes, which makes the portrait data difficult to archive. Therefore, it is desirable to provide systems and methods for effectively managing portrait data.
SUMMARY
In one aspect of the present discourse, a system may be provided. The system may include at least one storage device including a set of instructions and at least one processor in communication with the at least one storage device. When executing the set of instructions, the at least one processor may be configured to cause the system to: obtain a representative feature dataset of each of one or more clusters, each of the one or  more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster; obtain a target feature dataset of a target portrait; determine first similarities between the target feature dataset and the representative feature datasets of the one or more clusters; in response to determining that the first similarities fail to satisfy a first condition, add a new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determine second similarities between the target feature dataset and the feature datasets of one or more portraits in the at least one first cluster; in response to determining that the second similarities fail to satisfy a second condition, add the new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the second similarities corresponding to at least one second cluster satisfies the second condition, combine the target portrait and the at least one second cluster to form a combined cluster.
In some embodiments, the at least one processor may be configured to cause the system to: determine a representative value of the combined cluster; and designate a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster.
In some embodiments, the at least one second cluster may be same as the at least one first cluster.
In some embodiments, the first condition may include that one or more of the first similarities exceed a first threshold. The second condition may include that one or more of the second similarities exceed a second threshold. The first threshold may be smaller than the second threshold.
In another aspect of the present discourse, a system may be provided. The system may include at least one storage device including a set of instructions and at least one processor in communication with the at least one storage device. When executing  the set of instructions, the at least one processor may be configured to cause the system to perform an updating process based on a first feature dataset of a first portrait. The updating process may include: adding one or more first new feature datasets of one or more first new portraits satisfying a first condition into a cluster including the first feature dataset; initiating an iterative process for the cluster, the iterative process comprising a plurality of cycles and each of the plurality of cycles comprising: for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and terminating the iterative process until there is no second new feature dataset satisfying the second condition.
In some embodiments, wherein to determine one or more first new feature datasets of one or more first new portraits satisfying a first condition, the at least one processor may cause the system to: designate the first feature dataset in the cluster as an initial dataset; determine at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a first distance threshold; for each of the at least one first reference feature dataset, determine at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a second distance threshold; and designate the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
In some embodiments, wherein to determine one or more second new feature datasets of one or more second new portraits satisfying a second condition, the at least one processor may cause the system to: for each of the at least one second reference feature dataset in the cluster, designate the second reference feature dataset in the cluster as an initial dataset; determine at least one third reference feature dataset with at least one third vector distance to the initial dataset smaller than the first distance threshold; and for each of the at least one third reference feature dataset, determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature  dataset smaller than the second distance threshold; and designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
In some embodiments, the first condition may include that a vector distance between the first feature dataset and each of the one or more first new feature datasets is smaller than a third distance threshold.
In some embodiments, the second condition may include that a vector distance between the one of the one or more first new feature datasets and each of the one or more second new feature datasets is smaller than the third distance threshold.
In another aspect of the present discourse, a method may be provided. The method may be implemented on a computing device including at least one processor, at least one storage medium, and a communication platform connected to a network. The method may include: obtaining a representative feature dataset of each of one or more clusters, each of the one or more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster; obtaining a target feature dataset of a target portrait; determining first similarities between the target feature dataset and the representative feature datasets of the one or more clusters; in response to determining that the first similarities fail to satisfy a first condition, adding a new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determining second similarities between the target feature dataset and the feature datasets of one or more portraits in the at least one first cluster; in response to determining that the second similarities fail to satisfy a second condition, adding the new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the second similarities corresponding to at least one second cluster satisfies the second condition, combining the target portrait and the at least one second cluster to form a  combined cluster.
In some embodiments, the method may further include: determining a representative value of the combined cluster; and designating a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster.
In some embodiments, the at least one second cluster may be same as the at least one first cluster.
In some embodiments, the first condition may include that one or more of the first similarities exceed a first threshold. The second condition may include that one or more of the second similarities exceed a second threshold. The first threshold may be smaller than the second threshold.
In another aspect of the present discourse, a method may be provided. The method may be implemented on a computing device including at least one processor, at least one storage medium, and a communication platform connected to a network. The method may include performing an updating process based on a first feature dataset of a first portrait. The updating process may include: adding one or more first new feature datasets of one or more first new portraits satisfying a first condition into a cluster including the first feature dataset; and initiating an iterative process for the cluster, the iterative process including a plurality of cycles and each of the plurality of cycles including: for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and terminating the iterative process until there is no second new feature dataset satisfying the second condition.
In some embodiments, the determining one or more first new feature datasets of one or more first new portraits satisfying a first condition may include: designating the first feature dataset in the cluster as an initial dataset; determining at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a first distance threshold; for each of the at least one first reference feature dataset, determining  at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a second distance threshold; and designating the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
In some embodiments, the determining one or more second new feature datasets of one or more second new portraits satisfying a second condition may include: for each of the at least one second reference feature dataset in the cluster, designate the second reference feature dataset in the cluster as an initial dataset; determine at least one third reference feature dataset with at least one vector distance to the initial dataset smaller than the first distance threshold; and for each of the at least one third reference feature dataset, determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the second distance threshold; and designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
In some embodiments, the first condition may include that a vector distance between the first feature dataset and each of the one or more first new feature datasets is smaller than a third distance threshold.
In some embodiments, the second condition may include that a vector distance between the one of the one or more first new feature datasets and each of the one or more second new feature datasets is smaller than the third threshold.
In another aspect of the present discourse, a non-transitory computer readable medium may be provided. The non-transitory computer readable medium may include executable instructions that, when executed by at least one processor, direct the at least one processor to perform a method. The method may include: obtaining a representative feature dataset of each of one or more clusters, each of the one or more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster; obtaining a target feature dataset of a  target portrait; determining first similarities between the target feature dataset and the representative feature datasets of the one or more clusters; in response to determining that the first similarities fail to satisfy a first condition, adding a new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determining second similarities between the target feature dataset and the feature datasets of one or more portraits in the at least one first cluster; in response to determining that the second similarities fail to satisfy a second condition, adding the new cluster to gather the target feature dataset of the target portrait; and in response to determining that at least one of the second similarities corresponding to at least one second cluster satisfies the second condition, combining the target portrait and the at least one second cluster to form a combined cluster.
In another aspect of the present discourse, a non-transitory computer readable medium may be provided. The non-transitory computer readable medium may include executable instructions that, when executed by at least one processor, direct the at least one processor to perform a method. The method may include: performing an updating process based on a first feature dataset of a first portrait, the updating process comprising: adding one or more first new feature datasets of one or more first new portraits satisfying a first condition into a cluster including the first feature dataset; and initiating an iterative process for the cluster, the iterative process comprising a plurality of cycles and each of the plurality of cycles comprising: for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and terminating the iterative process until there is no second new feature dataset satisfying the second condition.
Additional features will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following and the accompanying drawings or may be learned by production or operation of the examples. The features of the present disclosure may be realized and attained by  practice or use of various aspects of the methodologies, instrumentalities and combinations set forth in the detailed examples discussed below.
BRIEF DESCRIPTION OF THE DRAWINGS
The present disclosure is further described in terms of exemplary embodiments. These exemplary embodiments are described in detail with reference to the drawings. The drawings are not to scale. These embodiments are non-limiting schematic embodiments, in which like reference numerals represent similar structures throughout the several views of the drawings, and wherein:
FIG. 1 is a schematic diagram illustrating an exemplary portrait data management system according to some embodiments of the present disclosure;
FIG. 2 is a block diagram illustrating an exemplary portrait data management system according to some embodiments of the present disclosure;
FIG. 3 is a block diagram illustrating an exemplary portrait data management system according to some embodiments of the present disclosure;
FIG. 4 is a flowchart illustrating an exemplary process for portrait data management according to some embodiments of the present disclosure;
FIG. 5 is a flowchart illustrating an exemplary process for managing portrait data according to some embodiments of the present disclosure;
FIG. 6 is a flowchart illustrating an exemplary process for determining one or more first new feature datasets of one or more first new portraits according to some embodiments of the present disclosure;
FIG. 7 is a flowchart illustrating an exemplary process for determining one or more second new feature datasets of one or more second new portraits according to some embodiments of the present disclosure;
FIG. 8 is a flowchart illustrating an image clustering process according to some embodiments of the present disclosure;
FIG. 9 is a flowchart illustrating cosine similarity comparison in some embodiments  of the present disclosure;
FIG. 10 is a block diagram illustrating an image clustering device according to some embodiments of the present disclosure;
FIG. 11 is a flowchart illustrating an optimization process for created files according to some embodiments the present disclosure;
FIG. 12 is a flowchart illustrating a process for optimizing files having been created in a database according to some embodiments of the present disclosure; and
FIG. 13 is a block diagram illustrating a file optimization device according to some embodiments of the present disclosure.
DETAILED DESCRIPTION
In the following detailed description, numerous specific details are set forth by way of examples in order to provide a thorough understanding of the relevant disclosure. However, it should be apparent to those skilled in the art that the present disclosure may be practiced without such details. In other instances, well-known methods, procedures, systems, components, and/or circuitry have been described at a relatively high-level, without detail, in order to avoid unnecessarily obscuring aspects of the present disclosure. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present disclosure. Thus, the present disclosure is not limited to the embodiments shown, but to be accorded the widest scope consistent with the claims.
The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms “a, ” “an, ” and “the” may be intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprise, ” “comprises, ” and/or “comprising, ” “include, ” “includes, ” and/or “including, ” when used in this specification, specify the presence of stated features, integers, steps, operations,  elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood that the terms “system, ” “unit, ” “module, ” and/or “block” used herein are one method to distinguish different components, elements, parts, sections or assemblies of different levels in ascending order. However, the terms may be displaced by another expression if they achieve the same purpose.
The modules (or units, blocks, units) described in the present disclosure may be implemented as software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage devices. In some embodiments, a software module may be compiled and linked into an executable program. It will be appreciated that software modules can be callable from other modules or from themselves, and/or can be invoked in response to detected events or interrupts. Software modules configured for execution on computing devices can be provided on a computer readable medium, such as a compact disc, a digital video disc, a flash drive, a magnetic disc, or any other tangible medium, or as a digital download (and can be originally stored in a compressed or installable format that requires installation, decompression, or decryption prior to execution) . Such software code can be stored, partially or fully, on a memory device of the executing computing device, for execution by the computing device. Software instructions can be embedded in a firmware, such as an EPROM. It will be further appreciated that hardware modules (e.g., circuits) can be included of connected or coupled logic units, such as gates and flip-flops, and/or can be included of programmable units, such as programmable gate arrays or processors. The modules or computing device functionality described herein are preferably implemented as hardware modules, but can be software modules as well. In general, the modules described herein refer to logical modules that can be combined with other modules or divided into units despite their physical organization or storage.
It will be understood that when a unit, engine, module or block is referred to as being “on, ” “connected to, ” or “coupled to, ” another unit, engine, module, or block, it may  be directly on, connected or coupled to, or communicate with the other unit, engine, module, or block, or an intervening unit, engine, module, or block may be present, unless the context clearly indicates otherwise. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed items.
These and other features, and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structure and the combination of parts and economies of manufacture, may become more apparent upon consideration of the following description with reference to the accompanying drawings, all of which form a part of this disclosure. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended to limit the scope of the present disclosure.
The flowcharts used in the present disclosure illustrate operations that systems implement according to some embodiments of the present disclosure. It is to be expressly understood, the operations of the flowcharts may be implemented not in order. Conversely, the operations may be implemented in inverted order, or simultaneously. Moreover, one or more other operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.
An aspect of the present disclosure relates to systems and methods for portrait data management. The system may obtain a plurality of clusters (or files) for one or more persons (e.g., at least one cluster may correspond to a person) . For each of the at least one cluster among the plurality of clusters, the system may add one or more first new portraits satisfying a first condition into the cluster. In some embodiments, the first condition may be that a similarity between a first new feature dataset of a first new portrait and a representative feature dataset of the cluster is greater than a threshold. Further, based on each of the one or more first new portraits, the system may add one or more second new portraits satisfying a second condition into the cluster. Similar to the first condition, the second condition may be that a similarity between a first new feature dataset of a first new portrait and a second new feature dataset of a second new portrait is greater  than a threshold. By doing this, the system may combine different clusters (or files) for a same person, thereby avoiding the problem that one person has different clusters (or files) . Optionally, the addition of the first new portrait (s) into the cluster based on the representative feature dataset of the cluster, and the addition of the second new portrait (s) into the cluster based on the feature dataset of a newly added first new portrait may be performed in parallel, thus greatly increasing the efficiency of the clustering.
Another aspect of the present disclosure relates to systems and methods for portrait data management. The system may obtain one or more clusters having been clustered and a target feature dataset of a target portrait to be clustered. In some embodiments, the one or more clusters may be clustered based on the process described above. The system may determine first similarities between the target feature dataset and representative feature dataset (s) of the one or more clusters. In response to determining that the first similarities fail to satisfy a first condition (e.g., the first similarities smaller than a first threshold) , the system may add a new cluster to gather the target feature dataset of the target portrait. In response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, the system may determine second similarities between the target feature dataset and feature datasets of one or more portraits in the at least one first cluster. In response to determining that the second similarities fail to satisfy a second condition (e.g., the second similarities smaller than a second threshold) , the system may add the new cluster to gather the target feature dataset of the target portrait. In response to determining that at least one of the second similarities corresponding to at least one second cluster satisfies the second condition, the system may combine the target portrait and the at least one second cluster to form a combined cluster. By setting multiple conditions to distribute the target portrait into an existing cluster or a new cluster, the clustering of portraits belonging to a same person may be accurately achieved, thus realizing a more effective portrait data management.
FIG. 1 is a schematic diagram illustrating an exemplary portrait data  management system 100 according to some embodiments of the present disclosure.
The portrait data management system 100 may be executed in a mobile terminal, a computer terminal, or a similar computing device. As shown in FIG. 1, the portrait data management system 100 may include one or more processors 102 and a storage device 104.
The processor 102 may process data and/or information obtained from other devices or system components. For example, the processor 102 may execute program instructions based on the data, the information, and/or processing result (s) to perform one or more functions described in the present disclosure. In some embodiments, the processor 102 may include one or more sub-processing devices (e.g., a single-core processing device or a multi-core processing device) . Merely by way of example, the processor 102 may include a central processing unit (CPU) , an application specific integrated circuit (ASIC) , an application specific instruction processor (ASIP) , a graphics processor (GPU) , a physical processor (PPU) , a digital signal processor (DSP) , a field programmable gate array (FPGA) , an editable logic circuit (PLD) , a controller, a microcontroller unit, a reduced instruction set computer (RISC) , a microprocessor, or the like, or any combination thereof.
The storage device 104 may be configured to store data and/or instructions. In some embodiments, the storage device 104 may store computer programs, for example, software programs, modules of application software. For example, the storage device 104 may store computer programs corresponding to portrait data management (e.g., image/portrait clustering, file combination and/or optimization) in some embodiments of the present disclosure. The processor 102 may execute various functional applications and data processing by running the computer programs stored in the storage device 104 to implement the portrait data management. The storage device 104 may include one or more storage components, each of which may be an independent device or a part of other devices. In some embodiments, the storage device 104 may include a random access memory (RAM) (e.g., a high-speed RAM) , a read only memory (ROM) , a mass storage, a  removable memory, a volatile read-write memory, a non-volatile memory, a flash memory, or the like, or any combination thereof. For example, the mass storage may include a magnetic disk, an optical disk, a solid-state disk, etc. In some embodiments, the storage device 104 may further include a storage remotely provided with respect to the processor 102, and the remote storage may be connected to the portrait data management system 100 through a network. For example, the network may include but is not limited to Internet, Intranet, a local area network, a mobile communication network, or any combination thereof. In some embodiments, the storage device 104 may be implemented on a cloud platform.
In some embodiments, the portrait data management system 100 may also include a transmission device (not shown in FIG. 1) and an input and output device (not shown in FIG. 1) for communication functions. Those skilled in the art may understand that the structure shown in FIG. 1 is merely for illustration purposes, which may not limit the structure of the portrait data management system 100. For example, the portrait data management system 100 may also include more or fewer components than those shown in FIG. 1, or include a configuration different from that shown in FIG. 1.
The transmission device may be configured to receive or transmit data via the network. A specific example of the network may include a wireless network provided by a communication provider of the portrait data management system 100. For example, the transmission device may include a Network Interface Controller (NIC) connected to other network devices through a base station to communicate with the Internet. As another example, the transmission device may be a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.
Data (or a dataset) may refer to the digital representation of information. The data may include various types, for example, binary data, text data, image data, video data, etc. An instruction may refer to a program that can control a device or component to perform a specific function.
FIG. 2 is a block diagram illustrating an exemplary portrait data management  system 200 according to some embodiments of the present disclosure. The portrait data management system 200 may be an example of the portrait data management system 100.
As shown in FIG. 2, the portrait data management system 200 may include a first obtainment module 210, a second obtainment module 220, and a clustering module 230.
The first obtainment module 210 may be configured to obtain a representative feature dataset of each of one or more clusters. Each of the one or more clusters may include one or more portraits and one or more feature datasets corresponding to the one or more portraits. As used herein, the representative feature dataset of a cluster may be selected from the one or more feature datasets in the cluster.
The second obtainment module 220 may be configured to obtain a target feature dataset of a target portrait to be clustered.
The clustering module 230 may be configured to determine first similarities between the target feature dataset and the representative feature dataset (s) of the one or more clusters. In response to determining that the first similarities fail to satisfy a first condition, the clustering module 230 may add a new cluster to gather the target feature dataset of the target portrait. In response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, the clustering module 230 may determine second similarities between the target feature dataset and feature dataset (s) of one or more portraits in the at least one first cluster. In response to determining that the second similarities fail to satisfy a second condition, the clustering module 230 may add the new cluster to gather the target feature dataset of the target portrait. In response to determining that at least one of the second similarities corresponding to at least one second cluster satisfies the second condition, the clustering module 230 may combine the target portrait and the at least one second cluster to form a combined cluster. In some embodiments, the clustering module 230 may also be configured to determine a representative value of the combined cluster, and designate  a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster.
In some embodiments, the at least one second cluster may be the same as the at least one first cluster.
In some embodiments, the first condition may include that one or more of the first similarities exceed a first threshold (also referred to as “first similarity threshold” ) . The second condition may include that one or more of the second similarities exceed a second threshold (also referred to as “second similarity threshold” ) . In some embodiments, the first threshold and the second threshold may be determined based on a calculation algorithm. In some embodiments, the first threshold may be smaller than the second threshold. In some embodiments, the first threshold may exceed or equal the second threshold.
FIG. 3 is a block diagram illustrating an exemplary portrait data management system 300 according to some embodiments of the present disclosure. The portrait data management system 300 may be an example of the portrait data management system 100.
As shown in FIG. 3, the portrait data management system 300 may include an update module 310 and an iteration module 320.
The update module 310 may be configured to perform an updating process based on a first feature dataset of a first portrait. The updating process may include adding one or more first new feature datasets of one or more first new portraits satisfying a third condition into a cluster including the first feature dataset. The updating process may also include initiating an iterative process for the cluster. The iterative process may include a plurality of cycles and each of the plurality of cycles may include: for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a fourth condition into the cluster; and terminating the iterative process until there is no second new feature dataset satisfying the fourth condition.
In some embodiments, the third condition may include that a vector distance between the first feature dataset and each of the one or more first new feature datasets is smaller than a third threshold. The fourth condition may include that a vector distance between the one of the one or more first new feature datasets and each of the one or more second new feature datasets is smaller than the third threshold.
In some embodiments, the update module 310 may designate the first feature dataset in the cluster as an initial dataset and determine at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a fourth threshold. For each of the at least one first reference feature dataset, the update module 310 may determine at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a fifth threshold. Further, the update module 310 may designate the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
The iteration module 320 may designate the second reference feature dataset in the cluster as an initial dataset and determine at least one third reference feature dataset with at least one third vector distance to the initial dataset smaller than the third threshold. For each of the at least one third reference feature dataset, the iteration module 320 may determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the fourth threshold. The iteration module 320 may designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
The modules in the portrait  data management system  200 or 300 may be connected to or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, or the like, or any combination thereof. The wireless connection may include a Local Area Network (LAN) , a Wide Area Network (WAN) , a Bluetooth, a ZigBee, a Near Field Communication (NFC) , or the like, or any combination thereof. Two or more of the  modules may be combined into a single module, and any one of the modules may be divided into two or more units. For example, the first obtainment module 210, the second obtainment module 220, and the clustering module 230 described in FIG. 2 may be different modules in the portrait management system 200, or be integrated into one module that implements functions of two or two more modules of the above modules. As another example, the second obtainment module 220 and the clustering module 230 may be two modules, or integrated into one module configured to both obtain the target feature dataset of the target portrait and distribute the target feature dataset of the target portrait into a cluster. As a further example, each module may share a storage module or each module may have its own storage module.
FIG. 4 is a flowchart illustrating an exemplary process 400 for portrait data management according to some embodiments of the present disclosure.
Specifically, the process 400 may be implemented by the portrait data management system 200.
In 410, the portrait data management system 200 (e.g., the first obtainment module 210) may obtain a representative feature dataset of each of one or more clusters (also referred to as “portrait cluster, ” “image cluster” ) . As used herein, each cluster may include one or more portraits and one or more feature datasets (also referred to as “feature data, ” “portrait feature datasets” ) corresponding to the one or more portraits. For example, the one or more portraits in the cluster may correspond to a person. As another example, the one or more portraits in the cluster may correspond to a person in a particular scene. Merely by way of example, a cluster may only include one or more portraits of student A and one or more feature datasets corresponding to the portrait (s) of student A.
A feature dataset corresponding to a portrait may refer to a representation of a feature of the portrait. For example, the feature of the portrait may include a feature of a face of the portrait containing a feature of the eyes of the portrait, a feature of the mouth of the portrait, a feature of the nose of the portrait, a feature of the ears of the portrait, a  feature of the hands of the portrait, or the like, or any combination thereof. In some embodiments, the feature dataset corresponding to the portrait may be represented by a vector or a data point. In some embodiments, the representative feature dataset of the cluster may be selected from all the feature datasets in the cluster. In some embodiments, a feature dataset of a portrait in the cluster having the maximum similarity to a representative value of the cluster may be designated as the representative feature dataset of the cluster. As used herein, the representative value of the cluster may be an average representation of all the feature datasets in the cluster. For example, the representative value of the cluster may be determined by vectorizing the feature dataset (s) in the cluster. The representative value of the cluster may be an average of the vector (s) .
In some embodiments, the cluster (s) described above may be determined based on the process 500 described in FIG. 5, the descriptions of which may be not repeated herein.
In 420, the portrait data management system 200 (e.g., the second obtainment module 210) may obtain a target feature dataset (also referred to as “feature dataset to be processed” ) of a target portrait. The target feature dataset may refer to a feature dataset of a portrait to be clustered.
The target feature dataset may be directly obtained by the data management system 200. Alternatively, the target portrait may be first obtained by the data management system 200, and then the target feature dataset may be extracted by the data management system 200 from the target portrait.
In 430, the portrait data management system 200 (e.g., the clustering module 230) may determine first similarities between the target feature dataset and the representative feature dataset (s) of the cluster (s) . For example, the portrait data management system 200 may determine a first similarity between the target feature dataset and the representative feature dataset of each cluster.
In some alternative embodiments, to determine a first similarity between the target feature dataset and a representative feature dataset of a cluster, the portrait data  management system 200 may vectorize the representative feature dataset and the target feature dataset, and then determine a distance (also referred to as “vector distance” ) between the vectors. For example, the distance may include a Euclidean distance, a Mahalanobis distance, a Manhattan distance, etc. The first similarity may be quantified and/or determined based on the distance. For example, the larger the distance is, the smaller the first similarity may be. In some embodiments, a distance between two vectors may be represented by a cosine of an included angle between the two vectors. The larger the cosine of the included angle is, the smaller the distance between the two vectors may be and the more similar the two vectors may be. In some embodiments, the relationship between the first similarity and the vector distance may be indicated by, for example, a table, a function, or the like.
In 440, the portrait data management system 200 (e.g., the clustering module 230) may determine whether the first similarities satisfy a first condition.
In response to determining that the first similarities fail to satisfy the first condition, the portrait data management system 200 (e.g., the clustering module 230) may add a new cluster to gather the target feature dataset of the target portrait in 441.
The first condition may relate to a first similarity threshold or other conditions. In some embodiments, the first condition may be that at least one first similarity is larger than the first similarity threshold (e.g., 70%) . For example, if a first similarity between the target feature dataset and a certain representative feature dataset of a cluster is 80%, which is larger than the first similarity threshold, the first similarities may be regarded as satisfying the first condition. In some embodiments, that the first similarity between two feature datasets is larger than the first similarity threshold may represent that a vector distance corresponding to the two feature datasets is smaller than a first distance threshold. For example, the vector distance corresponding to two feature datasets (e.g., the target feature dataset and a representative feature dataset) may be represented by the cosine of the angle between two vectors corresponding to the two feature datasets, and thus the first condition may be that, among the angles corresponding to the target feature  dataset and the representative feature datasets, at least one angle has a cosine value that is larger than a first cosine threshold.
In some embodiments, that the first similarities fail to satisfy the first condition represents that the target feature dataset fail to match any one of the representative feature dataset (s) and cannot be distributed into any of the cluster (s) corresponding to the representative feature dataset (s) . The portrait data management system 200 may add the new cluster to gather the target feature dataset of the target portrait. For example, the target feature dataset may correspond to Xiao Ming’s portrait. The existing clusters may include three clusters, e.g., a cluster corresponding to Xiao Gang’s portrait (s) , a cluster corresponding to Xiao Hong’s portrait (s) , and a cluster corresponding to Xiao Li’s portrait (s) . In the condition that the first similarities between Xiao Ming’s portrait and the three clusters fail to satisfy the first condition, the portrait data management system 200 may establish the new cluster to gather the portrait of Xiao Ming and the feature dataset corresponding to Xiao Ming’s portrait.
In response to determining that the first similarities satisfy the first condition, the portrait data management system 200 (e.g., the clustering module 230) may determine second similarities between the target feature dataset and feature dataset (s) of one or more portraits in the at least one first cluster in 442.
In some embodiments, that the first similarities satisfy the first condition represents that the target feature dataset matches representative feature dataset (s) corresponding to the at least one first cluster.
In some embodiments, the process of determining the second similarities may be similar to the process of determining the first similarities. For example, to determine a second similarity between the target feature dataset and a certain feature dataset of a portrait in the at least one first cluster, the portrait data management system 200 may first vectorize the certain feature dataset and the target feature dataset, and then determine a distance between the vectors. Exemplary distances may include a Euclidean distance, a Mahalanobis distance, a Manhattan distance, etc. The second similarity may be  quantified and/or determined based on the distance. For example, the larger the distance is, the smaller the second similarity may be. In some embodiments, a distance between two vectors may be represented by a cosine of an included angle between the two vectors. The larger the cosine of the included angle is, the smaller the distance between the two vectors may be and the more similar the two vectors may be. In some embodiments, the relationship between the second similarity and the vector distance may be indicated by, for example, a table, a function, or the like.
In 443, the portrait data management system 200 (e.g., the clustering module 230) may determine whether the second similarities satisfy a second condition.
In response to determining that the second similarities fail to satisfy the second condition, the portrait data management system 200 (e.g., the clustering module 230) may add the new cluster to gather the target feature dataset of the target portrait in 444.
Similar to the first condition, the second condition may relate to a second similarity threshold or other conditions. For example, if at least one second similarity is greater than the second similarity threshold (or a corresponding vector distance is smaller than a second distance threshold, or a corresponding cosine of an angle is larger than a second cosine threshold) , the second similarities may be regarded as satisfying the second condition. In some embodiments, the first similarity threshold may be smaller than the second similarity threshold. In some embodiments, the first similarity threshold may exceed or equal the second similarity threshold. In some embodiments, the firs similarities and the second similarities may be determined based on a same calculation algorithm.
In some embodiments, that the second similarities fail to satisfy the second condition represents that the target feature dataset fails to match any one of feature dataset (s) corresponding to the first cluster (s) and cannot be distributed into any one of the first cluster (s) . The portrait data management system 200 may add the new cluster to gather the target feature dataset of the target portrait. The process for adding the new cluster may be similar to the process for adding the new cluster described in 441, the  descriptions of which may be not repeated herein.
In response to determining that the second similarities satisfy the second condition, the portrait data management system 200 (e.g., the clustering module 230) may combine the target portrait and at least one second cluster to form a combined cluster in 445. The at least one second cluster described herein refers to the cluster (s) whose corresponding similarities satisfying the second condition. In some embodiments, the second cluster (s) may be part of the first cluster (s) . As another example, the second cluster (s) may be the same as the first cluster (s) .
That the second similarities satisfy the second condition represents that the target feature dataset matches feature dataset (s) corresponding to the second cluster (s) . For example, the target feature dataset may correspond to A’s portrait. The existing clusters may include three clusters, i.e., a first cluster corresponding to Xiao Gang’s portrait (s) , a second cluster corresponding to Xiao Hong’s portrait (s) , and a third cluster corresponding to Xiao Li’s portrait (s) . In the condition that the second similarities between the Xiao Ming ’s portrait and the second and third clusters satisfy the second condition, the portrait data management system 200 may combine the A’s portrait and the Xiao Hong’s portrait (s) and the Xiao Li’s portrait (s) to form the combined cluster.
In some embodiments, the portrait data management system 200 may determine a representative value of the combined cluster. As used herein, the representative value of the combined cluster may be an average representation of all the feature datasets corresponding to the portraits in the combined cluster. For example, the combined cluster may include feature datasets with representations (e.g., vectors) A1, A2, A3, and A4, respectively, and the representative value of the combined cluster may be represented by (A1+A2+A3+A4) /4.
Further, the portrait data management system 200 may designate a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster. In some embodiments, the portrait data management system 200 may determine a representative  data point corresponding to the representative value. The portrait data management system 200 may designate a feature dataset of a portrait in the combined cluster whose corresponding data point has the smallest distance to the representative data point as the representative feature dataset of the combined cluster.
FIG. 5 is a flowchart illustrating an exemplary process 500 for managing portrait data according to some embodiments of the present disclosure.
Specifically, the process 500 may be implemented by the portrait data management system 300.
In 510, the portrait data management system 300 (e.g., the update module 310) may perform an updating process based on a first feature dataset of a first portrait. In some embodiments, the portrait data management system 300 may obtain a plurality of clusters from the storage device 104 or an external storage device. For example, the plurality of clusters may each correspond to a person (e.g., at least one cluster may correspond to one person) and include a plurality of feature datasets of the corresponding person. In some embodiments, each cluster may have an initial representative feature dataset. In some embodiments, the portrait data management system 300 may also determine representative feature datasets (which may be the same as or different from the initial representative feature datasets) of the clusters by performing clustering analysis on the clusters. In some embodiments, the first feature dataset may be one of the determined representative feature datasets of the clusters. More detailed descriptions of determining the representative feature datasets of the clusters may be found elsewhere in the present disclosure. See, for example, FIG. 4 and the descriptions thereof.
As used herein, the updating process may include adding one or more first new feature datasets of one or more first new portraits satisfying a third condition into a first cluster including the first feature dataset. In some embodiments, the third condition may relate to a third similarity threshold or other conditions. In some embodiments, the third condition may be that the similarity between the first feature dataset and the first new feature dataset exceeds the third similarity threshold (e.g., 80%) . In some embodiments,  that the similarity between the first feature dataset and the first new feature dataset exceeds the third similarity threshold may represent that a vector distance between two vectors corresponding to the first feature dataset and the first new feature dataset is smaller than a third distance threshold and/or a cosine of an included angle between the two vectors is larger than a third angle threshold. In some embodiments, the portrait data management system 300 may determine the first new feature dataset (s) according to the process 600 described in FIG. 6, the descriptions of which may be not repeated herein. Mere by way of example, provided that the first feature dataset is a feature dataset of Xiao Ming’s portrait, if both of a feature dataset of a portrait A and a feature dataset of a portrait B satisfy the third condition, the portrait data management system 300 may add the feature dataset of the portrait A and the feature dataset of the portrait B into the cluster including the feature dataset of Xiao Ming’s portrait.
For one of the one or more first new feature datasets in the first cluster, the portrait data management system 300 (e.g., the iteration module 320) may further add one or more second new feature datasets of one or more second new portraits satisfying a fourth condition into the first cluster. In some embodiments, similar to the third condition, the fourth condition may relate to the third similarity threshold or other conditions. In some embodiments, the fourth condition may be that the similarity between the first new feature dataset and the second new feature dataset exceeds the third similarity threshold (e.g., 80%) . In some embodiments, that the similarity between the first new feature dataset and the second new feature dataset exceeds the third similarity threshold may represent that a vector distance between two feature vectors corresponding to the first new feature dataset and the second new feature dataset is smaller than the third distance threshold or a cosine of an included angle between the two vectors is larger than the third angle threshold. In some embodiments, the portrait data management system 300 may determine the second new feature dataset (s) according to the process 700 described in FIG. 7, the descriptions of which may be not repeated herein. In some embodiments, for each of the one or more first new feature dataset in the first cluster, the portrait data  management system 300 may add all of its corresponding second new feature datasets into the first cluster.
In 530, the portrait data management system 300 (e.g., the iteration module 320) may determine whether no more second new feature dataset satisfies the fourth condition. In response to determining that no more second new feature dataset satisfies the fourth condition, that is, the portrait data management system 300 has executed the operation 520 for all of the first new feature dataset (s) , the process 500 may terminate. In response to determining that there is still at least one second new feature dataset that satisfies the second condition, the portrait data management system 300 may proceed to the operation 520 to continue to adding the second new feature (s) for the one or more first new feature datasets in the first cluster.
FIG. 6 is a flowchart illustrating an exemplary process 600 for determining the one or more first new feature datasets of the one or more first new portraits according to some embodiments of the present disclosure.
In 610, the portrait data management system 300 (e.g., the update module 310) may designate the first feature dataset in the first cluster as an initial dataset.
In some embodiments, the portrait data management system 300 may vectorize the feature datasets of the plurality of clusters and the initial dataset, and then determine vector distance between each of the vectors corresponding to the feature datasets of the plurality of clusters and the vector corresponding to the initial dataset. The larger a vector distance is, the less similar two feature datasets corresponding to the vector distance may be. In some embodiments, a distance between two vectors may be represented by a cosine of an included angle between the two vectors. The larger the cosine of the included angle is, the smaller the distance between the two vectors may be and the more similar the two vectors may be.
In 620, the portrait data management system 300 (e.g., the update module 310) may determine at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a fourth distance threshold among the plurality of  clusters.
For each of the at least one first reference feature dataset, the portrait data management system 300 (e.g., the update module 310) may determine at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a fifth distance threshold among the plurality of clusters in 630. In some embodiments, the fifth distance threshold may be the same as or different from the fourth distance threshold. For example, the fifth distance threshold is smaller or larger than the fourth distance threshold. As another example, the fifth distance threshold may be the same as the fourth distance threshold. In some embodiments, the third distance threshold described in FIG. 5 may be twice the fourth distance threshold or the fifth distance threshold.
In 640, the portrait data management system 300 (e.g., the update module 310) may designate the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
FIG. 7 is a flowchart illustrating an exemplary process 700 for determining the one or more second new feature datasets of the one or more second new portraits according to some embodiments of the present disclosure. In some embodiments, the portrait data management system 300 (e.g., the iteration module 320) may initiate an iterative process for determining the one or more second new feature datasets. Each iteration of the iterative process may be implemented based on the process 700.
For one of the at least one second reference feature dataset, the portrait data management system 300 (e.g., the iteration module 320) may designate the second reference feature dataset in the cluster as an initial dataset in 710.
For the second reference feature dataset, the portrait data management system 300 (e.g., the iteration module 320) may determine at least one third reference feature dataset with at least one third vector distance to the initial dataset smaller than the fourth distance threshold in 720. As used herein, a third vector distance may be similar to the first vector distance or the second vector distance described in FIG. 6, and the  descriptions of which may be not repeated herein.
For each of the at least one third reference feature dataset, the portrait data management system 300 (e.g., the iteration module 320) may determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the fifth distance threshold in 730. As used herein, a fourth vector distance may be similar to the first vector distance or the second vector distance described in FIG. 6, and the descriptions of which may be not repeated herein.
The portrait data management system 300 (e.g., the iteration module 320) may designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
FIG. 8 is a flowchart illustrating an image clustering process 800 according to some embodiments of the present disclosure. As shown in FIG. 8, the process may include the following operations.
In 802, a feature dataset (e.g., a facial feature dataset) of an image including a portrait or face to be processed may be compared with representative feature datasets (e.g., representative facial feature datasets) of representative images in N image clusters (also referred to as one or more clusters described elsewhere in the present disclosure) to determine K target image clusters (also referred to as at least one first cluster described elsewhere in the present disclosure) in the N image clusters. First similarities between the facial feature dataset of the image to be processed and the facial feature datasets of the representative images in the K target image clusters may be greater than or equal to a first threshold (also referred to as “similarity threshold” ) . Each image cluster may include a group of images related to a same identity, and the representative image in the image cluster may be an image used to indicate the same identity in the group of images included in the image cluster. As used herein, N≥K>0.
Alternatively, in some embodiments, the facial feature dataset of the image to be processed may include a facial feature dataset of a person or portrait in the image to be processed. The embodiments may be applied to scenarios where facial feature  comparison is needed, for example, an entrance of a train station where identities of passengers are verified, various scenarios where fees are paid, etc.
Alternatively, the facial feature dataset of the image to be processed may be first compared with the facial feature datasets of the representative images instead of comparing the facial feature dataset of the image to be processed with the facial feature datasets of all images in the N image clusters. By comparing with the representative images, the K target image clusters may be filtered out, such that the amount of the comparison may be reduced and the efficiency of the comparison may be improved.
In 804, the facial feature dataset of the image to be processed may be compared with facial feature datasets of images in the K target image clusters to determine M target image clusters (also referred to as “at least one second cluster” described elsewhere in the present disclosure) in the K target image clusters. Second similarities between facial feature dataset (s) of at least one image in the M target image clusters and the facial feature dataset of the image to be processed may be greater than or equal to a second threshold. As used herein, M>0.
Alternatively, in some embodiments, the M target image clusters may be considered as the result of the second comparison. As long as a second similarity between a facial feature dataset of one specific image in the K target image clusters and the facial feature dataset of the image to be processed is greater than or equal to the second threshold, the facial feature dataset of the image to be processed may belong to the target image cluster including the specific image.
Alternatively, in multiple snapshot images of a same person in real-time data, due to various factors such as a snapshot scene, a face angle, an image quality, an order of appearance, etc., a feature dataset of the person in a snapshot image may fail to match feature datasets of all cluster centers associated with the same person, causing a problem of multiple files (or clusters) for the person. In some embodiments, the second comparison may avoid or reduce the problem of the multiple files for the person while the image clustering process is implemented in real time and/or in large scale.
Alternatively, in some embodiments, the first threshold may be smaller than the second threshold. The first threshold may be a threshold for initial filtering. The second threshold may be a threshold for determining whether the facial feature dataset of the image to be processed and the facial feature datasets of the target image clusters correspond to the same identity.
In 806, the image to be processed may be clustered into some or all of the M target image clusters.
Alternatively, in some embodiments, the image to be processed may be clustered into all target image clusters or into one or more of the target image clusters.
It should be noted that if the image to be processed is clustered into a plurality of target image clusters, the plurality of the target image clusters may be target image clusters of the same person, which may be combined for processing.
Through the above operations, the facial feature dataset of the image to be processed may be compared with the facial feature datasets of the representative images in the N image clusters to determine the K target image clusters in the N image clusters. The first similarities between the facial feature dataset of the image to be processed and the facial feature datasets of the representative images in the K target image clusters may be greater than or equal to the first threshold. Each image cluster may include a group of images related to the same identity, and the representative image in the image cluster may be the image used to indicate the same identity in the group of images included in the image cluster. As used herein, N≥K>0. The facial feature dataset of the image to be processed may be further compared with the facial feature datasets of the images in the K target image clusters to determine the M target image clusters in the K target image clusters. The second similarities between the facial feature dataset (s) of the at least one image in the M target image clusters and the facial feature dataset of the image to be processed may be greater than or equal to the second threshold. As used herein, M>0. The image to be processed may be distributed into some or all of the M target image clusters. Therefore, the image to be processed may be distributed into the target image  clusters accurately, and a technical problem of inaccurate image clustering may be solved and an effect of the accurate clustering may be achieved.
In some embodiments, an executive body of the above operations may be a mobile terminal, a computer terminal, or a similar computing device.
In an alternative embodiment, before the facial feature dataset of the image to be processed is compared with the facial feature datasets of the representative images in the N image clusters, the process may further include: obtaining the representative image in each image cluster by performing the following operations on each of the N image clusters. Each image cluster may be considered as a current image cluster when the following operations are performed.
In S1, in a coordinate system, a feature point (also referred to as “data point” ) of a facial feature dataset of each image in the current image cluster may be determined. The feature point may correspond to a feature value that can be used to identify a distribution of the facial feature dataset of each image in the current image cluster in the coordinate system.
In S2, a feature point closest to other feature points among the feature points of the facial feature datasets of all the images in the current image cluster may be determined as a representative feature point.
In S3, an image corresponding to the representative feature point may be determined as a representative image in the current image cluster.
Alternatively, in some embodiments, the feature point of the facial feature dataset of each image may form a cluster in the coordinate system. A feature point closest to other feature points among the feature points of the current image cluster may be determined as the representative feature point, that is, a cluster center in a cluster. An image corresponding to the cluster center may be a representative image.
According to the embodiments, by determining the representative images and using the facial feature datasets of the representative images to compare with the facial feature dataset of the image to be processed, an amount of the comparison may be  reduced and the efficiency of clustering may be improved.
In an alternative embodiment, the facial feature dataset of the image to be processed may be compared with the facial feature datasets of the representative images in the N image clusters and the K target image clusters in the N image clusters may be determined according to the following operations.
In S1, a coordinate point (also referred to as “feature point) corresponding to the facial feature dataset of the image to be processed in a coordinate system may be determined. The coordinate point of the facial feature dataset of the image to be processed may correspond to a feature value that can be used to identify the feature distribution of the facial feature dataset of the image to be processed in the coordinate system.
In S2, a directed line segment in the coordinate system may be determined by connecting an origin point in the coordinate system to the coordinate point of the facial feature dataset of the image to be processed and a feature vector of the facial feature dataset of the image to be processed may be obtained.
In S3, coordinate points of the facial feature datasets of the representative images in the N image clusters in the coordinate system may be determined. The coordinate points of the facial feature datasets of the representative images may correspond to the feature values that can be used to identify a feature distribution of the facial feature datasets of the representative images in the coordinate system.
In S4, the K target image clusters may be determined from the N image clusters according to the feature vector of the facial feature dataset of the image to be processed. The cosines of the angles between the feature vector of the facial feature dataset of the image to be processed and the feature vectors of the facial feature datasets of the representative images of the K target image clusters may be respectively greater than the first threshold.
Alternatively, in some embodiments, the comparison of the cosines of the angles between the vector of the facial feature dataset of the image to be processed and the  vectors of the facial feature datasets of the representative images in the K target image clusters may be implemented using cosine similarity.
FIG. 9 is a flowchart illustrating cosine similarity comparison in some embodiments of the present disclosure. As shown in FIG. 9, a face image may be illustrated as an example of the image to be processed, and the process may include the following operations.
In 901, a face image snapshotted by a camera in real time may be obtained.
In 902, a facial feature dataset of the face image may be extracted.
In 903, cosine similarities between the facial feature dataset and representative facial feature datasets of cluster centers (representative images) having been clustered may be compared, and k cluster centers whose corresponding cosine similarities are greater than or equal to the first threshold L1 may be extracted first.
In 904, the value of k may be determined. If k≥1, the process may proceed to 905; if k<1, the process may proceed to 909.
In 905, cosine similarities between the facial feature dataset and all cluster members (including the cluster centers) of the k clusters may be compared again. Cluster members whose corresponding cosine similarities are greater than or equal to the second threshold L2 may be designated as H (which correspond to M target image clusters) .
In 906, whether the value of H is greater than 1 may be determined. If H≥1, the process may proceed to 907; if H<1, the process may proceed to 908.
In 907, the face image may be clustered in a cluster having a cluster member with the highest similarity, and a cluster center of the cluster may be updated. Whether the matched cluster members (i.e., the H cluster members) in the comparison are from the same cluster may be determined. If the matched cluster members are not from the same cluster, clusters that the matched cluster members belong to may be combined, a cluster center of which may be updated.
In 908, a new cluster may be created, and the face image may be set as a  cluster center of the cluster.
In 909, if no cluster center is matched (that is, the facial feature dataset fails to match all of the representative feature datasets) , a new cluster may be created, and the face image may be set as a cluster center of the cluster.
Alternatively, the similarity threshold L1 corresponding to the representative images may be set to be smaller than the similarity threshold L2 corresponding to the cluster members. L1 may be used for the initial filtering, and L2 may be the similarity threshold used for identifying the face images of a same person.
Alternatively, a manner for updating the representative image may include calculating an average value of the facial feature datasets of all images in a cluster and selecting an image with the highest cosine similarity to the average value as a new representative image.
Alternatively, due to a large count of snapshot images in a large-scale application scenario, the dimension of the extracted facial feature datasets may be reduced to satisfy the rationality of memory consumption.
According to the embodiment, the image to be processed may be distributed by using the cosine similarity, thereby improving the efficiency and accuracy of the clustering.
In an alternative embodiment, the facial feature dataset of the image to be processed may be compared with the facial feature datasets of the images in the K target image clusters and the M target image clusters in the K target image clusters may be determined according to the following operations.
In S1, the coordinate point of the facial feature dataset of the image to be processed in the coordinate system may be determined. The coordinate point of the facial feature dataset of the image to be processed may correspond to a feature value that can be used to identify the feature distribution of the facial feature dataset the image to be processed in the coordinate system.
In S2, the directed line segment in the coordinate system may be determined by connecting the origin point in the coordinate system to the coordinate point of the facial  feature dataset of the image to be processed and the feature vector of the facial feature dataset of the image to be processed may be obtained.
In S3, vectors (also referred to as “feature vectors” ) between the coordinate points of the facial feature datasets of the images in the K target image clusters and the origin point in the coordinate system may be determined and the feature vectors of the facial feature datasets of the images in the K target image clusters may be obtained.
In S4, the M target image clusters from the K target image clusters may be determined according to the feature vector of the facial feature dataset of the image to be processed. The cosine (s) of angle (s) between the feature vector of the facial feature dataset of the image to be processed and the feature vectors of the facial feature dataset (s) of the at least one image of the M target image clusters may be greater than or equal to the second threshold.
Alternatively, in some embodiments, image clusters clustered based on the image to be processed may be further filtered by comparing the facial feature dataset of the image to be processed with the facial feature datasets of the images in the K target image clusters using the cosine similarity, which may improve the accuracy of the clustering, and avoid or minimize a problem of multiple files for one person while the image clustering process is implemented in real time and/or in large scale.
In an alternative embodiment, the image to be processed may be distributed into some or all of the M target image clusters according to the following operations.
In S1, the feature vector of the facial feature dataset of each image in the M target image clusters may be obtained.
In S2, an image cluster having an image with the largest cosines of the angles between the feature vectors of the facial feature datasets in the M target image clusters and the feature vector of the facial feature dataset of the image to be processed may be determined as an image cluster to be clustered. Some or all of the target image clusters may include the image cluster to be clustered.
In S3, the image to be processed may be distributed into the image cluster to be  clustered.
Alternatively, in some embodiments, the image cluster (s) to be clustered may be determined from a plurality of clusters by comparing the feature values, which may further reduce the amount of the comparing and improve the efficiency of the clustering.
In an alternative embodiment, after the facial feature dataset of the image to be processed is compared with the facial feature datasets of the representative images in the N image clusters and the K target image clusters in the N image clusters are determined, the process may further include the following operations.
In S1, image cluster (s) corresponding to the facial feature dataset of the image to be processed may be created.
Alternatively, in some embodiments, when the image to be processed does not match all image clusters, a new cluster may be created, thereby accurately achieving one file for one person.
In an alternative embodiment, after the image to be processed is clustered into some or all of the target image clusters in the M target image clusters, the process may further include the following operations.
In S1, an average value of the feature vectors of the facial feature datasets of some or all of the images in the M target image clusters may be determined.
In S2, in the target image clusters, an image corresponding to a feature vector with the smallest included angle to a feature vector corresponding to the average value may be determined as the representative image.
Alternatively, in some embodiments, when a similarity between the feature vector corresponding to the feature value of the image to be processed and the feature vector corresponding to the average value is greater than similarities between the feature vectors corresponding to the feature values of some or all of the images in the target image clusters and the feature vector corresponding to the average value, the image to be processed may be updated as the representative image of some or all of the target image cluster. In some embodiments, for images that meet the similarity requirements  described above, an image that meets additional requirements may be determined as the representative image, for example, an image with a clearer facial feature dataset.
In an alternative embodiment, after the image to be processed is clustered into some or all of the M target image clusters, the process may further include the following operations.
In S1, if some or all of the target image clusters are a plurality of image clusters, some or all of the target image clusters may be combined into one image cluster to re-determine the representative image.
Alternatively, in the embodiment, the plurality of image clusters that match the image to be processed may be considered as clusters of a same object, and the image clusters may be combined, thereby achieving one file for one person. The occurrence of multiple files for one person may be avoided or minimized while the image clustering process is implemented in real time and/or in large scale.
To sum up, the problem of the multiple files for one person, resulting from that the feature dataset of the real-time snapshot image fails to match any feature dataset of the cluster centers due to unreasonable selection of the representative images of the clusters or calculation errors, may be avoided by using the twice similarity comparisons based on the first threshold and the second threshold. For the second similarity comparison, if the feature dataset matches feature datasets of more than one cluster, the cluster combination process may be implemented, thereby making an improvement on the problem of occurred multiple files for one person.
In this embodiment, an image clustering device may also be provided. FIG. 10 is a block diagram illustrating an image clustering device according to some embodiments of the present disclosure. As shown in FIG. 10, the device may include a first determination module 1020, a second determination module 1040, and a clustering module 1060.
The first determination module 1020 may be configured to compare a feature dataset (e.g., a facial feature dataset) of an image including a portrait to be processed with  representative feature datasets of representative images in N image clusters to determine K target image clusters (also referred to as “at least one first cluster” described elsewhere in the present disclosure) in the N image clusters. First similarities between the facial feature dataset of the image to be processed and the facial feature datasets of the representative images in the K target image clusters may be greater than or equal to a first threshold. Each image cluster may include a group of images related to a same identity, and the representative image in the image cluster may be an image used to indicate the same identity in the group of images included in the image cluster. As used herein, N≥K>0. More detailed descriptions of comparing the feature dataset of the image to be processed with the representative feature datasets and determining the K target image clusters may be found elsewhere in the present disclosure. See, for example, FIGs. 8-9 and the descriptions thereof.
The second determination module 1040 may be configured to compare the facial feature dataset of the image to be processed with facial feature datasets of images in the K target image clusters to determine M target image clusters (also referred to as “at least one second cluster” described elsewhere in the present disclosure) in the K target image clusters. Second similarities between facial feature dataset (s) of at least one image in the M target image clusters and the facial feature dataset of the image to be processed may be greater than or equal to a second threshold. As used herein, M>0. More detailed descriptions of comparing the facial feature dataset of the image to be processed with the facial feature datasets of images in the K target image clusters and determining the M target image clusters may be found elsewhere in the present disclosure. See, for example, FIGs. 8-9 and the descriptions thereof.
The clustering module 1060 may be configured to cluster the image to be processed into some or all of the M target image clusters. For example, the clustering module 1060 may cluster the image to be processed into all target image clusters or one or more of the target image clusters. More detailed descriptions of clustering the image to be processed into some or all of the M target image clusters may be found elsewhere in  the present disclosure. See, for example, FIGs. 8-9 and the descriptions thereof.
In some embodiments, the device may include a processing module (not shown in FIG. 10) . Before the facial feature dataset of the image to be processed is compared with the facial feature datasets of the representative images in the N image clusters, the processing module may be configured to obtain the representative image in each image cluster. More detailed descriptions of obtaining the representative image may be found elsewhere in the present disclosure. See, for example, FIGs. 8-9 and the descriptions thereof.
In some embodiments, the device may also include a creation module. After the facial feature dataset of the image to be processed is compared with the facial feature datasets of the representative images in the N image clusters and the K target image clusters in the N image clusters are determined, the creation module may be configured to create image cluster (s) corresponding to the facial feature dataset of the image to be processed.
In some embodiments, the device may also include a third determination module. After the image to be processed is clustered into some or all of the target image clusters in the M target image clusters, the third determination module may be configured to determine an average value of the feature vectors of the facial feature datasets of some or all images in the M target image clusters, and determine an image corresponding to a feature vector with the smallest included angle to a feature vector corresponding to the average value as the representative image.
In some embodiments, the device may also include a combination module. After the image to be processed is clustered into some or all of the M target image clusters, if some or all of the target image clusters are a plurality of image clusters, the combination module may be configured to combine some or all of the target image clusters into one image cluster to re-determine the representative image.
FIG. 11 is a flowchart illustrating an optimization process 1100 for created files according to some embodiments the present disclosure. As shown in FIG. 11, the  process may include the following operations.
In 1102, N file data (also referred as “N clusters” ) that has been created in a database may be obtained. The N file data may include image features corresponding to initial main-file images and image features corresponding to initial sub-file images of the N files. The initial main-file images may represent images of target persons. N may be an integer greater than 1.
In 1104, the image features corresponding to the initial main-file images of the N files may be used as initial cluster centers and changed N file data may be obtained by performing cluster analysis on the N file data. The changed N file data may include image features corresponding to target main-file images and image features corresponding to target sub-file images of the changed N files. The target main-file images may be the same as or different from the initial main-file images.
In the above operation 1104, the image features corresponding to the initial main-file images of each file may be used as the initial cluster centers and a cluster center of each file may be re-determined by performing the cluster analysis. The clustering manner may be various.
Further, the image features of the main-file images of the N files may be determined as the initial cluster centers, respectively. The cluster analysis may be performed on the N file data to obtain the changed N file data according to a clustering algorithm, for example, a K-means clustering algorithm, a K center point clustering algorithm, a system clustering manner, etc.
In 1106, the changed N files may be designated as reference files respectively, and the changed N file data may be re-filed according to the reference files.
In the above operation 1106, each image in each file of the N files may be used as a reference image and the similarity comparison may be performed between file data in other files and the reference image. If a similarity is within a range, it may be determined that two files may belong to the same person and be combined into one file.
Through the operations 1102 to 1106, a problem that the same person has  multiple files in the created files may be solved. By optimizing the created files in the database, the existence of the multiple files for the same person may be avoided, thereby improving the accuracy of filing.
In some embodiments, the operation 1106 may specifically include performing the following operations on each file of the changed N files to re-file the changed N file data. As used herein, each file on which the following operations are performed may be designated as a current file. The current file may be determined as a reference file. An image feature corresponding to a target main-file image of the reference file may be determined as a first reference image feature, and image features with similarities to the first reference image feature greater than or equal to a predetermined threshold from the changed (N-1) files other than the reference file may be searched. Target main-file image (s) or target sub-file image (s) corresponding to the image features with the similarities to the first reference image features greater than or equal to the predetermined threshold may be combined into the reference file. The changed N files with the same image features may be combined to obtain M files. As used herein, N may be greater than or equal to M. An image with a central data point (also referred to as “representative data point” ) may be selected as a target main-file image for each of the M files. In some embodiments, the image feature corresponding to the target main-file image of each file of the changed N files may be used as the reference image feature and the similarity comparison may be performed between the reference image feature and the image features corresponding to the target main-file images of other changed N files. If a similarity between image features corresponding to target main-file images of two files is within the range, it may be determined that the two files belong to the same person, and target main-file images and target sub-file images in the two files may be combined into one file. Through the manner, two images may be combined into the same file twice. For the combined file, the target main-file images in the two files may be used as target main-file images of the combined file, or one of the target main-file images may be used as a target main-file image of the combined file and the other may be used as a target sub-file  image.
Further, the following operations may be performed on each file of the M files to determine target main-file images of the M files. As used herein, each file on which the following operations are performed may be designated as a current file. A weighted average of image features of all images in the current target file may be determined. An image whose image feature value having the smallest distance to the weighted average value among all images of the current target file may be designated as a target main-file image of the current target file. For example, a current target file may include an image A, an image B, an image C, and an image D. Taking a three-dimensional feature corresponding to each image as an example, if an image feature corresponds to the image A is represented by (x 1, y 1, z 1) , an image feature corresponds to the image B is represented by (x 2, y 2, z 2) , and an image feature corresponds to the image C is represented by (x 3, y 3, z 3) , and an image feature corresponds to the image D is (x 4, y 4, z 4) , a weighted average of image features of the images A, B, C and D may be 
Figure PCTCN2020110156-appb-000001
wherein
Figure PCTCN2020110156-appb-000002
Figure PCTCN2020110156-appb-000003
Figure PCTCN2020110156-appb-000004
wherein w 1, w 2, w 3, w 4 are weights corresponding to the images A, B, C, and D respectively and may be the same or different.
The distance between the images A, B, C, and D, and the weighted average may be respectively determined as:
Figure PCTCN2020110156-appb-000005
Figure PCTCN2020110156-appb-000006
Figure PCTCN2020110156-appb-000007
Figure PCTCN2020110156-appb-000008
An image corresponding to the minimum distance may be selected as a target main image.
Further, that the target main-file images or the target sub-file images corresponding to the image features with the similarities to the first reference image feature greater than or equal to the predetermined threshold are combined into the reference file may include the following operations.
In a case where the image features with the similarities to the first reference image feature greater than or equal to the predetermined threshold correspond to the target main-file image, the target main-file images and the target sub-file images of the file corresponding to the target main-file image may be combined into the reference file.
In a case where image features with the similarities to the first reference image feature greater than or equal to the predetermined threshold correspond to the target sub-file images, the target sub-file images with the similarities to the first reference image feature greater than or equal to the predetermined threshold may be combined into the reference file.
In some embodiments, in order to further improve the accuracy of the file optimization, the file may be further optimized with the image features corresponding to the target sub-file images of the reference file as the reference image features. Specifically, the image features corresponding to the added target sub-file images of the reference file may be determined as second reference image features. Image features with similarities to the second reference image features greater than or equal to the predetermined threshold may be searched from the changed (N-1) files. The target main-file images or the target sub-file images corresponding to the searched image features may be combined into the reference file, and the added target sub-file images may be marked as searched. The process described above may be repeatedly implemented until the added target sub-file images are all marked as searched and no more image feature having a similarity to the second reference image feature greater than or equal to the predetermined threshold is found from the changed (N-1) files.
Taking the similarity quantified by the distance to determine whether every two created files correspond to a same person and are combined as a file as an example, some embodiments of the present disclosure may be described in detail below.
FIG. 12 is a flowchart illustrating a process 1200 for optimizing files having been created in a database according to some embodiments of the present disclosure. As shown in FIG. 12, the process may include the following operations.
In 1201, data (also referred to as “created file data” ) of files having been created may be used as clustering data. As used herein, a main-file image of a file may be used as a cluster center for cluster analysis. Specifically, the created file data including main-file images and sub-file feature datasets may be obtained. The cluster analysis may be performed by using all feature datasets of the main-file images as initial cluster centers. For example, the clustering manner may include but is not limited to a K-means clustering manner, a K-center point clustering manner, a system clustering manner, etc. Taking a K-mean clustering manner as an example, the K-means clustering manner may include the following operations. Each point corresponding to a feature dataset of an image may be assigned to the nearest cluster center point to form a corresponding cluster in operation A. An average of each dimension of data in the cluster may be calculated to obtain a new cluster center in operation B. The operations A and B may be repeated until the cluster center no longer changes.
In 1202, the clustering data may be obtained and a full cluster of each cluster center may be determined. If a cluster center after the cluster analysis is not an existing data point, a new cluster center may be finally determined by using the nearest existing feature data point as the cluster center.
In 1203, one data point in the full cluster of the cluster center may be designated as an initial point (if the point is searched, the search may not be repeated) , a twice distance threshold may be designated as a radius, data point (s) of the cluster center within the twice distance threshold may be searched, and the data point (s) of the cluster center may be added to a sub-cluster of the cluster center, and the data point (i.e., the initial  point) may be marked as searched. As used herein, a similarity between feature datasets may be quantified by distance including but being not limited to a Euclidean distance, a cosine distance, etc. Taking the Euclidean distance as an example, the smaller the distance is, the more similar the portrait feature datasets may be. For example, if image features of one person are represented by X, Y, and Z, a cluster center X is similar to a sub-cluster data point Y, Y is within a distance threshold from X, the sub-cluster data point Y is similar to a cluster center Z, and Z is within the distance threshold from Y, Z may be within the twice distance threshold from the cluster center X.
In 1204, whether all sub-clusters of the cluster center have been searched may be determined. If all data points in the sub-clusters of the cluster center are searched, the operation 1206 may be triggered; otherwise, the operation 1205 may be triggered.
In 1205, one data point in the sub-cluster of the cluster center may be designated as an initial point (if the point is searched, the search may not be repeated) , and data point (s) of the cluster center within the twice distance threshold to the initial data point may be searched and added to the sub-cluster (s) of cluster center, and the data point (i.e., the initial point) may be marked as searched. Then the operation 1204 may be triggered.
In 1206, a file corresponding to the person may be filed, which may include one or more cluster centers and sub-clusters of data points within the cluster.
In 1207, whether the full cluster of the cluster center has been searched may be determined. If data points in the full cluster of the cluster center are searched, the operation 1208 may be triggered; otherwise, the operation 1203 may be triggered.
In 1208, the file combination and optimization may be completed.
For illustration purposes, a database may include images A, B, C, D, E, X, Y, and Z, and be divided into three files. Some embodiments of the present disclosure may be described below.
Conditions of A, B, C, D, E, X, Y, and Z may be as follows:
A and C are not similar, A and C are main-file images;
B is similar to A and is a sub-file of A;
D and E are similar to A and C, are more similar to C, and are sub-files of C;
B is similar to C, D is similar to E; and
X, Y, and Z are similar to each other, but not similar to A, B, C, D, and E, and X is a main-file image.
Optimization operations of the filing may be as follows:
Cluster analysis may be performed with A, C, and X as initial cluster centers and obtain a new full cluster with cluster centers B, D, and Y, a sub-file A of B, sub-files C, and E of D, and sub-files X and Z of Y. ( “Operation 1” for short) .
The cluster center B may be selected to begin a search. A distance threshold may be designated as a radius to obtain a sub-cluster of data points A and C, and B may be marked as searched. ( “Operation 2” for short) .
The sub-cluster of data point A may be designated as an initial point, and the distance threshold may be designated as a radius to obtain a sub-cluster of the cluster center B and D within the distance threshold, and A may be marked as searched. Alternatively, the above operations 2 and 3 may be combined. The cluster center data point B may be used as an initial point, and the twice distance threshold may be designated as the radius to directly search the data points of the cluster centers. ( “Operation 3” for short) .
The cluster center D may be selected to begin a search to obtain a sub-cluster of the data points A, C, and E, and D may be marked as searched. ( “Operation 4” for short) .
The data point C of the sub-cluster may be selected to begin a search to obtain the cluster centers B and D within the threshold. ( “Operation 5” for short) . Alternatively, The above operations 4 and 5 may be combined to designate the cluster center data point C as an initial point and directly search the data points of the cluster center within the twice to the initial data point.
The cluster centers B and D may be traversed and searched through the  operation 2 to operation 5. The cluster centers B and D may be determined to be in the same file, and the corresponding file of the person may be formed (including 2 cluster centers B and D, and sub-clusters with the data points C, D, and E within the cluster) . ( “operation 6” for short) .
The cluster center Y may be selected to begin a search. The distance threshold may be designated as the radius to obtain a sub-cluster of data points X, Z, and Y may be marked as a searched state. ( “Operation 7” for short) .
The data points X, Z of the sub-cluster may be designated as initial points, and the distance threshold may be designated as a radius to obtain only one sub-cluster of the cluster center Y. No new cluster center may be found, and X, Z may be marked searched. ( “Operation 8” for short) .
The cluster center Y may be traversed and searched through the operation 7 to the operation 8. The cluster center Y may be determined to be in the same file, and the corresponding file of the person may be formed (including 1 cluster center Y, and the sub-cluster of data points X and Z) . ( “Operation 9” for short) .
All data points may be traversed and searched, and the file combination and optimization may be completed.
In some embodiments, a file optimization device may also be provided in the embodiment of the present disclosure. FIG. 13 is a block diagram illustrating the file optimization device according to some embodiments of the present disclosure. As shown in FIG. 13, the device may include an obtainment module 1320, a cluster analysis module 1340, and a processing module 1360.
The obtainment module 1320 may be configured to obtain N file data (also referred to as “N clusters” ) that has been created in a database. The N file data may include image features corresponding to initial main-file images and image features corresponding to initial sub-file images of the N files. The initial main-file images may represent images of target persons. N may be an integer greater than 1.
The cluster analysis module 1340 may be configured to use the image features  corresponding to the initial main-file images of the N files as initial cluster centers and obtain changed N file data by performing cluster analysis on the N file data. The changed N file data may include image features corresponding to target main-file images and image features corresponding to target sub-file images of the changed N files. The target main-file images may be the same as or different from the initial main-file images.
The processing module 1360 may be configured to designate the changed N files as reference files respectively, and re-file the changed N file data according to the reference files.
It should be noted that the above descriptions are for illustration purposes. In some embodiments, the process (e.g., the processes 400-900, 1100, or 1200) described above may be implemented for cluster images containing objects (e.g., vehicles, particular places (e.g., buildings, a factories) other than the portrait or face. Taking vehicles as an example, feature datasets (e.g., a feature of a license plate of a vehicle, a feature of a color of the vehicle, a feature of a type of the vehicle) of one or more vehicles in a plurality of images may be determined, and the plurality of images may be clustered into one or more clusters (e.g., each cluster may include at least one image correspond to a same vehicle) based on similarities of the feature datasets according to the processes.
Having thus described the basic concepts, it may be rather apparent to those skilled in the art after reading this detailed disclosure that the foregoing detailed disclosure is intended to be presented by way of example only and is not limiting. Various alterations, improvements, and modifications may occur and are intended to those skilled in the art, though not expressly stated herein. These alterations, improvements, and modifications are intended to be suggested by this disclosure, and are within the spirit and scope of the exemplary embodiments of this disclosure.
Moreover, certain terminology has been used to describe embodiments of the present disclosure. For example, the terms “one embodiment, ” “an embodiment, ” and/or “some embodiments” mean that a particular feature, structure or characteristic described in connection with the embodiment is in at least one embodiment of the present disclosure.  Therefore, it is emphasized and should be appreciated that two or more references to “an embodiment” or “one embodiment” or “an alternative embodiment” in various portions of this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined as suitable in one or more embodiments of the present disclosure.
Further, it will be appreciated by one skilled in the art, aspects of the present disclosure may be illustrated and described herein in any of a number of patentable classes or context including any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof. Accordingly, aspects of the present disclosure may be implemented entirely hardware, entirely software (including firmware, resident software, micro-code, etc. ) or combining software and hardware implementation that may all generally be referred to herein as a “unit, ” “module, ” or “system. ” Furthermore, aspects of the present disclosure may take the form of a computer program product embodied in one or more computer readable media having computer readable program code embodied thereon.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including electro-magnetic, optical, or the like, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that may communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable signal medium may be transmitted using any appropriate medium, including wireless, wireline, optical fiber cable, RF, or the like, or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Scala, Smalltalk, Eiffel,  JADE, Emerald, C++, C#, VB. NET, Python or the like, conventional procedural programming languages, such as the "C" programming language, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP, dynamic programming languages such as Python, Ruby and Groovy, or other programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN) , or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider) or in a cloud computing environment or offered as a service such as a Software as a Service (SaaS) .
Furthermore, the recited order of processing elements or sequences, or the use of numbers, letters, or other designations therefore, is not intended to limit the claimed processes and methods to any order except as may be specified in the claims. Although the above disclosure discusses through various examples what is currently considered to be a variety of useful embodiments of the disclosure, it is to be understood that such detail is solely for that purpose, and that the appended claims are not limited to the disclosed embodiments, but, on the contrary, are intended to cover modifications and equivalent arrangements that are within the spirit and scope of the disclosed embodiments. For example, although the implementation of various components described above may be embodied in a hardware device, it may also be implemented as a software only solution, e.g., an installation on an existing server or mobile device.
Similarly, it should be appreciated that in the foregoing description of embodiments of the present disclosure, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure aiding in the understanding of one or more of the various embodiments. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed  subject matter requires more features than are expressly recited in each claim. Rather, claimed subject matter may lie in smaller than all features of a single foregoing disclosed embodiment.

Claims (20)

  1. A system, comprising:
    at least one storage device including a set of instructions; and
    at least one processor in communication with the at least one storage device, wherein when executing the set of instructions, the at least one processor is configured to cause the system to:
    obtain a representative feature dataset of each of one or more clusters, each of the one or more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster;
    obtain a target feature dataset of a target portrait;
    determine first similarities between the target feature dataset and the representative feature datasets of the one or more clusters;
    in response to determining that the first similarities fail to satisfy a first condition, add a new cluster to gather the target feature dataset of the target portrait; and
    in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determine second similarities between the target feature dataset and the feature datasets of one or more portraits in the at least one first cluster;
    in response to determining that the second similarities fail to satisfy a second condition, add the new cluster to gather the target feature dataset of the target portrait; and
    in response to determining that at least one of the second similarities corresponding to at least one second cluster satisfies the second condition,  combine the target portrait and the at least one second cluster to form a combined cluster.
  2. The system of claim 1, wherein the at least one processor is configured to cause the system to:
    determine a representative value of the combined cluster; and
    designate a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster.
  3. The system of claim 1 or claim 2, wherein the at least one second cluster is same as the at least one first cluster.
  4. The system of any one of claims 1-3, wherein
    the first condition includes that one or more of the first similarities exceed a first threshold;
    the second condition includes that one or more of the second similarities exceed a second threshold; and
    the first threshold is smaller than the second threshold.
  5. A system, comprising:
    at least one storage device including a set of instructions; and
    at least one processor in communication with the at least one storage device, wherein when executing the set of instructions, the at least one processor is configured to cause the system to:
    perform an updating process based on a first feature dataset of a first portrait, the updating process comprising:
    adding one or more first new feature datasets of one or more first new  portraits satisfying a first condition into a cluster including the first feature dataset;
    initiating an iterative process for the cluster, the iterative process comprising a plurality of cycles and each of the plurality of cycles comprising:
    for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and
    terminating the iterative process until there is no second new feature dataset satisfying the second condition.
  6. The system of claim 5, wherein to determine one or more first new feature datasets of one or more first new portraits satisfying a first condition, the at least one processor causes the system to:
    designate the first feature dataset in the cluster as an initial dataset;
    determine at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a first distance threshold;
    for each of the at least one first reference feature dataset, determine at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a second distance threshold; and
    designate the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
  7. The system of claim 6, wherein to determine one or more second new feature datasets of one or more second new portraits satisfying a second condition, the at least one processor causes the system to:
    for each of the at least one second reference feature dataset in the cluster,
    designate the second reference feature dataset in the cluster as an initial dataset;
    determine at least one third reference feature dataset with at least one third vector distance to the initial dataset smaller than the first distance threshold; and
    for each of the at least one third reference feature dataset, determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the second distance threshold; and
    designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
  8. The system of claim 5, wherein the first condition includes that a vector distance between the first feature dataset and each of the one or more first new feature datasets is smaller than a third distance threshold.
  9. The system of claim 8, wherein the second condition includes that a vector distance between the one of the one or more first new feature datasets and each of the one or more second new feature datasets is smaller than the third distance threshold.
  10. A method implemented on a computing device including at least one processor, at least one storage medium, and a communication platform connected to a network, the method comprising:
    obtaining a representative feature dataset of each of one or more clusters, each of the one or more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster;
    obtaining a target feature dataset of a target portrait;
    determining first similarities between the target feature dataset and the representative feature datasets of the one or more clusters;
    in response to determining that the first similarities fail to satisfy a first condition, adding a new cluster to gather the target feature dataset of the target portrait; and
    in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determining second similarities between the target feature dataset and the feature datasets of one or more portraits in the at least one first cluster;
    in response to determining that the second similarities fail to satisfy a second condition, adding the new cluster to gather the target feature dataset of the target portrait; and
    in response to determining that at least one of the second similarities corresponding to at least one second cluster satisfies the second condition, combining the target portrait and the at least one second cluster to form a combined cluster.
  11. The method of claim 10, further comprising:
    determining a representative value of the combined cluster; and
    designating a feature dataset of a portrait in the combined cluster having a maximum similarity to the representative value as a representative feature dataset of the combined cluster.
  12. The method of claim 10 or claim 11, wherein the at least one second cluster is same as the at least one first cluster.
  13. The method of any one of claims 10-12, wherein
    the first condition includes that one or more of the first similarities exceed a first threshold;
    the second condition includes that one or more of the second similarities exceed a second threshold; and
    the first threshold is smaller than the second threshold.
  14. A method implemented on a computing device including at least one processor, at  least one storage medium, and a communication platform connected to a network, the method comprising:
    performing an updating process based on a first feature dataset of a first portrait, the updating process comprising:
    adding one or more first new feature datasets of one or more first new portraits satisfying a first condition into a cluster including the first feature dataset; and
    initiating an iterative process for the cluster, the iterative process comprising a plurality of cycles and each of the plurality of cycles comprising:
    for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and
    terminating the iterative process until there is no second new feature dataset satisfying the second condition.
  15. The method of claim 14, wherein the determining one or more first new feature datasets of one or more first new portraits satisfying a first condition includes:
    designating the first feature dataset in the cluster as an initial dataset;
    determining at least one first reference feature dataset with at least one vector distance to the initial dataset smaller than a first distance threshold;
    for each of the at least one first reference feature dataset, determining at least one second reference feature dataset with at least one second vector distance to the first reference feature dataset smaller than a second distance threshold; and
    designating the at least one first reference feature dataset and the at least one second reference feature as the one or more first new feature datasets.
  16. The method of claim 15, wherein the determining one or more second new feature datasets of one or more second new portraits satisfying a second condition includes:
    for each of the at least one second reference feature dataset in the cluster,
    designate the second reference feature dataset in the cluster as an initial dataset;
    determine at least one third reference feature dataset with at least one vector distance to the initial dataset smaller than the first distance threshold; and
    for each of the at least one third reference feature dataset, determine at least one fourth reference feature dataset with at least one fourth vector distance to the third feature dataset smaller than the second distance threshold; and
    designate the at least one third reference feature dataset and the at least one fourth reference feature as the one or more second new feature datasets.
  17. The method of claim 14, wherein the first condition includes that a vector distance between the first feature dataset and each of the one or more first new feature datasets is smaller than a third distance threshold.
  18. The method of claim 17, wherein the second condition includes that a vector distance between the one of the one or more first new feature datasets and each of the one or more second new feature datasets is smaller than the third threshold.
  19. A non-transitory computer readable medium, comprising executable instructions that, when executed by at least one processor, direct the at least one processor to perform a method, the method comprising:
    obtaining a representative feature dataset of each of one or more clusters, each of the one or more clusters comprising one or more portraits and one or more feature datasets corresponding to the one or more portraits, the representative feature dataset of a cluster being selected from the one or more feature datasets in the cluster;
    obtaining a target feature dataset of a target portrait;
    determining first similarities between the target feature dataset and the representative feature datasets of the one or more clusters;
    in response to determining that the first similarities fail to satisfy a first condition, adding a new cluster to gather the target feature dataset of the target portrait; and
    in response to determining that at least one of the first similarities corresponding to at least one first cluster of the one or more clusters satisfies the first condition, determining second similarities between the target feature dataset and the feature datasets of one or more portraits in the at least one first cluster;
    in response to determining that the second similarities fail to satisfy a second condition, adding the new cluster to gather the target feature dataset of the target portrait; and
    in response to determining that at least one of the second similarities corresponding to at least one second cluster satisfies the second condition, combining the target portrait and the at least one second cluster to form a combined cluster.
  20. A non-transitory computer readable medium, comprising executable instructions that, when executed by at least one processor, direct the at least one processor to perform a method, the method comprising:
    performing an updating process based on a first feature dataset of a first portrait, the updating process comprising:
    adding one or more first new feature datasets of one or more first new portraits satisfying a first condition into a cluster including the first feature dataset; and
    initiating an iterative process for the cluster, the iterative process comprising a plurality of cycles and each of the plurality of cycles comprising:
    for one of the one or more first new feature datasets in the cluster, adding one or more second new feature datasets of one or more second new portraits satisfying a second condition into the cluster; and
    terminating the iterative process until there is no second new feature dataset satisfying the second condition.
PCT/CN2020/110156 2019-12-23 2020-08-20 Systems and methods for managing portrait data WO2021128883A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201911341089.7A CN111091106B (en) 2019-12-23 2019-12-23 Image clustering method and device, storage medium and electronic device
CN201911341089.7 2019-12-23
CN202010085148.5 2020-02-10
CN202010085148.5A CN111309946B (en) 2020-02-10 2020-02-10 Established file optimization method and device

Publications (1)

Publication Number Publication Date
WO2021128883A1 true WO2021128883A1 (en) 2021-07-01

Family

ID=76573624

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/110156 WO2021128883A1 (en) 2019-12-23 2020-08-20 Systems and methods for managing portrait data

Country Status (1)

Country Link
WO (1) WO2021128883A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096800A (en) * 2009-12-14 2011-06-15 北京中星微电子有限公司 Method and device for acquiring image information
US20120328203A1 (en) * 2011-06-22 2012-12-27 The Boeing Company Image Registration
CN108229419A (en) * 2018-01-22 2018-06-29 百度在线网络技术(北京)有限公司 For clustering the method and apparatus of image
CN110175555A (en) * 2019-05-23 2019-08-27 厦门市美亚柏科信息股份有限公司 Facial image clustering method and device
CN110443297A (en) * 2019-07-30 2019-11-12 浙江大华技术股份有限公司 Clustering method, device and the computer storage medium of image
CN111091106A (en) * 2019-12-23 2020-05-01 浙江大华技术股份有限公司 Image clustering method and device, storage medium and electronic device
CN111309946A (en) * 2020-02-10 2020-06-19 浙江大华技术股份有限公司 Established file optimization method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096800A (en) * 2009-12-14 2011-06-15 北京中星微电子有限公司 Method and device for acquiring image information
US20120328203A1 (en) * 2011-06-22 2012-12-27 The Boeing Company Image Registration
CN108229419A (en) * 2018-01-22 2018-06-29 百度在线网络技术(北京)有限公司 For clustering the method and apparatus of image
CN110175555A (en) * 2019-05-23 2019-08-27 厦门市美亚柏科信息股份有限公司 Facial image clustering method and device
CN110443297A (en) * 2019-07-30 2019-11-12 浙江大华技术股份有限公司 Clustering method, device and the computer storage medium of image
CN111091106A (en) * 2019-12-23 2020-05-01 浙江大华技术股份有限公司 Image clustering method and device, storage medium and electronic device
CN111309946A (en) * 2020-02-10 2020-06-19 浙江大华技术股份有限公司 Established file optimization method and device

Similar Documents

Publication Publication Date Title
CN108229419B (en) Method and apparatus for clustering images
US10776400B2 (en) Clustering using locality-sensitive hashing with improved cost model
WO2017124713A1 (en) Data model determination method and apparatus
US20210365713A1 (en) Image clustering method and apparatus, and storage medium
KR20180048930A (en) Enforced scarcity for classification
CN110414569B (en) Clustering implementation method and device
CN110709829B (en) Data processing system and method
CN110956255A (en) Difficult sample mining method and device, electronic equipment and computer readable storage medium
US20180039823A1 (en) Clustering large database of images using multilevel clustering approach for optimized face recognition process
CN111784699B (en) Method and device for carrying out target segmentation on three-dimensional point cloud data and terminal equipment
CN112529068B (en) Multi-view image classification method, system, computer equipment and storage medium
WO2014177050A1 (en) Method and device for aggregating documents
WO2023020214A1 (en) Retrieval model training method and apparatus, retrieval method and apparatus, device and medium
CN110909817B (en) Distributed clustering method and system, processor, electronic device and storage medium
KR20220123352A (en) Artificial intelligence-based portrait archiving method, device and storage medium
CN114968612B (en) Data processing method, system and related equipment
WO2020181873A1 (en) Systems and methods for image retrieval
CN115115815A (en) Training method, device and system for feature extraction network of three-dimensional grid model
CN114444668A (en) Network quantization method, network quantization system, network quantization apparatus, network quantization medium, and image processing method
Wang et al. The parallelization and optimization of K-means algorithm based on spark
WO2021128883A1 (en) Systems and methods for managing portrait data
CN112906652A (en) Face image recognition method and device, electronic equipment and storage medium
CN115795355B (en) Classification model training method, device and equipment
CN113111687A (en) Data processing method and system and electronic equipment
CN115204318B (en) Event automatic hierarchical classification method and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20906473

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20906473

Country of ref document: EP

Kind code of ref document: A1