WO2023124134A1 - File processing method and apparatus, electronic device, computer storage medium and program - Google Patents

File processing method and apparatus, electronic device, computer storage medium and program Download PDF

Info

Publication number
WO2023124134A1
WO2023124134A1 PCT/CN2022/113914 CN2022113914W WO2023124134A1 WO 2023124134 A1 WO2023124134 A1 WO 2023124134A1 CN 2022113914 W CN2022113914 W CN 2022113914W WO 2023124134 A1 WO2023124134 A1 WO 2023124134A1
Authority
WO
WIPO (PCT)
Prior art keywords
image feature
image
feature
density
representative
Prior art date
Application number
PCT/CN2022/113914
Other languages
French (fr)
Chinese (zh)
Inventor
贺文峰
王康
何俊峰
霍明明
郭如意
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023124134A1 publication Critical patent/WO2023124134A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/55Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Definitions

  • the method further includes: in response to an update event of the cover image, implementing the following steps to implement the cover image of the archive Update: obtaining a set of image features of the target object, determining a representative feature of the set of image features, and determining a cover image of the profile; wherein:
  • the embodiments of the present disclosure also provide a file processing device.
  • the second processing part 902 is configured to determine the local density of each image feature according to the similarity set, including:

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Processing Or Creating Images (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed in embodiments of the present invention are a file processing method and apparatus, a device, a computer storage medium and a computer program. The method comprises: obtaining an image feature set of a target object; determining a similarity set between each image feature in the image feature set and other image features in the image feature set; determining a representative feature of the image feature set according to the similarity set; and determining an image corresponding to the representative feature as a cover image of a personnel image file corresponding to the target object.

Description

档案处理方法、装置、电子设备、计算机存储介质和程序File processing method, device, electronic device, computer storage medium and program
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202111626946.5、申请日为2021年12月28日,名称为“档案处理方法、装置、电子设备及计算机存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on the Chinese patent application with the application number 202111626946.5, the filing date is December 28, 2021, and the title is "file processing method, device, electronic equipment and computer storage medium", and claims the priority of the Chinese patent application, The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本公开涉及计算机视觉技术,涉及但不限于一种档案处理方法、装置、电子设备、计算机存储介质和计算机程序。The present disclosure relates to computer vision technology, and relates to but not limited to a file processing method, device, electronic equipment, computer storage medium and computer program.
背景技术Background technique
目前,在智慧城市的建设过程中,可以通过目标检测、特征提取、属性检测以及人脸聚类等一系列计算机视觉技术,很好地对摄像机抓拍数据进行分类、标注等处理,基于这些数据,可以定义人员图像档案,即定义各人员的轨迹。At present, in the process of building a smart city, a series of computer vision technologies such as target detection, feature extraction, attribute detection, and face clustering can be used to classify and label camera capture data. Based on these data, Personnel image files can be defined, that is, the trajectory of each person can be defined.
发明内容Contents of the invention
本公开实施例提供了档案处理方法、装置、电子设备、计算机存储介质和计算机程序。Embodiments of the present disclosure provide a file processing method, device, electronic equipment, computer storage medium and computer program.
本公开实施例提供了一种档案处理方法,所述方法包括:An embodiment of the present disclosure provides a file processing method, the method comprising:
获取目标对象的图像特征集合;确定所述图像特征集合中每个图像特征与所述图像特征集合中其它图像特征之间的相似度集合;根据所述相似度集合,确定所述图像特征集合的代表性特征;将所述代表性特征对应的图像确定为所述目标对象对应的档案的封面图像。Acquire the image feature set of the target object; determine the similarity set between each image feature in the image feature set and other image features in the image feature set; determine the image feature set according to the similarity set Representative feature: determining the image corresponding to the representative feature as the cover image of the file corresponding to the target object.
在本公开的一些实施例中,所述根据所述相似度集合,确定所述图像特征集合的代表性特征,包括:根据所述相似度集合,确定所述每个图像特征的局部密度;根据所述相似度集合和所述每个图像特征的局部密度,确定每个图像特征的密度点间隔;根据所述每个图像特征的所述局部密度和所述密度点间隔,确定所述图像特征集合的代表性特征。In some embodiments of the present disclosure, the determining the representative feature of the image feature set according to the similarity set includes: determining the local density of each image feature according to the similarity set; The similarity set and the local density of each image feature determine the density point interval of each image feature; according to the local density and the density point interval of each image feature, determine the image feature Representative characteristics of the collection.
可以看出,每个图像特征的局部密度和密度点间隔,可以客观准确地反映图像特征在特征空间的分布,从而,代表性特征对应的图像是客观准确地选取出的代表性图像,即,本公开实施例可以准确地选取出具有代表性的封面图像。It can be seen that the local density and density point interval of each image feature can objectively and accurately reflect the distribution of image features in the feature space, so that the image corresponding to the representative feature is a representative image selected objectively and accurately, that is, The embodiment of the present disclosure can accurately select a representative cover image.
在本公开的一些实施例中,所述根据所述相似度集合,确定所述每个图像特征的局部密度,包括:在所述图像特征集合中,确定与所述每个图像特征的相似度大于阈值的至少一个图像特征;将所述至少一个图像特征与所述每个图像特征的相似度之和,作为所述每个图像特征的局部密度。In some embodiments of the present disclosure, the determining the local density of each image feature according to the similarity set includes: determining the similarity with each image feature in the image feature set At least one image feature greater than a threshold; using the sum of similarities between the at least one image feature and each image feature as the local density of each image feature.
可以理解地,在得到图像特征集合后,图像特征集合的特征在特征空间中存在一定的特征分布,在某些区域,特征分布会比较集中,即特征的局部密度较高,说明该特征区域具有代表性,找到该密度区域的中心点作为该区域的代表特征;因此,在本公开实施例中,通过计算每个图像特征的局部密度,有利于确定出图像特征集合的代表性特征。It can be understood that after the image feature set is obtained, the features of the image feature set have a certain feature distribution in the feature space. In some areas, the feature distribution will be relatively concentrated, that is, the local density of the feature is high, indicating that the feature area has Representativeness, find the center point of the density region as the representative feature of the region; therefore, in the embodiments of the present disclosure, by calculating the local density of each image feature, it is beneficial to determine the representative feature of the image feature set.
在本公开的一些实施例中,所述根据所述相似度集合和所述每个图像特征的局部密度,确定每个图像特征的密度点间隔,包括:在所述图像特征集合中的第一图像特征不是所述图像特征集合中局部密度最大的图像特征的情况下,在所述图像特征集合中选取局部密度大于所述第一图像特征的局部密度的图像特征,将选取的所述图像特征与所述第一图像特征的相似度的最小值作为所述第一图像特征的密度点间隔;所述第一图像特 征为所述图像特征集合中的任意一个图像特征;In some embodiments of the present disclosure, the determining the density point interval of each image feature according to the similarity set and the local density of each image feature includes: the first in the image feature set When the image feature is not the image feature with the largest local density in the image feature set, select an image feature with a local density greater than the local density of the first image feature in the image feature set, and the selected image feature The minimum value of the similarity with the first image feature is used as the density point interval of the first image feature; the first image feature is any image feature in the image feature set;
在得出所述图像特征集合中除所述局部密度最大的图像特征外的各个图像特征的密度点间隔的情况下,在所述图像特征集合中除所述局部密度最大的图像特征外的各个图像特征的密度点间隔中,将密度点间隔的最小值作为所述图像特征集合中所述局部密度最大的图像特征的密度点间隔。In the case of obtaining the density point spacing of each image feature in the image feature set except for the image feature with the highest local density, each image feature in the set of image features except the image feature with the highest local density In the density point interval of the image feature, the minimum value of the density point interval is used as the density point interval of the image feature with the highest local density in the image feature set.
可以理解地,局部密度较高的图像特征可能不止一个,为了降低不同的局部密度较高的图像特征之间的相互影响,需要在特征空间中确定具有高局部密度且与其他高局部密度的图像特征具有足够相似度距离的图像特征作为代表性特征;这里,两个图像特征点之间的相似度距离与两个图像特征之间的相似度成负相关;本公开实施例中,可以通过密度点间隔表征具有高局部密度的图像特征与其它高局部密度的图像特征的相似度;通过确定图像特征的密度点间隔,有利于准确地在特征空间中确定具有高局部密度且与其他高局部密度的图像特征具有足够相似度距离的图像特征,即有利于准确地确定代表性特征。It is understandable that there may be more than one image feature with high local density. In order to reduce the interaction between different image features with high local density, it is necessary to determine the image with high local density and other high local density in the feature space. An image feature with a sufficient similarity distance is used as a representative feature; here, the similarity distance between two image feature points is negatively correlated with the similarity between two image features; The point interval characterizes the similarity between image features with high local density and other image features with high local density; by determining the density point interval of image features, it is helpful to accurately determine the image features with high local density and other high local density in the feature space. Image features with a sufficient similarity distance are conducive to accurately determine representative features.
在本公开的一些实施例中,所述根据所述每个图像特征的所述局部密度和所述密度点间隔,确定所述图像特征集合的代表性特征,包括:根据所述每个图像特征的所述局部密度和所述密度点间隔,得出所述每个图像特征的代表性分数,所述每个图像特征的代表性分数与所述局部密度成正相关,与所述密度点间隔成负相关;在所述图像特征集合中,选取代表性分数大于或等于代表性分数阈值的至少一个特征作为所述代表性特征。In some embodiments of the present disclosure, the determining a representative feature of the image feature set according to the local density and the density point interval of each image feature includes: according to each image feature The local density and the density point interval of , obtain the representative score of each image feature, the representative score of each image feature is positively correlated with the local density, and proportional to the density point interval Negative correlation; in the image feature set, at least one feature whose representative score is greater than or equal to a representative score threshold is selected as the representative feature.
可以看出,在某个图像特征的局部密度较高或者密度点间隔较低的情况下,该图像特征的代表性分数会越高,该图像特征会更有可能成为代表性特征;即,有利于将具有高局部密度且与其他高局部密度特征具有较小相似度的特征作为代表性特征,从而,本公开实施例可以在图像特征集合中较为准确地确定出代表性特征。It can be seen that when the local density of an image feature is high or the density point interval is low, the representative score of the image feature will be higher, and the image feature will be more likely to become a representative feature; that is, there It is beneficial to use a feature with high local density and a small similarity with other high local density features as a representative feature, so that the embodiment of the present disclosure can more accurately determine the representative feature in the image feature set.
在本公开的一些实施例中,所述根据所述每个图像特征的所述局部密度和所述密度点间隔,得出所述每个图像特征的代表性分数,包括:将所述每个图像特征的局部密度与所述密度点间隔的比值,作为所述每个图像特征的代表性分数。可以看出,本公开实施例通过计算每个图像特征的局部密度与所述密度点间隔的比值,较为容易地得出每个图像特征的代表性分数。In some embodiments of the present disclosure, the deriving the representative score of each image feature according to the local density and the density point interval of each image feature includes: The ratio of the local density of the image feature to the density point interval is used as the representative score of each image feature. It can be seen that in the embodiments of the present disclosure, the representative score of each image feature can be relatively easily obtained by calculating the ratio of the local density of each image feature to the density point interval.
在本公开的一些实施例中,在首次确定所述档案的封面图像后,所述方法还包括:响应于所述封面图像的更新事件,通过执行以下步骤,实现对所述档案的封面图像的更新:获取所述目标对象的图像特征集合、确定所述图像特征集合的代表性特征、以及确定所述档案的封面图像;其中:In some embodiments of the present disclosure, after the cover image of the archive is determined for the first time, the method further includes: in response to an update event of the cover image, implementing the following steps to implement the cover image of the archive Update: obtaining a set of image features of the target object, determining a representative feature of the set of image features, and determining a cover image of the profile; wherein:
所述封面图像的更新事件包括以下至少之一:在更新所述档案的情况下;在获取到所述封面图像的更新指令的情况下;在周期性更新所述封面图像的情况下。The update event of the cover image includes at least one of the following: when the file is updated; when an instruction to update the cover image is acquired; when the cover image is periodically updated.
可以看出,本公开实施例可以在确定更新档案,或者在确定需要更新封面图像的情况下,通过重复执行本公开实施例的档案处理方法,可以实现封面图像的刷新;在周期性更新封面图像的情况下,通过重复执行本公开实施例的档案处理方法,可以实现封面图像的持续更新,由于无需对封面图像进行人工修正,从而可以降低运维成本;在一些实施例中,在更新档案的情况下,档案中图像为近期获取的图像,即,本公开实施例可以基于近期获取的图像进行封面图像的选取,从而选取出的封面图像能够反映目标对象的近期状态,从而便于后续针对目标对象进行特征检索。It can be seen that in the embodiment of the present disclosure, when it is determined to update the file, or when it is determined that the cover image needs to be updated, the cover image can be refreshed by repeatedly executing the file processing method of the embodiment of the present disclosure; when the cover image is periodically updated In some cases, by repeatedly executing the file processing method of the embodiment of the present disclosure, the continuous update of the cover image can be realized. Since there is no need to manually correct the cover image, the operation and maintenance cost can be reduced; in some embodiments, when updating the file In some cases, the image in the file is a recently acquired image, that is, the embodiment of the present disclosure can select the cover image based on the recently acquired image, so that the selected cover image can reflect the recent state of the target object, thereby facilitating subsequent targeting of the target object. Perform a feature search.
在本公开的一些实施例中,所述获取目标对象的图像特征集合,包括:确定所述目标对象对应的档案中每个图像的采集时刻与当前时刻的时长;在所述档案中,将所述时长超过图像的存活周期的图像滤除,得到更新后的档案;对所述更新后的像档案进行特征提取,得到所述目标对象的图像特征集合。In some embodiments of the present disclosure, the acquisition of the image feature set of the target object includes: determining the acquisition time and the current time duration of each image in the file corresponding to the target object; in the file, the The image whose duration exceeds the life cycle of the image is filtered out to obtain an updated file; feature extraction is performed on the updated image file to obtain an image feature set of the target object.
在本公开实施例中,将档案中采集时刻与当前时刻的时长超过图像的存活周期的图 像进行滤除,可以提高选取封面图像的过程的可靠性;在一些实施例中,本公开实施例可以基于最近采集的图像选取代表性图像,从而,选取出的代表性图像能够反映目标对象的最近状态。In the embodiment of the present disclosure, the images in the file whose collection time and current time are longer than the life cycle of the image are filtered out, which can improve the reliability of the process of selecting the cover image; in some embodiments, the embodiment of the present disclosure can A representative image is selected based on the most recently collected image, so that the selected representative image can reflect the latest state of the target object.
在本公开的一些实施例中,在对所述封面图像进行更新前,所述方法还包括:响应于将目标对象的新图像添加到所述档案,确定所述档案中图像的数量;响应于所述档案中的图像的数量超过预设数量的情况下,按照所述档案中采集时刻从早到晚的顺序,依次滤除所述档案中的图像,直至所述档案中的图像数量小于或等于所述预设数量为止。In some embodiments of the present disclosure, prior to updating the cover image, the method further includes: in response to adding a new image of the target object to the profile, determining the number of images in the profile; in response to When the number of images in the archive exceeds the preset number, the images in the archive are sequentially filtered out according to the order of collection time in the archive from early to late until the number of images in the archive is less than or equal to the preset amount.
可以理解地,在将目标对象的新图像添加到档案的情况下,响应于档案中的图像的数量超过预设数量,则说明档案中的图像会消耗更多的磁盘资源,在这种情况下,通过滤除档案中的图像,有利于降低档案中的图像所占用的磁盘资源。Understandably, in the case of adding a new image of the target object to the archive, in response to the number of images in the archive exceeding a preset number, it is indicated that the images in the archive consume more disk resources, in this case , by filtering out the images in the archive, it is beneficial to reduce the disk resources occupied by the images in the archive.
本公开实施例还提出了一种档案处理装置,所述装置包括获取部分、第一处理部分、第二处理部分和第三处理部分,其中,An embodiment of the present disclosure also proposes a file processing device, which includes an acquisition part, a first processing part, a second processing part and a third processing part, wherein,
获取部分,配置为获取目标对象的图像特征集合;The acquisition part is configured to acquire the image feature set of the target object;
第一处理部分,配置为确定所述图像特征集合中每个图像特征与所述图像特征集合中其它图像特征之间的相似度集合;A first processing part configured to determine a similarity set between each image feature in the set of image features and other image features in the set of image features;
第二处理部分,配置为根据所述相似度集合,确定所述图像特征集合的代表性特征;The second processing part is configured to determine representative features of the image feature set according to the similarity set;
第三处理部分,配置为将所述代表性特征对应的图像确定为所述目标对象对应的档案的封面图像。The third processing part is configured to determine the image corresponding to the representative feature as the cover image of the file corresponding to the target object.
本公开实施例还提供了一种电子设备,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器;其中,所述处理器用于运行所述计算机程序以执行上述任意一种档案处理方法。An embodiment of the present disclosure also provides an electronic device, including a processor and a memory for storing a computer program that can run on the processor; wherein, the processor is used to run the computer program to execute any one of the above-mentioned files Approach.
本公开实施例还提供了一种计算机存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述任意一种档案处理方法。An embodiment of the present disclosure also provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any one of the file processing methods above is implemented.
本公开实施例还提供了一种计算机程序,该计算机程序包括计算机可读代码,当计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述任意一种档案处理方法。An embodiment of the present disclosure also provides a computer program, the computer program includes computer readable code, when the computer readable code is run in the electronic device, the processor in the electronic device executes any one of the above files Approach.
可以看出,本公开实施例可以根据图像特征集合中每个图像特征与其它图像特征之间的相似度集合,得出图像特征集合中的代表性特征,因此,与代表性特征对应的图像是根据图像特征之间的相似度准确地确定出的代表性图像,即,本公开实施例可以在档案中准确地选取出具有代表性的封面图像。It can be seen that the embodiments of the present disclosure can obtain the representative features in the image feature set according to the similarity set between each image feature in the image feature set and other image features. Therefore, the image corresponding to the representative feature is The representative image is accurately determined according to the similarity between image features, that is, the embodiment of the present disclosure can accurately select a representative cover image from the archive.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.
图1为本公开实施例的档案处理方法的一个流程图;FIG. 1 is a flowchart of a file processing method according to an embodiment of the present disclosure;
图2为本公开实施例中确定代表性特征的一个流程图;FIG. 2 is a flow chart of determining representative features in an embodiment of the present disclosure;
图3为本公开实施例中确定图像特征的局部密度的流程图;Fig. 3 is a flowchart of determining the local density of image features in an embodiment of the present disclosure;
图4为本公开实施例中确定图像特征的密度点间隔的流程图;Fig. 4 is a flowchart of determining the density point interval of image features in an embodiment of the present disclosure;
图5为本公开实施例中确定代表性特征的原理示意图;FIG. 5 is a schematic diagram of the principle of determining representative features in an embodiment of the present disclosure;
图6为本公开实施例中确定代表性特征的另一个流程图;FIG. 6 is another flow chart for determining representative features in an embodiment of the present disclosure;
图7为本公开实施例中获取目标对象的图像特征集合的流程图;FIG. 7 is a flow chart of acquiring an image feature set of a target object in an embodiment of the present disclosure;
图8为本公开实施例中对档案中的图像进行过滤的流程图;FIG. 8 is a flow chart of filtering images in archives in an embodiment of the present disclosure;
图9为本公开实施例的档案处理装置的结构示意图;FIG. 9 is a schematic structural diagram of a file processing device according to an embodiment of the present disclosure;
图10为本公开实施例的电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
在相关技术中,可以采用计算机视觉技术对抓拍图像进行处理,从而得到各个人员的档案,基于各个人员的档案,可以很好地实现目标人员检索、轨迹查询等数据分析任务。但是档案本身属于一种关系信息,无法直观展示。另外,针对海量抓拍图像,要实现全量检索非常困难,而在实际场景中只需要检索每个档案下一些典型的抓拍图像即可。因此,需要能挑选出档案中最具代表性的图像作为档案的封面图像。In related technologies, computer vision technology can be used to process the captured images, so as to obtain the files of each person. Based on the files of each person, data analysis tasks such as target person retrieval and track query can be well realized. However, the file itself is a kind of relational information, which cannot be displayed intuitively. In addition, for massive snapshot images, it is very difficult to achieve full retrieval, but in actual scenarios, only some typical snapshot images under each file need to be retrieved. Therefore, it is necessary to be able to select the most representative image in the archive as the cover image of the archive.
传统的封面图像是档案中随机选取的任意抓拍图像,这种方法存在如下两个问题:1)选取的图像的质量无法控制,可能选取出拍摄角度不佳、成像模糊、放缩比例不合适等质量不好的图像;2)随机选取的图像可能是已经过期并删除的历史图像,从而导致封面图像的丢失,而且,如果随机选取的图像的抓拍时间距离当前时间较久,该图像也无法代表档案人员的近期状态。The traditional cover image is an arbitrary snapshot image randomly selected in the archives. This method has the following two problems: 1) The quality of the selected image cannot be controlled, and the selected image may have a bad shooting angle, blurred image, inappropriate zoom ratio, etc. 2) The randomly selected image may be a historical image that has expired and been deleted, resulting in the loss of the cover image. Moreover, if the capture time of the randomly selected image is longer than the current time, the image cannot represent Recent status of the archivist.
针对上述技术问题,提出本公开实施例的技术方案。In view of the above technical problems, the technical solutions of the embodiments of the present disclosure are proposed.
以下结合附图及实施例,对本公开进行进一步详细说明。应当理解,此处所提供的实施例仅仅用以解释本公开,并不用于限定本公开。另外,以下所提供的实施例是用于实施本公开的部分实施例,而非提供实施本公开的全部实施例,在不冲突的情况下,本公开实施例记载的技术方案可以任意组合的方式实施。The present disclosure will be described in further detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided here are only used to explain the present disclosure, not to limit the present disclosure. In addition, the embodiments provided below are some embodiments for implementing the present disclosure, rather than providing all the embodiments for implementing the present disclosure. In the case of no conflict, the technical solutions recorded in the embodiments of the present disclosure can be combined in any manner implement.
需要说明的是,在本公开实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的方法或者装置不仅包括所明确记载的要素,而且还包括没有明确列出的其他要素,或者是还包括为实施方法或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括该要素的方法或者装置中还存在另外的相关要素(例如方法中的步骤或者装置中的单元,例如的单元可以是部分电路、部分处理器、部分程序或软件等等)。It should be noted that in the embodiments of the present disclosure, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion, so that a method or device comprising a series of elements not only includes the explicitly stated elements, but also include other elements not explicitly listed, or also include elements inherent in implementing the method or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of additional related elements (such as steps in the method or A unit in an apparatus, for example, a unit may be part of a circuit, part of a processor, part of a program or software, etc.).
例如,本公开实施例提供的档案处理方法包含了一系列的步骤,但是本公开实施例提供的档案处理方法不限于所记载的步骤,同样地,本公开实施例提供的装置不限于包括所明确记载的部分,还可以包括为获取相关信息、或基于信息进行处理时所需要设置的部分。For example, the file processing method provided by the embodiment of the present disclosure includes a series of steps, but the file processing method provided by the embodiment of the present disclosure is not limited to the steps described, and similarly, the device provided by the embodiment of the present disclosure is not limited to include the specified steps. The recorded part may also include the part that needs to be set for obtaining relevant information or processing based on the information.
本公开实施例可以应用于终端、服务器等电子设备中。这里,终端可以是瘦客户机、厚客户机、手持或膝上设备、基于微处理器的系统、机顶盒、可编程消费电子产品、网络个人电脑、小型计算机系统,等等,服务器可以是服务器计算机系统小型计算机系统﹑大型计算机系统和包括上述任何系统的分布式云计算技术环境,等等。Embodiments of the present disclosure may be applied to electronic devices such as terminals and servers. Here, a terminal can be a thin client, a thick client, a handheld or laptop device, a microprocessor-based system, a set-top box, programmable consumer electronics, a network personal computer, a small computer system, etc., and a server can be a server computer Systems Small computer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
终端、服务器等电子设备可以包括用于执行指令的程序模块。通常,程序模块可以包括例程、程序、目标程序、组件、逻辑、数据结构等等,它们执行特定的任务。计算机系统/服务器可以在分布式云计算环境中实施,分布式云计算环境中,任务是由通过通信网络链接的远程处理设备执行的。在分布式云计算环境中,程序模块可以位于包括存储设备的本地或远程计算系统存储介质上。Electronic devices such as terminals and servers may include program modules for executing instructions. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc., that perform particular tasks. The computer system/server can be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computing system storage media including storage devices.
本公开实施例提出了一种档案处理方法,可以应用于智能视频分析、智慧城市或其它图像分析场景。The embodiment of the present disclosure proposes a file processing method, which can be applied to intelligent video analysis, smart city or other image analysis scenarios.
图1为本公开实施例的档案处理方法的一个流程图,如图1所示,该流程可以包括:Fig. 1 is a flowchart of the file processing method of the embodiment of the present disclosure, as shown in Fig. 1, the process may include:
步骤101:获取目标对象的图像特征集合。Step 101: Obtain an image feature set of a target object.
本公开实施例中,通过对档案进行图像特征提取,得到目标对象的图像特征集合。这里,档案表示一个目标对象的图像集合,例如,目标对象可以是人员、车辆或其它类型的物体,档案中的图像可以是通过图像采集设备采集的图像;档案中的图像的格式可以是联合图像专家小组(Joint Photographic Experts GROUP,JPEG)、位图(Bitmap,BMP)、 便携式网络图形(Portable Network Graphics,PNG)或其它格式;需要说明的是,这里仅仅是对档案中的图像的格式和来源进行了举例说明,本公开实施例并不对档案中的图像的格式和来源进行限定。In the embodiment of the present disclosure, the image feature set of the target object is obtained by extracting the image feature from the file. Here, an archive represents a collection of images of a target object. For example, the target object can be a person, a vehicle, or other types of objects, and the images in the archive can be images collected by image acquisition equipment; the format of the images in the archive can be a joint image Joint Photographic Experts Group (JPEG), Bitmap (Bitmap, BMP), Portable Network Graphics (PNG) or other formats; it should be noted that this is only for the format and source of the images in the file An example is used for illustration, and the embodiment of the present disclosure does not limit the format and source of the image in the file.
示例性地,在获取目标对象的图像集合后,可以采用预先训练的特征提取网络对图像集合的图像进行特征提取,得到目标对象的图像特征集合,本公开实施例中,并不对特征提取网络的网络结构和种类进行限定。Exemplarily, after acquiring the image collection of the target object, a pre-trained feature extraction network can be used to perform feature extraction on the images in the image collection to obtain the image feature collection of the target object. In the embodiment of the present disclosure, the feature extraction network does not Network structure and types are defined.
示例性地,在得到至少两个对象的图像特征集合后,可以通过对上述至少两个对象的图像特征集合进行聚类,得到目标对象的图像特征集合;示例性地,对图像特征集合进行聚类的方法可以是基于划分的聚类算法、基于层次的聚类算法或基于密度的聚类算法。Exemplarily, after obtaining the image feature sets of at least two objects, the image feature sets of the target object can be obtained by clustering the image feature sets of the at least two objects; Exemplarily, clustering the image feature sets The class method can be a partition-based clustering algorithm, a hierarchical clustering algorithm, or a density-based clustering algorithm.
示例性地,在目标对象为人员的情况下,图像特征集合中的图像特征可以是人脸特征、人体特征等;在目标对象为机动车的情况下,图像特征集合中的图像特征可以是机动车特征;在目标对象为非机动车的情况下,图像特征集合中的图像特征可以是非机动车特征。Exemplarily, in the case where the target object is a person, the image features in the image feature set may be facial features, human body features, etc.; in the case of a motor vehicle, the image features in the image feature set may be machine Motor vehicle features; when the target object is a non-motor vehicle, the image features in the image feature set may be non-motor vehicle features.
步骤102:确定图像特征集合中每个图像特征与图像特征集合中其它图像特征之间的相似度集合。Step 102: Determine a similarity set between each image feature in the image feature set and other image features in the image feature set.
在一种实现方式中,令C i表示目标对象的图像特征集合,i为大于或等于1的整数;对于图像特征集合C i中的第j个特征x ij,可以确定图像特征集合C i中第j个特征x ij与其它特征的相似度,其中,j为大于或等于1的整数。在确定图像特征集合C i中第j个特征x ij与其它特征的相似度之后,通过遍历j的取值,可以确定图像特征集合中每个图像特征与图像特征集合中其它图像特征之间的相似度集合。 In one implementation, let C i represent the image feature set of the target object, i is an integer greater than or equal to 1; for the jth feature x ij in the image feature set C i , it can be determined that The similarity between the jth feature x ij and other features, where j is an integer greater than or equal to 1. After determining the similarity between the jth feature x ij and other features in the image feature set Ci , by traversing the value of j, the relationship between each image feature in the image feature set and other image features in the image feature set can be determined collection of similarities.
步骤103:根据相似度集合,确定图像特征集合的代表性特征。Step 103: Determine representative features of the image feature set according to the similarity set.
步骤104:将代表性特征对应的图像确定为目标对象对应的档案的封面图像。Step 104: Determine the image corresponding to the representative feature as the cover image of the file corresponding to the target object.
本公开实施例中,由于图像特征集合中的图像特征是从目标对象的图像中提取的,因此,可以确定图像特征集合中每个图像特征对应的图像,从而,在确定代表性特征后,可以在目标对象对应的档案中确定与代表性特征对应的图像。In the embodiment of the present disclosure, since the image features in the image feature set are extracted from the image of the target object, the image corresponding to each image feature in the image feature set can be determined, so that after determining the representative feature, it can be An image corresponding to a representative feature is identified in a profile corresponding to the target object.
在实际应用中,上述步骤101至步骤104可以基于电子设备的处理器实现,上述处理器可以为特定用途集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理装置(Digital Signal Processing Device,DSPD)、可编程逻辑装置(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器中的至少一种。In practical applications, the above step 101 to step 104 can be implemented based on the processor of the electronic device, and the above processor can be an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), Central Processing Unit (Central Processing Unit, CPU), At least one of controller, microcontroller, microprocessor.
可以看出,本公开实施例可以根据图像特征集合中每个图像特征与其它图像特征之间的相似度集合,得出图像特征集合中的代表性特征,因此,与代表性特征对应的图像是根据图像特征之间的相似度准确地确定出的代表性图像,即,本公开实施例可以在档案中准确地选取出具有代表性的封面图像。在一些实施例中,在将代表性图像作为档案的封面图像的情况下,相比与随机选取图像,本公开实施例选取出的封面图像具有一定可解释性和典型性,能够较好地代表档案,人眼可读性较好。It can be seen that the embodiments of the present disclosure can obtain the representative features in the image feature set according to the similarity set between each image feature in the image feature set and other image features. Therefore, the image corresponding to the representative feature is The representative image is accurately determined according to the similarity between image features, that is, the embodiment of the present disclosure can accurately select a representative cover image from the archive. In some embodiments, when the representative image is used as the cover image of the archive, compared with randomly selected images, the cover image selected by the embodiments of the present disclosure has certain interpretability and typicality, and can better represent Files are better readable to the human eye.
在本公开的一些实施例中,参照图2,根据相似度集合,确定图像特征集合的代表性特征的流程可以包括:In some embodiments of the present disclosure, referring to FIG. 2 , according to the similarity set, the process of determining the representative feature of the image feature set may include:
步骤1031:根据相似度集合,确定每个图像特征的局部密度。Step 1031: Determine the local density of each image feature according to the similarity set.
示例性地,图像特征的局部密度用于表示图像特征在特征空间中局部区域的密度。Exemplarily, the local density of the image feature is used to represent the density of the local area of the image feature in the feature space.
参照图3,根据相似度集合,确定每个图像特征的局部密度的流程可以包括:Referring to FIG. 3, according to the similarity set, the process of determining the local density of each image feature may include:
步骤10311:在图像特征集合中,确定与每个图像特征的相似度大于阈值的至少一个图像特征。Step 10311: In the image feature set, determine at least one image feature whose similarity with each image feature is greater than a threshold.
步骤10312:将至少一个图像特征与每个图像特征的相似度之和,作为每个图像特征的局部密度。Step 10312: Take the sum of the similarities between at least one image feature and each image feature as the local density of each image feature.
在一种实现方式中,在C i表示目标对象的图像特征集合的情况下,对于特征集合C i中的第j个特征x ij,可以查找图像特征集合C i中与第j个特征x ij的相似度大于设定相似度阈值的特征的集合A,将集合A中各特征与第j个特征x ij的相似度之和作为第j个特征x ij的局部密度α ijIn one implementation, when C i represents the image feature set of the target object, for the j-th feature x ij in the feature set C i , it is possible to search for the j-th feature x ij in the image feature set C i The set A of features whose similarity is greater than the set similarity threshold, the sum of the similarities between each feature in set A and the jth feature x ij is taken as the local density α ij of the jth feature x ij .
可以理解地,在得到图像特征集合后,图像特征集合的特征在特征空间中存在一定的特征分布,在某些区域,特征分布会比较集中,即特征的局部密度较高,说明该特征区域具有代表性,找到该密度区域的中心点作为该区域的代表特征;因此,在本公开实施例中,通过计算每个图像特征的局部密度,有利于确定出图像特征集合的代表性特征。It can be understood that after the image feature set is obtained, the features of the image feature set have a certain feature distribution in the feature space. In some areas, the feature distribution will be relatively concentrated, that is, the local density of the feature is high, indicating that the feature area has Representativeness, find the center point of the density region as the representative feature of the region; therefore, in the embodiments of the present disclosure, by calculating the local density of each image feature, it is beneficial to determine the representative feature of the image feature set.
步骤1032:根据相似度集合和每个图像特征的局部密度,确定每个图像特征的密度点间隔。Step 1032: Determine the density point interval of each image feature according to the similarity set and the local density of each image feature.
参照图4,根据相似度集合和每个图像特征的局部密度,确定每个图像特征的密度点间隔的流程可以包括:Referring to Figure 4, according to the similarity set and the local density of each image feature, the process of determining the density point interval of each image feature may include:
步骤10321:在图像特征集合中的第一图像特征不是图像特征集合中局部密度最大的图像特征的情况下,在图像特征集合中选取局部密度大于第一图像特征的局部密度的图像特征,将选取的图像特征与第一图像特征的相似度的最小值作为第一图像特征的密度点间隔;第一图像特征为图像特征集合中的任意一个图像特征。Step 10321: When the first image feature in the image feature set is not the image feature with the largest local density in the image feature set, select an image feature with a local density greater than that of the first image feature in the image feature set, and select The minimum value of the similarity between the image feature and the first image feature is used as the density point interval of the first image feature; the first image feature is any image feature in the image feature set.
在一种实现方式中,对于上述图像特征集合C i中的第j个特征x ij,在第j个特征x ij不是图像特征集合C i中局部密度最大的图像特征的情况下,可以在图像特征集合C i中选取局部密度大于第j个特征x ij的局部密度的图像特征,将选取的图像特征与第j个特征x ij相似度的最小值β ij作为于第j个特征x ij的密度点间隔。 In one implementation, for the jth feature x ij in the image feature set C i above, if the jth feature x ij is not the image feature with the highest local density in the image feature set C i , it can be in the image Select the image feature whose local density is greater than the local density of the jth feature x ij in the feature set C i , and use the minimum value β ij of the similarity between the selected image feature and the jth feature x ij as the value of the jth feature x ij Density point spacing.
步骤10322:在得出图像特征集合中除局部密度最大的图像特征外的各个图像特征的密度点间隔的情况下,在图像特征集合中除局部密度最大的图像特征外的各个图像特征的密度点间隔中,将密度点间隔的最小值作为图像特征集合中局部密度最大的图像特征的密度点间隔。Step 10322: In the case of obtaining the density point interval of each image feature in the image feature set except the image feature with the highest local density, the density points of each image feature in the image feature set except the image feature with the highest local density In the interval, the minimum value of the density point interval is used as the density point interval of the image feature with the highest local density in the image feature set.
可以理解地,局部密度较高的图像特征可能不止一个,为了降低不同的局部密度较高的图像特征之间的相互影响,需要在特征空间中确定具有高局部密度且与其他高局部密度的图像特征具有足够相似度距离的图像特征作为代表性特征;这里,两个图像特征点之间的相似度距离与两个图像特征之间的相似度成负相关;本公开实施例中,可以通过密度点间隔表征具有高局部密度的图像特征与其它高局部密度的图像特征的相似度;参照图5,实线圆圈表示图像特征,直线所指向的两个图像特征具有较高的局部密度,即,附近的图像特征较多;并且,第一图像特征501与第二图像特征502之间的相似度距离较大,第一图像特征501与第二图像特征502之间的相似度较小,在一个示例中,第二图像特征502的密度点间隔为:第一图像特征501与第二图像特征502之间的相似度。It is understandable that there may be more than one image feature with high local density. In order to reduce the interaction between different image features with high local density, it is necessary to determine the image with high local density and other high local density in the feature space. An image feature with a sufficient similarity distance is used as a representative feature; here, the similarity distance between two image feature points is negatively correlated with the similarity between two image features; The point interval characterizes the similarity between the image feature with high local density and other image features with high local density; referring to Figure 5, the solid circle represents the image feature, and the two image features pointed by the straight line have higher local density, that is, There are many image features nearby; and, the similarity distance between the first image feature 501 and the second image feature 502 is relatively large, and the similarity between the first image feature 501 and the second image feature 502 is small. In an example, the density point interval of the second image feature 502 is: the similarity between the first image feature 501 and the second image feature 502 .
步骤1033:根据每个图像特征的局部密度和密度点间隔,确定图像特征集合的代表性特征。Step 1033: Determine representative features of the image feature set according to the local density and density point interval of each image feature.
可以看出,每个图像特征的局部密度和密度点间隔,可以客观准确地反映图像特征在特征空间的分布,从而,代表性特征对应的图像是客观准确地选取出的代表性图像,即,本公开实施例可以准确地选取出具有代表性的封面图像。It can be seen that the local density and density point interval of each image feature can objectively and accurately reflect the distribution of image features in the feature space, so that the image corresponding to the representative feature is a representative image selected objectively and accurately, that is, The embodiment of the present disclosure can accurately select a representative cover image.
在本公开的一些实施例中,参照图6,步骤1033的实现方式可以包括:In some embodiments of the present disclosure, referring to FIG. 6, the implementation of step 1033 may include:
步骤10331:根据每个图像特征的局部密度和密度点间隔,得出每个图像特征的代表性分数,每个图像特征的代表性分数与局部密度成正相关,与密度点间隔成负相关。Step 10331: Obtain the representative score of each image feature according to the local density and the density point interval of each image feature. The representative score of each image feature is positively correlated with the local density and negatively correlated with the density point interval.
步骤10332:在图像特征集合中,选取代表性分数大于或等于代表性分数阈值的至少一个特征作为代表性特征。Step 10332: In the image feature set, select at least one feature whose representative score is greater than or equal to the representative score threshold as a representative feature.
本公开实施例中,代表性分数阈值可以根据实际需求设置。在一种实现方式中,可以按照代表性分数从高到低的顺序,对图像特征集合中的图像特征进行排序,将排序结果中的第k个特征的代表性分数作为代表性分数阈值,即,在排序结果中选取排列在前的k个特征作为代表性特征。In the embodiment of the present disclosure, the representative score threshold may be set according to actual requirements. In one implementation, the image features in the image feature set can be sorted in the order of representative scores from high to low, and the representative score of the kth feature in the sorting result can be used as the representative score threshold, namely , select the top k features in the sorting results as representative features.
可以看出,在某个图像特征的局部密度较高或者密度点间隔较低的情况下,该图像特征的代表性分数会越高,该图像特征会更有可能成为代表性特征;即,有利于将具有高局部密度且与其他高局部密度特征具有较小相似度的特征作为代表性特征,从而,本公开实施例可以在图像特征集合中较为准确地确定出代表性特征。It can be seen that when the local density of an image feature is high or the density point interval is low, the representative score of the image feature will be higher, and the image feature will be more likely to become a representative feature; that is, there It is beneficial to use a feature with high local density and a small similarity with other high local density features as a representative feature, so that the embodiment of the present disclosure can more accurately determine the representative feature in the image feature set.
在本公开的一些实施例中,可以将每个图像特征的局部密度与密度点间隔的比值,作为每个图像特征的代表性分数。In some embodiments of the present disclosure, the ratio of the local density of each image feature to the density point interval may be used as the representative score of each image feature.
在一种实现方式中,对于上述特征集合C i中的第j个特征x ij,可以确定第j个特征x ij的代表性分数为α ijij。然后,可以在上述特征集合C i中,选取出代表性分数大于或等于代表性分数阈值的至少一个特征。 In an implementation manner, for the jth feature x ij in the feature set C i above, the representative score of the jth feature x ij may be determined as α ijij . Then, at least one feature with a representative score greater than or equal to a representative score threshold may be selected from the above feature set C i .
在本公开的一些实施例中,在首次确定档案的封面图像后,响应于封面图像的更新事件,可以通过执行以下步骤,实现对档案的封面图像的更新:获取目标对象的图像特征集合、确定图像特征集合的代表性特征、以及确定档案的封面图像。In some embodiments of the present disclosure, after determining the cover image of the archive for the first time, in response to the update event of the cover image, the following steps may be performed to update the cover image of the archive: acquiring the image feature set of the target object, determining Representative features of the set of image features, and the cover image for the identified profile.
其中,封面图像的更新事件包括以下至少之一:Wherein, the update event of the cover image includes at least one of the following:
在更新档案的情况下;In the case of updating files;
在获取到封面图像的更新指令的情况下;In the case of obtaining the update instruction of the cover image;
在周期性更新封面图像的情况下。In the case of periodically updating the cover image.
可以看出,本公开实施例可以在确定更新档案,或者在确定需要更新封面图像的情况下,通过执行步骤101至步骤104,可以实现封面图像的刷新;在周期性更新封面图像的情况下,通过执行步骤101至步骤104,可以自动实现封面图像的持续更新,由于无需对封面图像进行人工修正,从而可以降低运维成本;在一些实施例中,在更新档案的情况下,档案中图像为近期获取的图像,即,本公开实施例可以基于近期获取的图像进行封面图像的选取,从而选取出的封面图像能够反映目标对象的近期状态,从而便于后续针对目标对象进行特征检索。It can be seen that in the embodiment of the present disclosure, when it is determined to update the file, or when it is determined that the cover image needs to be updated, by performing steps 101 to 104, the cover image can be refreshed; in the case of periodic update of the cover image, By performing steps 101 to 104, the continuous update of the cover image can be automatically realized, and since there is no need to manually correct the cover image, the operation and maintenance cost can be reduced; in some embodiments, when the file is updated, the image in the file is Recently acquired images, that is, the embodiment of the present disclosure can select a cover image based on a recently acquired image, so that the selected cover image can reflect the recent state of the target object, thereby facilitating subsequent feature retrieval for the target object.
在本公开的一些实施例中,参照图7,获取目标对象的图像特征集合的流程可以包括:In some embodiments of the present disclosure, referring to FIG. 7 , the process of acquiring the image feature set of the target object may include:
步骤701:确定目标对象对应的档案中每个图像的采集时刻与当前时刻的时长。Step 701: Determine the duration between the acquisition time and the current time of each image in the file corresponding to the target object.
步骤702:在档案中,将时长超过图像的存活周期的图像滤除,得到更新后的档案。Step 702: In the archive, filter out images whose duration exceeds the life cycle of the image to obtain an updated archive.
在实际应用中,可以通过spark计算引擎将档案中采集时刻与当前时刻的时长超过图像的存活周期的图像进行滤除,得到更新后的档案。In practical applications, the spark computing engine can be used to filter out the images in the archives whose time between the acquisition time and the current time exceeds the life cycle of the image, so as to obtain an updated archive.
步骤703:对更新后的档案进行特征提取,得到档案中目标对象的图像特征集合。Step 703: Perform feature extraction on the updated archive to obtain a set of image features of the target object in the archive.
在一些实施例中,由于档案中的图像会消耗大量的磁盘资源,因此可以针对图像设置图像存活时间IMAGE_URL_TTL,类似的,也可以针对底库中的特征设置一个特征存活时间FEATURE_TTL;示例性地,可以将图像存活时间IMAGE_URL_TTL和特征存活时间FEATURE_TTL的较小值作为图像的存活周期。In some embodiments, since the images in the archive consume a lot of disk resources, the image survival time IMAGE_URL_TTL can be set for the image, similarly, a feature survival time FEATURE_TTL can also be set for the features in the bottom library; for example, The smaller value of the image survival time IMAGE_URL_TTL and the feature survival time FEATURE_TTL can be used as the survival period of the image.
在一种实现方式,存活周期可以是一周、15天、一个月等。In an implementation manner, the survival period may be one week, 15 days, one month, and so on.
可以理解地,不能选取档案中采集时刻与当前时刻的时长超过图像的存活周期的图像,否则会导致选取出的封面图像过期,或者导致底库中的特征过期;在本公开实施例中,将档案中采集时刻与当前时刻的时长超过图像的存活周期的图像进行滤除,可以提高选取封面图像的过程的可靠性;在一些实施例中,本公开实施例可以基于最近采集的图像选取代表性图像,从而,选取出的代表性图像能够反映目标对象的最近状态。Understandably, it is not possible to select an image whose duration between the acquisition time and the current time in the archive exceeds the life cycle of the image, otherwise the selected cover image will expire, or the features in the base library will expire; in the embodiment of the present disclosure, the Filtering out images whose duration between the collection time and the current time exceeds the life cycle of the image in the archive can improve the reliability of the process of selecting a cover image; in some embodiments, the embodiments of the present disclosure can select representative images based on the most recently collected images image, so that the selected representative image can reflect the latest state of the target object.
在本公开的一些实施例中,在对封面图像进行更新前,参照图8,上述档案处理方法还可以包括:In some embodiments of the present disclosure, before updating the cover image, referring to FIG. 8 , the above file processing method may further include:
步骤801:响应于将目标对象的新图像添加到档案,确定档案中图像的数量。Step 801 : In response to adding a new image of a target object to the dossier, determine the number of images in the dossier.
步骤802:响应于档案中的图像的数量超过预设数量的情况,按照档案中采集时刻从早到晚的顺序,依次滤除档案中的图像,直至档案中的图像数量小于或等于预设数量为止。Step 802: In response to the fact that the number of images in the archive exceeds the preset number, sequentially filter out the images in the archive according to the order of collection time in the archive from early to late until the number of images in the archive is less than or equal to the preset number until.
这里,响应于档案中的图像的数量不超过预设数量的情况,可以保持档案中的图像不变。Here, in response to the fact that the number of images in the archive does not exceed a preset number, the images in the archive may remain unchanged.
可以理解地,在将目标对象的新图像添加到档案的情况下,响应于档案中的图像的数量超过预设数量,则说明档案中的图像会消耗更多的磁盘资源,在这种情况下,通过滤除档案中的图像,有利于降低档案中的图像所占用的磁盘资源。Understandably, in the case of adding a new image of the target object to the archive, in response to the number of images in the archive exceeding a preset number, it is indicated that the images in the archive consume more disk resources, in this case , by filtering out the images in the archive, it is beneficial to reduce the disk resources occupied by the images in the archive.
在本公开的一些实施例中,在确定档案的封面图像后,可以将封面图像进行展示,还可以对封面图像进行分析或特征检索。示例性地,可以在获取任意一个对象的特征检索请求后,按照特征检索请求,在不同的对象对应的档案的封面图像进行特征检索。In some embodiments of the present disclosure, after the cover image of the archive is determined, the cover image may be displayed, and the cover image may also be analyzed or feature retrieved. Exemplarily, after acquiring the feature retrieval request of any object, according to the feature retrieval request, the feature retrieval can be performed on the cover image of the files corresponding to different objects.
可以看出,由于封面图像其具有很好的图像代表性,因此,可以通过对封面图像特征检索,可以提高特征检索的准确性,另外,相比于从至少两个对象的各抓拍图像中进行特征检索,本公开实施例基于封面图像中进行特征检索,可以有效地减少待检索图像的数量,提高检索的效率,另外,综合多个封面图像的检索结果,还能够有效提高检索的召回率。It can be seen that since the cover image has a good image representation, the accuracy of the feature retrieval can be improved by retrieving the features of the cover image. For feature retrieval, the embodiments of the present disclosure perform feature retrieval based on cover images, which can effectively reduce the number of images to be retrieved and improve retrieval efficiency. In addition, integrating retrieval results of multiple cover images can also effectively improve the recall rate of retrieval.
在一些场景中,摄像头抓拍的图像数据,经过提取聚类后会形成目标对象对应的档案,在相关技术中,用户通过查询档案查看封面图时,可能会出现图片访问不到,或者图片难以辨认,需要进一步点击到档案详情,找到成像质量较好的图像进行比对,才能确认是不是目标对象对应的档案。而在采用本公开实施例的技术方案后,输出的封面图像为档案抓拍中较为典型的抓拍图像,利用封面图像即可过滤非目标对象的档案。In some scenarios, the image data captured by the camera will be extracted and clustered to form a file corresponding to the target object. In related technologies, when the user checks the cover image by querying the file, the image may not be accessible or the image may be difficult to identify , it is necessary to further click on the file details to find an image with better imaging quality for comparison, in order to confirm whether it is the file corresponding to the target object. However, after adopting the technical solutions of the embodiments of the present disclosure, the output cover image is a typical snapshot image in file snapshots, and the files of non-target objects can be filtered by using the cover image.
在前述实施例提出的档案处理方法的基础上,本公开实施例还提出了一种档案处理装置。On the basis of the file processing methods provided in the foregoing embodiments, the embodiments of the present disclosure also provide a file processing device.
图9为本公开实施例的档案处理装置的结构示意图,如图9所示,该装置可以包括:获取部分900、第一处理部分901、第二处理部分902和第三处理部分903,其中,Fig. 9 is a schematic structural diagram of a file processing device according to an embodiment of the present disclosure. As shown in Fig. 9, the device may include: an acquisition part 900, a first processing part 901, a second processing part 902 and a third processing part 903, wherein,
获取部分900,配置为获取目标对象的图像特征集合;The acquiring part 900 is configured to acquire the image feature set of the target object;
第一处理部分901,配置为确定所述图像特征集合中每个图像特征与所述图像特征集合中其它图像特征之间的相似度集合;The first processing part 901 is configured to determine a similarity set between each image feature in the image feature set and other image features in the image feature set;
第二处理部分902,配置为根据所述相似度集合,确定所述图像特征集合的代表性特征;The second processing part 902 is configured to determine representative features of the image feature set according to the similarity set;
第三处理部分903,配置为将所述代表性特征对应的图像确定为所述目标对象对应的档案的封面图像。The third processing part 903 is configured to determine the image corresponding to the representative feature as the cover image of the file corresponding to the target object.
在一些实施例中,所述第二处理部分902,配置为根据所述相似度集合,确定所述图像特征集合的代表性特征,包括:In some embodiments, the second processing part 902 is configured to determine representative features of the image feature set according to the similarity set, including:
根据所述相似度集合,确定所述每个图像特征的局部密度;determining the local density of each image feature according to the similarity set;
根据所述相似度集合和所述每个图像特征的局部密度,确定每个图像特征的密度点间隔;Determine the density point interval of each image feature according to the similarity set and the local density of each image feature;
根据所述每个图像特征的所述局部密度和所述密度点间隔,确定所述图像特征集合的代表性特征。A representative feature of the image feature set is determined according to the local density and the density point interval of each image feature.
在一些实施例中,所述第二处理部分902,配置为根据所述相似度集合,确定所述每个图像特征的局部密度,包括:In some embodiments, the second processing part 902 is configured to determine the local density of each image feature according to the similarity set, including:
在所述图像特征集合中,确定与所述每个图像特征的相似度大于阈值的至少一个图像特征;将所述至少一个图像特征与所述每个图像特征的相似度之和,作为所述每个图像特征的局部密度。In the set of image features, determine at least one image feature whose similarity with each image feature is greater than a threshold; use the sum of the similarities between the at least one image feature and each image feature as the The local density of each image feature.
在一些实施例中,所述第二处理部分902,配置为根据所述相似度集合和所述每个图像特征的局部密度,确定每个图像特征的密度点间隔,包括:In some embodiments, the second processing part 902 is configured to determine the density point interval of each image feature according to the similarity set and the local density of each image feature, including:
在所述图像特征集合中的第一图像特征不是所述图像特征集合中局部密度最大的图像特征的情况下,在所述图像特征集合中选取局部密度大于所述第一图像特征的局部密度的图像特征,将选取的所述图像特征与所述第一图像特征的相似度的最小值作为所述第一图像特征的密度点间隔;所述第一图像特征为所述图像特征集合中的任意一个图像特征;在得出所述图像特征集合中除所述局部密度最大的图像特征外的各个图像特征的密度点间隔的情况下,在所述图像特征集合中除所述局部密度最大的图像特征外的各个图像特征的密度点间隔中,将密度点间隔的最小值作为所述图像特征集合中所述局部密度最大的图像特征的密度点间隔。In the case that the first image feature in the image feature set is not the image feature with the largest local density in the image feature set, select an image feature with a local density greater than the local density of the first image feature in the image feature set Image feature, taking the minimum value of the similarity between the selected image feature and the first image feature as the density point interval of the first image feature; the first image feature is any of the image feature sets An image feature; in the case of obtaining the density point interval of each image feature in the image feature set except the image feature with the local maximum density, in the image feature set except the image feature with the local maximum density In the density point interval of each image feature other than the feature, the minimum value of the density point interval is used as the density point interval of the image feature with the highest local density in the image feature set.
在一些实施例中,所述第二处理部分902,配置为根据所述每个图像特征的所述局部密度和所述密度点间隔,确定所述图像特征集合的代表性特征,包括:In some embodiments, the second processing part 902 is configured to determine representative features of the image feature set according to the local density and the density point interval of each image feature, including:
根据所述每个图像特征的所述局部密度和所述密度点间隔,得出所述每个图像特征的代表性分数,所述每个图像特征的代表性分数与所述局部密度成正相关,与所述密度点间隔成负相关;According to the local density and the density point interval of each image feature, a representative score of each image feature is obtained, and the representative score of each image feature is positively correlated with the local density, Negatively correlated with the density point interval;
在所述图像特征集合中,选取代表性分数大于或等于代表性分数阈值的至少一个特征作为所述代表性特征。In the image feature set, at least one feature whose representative score is greater than or equal to a representative score threshold is selected as the representative feature.
在一些实施例中,所述第二处理部分902,配置为根据所述每个图像特征的所述局部密度和所述密度点间隔,得出所述每个图像特征的代表性分数,包括:In some embodiments, the second processing part 902 is configured to obtain the representative score of each image feature according to the local density and the density point interval of each image feature, including:
将所述每个图像特征的局部密度与所述密度点间隔的比值,作为所述每个图像特征的代表性分数。The ratio of the local density of each image feature to the density point interval is used as the representative score of each image feature.
在一些实施例中,所述第三处理部分903,还配置为在首次确定所述档案的封面图像后,响应于所述封面图像的更新事件,通过执行以下步骤,实现对所述档案的封面图像的更新:获取所述目标对象的图像特征集合、确定所述图像特征集合的代表性特征、以及确定所述档案的封面图像;其中:In some embodiments, the third processing part 903 is further configured to perform the following steps in response to an update event of the cover image after determining the cover image of the archive for the first time, to implement the cover image of the archive Image updating: acquiring the image feature set of the target object, determining representative features of the image feature set, and determining the cover image of the file; wherein:
所述封面图像的更新事件包括以下至少之一:The update event of the cover image includes at least one of the following:
在更新所述档案的情况下;in the case of updating said file;
在获取到所述封面图像的更新指令的情况下;In the case of acquiring the update instruction of the cover image;
在周期性更新所述封面图像的情况下。In the case of periodically updating the cover image.
在一些实施例中,所述获取部分900,配置为获取目标对象的图像特征集合,包括:In some embodiments, the acquisition part 900 is configured to acquire the image feature set of the target object, including:
确定所述目标对象对应的档案中每个图像的采集时刻与当前时刻的时长;Determining the acquisition time of each image in the file corresponding to the target object and the duration of the current time;
在所述档案中,将所述时长超过图像的存活周期的图像滤除,得到更新后的档案;In the archive, the images whose duration exceeds the life cycle of the image are filtered out to obtain an updated archive;
对所述更新后的档案进行特征提取,得到所述目标对象的图像特征集合。Feature extraction is performed on the updated archive to obtain an image feature set of the target object.
在一些实施例中,所述获取部分900,还配置为在对所述封面图像进行更新前,响应于将所述目标对象的新图像添加到所述档案,确定所述档案中图像的数量;响应于所述档案中的图像的数量超过预设数量的情况,按照所述档案中采集时刻从早到晚的顺序,依次滤除所述档案中的图像,直至所述档案中的图像数量小于或等于所述预设数量为止。In some embodiments, the acquiring portion 900 is further configured to determine the number of images in the archive in response to adding a new image of the target object to the archive before updating the cover image; In response to the fact that the number of images in the archive exceeds a preset number, sequentially filter out the images in the archive according to the order of collection time in the archive from early to late until the number of images in the archive is less than or equal to the preset amount.
上述获取部分900、第一处理部分901、第二处理部分902和第三处理部分903可以基于电子设备的处理器实现。The acquisition part 900, the first processing part 901, the second processing part 902 and the third processing part 903 mentioned above can be realized based on the processor of the electronic device.
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in this embodiment may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产 品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or It is said that the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes.
具体来讲,本实施例中的一种档案处理方法对应的计算机程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种档案处理方法对应的计算机程序指令被一电子设备读取或被执行时,实现前述实施例的任意一种档案处理方法。Specifically, the computer program instructions corresponding to a file processing method in this embodiment can be stored on a storage medium such as an optical disc, a hard disk, or a USB flash drive. When the computer program instructions corresponding to a file processing method in the storage medium When read or executed by an electronic device, any one of the file processing methods of the foregoing embodiments is realized.
基于前述实施例相同的技术构思,参见图10,其示出了本公开实施例提供的一种电子设备1000,可以包括:存储器1001、处理器1002及存储在存储器1001上并可在处理器1002上运行的计算机程序;其中,Based on the same technical idea of the foregoing embodiments, see FIG. 10 , which shows an electronic device 1000 provided by an embodiment of the present disclosure, which may include: a memory 1001, a processor 1002, and an A computer program running on ; where,
存储器1001,用于存储计算机程序和数据; memory 1001 for storing computer programs and data;
处理器1002,用于执行所述存储器中存储的计算机程序,以实现前述实施例的任意一种档案处理方法。The processor 1002 is configured to execute the computer program stored in the memory, so as to realize any file processing method of the foregoing embodiments.
在实际应用中,上述存储器1001可以是易失性存储器(volatile memory),例如RAM;或者非易失性存储器(non-volatile memory),例如ROM,快闪存储器(flash memory),硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);或者上述种类的存储器的组合,并向处理器1002提供指令和数据。In practical applications, the above-mentioned memory 1001 can be a volatile memory (volatile memory), such as RAM; or a non-volatile memory (non-volatile memory), such as ROM, flash memory (flash memory), hard disk (Hard Disk Drive, HDD) or solid-state drive (Solid-State Drive, SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor 1002.
上述处理器1002可以为ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微处理器中的至少一种。The aforementioned processor 1002 may be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.
本公开实施例还提供了一种计算机程序,该计算机程序包括计算机可读代码,当计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述任意一种档案处理方法。An embodiment of the present disclosure also provides a computer program, the computer program includes computer readable code, when the computer readable code is run in the electronic device, the processor in the electronic device executes any one of the above files Approach.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or parts included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments, and the same or similar points can be referred to each other. For the sake of brevity, no further details are given here.
本公开所提供的各方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the various method embodiments provided in the present disclosure can be combined arbitrarily without conflict to obtain new method embodiments.
本公开所提供的各产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in the various product embodiments provided in the present disclosure can be combined arbitrarily without conflict to obtain new product embodiments.
本公开所提供的各方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in each method or device embodiment provided in the present disclosure can be combined arbitrarily without conflict to obtain a new method embodiment or device embodiment.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本公开各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present disclosure.
上面结合附图对本公开的实施例进行了描述,但是本公开并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本公开的启示下,在不脱离本公开宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本公开的保护之内。The embodiments of the present disclosure have been described above in conjunction with the accompanying drawings, but the present disclosure is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Under the inspiration of the present disclosure, without departing from the purpose of the present disclosure and the protection scope of the claims, many forms can also be made, and these all belong to the protection of the present disclosure.

Claims (21)

  1. 一种档案处理方法,应用于电子设备中,所述方法包括:A file processing method applied to electronic equipment, the method comprising:
    获取目标对象的图像特征集合;Obtain a set of image features of the target object;
    确定所述图像特征集合中每个图像特征与所述图像特征集合中其它图像特征之间的相似度集合;determining a set of similarities between each image feature in the set of image features and other image features in the set of image features;
    根据所述相似度集合,确定所述图像特征集合的代表性特征;Determine representative features of the image feature set according to the similarity set;
    将所述代表性特征对应的图像确定为所述目标对象对应的档案的封面图像。The image corresponding to the representative feature is determined as the cover image of the file corresponding to the target object.
  2. 根据权利要求1所述的方法,其中,所述根据所述相似度集合,确定所述图像特征集合的代表性特征,包括:The method according to claim 1, wherein said determining representative features of said image feature set according to said similarity set comprises:
    根据所述相似度集合,确定所述每个图像特征的局部密度;determining the local density of each image feature according to the similarity set;
    根据所述相似度集合和所述每个图像特征的局部密度,确定每个图像特征的密度点间隔;Determine the density point interval of each image feature according to the similarity set and the local density of each image feature;
    根据所述每个图像特征的所述局部密度和所述密度点间隔,确定所述图像特征集合的代表性特征。A representative feature of the image feature set is determined according to the local density and the density point interval of each image feature.
  3. 根据权利要求2所述的方法,其中,所述根据所述相似度集合,确定所述每个图像特征的局部密度,包括:The method according to claim 2, wherein said determining the local density of each image feature according to said similarity set comprises:
    在所述图像特征集合中,确定与所述每个图像特征的相似度大于阈值的至少一个图像特征;In the set of image features, determining at least one image feature whose similarity with each image feature is greater than a threshold;
    将所述至少一个图像特征与所述每个图像特征的相似度之和,作为所述每个图像特征的局部密度。The sum of similarities between the at least one image feature and each image feature is used as the local density of each image feature.
  4. 根据权利要求2或3所述的方法,其中,所述根据所述相似度集合和所述每个图像特征的局部密度,确定每个图像特征的密度点间隔,包括:The method according to claim 2 or 3, wherein said determining the density point interval of each image feature according to the similarity set and the local density of each image feature comprises:
    在所述图像特征集合中的第一图像特征不是所述图像特征集合中局部密度最大的图像特征的情况下,在所述图像特征集合中选取局部密度大于所述第一图像特征的局部密度的图像特征,将选取的所述图像特征与所述第一图像特征的相似度的最小值作为所述第一图像特征的密度点间隔;所述第一图像特征为所述图像特征集合中的任意一个图像特征;In the case that the first image feature in the image feature set is not the image feature with the largest local density in the image feature set, select an image feature with a local density greater than the local density of the first image feature in the image feature set Image feature, taking the minimum value of the similarity between the selected image feature and the first image feature as the density point interval of the first image feature; the first image feature is any of the image feature sets an image feature;
    在得出所述图像特征集合中除所述局部密度最大的图像特征外的各个图像特征的密度点间隔的情况下,在所述图像特征集合中除所述局部密度最大的图像特征外的各个图像特征的密度点间隔中,将密度点间隔的最小值作为所述图像特征集合中所述局部密度最大的图像特征的密度点间隔。In the case of obtaining the density point spacing of each image feature in the image feature set except for the image feature with the highest local density, each image feature in the set of image features except the image feature with the highest local density In the density point interval of the image feature, the minimum value of the density point interval is used as the density point interval of the image feature with the highest local density in the image feature set.
  5. 根据权利要求2至4任一项所述的方法,其中,所述根据所述每个图像特征的所述局部密度和所述密度点间隔,确定所述图像特征集合的代表性特征,包括:The method according to any one of claims 2 to 4, wherein said determining representative features of said image feature set according to said local density and said density point interval of said each image feature comprises:
    根据所述每个图像特征的所述局部密度和所述密度点间隔,得出所述每个图像特征的代表性分数,所述每个图像特征的代表性分数与所述局部密度成正相关,与所述密度点间隔成负相关;According to the local density and the density point interval of each image feature, a representative score of each image feature is obtained, and the representative score of each image feature is positively correlated with the local density, Negatively correlated with the density point interval;
    在所述图像特征集合中,选取代表性分数大于或等于代表性分数阈值的至少一个特征作为所述代表性特征。In the image feature set, at least one feature whose representative score is greater than or equal to a representative score threshold is selected as the representative feature.
  6. 根据权利要求5所述的方法,其中,所述根据所述每个图像特征的所述局部密度和所述密度点间隔,得出所述每个图像特征的代表性分数,包括:The method according to claim 5, wherein the representative score of each image feature is obtained according to the local density and the density point interval of each image feature, comprising:
    将所述每个图像特征的局部密度与所述密度点间隔的比值,作为所述每个图像特征的代表性分数。The ratio of the local density of each image feature to the density point interval is used as the representative score of each image feature.
  7. 根据权利要求1至6任一项所述的方法,其中,在首次确定所述档案的封面图像后,所述方法还包括:The method according to any one of claims 1 to 6, wherein, after first determining the cover image of the profile, the method further comprises:
    响应于所述封面图像的更新事件,通过执行以下步骤,实现对所述档案的封面图像的更新:In response to the update event of the cover image, the update of the cover image of the archive is realized by performing the following steps:
    获取所述目标对象的图像特征集合、确定所述图像特征集合的代表性特征、以及确定所述档案的封面图像;其中:acquiring a set of image features of the target object, determining a representative feature of the set of image features, and determining a cover image of the profile; wherein:
    所述封面图像的更新事件包括以下至少之一:The update event of the cover image includes at least one of the following:
    在更新所述档案的情况下;in the case of updating said file;
    在获取到所述封面图像的更新指令的情况下;In the case of acquiring the update instruction of the cover image;
    在周期性更新所述封面图像的情况下。In the case of periodically updating the cover image.
  8. 根据权利要求1至7任一项所述的方法,其中,所述获取目标对象的图像特征集合,包括:The method according to any one of claims 1 to 7, wherein said acquiring the image feature set of the target object comprises:
    确定所述目标对象对应的档案中每个图像的采集时刻与当前时刻的时长;Determining the acquisition time of each image in the file corresponding to the target object and the duration of the current time;
    在所述档案中,将所述时长超过图像的存活周期的图像滤除,得到更新后的档案;In the archive, the images whose duration exceeds the life cycle of the image are filtered out to obtain an updated archive;
    对所述更新后的档案进行特征提取,得到所述目标对象的图像特征集合。Feature extraction is performed on the updated archive to obtain an image feature set of the target object.
  9. 根据权利要求1至8任一项所述的方法,其中,在对所述封面图像进行更新前,所述方法还包括:The method according to any one of claims 1 to 8, wherein, before updating the cover image, the method further comprises:
    响应于将所述目标对象的新图像添加到所述档案,确定所述档案中图像的数量;determining a number of images in the dossier in response to adding a new image of the target object to the dossier;
    响应于所述档案中的图像的数量超过预设数量的情况,按照所述档案中采集时刻从早到晚的顺序,依次滤除所述档案中的图像,直至所述档案中的图像数量小于或等于所述预设数量为止。In response to the fact that the number of images in the archive exceeds a preset number, sequentially filter out the images in the archive according to the order of collection time in the archive from early to late until the number of images in the archive is less than or equal to the preset amount.
  10. 一种档案处理装置,所述装置包括获取部分、第一处理部分、第二处理部分和第三处理部分,其中,An archive processing device, the device comprising an acquisition part, a first processing part, a second processing part and a third processing part, wherein,
    获取部分,用于获取目标对象的图像特征集合;The acquisition part is used to acquire the image feature set of the target object;
    第一处理部分,用于确定所述图像特征集合中每个图像特征与所述图像特征集合中其它图像特征之间的相似度集合;A first processing part, configured to determine a similarity set between each image feature in the image feature set and other image features in the image feature set;
    第二处理部分,用于根据所述相似度集合,确定所述图像特征集合的代表性特征;The second processing part is used to determine representative features of the image feature set according to the similarity set;
    第三处理部分,用于将所述代表性特征对应的图像确定为所述目标对象对应的档案的封面图像。The third processing part is configured to determine the image corresponding to the representative feature as the cover image of the file corresponding to the target object.
  11. 根据权利要求10所述的装置,其中,所述第二处理部分,配置为根据所述相似度集合,确定所述图像特征集合的代表性特征,包括:The device according to claim 10, wherein the second processing part is configured to determine representative features of the image feature set according to the similarity set, comprising:
    根据所述相似度集合,确定所述每个图像特征的局部密度;determining the local density of each image feature according to the similarity set;
    根据所述相似度集合和所述每个图像特征的局部密度,确定每个图像特征的密度点间隔;Determine the density point interval of each image feature according to the similarity set and the local density of each image feature;
    根据所述每个图像特征的所述局部密度和所述密度点间隔,确定所述图像特征集合的代表性特征。A representative feature of the image feature set is determined according to the local density and the density point interval of each image feature.
  12. 根据权利要求11所述的装置,其中,所述第二处理部分,配置为根据所述相似度集合,确定所述每个图像特征的局部密度,包括:The device according to claim 11, wherein the second processing part is configured to determine the local density of each image feature according to the similarity set, comprising:
    在所述图像特征集合中,确定与所述每个图像特征的相似度大于阈值的至少一个图像特征;In the set of image features, determining at least one image feature whose similarity with each image feature is greater than a threshold;
    将所述至少一个图像特征与所述每个图像特征的相似度之和,作为所述每个图像特征的局部密度。The sum of similarities between the at least one image feature and each image feature is used as the local density of each image feature.
  13. 根据权利要求11或12所述的装置,其中,所述第二处理部分,配置为根据所述相似度集合和所述每个图像特征的局部密度,确定每个图像特征的密度点间隔,包括:The device according to claim 11 or 12, wherein the second processing part is configured to determine the density point interval of each image feature according to the similarity set and the local density of each image feature, comprising :
    在所述图像特征集合中的第一图像特征不是所述图像特征集合中局部密度最大的图 像特征的情况下,在所述图像特征集合中选取局部密度大于所述第一图像特征的局部密度的图像特征,将选取的所述图像特征与所述第一图像特征的相似度的最小值作为所述第一图像特征的密度点间隔;所述第一图像特征为所述图像特征集合中的任意一个图像特征;In the case that the first image feature in the image feature set is not the image feature with the largest local density in the image feature set, select an image feature with a local density greater than the local density of the first image feature in the image feature set Image feature, taking the minimum value of the similarity between the selected image feature and the first image feature as the density point interval of the first image feature; the first image feature is any of the image feature sets an image feature;
    在得出所述图像特征集合中除所述局部密度最大的图像特征外的各个图像特征的密度点间隔的情况下,在所述图像特征集合中除所述局部密度最大的图像特征外的各个图像特征的密度点间隔中,将密度点间隔的最小值作为所述图像特征集合中所述局部密度最大的图像特征的密度点间隔。In the case of obtaining the density point spacing of each image feature in the image feature set except for the image feature with the highest local density, each image feature in the set of image features except the image feature with the highest local density In the density point interval of the image feature, the minimum value of the density point interval is used as the density point interval of the image feature with the highest local density in the image feature set.
  14. 根据权利要求11至13任一项所述的装置,其中,所述第二处理部分,配置为根据所述每个图像特征的所述局部密度和所述密度点间隔,确定所述图像特征集合的代表性特征,包括:The device according to any one of claims 11 to 13, wherein the second processing part is configured to determine the image feature set according to the local density and the density point interval of each image feature representative features, including:
    根据所述每个图像特征的所述局部密度和所述密度点间隔,得出所述每个图像特征的代表性分数,所述每个图像特征的代表性分数与所述局部密度成正相关,与所述密度点间隔成负相关;According to the local density and the density point interval of each image feature, a representative score of each image feature is obtained, and the representative score of each image feature is positively correlated with the local density, Negatively correlated with the density point interval;
    在所述图像特征集合中,选取代表性分数大于或等于代表性分数阈值的至少一个特征作为所述代表性特征。In the image feature set, at least one feature whose representative score is greater than or equal to a representative score threshold is selected as the representative feature.
  15. 根据权利要求14所述的装置,其中,所述第二处理部分,配置为根据所述每个图像特征的所述局部密度和所述密度点间隔,得出所述每个图像特征的代表性分数,包括:The device according to claim 14, wherein the second processing part is configured to obtain the representativeness of each image feature according to the local density and the density point spacing of each image feature. scores, including:
    将所述每个图像特征的局部密度与所述密度点间隔的比值,作为所述每个图像特征的代表性分数。The ratio of the local density of each image feature to the density point interval is used as the representative score of each image feature.
  16. 根据权利要求10至15任一项所述的装置,其中,所述第三处理部分,还配置为在首次确定所述档案的封面图像后,响应于所述封面图像的更新事件,通过执行以下步骤,实现对所述档案的封面图像的更新:获取所述目标对象的图像特征集合、确定所述图像特征集合的代表性特征、以及确定所述档案的封面图像;The device according to any one of claims 10 to 15, wherein the third processing part is further configured to respond to an update event of the cover image by executing the following after the cover image of the archive is determined for the first time Step, realizing the update of the cover image of the archive: obtaining the image feature set of the target object, determining the representative feature of the image feature set, and determining the cover image of the archive;
    所述封面图像的更新事件包括以下至少之一:The update event of the cover image includes at least one of the following:
    在更新所述档案的情况下;in the case of updating said file;
    在获取到所述封面图像的更新指令的情况下;In the case of acquiring the update instruction of the cover image;
    在周期性更新所述封面图像的情况下。In the case of periodically updating the cover image.
  17. 根据权利要求10至16任一项所述的装置,其中,所述获取部分,配置为获取目标对象的图像特征集合,包括:The device according to any one of claims 10 to 16, wherein the acquiring part is configured to acquire a set of image features of the target object, comprising:
    确定所述目标对象对应的档案中每个图像的采集时刻与当前时刻的时长;Determining the acquisition time of each image in the file corresponding to the target object and the duration of the current time;
    在所述档案中,将所述时长超过图像的存活周期的图像滤除,得到更新后的档案;In the archive, the images whose duration exceeds the life cycle of the image are filtered out to obtain an updated archive;
    对所述更新后的档案进行特征提取,得到所述目标对象的图像特征集合。Feature extraction is performed on the updated archive to obtain an image feature set of the target object.
  18. 根据权利要求10至17任一项所述的装置,其中,所述获取部分,还配置为在对所述封面图像进行更新前,响应于将所述目标对象的新图像添加到所述档案,确定所述档案中图像的数量;响应于所述档案中的图像的数量超过预设数量的情况,按照所述档案中采集时刻从早到晚的顺序,依次滤除所述档案中的图像,直至所述档案中的图像数量小于或等于所述预设数量为止。The apparatus according to any one of claims 10 to 17, wherein the acquiring part is further configured to respond to adding a new image of the target object to the archive before updating the cover image, determining the number of images in the archive; in response to the fact that the number of images in the archive exceeds a preset number, sequentially filtering out the images in the archive according to the sequence of collection time in the archive from early to late, until the number of images in the file is less than or equal to the preset number.
  19. 一种电子设备,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器;其中,An electronic device comprising a processor and a memory for storing a computer program capable of running on the processor; wherein,
    所述处理器用于运行所述计算机程序以执行权利要求1至9任一项所述的档案处理方法。The processor is used to run the computer program to execute the file processing method described in any one of claims 1-9.
  20. 一种计算机存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1至9任一项所述的档案处理方法。A computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the file processing method described in any one of claims 1 to 9 is realized.
  21. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至9任一项所述的档案处理方法。A computer program, comprising computer-readable codes, when the computer-readable codes are run in an electronic device, a processor in the electronic device executes the archive processing described in any one of claims 1 to 9 method.
PCT/CN2022/113914 2021-12-28 2022-08-22 File processing method and apparatus, electronic device, computer storage medium and program WO2023124134A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111626946.5A CN114329023A (en) 2021-12-28 2021-12-28 File processing method and device, electronic equipment and computer storage medium
CN202111626946.5 2021-12-28

Publications (1)

Publication Number Publication Date
WO2023124134A1 true WO2023124134A1 (en) 2023-07-06

Family

ID=81015703

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/113914 WO2023124134A1 (en) 2021-12-28 2022-08-22 File processing method and apparatus, electronic device, computer storage medium and program

Country Status (2)

Country Link
CN (1) CN114329023A (en)
WO (1) WO2023124134A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114329023A (en) * 2021-12-28 2022-04-12 北京市商汤科技开发有限公司 File processing method and device, electronic equipment and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108461A (en) * 2017-12-29 2018-06-01 北京小米移动软件有限公司 Determine the method and device of cover image
CN109948734A (en) * 2019-04-02 2019-06-28 北京旷视科技有限公司 Image clustering method, device and electronic equipment
CN110443297A (en) * 2019-07-30 2019-11-12 浙江大华技术股份有限公司 Clustering method, device and the computer storage medium of image
CN112835876A (en) * 2019-11-25 2021-05-25 深圳云天励飞技术有限公司 Face file duplication removing method and related equipment
WO2021143237A1 (en) * 2020-01-15 2021-07-22 佳都新太科技股份有限公司 Dynamic human face clustering method and apparatus, device, and storage medium
CN114329023A (en) * 2021-12-28 2022-04-12 北京市商汤科技开发有限公司 File processing method and device, electronic equipment and computer storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108461A (en) * 2017-12-29 2018-06-01 北京小米移动软件有限公司 Determine the method and device of cover image
CN109948734A (en) * 2019-04-02 2019-06-28 北京旷视科技有限公司 Image clustering method, device and electronic equipment
CN110443297A (en) * 2019-07-30 2019-11-12 浙江大华技术股份有限公司 Clustering method, device and the computer storage medium of image
CN112835876A (en) * 2019-11-25 2021-05-25 深圳云天励飞技术有限公司 Face file duplication removing method and related equipment
WO2021143237A1 (en) * 2020-01-15 2021-07-22 佳都新太科技股份有限公司 Dynamic human face clustering method and apparatus, device, and storage medium
CN114329023A (en) * 2021-12-28 2022-04-12 北京市商汤科技开发有限公司 File processing method and device, electronic equipment and computer storage medium

Also Published As

Publication number Publication date
CN114329023A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN109117714B (en) Method, device and system for identifying fellow persons and computer storage medium
WO2021063011A1 (en) Method and device for behavioral analysis, electronic apparatus, storage medium, and computer program
CN110175549B (en) Face image processing method, device, equipment and storage medium
US8270684B2 (en) Automatic media sharing via shutter click
US9727546B1 (en) Creating a narrative description of media content and applications thereof
EP2224372A2 (en) Grouping images by location
WO2020259099A1 (en) Information processing method and device, and storage medium
TWI740537B (en) Information processing method, device and storage medium thereof
Thakre et al. Video partitioning and secured keyframe extraction of MPEG video
US9665773B2 (en) Searching for events by attendants
CN109800318B (en) Filing method and device
CN110705476A (en) Data analysis method and device, electronic equipment and computer storage medium
Shalika et al. Animal classification system based on image processing & support vector machine
CN109800664B (en) Method and device for determining passersby track
WO2023124134A1 (en) File processing method and apparatus, electronic device, computer storage medium and program
CN109241316B (en) Image retrieval method, image retrieval device, electronic equipment and storage medium
Yu et al. Leveraging probabilistic season and location context models for scene understanding
Dias et al. Temporal web image retrieval
CN112446361A (en) Method and equipment for cleaning training data
CN106557523A (en) Presentation graphics system of selection and equipment and object images search method and equipment
Kaur et al. Deep CNN based online image deduplication technique for cloud storage system
CN114863364A (en) Security detection method and system based on intelligent video monitoring
CN113570635B (en) Target motion trail restoration method and device, electronic equipment and storage medium
CN117576425B (en) Method and system for detecting scurrying image
CN116561372B (en) Personnel gear gathering method and device based on multiple algorithm engines and readable storage medium

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: 22913418

Country of ref document: EP

Kind code of ref document: A1