CN114268730A - Image storage method and device, computer equipment and storage medium - Google Patents

Image storage method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114268730A
CN114268730A CN202010968900.0A CN202010968900A CN114268730A CN 114268730 A CN114268730 A CN 114268730A CN 202010968900 A CN202010968900 A CN 202010968900A CN 114268730 A CN114268730 A CN 114268730A
Authority
CN
China
Prior art keywords
image
shooting
images
face
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010968900.0A
Other languages
Chinese (zh)
Inventor
雷霆
苏炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010968900.0A priority Critical patent/CN114268730A/en
Priority to PCT/CN2021/118045 priority patent/WO2022057773A1/en
Publication of CN114268730A publication Critical patent/CN114268730A/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

An image storage method, an image storage device, computer equipment and a storage medium belong to the technical field of data storage. The method comprises the following steps: acquiring a first image, selecting at least one image from the first image and the stored image set for storage, and deleting unselected images. The stored image set comprises one or more images, the images in the image set and the first image have the same shooting objects, the same shooting places and shooting time intervals smaller than a preset threshold value. In the method, the images of the same shooting object shot continuously in a short time at the same place are not stored completely, and only part of the images are selected for storage, so that the waste of storage space can be effectively reduced.

Description

Image storage method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a method and an apparatus for storing an image, a computer device, and a storage medium.
Background
With the continuous development of video monitoring, view applications such as face retrieval, face tracking and the like are derived on the basis of video monitoring. The captured image may be processed as follows before the view application is implemented.
The camera sends the images shot in real time to a storage system, such as an Intelligent Video Surveillance (IVS) platform of huashi corporation, and the IVS analyzes the received images to obtain face images in the images, and face feature data and structured data corresponding to each face image. The face feature data can be feature vectors, and the structured data comprises shooting time, shooting location, quality score, age, gender and the like corresponding to the face image. And then, correspondingly storing the face image, the corresponding face feature data and the face structural data for subsequent view application.
In the course of implementing the present application, the inventors found that the related art has at least the following problems:
if a certain subject stays at the same place for a long time, a camera deployed at the place continues to take a large number of images including the subject. Therefore, when the images are analyzed by the IVS, a large number of face images of the shooting object can be obtained, the face images are quite similar to each other, but a large amount of storage space is occupied, and waste of the storage space is caused.
Disclosure of Invention
The embodiment of the application provides an image storage method and device, computer equipment and a storage medium. The technical scheme is as follows:
in a first aspect, a method for storing an image is provided, the method comprising:
acquiring a first image, and performing deduplication operation on the first image and a stored image set, specifically comprising:
selecting at least one image from a first image and a stored image set for storage, wherein the stored image set comprises one or more images, and the images in the image set and the first image have: and deleting the unselected images by the same shooting object, the same shooting place and a shooting time interval smaller than a preset threshold value.
In the solution provided in the embodiment of the present application, the image may be a face image, and for convenience of description, the image is hereinafter referred to as a face image for convenience of description. The shooting place is the place where the image shooting device is located, and the preset threshold value can be 5 minutes to 10 minutes. The face image can be obtained by performing face recognition on a shot Video by the image shooting device, and then the face image is sent to an Intelligent Video monitoring platform (IVS) by the image shooting device, and can also be obtained by performing face recognition on a Video sent by the image shooting device by the IVS. Furthermore, the IVS acquires the face images in the order of shooting time. For example, the shooting time corresponding to the face image acquired later is later than the shooting time corresponding to the face image acquired earlier. After the face image is acquired every time, if the face image which is the same as the shooting object and the shooting place corresponding to the currently acquired face image and has the shooting time interval smaller than a preset threshold value is determined to be stored, the currently acquired face image is added to the image set corresponding to the face image meeting the conditions. Specifically, when it is determined whether the two face images correspond to the same photographic subject, the similarity of the feature data of the two face images may be calculated, and if the similarity is greater than a preset threshold, the two face images are considered to correspond to the same photographic subject.
At least one face image can be selected from the face images in the image set after the addition processing for storage, and the rest face images are deleted. Therefore, the face images of the same object continuously shot in the same place in a short time can be subjected to duplication elimination operation, and the storage resources are effectively saved without storing all the face images.
In one possible implementation, the method further includes:
and acquiring a second image, and if a third image which has the same shooting object, the same shooting place and a shooting time interval smaller than a preset threshold value as the second image is not stored, establishing an image set comprising the second image.
In the scheme provided by the embodiment of the application, when a face image is acquired, it may be determined whether a face image having the same shooting object, the same shooting location, and a shooting time interval smaller than a preset threshold as the face image is stored, and if a face image having the same shooting object, the same shooting location, and a shooting time interval smaller than the preset threshold as the face image is not stored, a new image set is established, and the acquired face image is added to the new image set.
In a possible implementation manner, the triggering condition of the deduplication operation may include:
and within a preset time length after the first image is acquired, a fourth face image which has the same shooting object, the same shooting place and a shooting time interval smaller than a preset threshold value as the first face image is not acquired.
In the solution provided in the embodiment of the present application, for an image set, if a face image having the same shooting object, the same shooting location, and a shooting time interval smaller than a preset threshold as a first face image (a face image newly added to the image set) is not acquired within a preset time period after the first face image is acquired, a deduplication operation may be performed on the image set. The preset time duration may be equal to the preset threshold, for example, the deduplication time interval is set to 10 minutes, the corresponding preset time duration may also be set to 10 minutes, or the preset time duration may be set to be slightly greater than the preset threshold.
In a possible implementation manner, the triggering condition of the deduplication operation may include:
and acquiring a fifth face image which has the same shooting object and a different shooting position with the first face image.
In the solution provided in the embodiment of the present application, in this case, it is described that the object corresponding to the first face image has already gone to another place, and then the deduplication operation may be performed on the image set.
In a possible implementation manner, the triggering condition of the deduplication operation may include:
and determining that the number of the face images included in the image set is larger than the target number, or determining that the size of the storage space occupied by the face images included in the image set is larger than the target storage value.
In the scheme provided by the embodiment of the application, the number of face images included in each image set can be detected according to a preset detection period, and if the number of face images is larger than the preset number, the image set can be subjected to deduplication operation. The target number can be set according to actual requirements, for example, the preset number can be set to 10 to 20. Or, the size of the storage space occupied by the face image in each image set can be detected according to a preset detection period, and if the size is larger than the target storage value, the image set can be subjected to deduplication operation. The target storage value may be set according to actual requirements, and may be set to 300KB to 600KB, for example.
In one possible implementation, the method further includes:
and modifying the shooting time of the selected face image into a target shooting time period, wherein the starting time of the target shooting time period is the earliest time of the shooting time of the image in the image recollection and the first image, the ending time of the target shooting time period is the latest time of the shooting time of the image in the image recollection and the first image, and deleting the structural data and the face feature data of the unselected image.
In the scheme provided by the embodiment of the application, in order to further save the storage space, when the unselected face images are deleted, the structured data and the face feature data corresponding to the face images can be deleted. In addition, for at least one face image remained in the removed set, the shooting time of the at least one face image can be modified into a target shooting time period, wherein the starting time of the target shooting time period is the earliest time of the shooting times corresponding to the face images in the image set, and the ending time of the target shooting time period is the latest time of the shooting times corresponding to the face images in the image set. In this way, the stored face image and the structured data thereof can indicate that the corresponding shooting object is located at the shooting location corresponding to the face image in the target shooting time period.
In one possible implementation, the selected image is the highest quality image.
In the scheme provided by the embodiment of the application, the quality of the face image is related to factors such as illumination of the face image, face angle and the like, and can be generally expressed by a quality score.
In a second aspect, there is provided an apparatus for image storage, the apparatus comprising:
an acquisition module for a first image;
a deduplication module, configured to perform deduplication operations on the first image and a stored image set, specifically to:
selecting at least one image from the first image and a stored image set for saving, wherein the stored image set comprises one or more images, and the images in the image set and the first image have: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value;
the unselected images are deleted.
In one possible implementation, the apparatus further includes:
and the establishing module is used for acquiring a second image, and if a third image which has the same shooting object, the same shooting place and a shooting time interval smaller than the preset threshold value as the second image is not stored, establishing an image set comprising the second image.
In a possible implementation manner, the triggering condition of the deduplication operation includes:
and within a preset time length after the first image is acquired, a fourth face image which has the same shooting object, the same shooting place and a shooting time interval smaller than a preset threshold value as the first face image is not acquired.
In a possible implementation manner, the triggering condition of the deduplication operation includes:
and acquiring a fifth face image which has the same shooting object and a different shooting position with the first face image.
In a possible implementation manner, the triggering condition of the deduplication operation includes:
determining that the number of face images included in the image set is greater than a target number, or,
and determining that the size of the storage space occupied by the face images included in the image set is larger than the target storage value.
In one possible implementation manner, the deduplication module is further configured to:
modifying the shooting time of the selected face image into a target shooting time period, wherein the starting time of the target shooting time period is the earliest time of the shooting times of the images in the image recollection and the first image, and the ending time of the target shooting time period is the latest time of the shooting times of the images in the image recollection and the first image;
and deleting the structural data and the face feature data of the unselected images.
In one possible implementation, the selected image is the highest quality image.
In a third aspect, a method for storing an image is provided, the method comprising:
acquiring images in an image set from a storage device, wherein the images in the image set and the first image have: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value; performing a deduplication operation on the first image and the stored image set, specifically including: and selecting one image from the image set for storage, and deleting unselected images.
In the solution provided in the embodiment of the present application, when the number of images in an image set or the occupied storage space is used as a trigger condition for a deduplication operation, the following situations may occur: the object stays in the same shooting place for a long time, the image shooting equipment in the shooting place continuously shoots face images, the face images only need to store the face images with the best quality, but due to the triggering condition, the face images are divided into a plurality of batches for duplication elimination, so that more face images can be stored, and therefore, the stored face images can be subjected to secondary duplication elimination. In the above case, some of the stored images satisfy the conditions of having the same subject, the same shooting location, and the shooting time interval smaller than the preset threshold, and the images may be regarded as belonging to the same image set, and one image with the best quality may be selected for storage, and the rest of the images may be deleted.
In a fourth aspect, there is provided an apparatus for image storage, the apparatus comprising:
an acquisition module configured to acquire, from a storage device, an image of a set of images, the image of the set of images and a first image having: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value;
a deduplication module, configured to perform deduplication operations on the image set, specifically to:
selecting an image from the image set for storage;
the unselected images are deleted.
In a fifth aspect, a computer device is provided, the computer device comprising a processor and a memory, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement the operations performed by the method of image storage according to the first and third aspects.
In a sixth aspect, there is provided a computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to perform the operations performed by the method of image storage according to the first and third aspects.
In a seventh aspect, a computer program product is provided, which, when run on a computer device, causes the computer device to perform the operations performed by the method for image storage according to the first and third aspects.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
in this embodiment of the present application, after an image is acquired, deduplication processing may be performed on the acquired image and an image in a stored image set, where the image in the image set and the currently acquired image satisfy the following conditions: the images in the image set and the images currently acquired are multiple images of the same object continuously shot in the same shooting place in a short time, and the images are quite similar to each other. Therefore, the images do not need to be stored completely, only partial images are selected to be stored, and unselected images are deleted, so that the storage resource can be effectively saved.
Drawings
Fig. 1 is a schematic diagram of an implementation scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart of a method for storing an image according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of creating an image collection according to an embodiment of the present application;
fig. 4 is a schematic diagram of adding a face image to an image set according to an embodiment of the present application;
fig. 5 is a schematic diagram of face image deduplication provided in an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an image storage apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides an image storage method, which can be implemented by a computer device, where the computer device has a storage function, such as a computer, a server, a Network Attached Storage (NAS) storage system, a Storage Area Network (SAN) storage system, a distributed storage system, a cloud storage system, a network hard disk recorder (NVR), and the like. Specifically, the system can be an intelligent video surveillance platform (IVS) of huacheng corporation. The IVS may provide services such as face retrieval for the user, as described below.
Referring to fig. 1, an implementation scenario of the embodiment of the present application may include an image capturing device and an IVS, where the image capturing device may be a conventional camera, and may also be a smart camera, such as a Software Defined Camera (SDC), where an application may be installed. The image shooting equipment can be deployed at places such as streets, intersections and the like according to actual needs. In the embodiment of the application, the image shooting equipment can send the shot image to the IVS, and the IVS performs duplicate removal on the image of the same object continuously shot by the same image shooting equipment in a short time, so that the storage space can be effectively saved, and more valuable data can be stored in the limited storage space. In addition, when the object is a human face and the image is a face image, the IVS can provide services such as face retrieval for the user, and on the basis of the duplication elimination operation of the face image, when the IVS performs the face retrieval, the face image is relatively less in total amount due to the duplication elimination operation, so that the face retrieval efficiency can be effectively improved, and better use experience is provided for the user. The basis for removing the duplicate image in this embodiment is: images having the same subject, the same shooting location, and a shooting time interval smaller than a preset threshold are regarded as similar images. Duplicate image deletion is performed for these similar images. That is, only one (or more) of them is retained, and the remaining images are deleted, thereby saving storage space.
The operation of removing the duplicate image may have a variety of operation modes. For example:
the first mode is as follows: a plurality of images (the whole of which is referred to as an image set) have been stored in the storage device, and deduplication is performed between the plurality of images.
And a second mode: a plurality of images (the whole of the plurality of images is called an image set) are already stored in the storage device, and the newly received image and the plurality of images which are already stored are subjected to de-duplication.
Referring to fig. 2, a method flow for storing an image provided by an embodiment of the present application may include the following steps:
step 201, a first image is acquired.
The first image may be in a different location than the collection of images, e.g., the first image is obtained by the computer device from outside the storage device, and the collection of images is obtained by the computer device from within the storage device. The first image may be the same as the acquisition location of the set of images, e.g. all acquired by the computer device from a storage device. The computer device and the storage device may be integrated, for example, a storage device having computing functionality.
The image may be a face image, and the following embodiments all use the image as a face image as an example for description.
In implementation, the method for acquiring the face image by the IVS may be different according to the function of the image capturing device. The following describes a method for acquiring a face image by an IVS:
the first method,
In the case where the image capturing apparatus captures a video:
after the image shooting equipment shoots a video, face recognition is carried out on video frames in the video according to a preset frame interval, and a face image and a scene image in the corresponding video frames are obtained. The preset frame interval may be, for example, 3 frames, 5 frames, or the like. And then, sending the face image in the video frame to an IVS (interactive voice system), wherein the IVS can directly acquire the face image.
In addition, when the image shooting device sends the face image of each video frame to the IVS, the scene image in the video frame, the corresponding shooting time and the shooting place can be sent at the same time, wherein the shooting place is the place where the image shooting device is located. Alternatively, the image capturing apparatus may transmit not the shooting location of the face image but the apparatus identification of the image capturing apparatus.
In the case where the image capturing apparatus captures a picture:
after the image shooting equipment shoots the pictures, the face recognition is carried out on the shot pictures to obtain the face images and the scene images in each picture. And then, sending the face image in each picture to the IVS, so that the IVS can directly acquire the face image.
In addition, when the image shooting device sends the face image corresponding to each picture to the IVS, the scene image in the picture, the corresponding shooting time and the shooting place can be sent at the same time. Alternatively, the image capturing apparatus may transmit not the shooting location of the face image but the apparatus identification of the image capturing apparatus.
According to actual needs, the IVS can process in real time, namely directly acquire the face image after receiving the face image sent by the image shooting equipment and execute subsequent processing. Or the IVS can store the received face data first, and then sequentially acquire the face images according to the shooting time sequence when the face images need to be deduplicated. For example, the technician may set a deduplication period, and each time a preset deduplication period is reached, the stored face image is acquired, and deduplication operation is performed, where the deduplication period may be one day, three days, or the like.
The second method,
In the case where the image capturing apparatus captures a video:
after the image shooting equipment shoots the video, the video can be directly sent to the IVS without face recognition. After receiving the video sent by the image shooting device, the IVS can perform face recognition on the video frames in the video according to the preset frame interval to obtain the face images and the scene images in the corresponding video frames.
Furthermore, the image capturing apparatus may also transmit the capturing time information at the same time when transmitting the video to the IVS. The shooting time information may be shooting time corresponding to each video frame in the video, or shooting start time of the video. When the shooting time information is the shooting start time of the video, the IVS can calculate the shooting time of the video frame required to be face-recognized in the video according to the shooting start time and the frame rate of the video after receiving the shooting start time.
Here, the frame rate of the video may be transmitted together when the image capturing apparatus transmits the video, or may be stored locally in the IVS. Under the condition that the frame rate is locally stored in the IVS, the IVS can correspondingly store the frame rate and the equipment identifier of the image shooting equipment, and the image shooting equipment can carry the equipment identifier of the local machine when sending videos. Correspondingly, the IVS may query the frame rate corresponding to the received device identifier according to the received device identifier and the correspondence between the device identifier and the frame rate.
In addition, when the image capturing apparatus transmits the video and the capturing time information to the IVS, at least one of the capturing location of the video or the apparatus identification of the image capturing apparatus may be transmitted at the same time. Under the condition of sending the equipment identification, the corresponding relation between the equipment identification and the shooting place can be stored in the IVS, and the IVS can determine the corresponding shooting place according to the equipment identification.
In the case where the image capturing apparatus captures a picture:
the image capturing device can directly send the captured picture to the IVS without face recognition, and simultaneously, can also send the capturing time and the capturing place of each picture.
In addition, the shooting location and the shooting time of the picture can be transmitted simultaneously with the transmission of the picture. After receiving the picture sent by the image shooting device, the IVS can perform face recognition on the picture to obtain a face image and a scene image in the picture.
Similarly, according to actual needs, the IVS may perform real-time processing, that is, directly perform face recognition after receiving the data sent by the image capturing device to obtain a face image, or the IVS may store the received data first, and when there is a need, sequentially obtain video frames or pictures according to a capturing time sequence, perform face recognition, and obtain a face image.
It should be noted here that, in both the first method and the second method, the face images are acquired in the order of the shooting time. For example, the shooting time corresponding to the face image acquired later is later than the shooting time corresponding to the face image acquired earlier. These images may be captured by the same camera or different cameras.
Step 202, performing a deduplication operation on the first image and the stored image set, specifically, the deduplication operation may include the following processing:
and selecting at least one image from the first image and the stored image set for storage, and deleting the unselected images. Wherein, the stored image set has one or more images, and the images in the image set and the first image have: the shooting method comprises the steps of shooting the same shot object, shooting the same place and shooting time intervals smaller than a preset threshold value.
The storage location where the image is stored is a storage device, such as a computer, a storage server, or a NAS, a storage cloud, a distributed storage device, or the like. In particular, the stored image may be located in memory or in a non-volatile medium (e.g., hard disk, solid state disk, magnetic tape).
It should be noted that "image collection" is a generic term for one or more images. It does not mean that a structure such as a collection exists in reality, and it does not mean that an executor of this step needs to perform operations such as creating a collection. Of course, for convenience of operation, the images meeting the condition may be managed by creating a set, and the images meeting the same deduplication condition may be divided into the same set.
The deduplication operation may not need to be performed frequently for the purpose of saving computing resources and the like. Therefore, the totality of images that have been received in the past and that meet the deduplication (deduplication) condition may be referred to as an image set. When a new image is received again and a condition for performing deduplication is satisfied, the newly received image and an image that has been stored in the past may be deduplicated. Alternatively, the population of images (i.e., the set of images) in the system that meet the deduplication condition is periodically deduplicated.
In implementation, after the face image is acquired, whether the face image which has the same shooting object and the same shooting place as the currently acquired face image and has the shooting time interval smaller than a preset threshold is stored or not can be judged, and if the face image which meets the above conditions is not stored, an image set including the currently acquired face image is established. The preset threshold may be set according to actual requirements, and may be set between 5 minutes and 10 minutes, such as 10 minutes, for example.
As shown in fig. 3, a plurality of image sets, such as an image set 1, an image set 2, and an image set 3, have been stored, and a face image E obtained currently has a shooting object 4 as a corresponding shooting object, a shooting location b, a shooting time of 2019, 9, month 1, day 10:35, and no face image having the same shooting object and the same shooting location as the face image E and a shooting time interval smaller than a preset threshold (for example, 10 minutes) is stored, it is necessary to establish an image set 4 and add the face image E to the image set 4.
When judging whether the shooting objects which are the same as the currently acquired face image are stored, similarity calculation can be carried out by adopting the face feature data of the currently acquired face image and the face feature data of all or part of the stored face images in each image set, and if the similarity of the face feature data of the target face image obtained by calculation and the face feature data of the currently acquired face image is greater than a preset similarity threshold value, the face image in the image set where the target face image is located and the currently acquired face image can be considered to correspond to the same shooting object. The similarity calculation may be euclidean distance calculation, cosine distance calculation, or the like.
The above-mentioned part of face images may be the face image with the highest quality in the image set, and the quality of the face image is related to the illumination, face angle, etc. of the face image. The quality of the face image can be judged by the following method: after the face image is obtained, inputting a pre-trained machine learning model for analysis to obtain the quality score of the face image, wherein the higher the quality score is, the higher the quality of the face image is. In addition, the quality of the face image can also be represented by quality marks, different quality marks correspond to different quality levels, and the higher the quality level corresponding to the quality mark of the face image is, the higher the quality of the face image is.
In addition, it should be noted that, after the face image is acquired, a pre-trained feature extraction model may be adopted to perform feature extraction on the currently acquired face image to obtain corresponding face feature data, and the face image and the face feature data are stored correspondingly so as to be used when calculating the similarity of the face feature data. In addition, data such as gender, age, quality score and the like corresponding to the currently acquired face image can be identified by adopting a pre-trained machine learning model, and the data and data such as shooting time, shooting location and the like corresponding to the face image can be used as the structural data of the face image together. Correspondingly, the face image, the face feature data and the structured data can be correspondingly stored.
After the face image is acquired, if it is determined that the face image which has the same shooting object as the currently acquired face image, the same shooting location, and the shooting time interval smaller than the preset threshold is stored, the currently acquired face image may be added to the image set where the face image satisfying the above conditions is located.
As shown in fig. 4, a plurality of image sets, such as an image set 1, an image set 2, and an image set 3, have been stored, and a face image E currently acquired has a shooting object 3 as a shooting object, a shooting location b, a shooting time of 2019, 9, month 1, day 10: 40, and the face image D having the same shooting object and the same shooting location as the face image E and having a shooting time interval smaller than a preset threshold (for example, 10 minutes) is stored, and the face image D belongs to the image set 3, the face image E may be added to the image set 3.
In a possible implementation manner, a triggering condition of the deduplication operation may be set, the deduplication operation is performed on the face images in the image set when the triggering condition of the deduplication operation is satisfied, at least one face image is selected to be stored, and the unselected face images are subjected to deletion processing. For convenience of explanation, the face image newly added to the image set is hereinafter referred to as a first face image. The triggering conditions for the deduplication operation may be various, and several of them are listed below for explanation:
the triggering condition of the duplicate removal operation is as follows,
Within a preset time length after the first image is acquired, the face image which has the same shooting object, the same shooting place and the shooting time interval smaller than a preset threshold value as the first face image is not acquired.
For an image set, if the face images having the same shooting objects, the same shooting places and the shooting time intervals smaller than a preset threshold value as the first face image are not acquired within a preset time length after the first face image is acquired, the image set is subjected to deduplication operation. The preset time period may be equal to the preset threshold, for example, the preset threshold is set to 10 minutes, the corresponding preset time period may also be set to 10 minutes, or the preset time period may be set to be slightly greater than the preset threshold.
Triggering conditions of the duplicate removal operation II,
And acquiring the face image which has the same shooting object as the first face image and is at a different shooting position.
In this case, it is described that when the object corresponding to the first face image has moved to a place other than the shooting place corresponding to the image set where the first face image exists, the duplication removal operation can be performed on the image set where the first face image exists.
Triggering conditions of the deduplication operation are three,
And determining that the storage space occupied by the face images in the image set is larger than the target storage value.
The size of the storage space occupied by the face image in each image set can be detected according to a preset detection period, and if the size is larger than a target storage value, the image set can be subjected to duplication removal operation. The target storage value may be set according to actual requirements, and may be set to 300KB to 600KB, for example.
The triggering condition of the duplicate removal operation is four,
And determining that the number of the face images in the image set reaches the target number.
The number of face images in each image set can be detected according to a preset detection period, and if the number of face images in each image set is larger than the preset number, the image set can be subjected to a deduplication operation. The target number may be set according to actual requirements, and for example, may be set to 10 sheets (or 20 sheets), that is: the deduplication is performed every time 10 (or 20) similar images are made. Of course, the target number may also be set to 2, i.e.: and performing duplication elimination operation on the image set every time an image with the same shooting object, the same shooting place and a shooting time interval smaller than a preset threshold value as the first face image in the image set is acquired.
The third trigger condition of the deduplication operation and the fourth trigger condition of the deduplication operation can both reduce the storage pressure of the equipment.
Triggering conditions of the deduplication operation are five,
The image in the storage device is searched for and the image set meeting the deduplication condition (i.e. a plurality of images having the same shooting object, the same shooting location, and a shooting time interval smaller than a preset threshold) is deduplicated at a certain time, for example, 3 am each day.
It should be noted that the triggering conditions of the foregoing deduplication operations, i.e., one, two, and three, or one, two, four, and five, may be used in combination.
In a possible implementation manner, the at least one facial image selected in the deduplication operation is a facial image with the highest quality in the image set.
In implementation, a preset number of face images can be selected for storage, specifically, the preset number can be set according to actual requirements, and can be an integer greater than or equal to 1.
In another possible implementation manner, when the deduplication operation is performed, the shooting time corresponding to the selected face image may be further modified to be the target shooting time period. The starting time in the target shooting time period is the earliest time in the shooting time corresponding to the face image in the image set, and the ending time in the target shooting time period is the latest time in the shooting time corresponding to the face image in the image set.
For example, as shown in fig. 5, a face image X, a face image Y, and a face image Z are included in one image set, where:
a face image X: shooting object 1, shooting place a, shooting time 2020, 9 months, 1 day, 10:00 and quality score of 90;
face image Y: shooting object 1, shooting place a, shooting time 2020, 9 months, 1 day, 10:02, and quality score 87;
a face image Z: shooting object 1, shooting place a, shooting time 2020, 9 months, 1 day, 10:06 and quality score 96.
And judging that the quality score of the face image Z is the highest, storing the face image Z, and deleting the face image X and the face image Y. And, the shooting time corresponding to the face image Z may be modified to a shooting time period, where the start time in the shooting time period is the earliest time among the shooting times corresponding to the face image X, the face image Y, and the face image Z: 10:00 on 1 st 1/9/2020, and the end time in the shooting time period is the latest time among the shooting times corresponding to the face image X, the face image Y, and the face image Z: 9/1/06 in 2020.
In addition, the structured data and the face feature data of the face image which is not selected can be deleted.
In another possible implementation manner, in a case that the triggering condition for the deduplication operation includes a third triggering condition for the deduplication operation or a fourth triggering condition for the deduplication operation, it may occur that the object stays in the same shooting location for a long time, and the image capturing device at the shooting location continuously captures face images, and the face images only need to store face images with the best quality, but due to the third triggering condition for the deduplication operation or the fourth triggering condition for the deduplication operation, the face images are divided into multiple batches for deduplication, so that more face images are stored, and therefore, secondary deduplication may be performed on the stored face images, and accordingly, the processing may be as follows: the method comprises the steps of reserving face images with higher quality in two face images with the same shooting objects, the same shooting places and shooting time intervals smaller than a preset threshold value, deleting the face images with lower quality, modifying the starting time of the shooting time period corresponding to the face images with higher quality to be the earliest shooting time in the shooting time periods corresponding to the two face images, and modifying the ending time to be the latest shooting time in the shooting time periods corresponding to the two face images.
For example, the following face images are stored:
face image 1: shooting an object 1, a shooting place a, a shooting time period of 10:00 in 9 month and 1 day in 2020 and 10:15 in 9 month and 1 day in 2020, and a quality score of 90;
face image 2: shooting an object 1, a shooting place a, a shooting time period of 10: 17-10: 30 in 9/1/2020 and quality score of 85;
face image 3: shooting object 1, shooting place a, shooting time period 2020, 9 month, 1 day 10:35-2020, 9 month, 1 day 10:50, and quality score 95.
Firstly, determining that the shooting objects and shooting places corresponding to the face image 1 and the face image 2 are the same, and the minimum time interval of the corresponding shooting time period is 2 minutes and less than a preset threshold (for example, 10 minutes), and determining that the quality score of the face image 1 is greater than that of the face image 2, storing the face image 1, and deleting the face image 2. And the starting time of the shooting time period corresponding to the face image 1 is modified to be the earliest shooting time in the shooting time periods corresponding to the face image 1 and the face image 2: and (3) in 2020, 9, 1, 10:00, modifying the end time of the shooting time period corresponding to the face image 1 into the latest shooting time in the shooting time periods corresponding to the face image 1 and the face image 2: 9/1/10/30 in 2020. After modification, the related information of the face image 1 is as follows:
face image 1: shooting object 1, shooting place a, shooting time period 2020, 9 month 1 day 10:00-2020, 9 month 1 day 10:30, and quality score 90.
Then, determining that the shooting objects and shooting places corresponding to the modified human face 1 and the human face image 3 are the same, and the minimum time interval of the corresponding shooting time period is 5 minutes and is smaller than the preset threshold, and determining that the quality score of the human face image 3 is larger than the quality score of the human face image 1, then retaining the human face image 3, and deleting the human face image 1. And, the starting time of the shooting time period corresponding to the face image 3 is modified to the earliest shooting time in the shooting time periods corresponding to the face images 1 and 3: and (3) modifying the end time of the shooting time period corresponding to the face image 3 into the latest shooting time in the shooting time periods corresponding to the face image 1 and the face image 3 at 10:00 in 9/2020: 9/1/10/50 in 2020. After modification, the related information of the face image 3 is as follows:
face image 3: shooting object 1, shooting place a, shooting time period 2020, 9 month 1 day 10:00-2020, 9 month 1 day 10:50, and quality score 95.
Therefore, the face image can be further deduplicated through the processing, the purpose that the same object shot in the same shooting place in a short time only retains the face image with the highest quality is achieved, the face image is deduplicated to a greater extent, and the storage space is saved.
Based on the same technical concept, an embodiment of the present application further provides an image storage apparatus, as shown in fig. 6, the apparatus including:
an obtaining module 610, configured to obtain a first image, which may specifically implement the obtaining function mentioned in step 201 above, and other implicit steps;
a deduplication module 620, configured to perform deduplication operations on the first image and the stored image set, specifically to:
selecting at least one image from the first image and a stored image set for saving, wherein the stored image set comprises one or more images, and the images in the image set and the first image have: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value;
the unselected images are deleted. In particular, the deduplication module 620 may implement the deduplication functionality mentioned above for step 202, as well as other implicit steps.
In one possible implementation, the apparatus further includes:
the establishing module 630 is configured to acquire a second image, and if a third image having the same shooting object, the same shooting location, and a shooting time interval smaller than the preset threshold as the second image is not stored, establish an image set including the second image.
In a possible implementation manner, the triggering condition of the deduplication operation includes:
and within a preset time length after the first image is acquired, a fourth face image which has the same shooting object, the same shooting place and a shooting time interval smaller than a preset threshold value as the first face image is not acquired.
In a possible implementation manner, the triggering condition of the deduplication operation includes:
and acquiring a fifth face image which has the same shooting object and a different shooting position with the first face image.
In a possible implementation manner, the triggering condition of the deduplication operation includes:
determining that the number of face images included in the image set is greater than a target number, or,
and determining that the size of the storage space occupied by the face images included in the image set is larger than the target storage value.
In a possible implementation manner, the deduplication module 620 is further configured to:
modifying the shooting time of the selected face image into a target shooting time period, wherein the starting time of the target shooting time period is the earliest time of the shooting times of the images in the image recollection and the first image, and the ending time of the target shooting time period is the latest time of the shooting times of the images in the image recollection and the first image;
and deleting the structural data and the face feature data of the unselected images.
In one possible implementation, the selected image is the highest quality image, e.g., the highest quality one image, or the highest quality two images.
Furthermore, the obtaining module 610 is further configured to obtain, from the storage device, an image in an image set, where the image in the image set and the first image have: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value;
the deduplication module 620 is further configured to perform deduplication operations on the first image and the stored image set, and specifically includes:
selecting an image from the image set for storage;
the unselected images are deleted.
It should be noted that: in the image storage apparatus provided in the above embodiment, only the division of the above functional modules is illustrated when storing an image, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the internal structure of the computer device may be divided into different functional modules to complete all or part of the above described functions. In addition, the image storage device and the image storage method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application, where the computer device may be an IVS in the foregoing method embodiment, and the computer device 700 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 701 and one or more memories 702, where the memory 702 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 701 to implement the method according to the foregoing method embodiment. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any combination thereof, and when the implementation is realized by software, all or part of the implementation may be realized in the form of a computer program product. The computer program product comprises one or more computer program instructions which, when loaded and executed on a device, cause a process or function according to an embodiment of the application to be performed, in whole or in part. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optics, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by the device or a data storage device, such as a server, a data center, etc., that is integrated into one or more available media. The usable medium may be a magnetic medium (such as a floppy Disk, a hard Disk, a magnetic tape, etc.), an optical medium (such as a Digital Video Disk (DVD), etc.), or a semiconductor medium (such as a solid state Disk, etc.).
All or part of the steps of the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.
The above description is only one embodiment of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements, etc. made therein are intended to be included within the scope of the present application.

Claims (18)

1. A method of image storage, the method comprising:
acquiring a first image;
performing a deduplication operation on the first image and the stored image set, specifically including:
selecting at least one image from the first image and a stored image set for saving, wherein the stored image set comprises one or more images, and the images in the image set and the first image have: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value;
the unselected images are deleted.
2. The method of claim 1, further comprising:
acquiring a second image;
and if a third image which has the same shooting object, the same shooting place and a shooting time interval smaller than the preset threshold value as the second image is not stored, establishing an image set comprising the second image.
3. The method of claim 1, wherein the trigger condition for the deduplication operation comprises:
and within a preset time length after the first image is acquired, a fourth face image which has the same shooting object, the same shooting place and a shooting time interval smaller than a preset threshold value as the first face image is not acquired.
4. The method of claim 1, wherein the trigger condition for the deduplication operation comprises:
and acquiring a fifth face image which has the same shooting object and a different shooting position with the first face image.
5. The method of claim 1, wherein the trigger condition for the deduplication operation comprises:
determining that the number of face images included in the image set is greater than a target number, or,
and determining that the size of the storage space occupied by the face images included in the image set is larger than the target storage value.
6. The method according to any one of claims 1-5, further comprising:
modifying the shooting time of the selected face image into a target shooting time period, wherein the starting time of the target shooting time period is the earliest time of the shooting times of the images in the image recollection and the first image, and the ending time of the target shooting time period is the latest time of the shooting times of the images in the image recollection and the first image;
and deleting the structural data and the face feature data of the unselected images.
7. Method according to any of claims 1-6, characterized in that the selected image is the highest quality image.
8. An apparatus for image storage, the apparatus comprising:
an acquisition module for a first image;
a deduplication module, configured to perform deduplication operations on the first image and a stored image set, specifically to:
selecting at least one image from the first image and a stored image set for saving, wherein the stored image set comprises one or more images, and the images in the image set and the first image have: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value;
the unselected images are deleted.
9. The apparatus of claim 8, further comprising:
and the establishing module is used for acquiring a second image, and if a third image which has the same shooting object, the same shooting place and a shooting time interval smaller than the preset threshold value as the second image is not stored, establishing an image set comprising the second image.
10. The apparatus of claim 8, wherein the trigger condition for the deduplication operation comprises:
and within a preset time length after the first image is acquired, a fourth face image which has the same shooting object, the same shooting place and a shooting time interval smaller than a preset threshold value as the first face image is not acquired.
11. The apparatus of claim 8, wherein the trigger condition for the deduplication operation comprises:
and acquiring a fifth face image which has the same shooting object and a different shooting position with the first face image.
12. The apparatus of claim 8, wherein the trigger condition for the deduplication operation comprises:
determining that the number of face images included in the image set is greater than a target number, or,
and determining that the size of the storage space occupied by the face images included in the image set is larger than the target storage value.
13. The apparatus of any of claims 8-12, wherein the deduplication module is further configured to:
modifying the shooting time of the selected face image into a target shooting time period, wherein the starting time of the target shooting time period is the earliest time of the shooting times of the images in the image recollection and the first image, and the ending time of the target shooting time period is the latest time of the shooting times of the images in the image recollection and the first image;
and deleting the structural data and the face feature data of the unselected images.
14. An arrangement according to any of claims 8-13, characterized in that the selected picture is the picture of highest quality.
15. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to perform operations performed by a method of image storage according to any one of claims 1 to 7.
16. A computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to perform operations performed by a method of image storage according to any one of claims 1 to 7.
17. A method of image storage, the method comprising:
acquiring an image in an image set from a storage device, wherein the image in the image set and a first image have: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value;
performing a deduplication operation on the first image and the stored image set, specifically including:
selecting an image from the image set for storage;
the unselected images are deleted.
18. An apparatus for image storage, the apparatus comprising:
an acquisition module configured to acquire, from a storage device, an image of a set of images, the image of the set of images and a first image having: the shooting method comprises the following steps of shooting objects with the same size, shooting places with the same size and shooting time intervals smaller than a preset threshold value;
a deduplication module, configured to perform deduplication operations on the image set, specifically to:
selecting an image from the image set for storage;
the unselected images are deleted.
CN202010968900.0A 2020-09-15 2020-09-15 Image storage method and device, computer equipment and storage medium Pending CN114268730A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010968900.0A CN114268730A (en) 2020-09-15 2020-09-15 Image storage method and device, computer equipment and storage medium
PCT/CN2021/118045 WO2022057773A1 (en) 2020-09-15 2021-09-13 Image storage method and apparatus, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010968900.0A CN114268730A (en) 2020-09-15 2020-09-15 Image storage method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114268730A true CN114268730A (en) 2022-04-01

Family

ID=80776470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010968900.0A Pending CN114268730A (en) 2020-09-15 2020-09-15 Image storage method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114268730A (en)
WO (1) WO2022057773A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117372933A (en) * 2023-12-06 2024-01-09 南京智绘星图信息科技有限公司 Image redundancy removing method and device and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408428B (en) * 2014-11-28 2018-05-15 东莞宇龙通信科技有限公司 A kind of processing method and processing device of same scene photo
CN105205181A (en) * 2015-10-28 2015-12-30 上海斐讯数据通信技术有限公司 Photo management method and management system
CN105760461A (en) * 2016-02-04 2016-07-13 上海卓易科技股份有限公司 Automatic album establishing method and device
CN107832452A (en) * 2017-11-23 2018-03-23 苏州亿科赛卓电子科技有限公司 A kind of photo management method and device
JP2020067966A (en) * 2018-10-26 2020-04-30 株式会社メルカリ Image data management system, image data management method, and image data management program
CN111597363A (en) * 2019-02-21 2020-08-28 奇酷互联网络科技(深圳)有限公司 Method for detecting repeated photos, mobile terminal and device with storage function
CN110046266B (en) * 2019-03-28 2021-11-02 深圳紫晶存储科技有限公司 Intelligent management method and device for photos

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117372933A (en) * 2023-12-06 2024-01-09 南京智绘星图信息科技有限公司 Image redundancy removing method and device and electronic equipment
CN117372933B (en) * 2023-12-06 2024-02-20 南京智绘星图信息科技有限公司 Image redundancy removing method and device and electronic equipment

Also Published As

Publication number Publication date
WO2022057773A1 (en) 2022-03-24

Similar Documents

Publication Publication Date Title
KR101810578B1 (en) Automatic media sharing via shutter click
JP6833842B2 (en) Optimized media fingerprint retention to improve system resource utilization
US20180268205A1 (en) Picture Ranking Method, and Terminal
CN110046266B (en) Intelligent management method and device for photos
WO2021104124A1 (en) Method, apparatus and system for determining confinement pen information, and storage medium
US9665773B2 (en) Searching for events by attendants
CN104216956A (en) Method and device for searching picture information
WO2023173646A1 (en) Expression recognition method and apparatus
CN111241928A (en) Face recognition base optimization method, system, equipment and readable storage medium
CN116229307A (en) Target identification method, system, equipment and storage medium based on frame extraction strategy
CN108540817B (en) Video data processing method, device, server and computer readable storage medium
KR20120051952A (en) Method and apparatus for image searching using feature point
CN114268730A (en) Image storage method and device, computer equipment and storage medium
CN111708906B (en) Visiting retrieval method, device and equipment based on face recognition and storage medium
CN114863364B (en) Security detection method and system based on intelligent video monitoring
CN112257666B (en) Target image content aggregation method, device, equipment and readable storage medium
CN115391596A (en) Video archive generation method and device and storage medium
CN110163043B (en) Face detection method, device, storage medium and electronic device
CN113515986A (en) Video processing method, data processing method and equipment
JP6443144B2 (en) Information output device, information output program, information output method, and information output system
CN110929095A (en) Video abstract playback method and device, electronic equipment and readable storage medium
KR102085036B1 (en) Method and Apparatus for Searching Image by Using Time Reference and Computer-Readable Recording Medium with Program
CN110517252B (en) Video detection method and device
CN110958433B (en) Image uploading method, monitoring device, electronic equipment and storage medium
CN114549290A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination