WO2019137167A1 - Photo album management method and apparatus, storage medium, and electronic device - Google Patents

Photo album management method and apparatus, storage medium, and electronic device Download PDF

Info

Publication number
WO2019137167A1
WO2019137167A1 PCT/CN2018/121981 CN2018121981W WO2019137167A1 WO 2019137167 A1 WO2019137167 A1 WO 2019137167A1 CN 2018121981 W CN2018121981 W CN 2018121981W WO 2019137167 A1 WO2019137167 A1 WO 2019137167A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
album
time
processed
management
Prior art date
Application number
PCT/CN2018/121981
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
刘耀勇
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019137167A1 publication Critical patent/WO2019137167A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • 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
    • 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 present application relates to the field of computer technologies, and in particular, to a photo album management method, apparatus, storage medium, and electronic device.
  • the terminal has a camera so as to be able to support a photographing function and the like.
  • the user can take a photo using the terminal's shooting function. For example, when the user goes to travel or meets with a friend, the scene can be recorded by the terminal's shooting function. At this time, the terminal stores the captured image in the album, so that when the user wants to recall the good time, the album can be taken from the album. View images in .
  • the embodiment of the present invention provides a photo album management method, device, storage medium, and electronic device, which can automatically delete a photo with poor shooting effect in an album, and the method is simple.
  • An embodiment of the present application provides a method for managing a photo album, which is applied to an electronic device, including:
  • the image whose resolution is lower than a preset threshold is deleted to manage the album.
  • the embodiment of the present application further provides an album management device, which is applied to an electronic device, and includes:
  • An obtaining module configured to acquire an image sample set, and a classification mark corresponding to each image sample in the image sample set
  • a training module configured to train the preset learning model according to the image sample set and the classification mark
  • a calculation module configured to calculate a sharpness of at least one image to be processed in the album by using the trained learning model
  • a deleting module configured to delete the image whose resolution is lower than a preset threshold to manage the album.
  • the album management device further includes a determining module, configured to:
  • the determining module is configured to:
  • the determining module is configured to:
  • an image taken in the album during the interval duration is taken as an image to be processed.
  • the deleting module is further configured to:
  • the album management device further includes an adding module, configured to:
  • the acquiring module acquires the image sample set, detecting whether the electronic device currently has a continuous shooting operation;
  • a classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
  • the embodiment of the present application further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to execute any of the foregoing album management methods.
  • the embodiment of the present application further provides an electronic device, including a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used in any one of the foregoing The steps in the album management method described.
  • FIG. 1 is a schematic flowchart of a method for managing a photo album according to an embodiment of the present application.
  • FIG. 2 is another schematic flowchart of a method for managing a photo album according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a scenario of a photo album management process according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of step 204 provided by an embodiment of the present application.
  • FIG. 5 is another schematic flowchart of step 204 provided in the embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an album management apparatus according to an embodiment of the present application.
  • FIG. 7 is another schematic structural diagram of an album management apparatus according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the embodiment of the present application provides a photo album management method, device, storage medium, and electronic device.
  • An album management method is applied to an electronic device, comprising: acquiring an image sample set and a classification mark corresponding to each image sample in the image sample set; and training the preset learning model according to the image sample set and the classification mark; The trained learning model calculates the sharpness of at least one image to be processed in the album; and deletes the image whose resolution is lower than the preset threshold to manage the album.
  • the method before calculating the sharpness of at least one image to be processed in the album by using the trained learning model, the method further includes:
  • the determining the image to be processed from the album according to the current time and the last management time recorded includes:
  • the determining the image to be processed from the album according to the current time and the last management time recorded includes:
  • an image taken in the album during the interval duration is taken as an image to be processed.
  • the method further includes:
  • the classification mark includes unclearness
  • the method before acquiring the image sample set, the method further includes:
  • a classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
  • the learning model is a deep neural network model
  • the training of the preset learning model according to the image sample set and the classification mark includes:
  • Each image sample in the image sample set and its corresponding classification mark are input into a preset depth neural network model to adjust the weight value and the parameter value of each layer of the neural network.
  • FIG. 1 is a schematic flowchart of a method for managing a photo album according to an embodiment of the present application, which is applied to an electronic device, and the specific process may be as follows:
  • the classification mark may include clear and unclear
  • the image sample set may be set by the user, and mainly includes a positive sample and a negative sample.
  • the positive sample is usually an image with better shooting effect, and the corresponding classification mark can be clear.
  • the negative sample is usually an image with poor shooting effect, and the corresponding classification mark can be unclear.
  • the album management method may further include:
  • a classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
  • the electronic device can be added as a negative sample to the image sample set, so that when the image sample set is subsequently used for training, the trained model can be more in line with the user's behavior habit.
  • the learning model may be a Convolutional Neural Network (CNN) model, which is a deep neural network model for processing large images.
  • CNN Convolutional Neural Network
  • the user can input the entire image and its corresponding classification mark into the learning model to adjust the weight value and parameter value of each layer of the neural network in the learning model to optimize and realize the learning model. Training.
  • CNN Convolutional Neural Network
  • the training of the learning model may be performed in the electronic device or in the server.
  • the electronic device When performing in the server, the electronic device only needs to periodically send the image sample set that satisfies the condition to the server, so that The server trains the learning model according to the transmitted image sample set, and periodically updates the trained learning model to the electronic device.
  • the learning model obtained by performing the forward operation on the learning model by using the image sample set ie, training
  • the post model can be used for image sharpness recognition, that is, the probability value of each image to meet the user's clear requirements can be calculated.
  • the image to be processed may be all images in the album, or may be a specified partial image.
  • the acquisition of the image to be processed may be real-time.
  • the user may recognize the image as a to-be-processed image for each time a photo is taken, or may be periodic, for example, the latest photo taken by the user is reached.
  • the electronic device may be triggered to obtain the image to be processed for clarity recognition, that is, before the step 103, the album management method may further include:
  • the current time can be detected in real time, and whether the image to be processed needs to be acquired according to the number of images captured by the user between the current time and the last management time or according to the interval between the current time and the last management time Perform a sharpness recognition operation.
  • step determining an image to be processed from the album according to the current time and the last management time that has been recorded.
  • the preset number may be an artificially set 20 or 15, etc., and each time the electronic device performs album management, the electronic device stores the management time at the time, and calculates the subsequent shooting of the user by using the current management time as a starting point.
  • the number of new photos when the specified number is reached, manages these newly taken photos and repeats the previous operation with the management time as a new starting point.
  • step "determining the image to be processed from the album according to the current time and the last management time recorded” may further include:
  • the image taken in the album during the interval is taken as the image to be processed.
  • the management of the album may be automatically started according to the time periodicity, for example, every preset time period, and the preset duration may be manually set by one month or two months, etc., mainly according to The user's own camera frequency depends on the frequency of the camera, and the preset duration can be shorter.
  • the preset threshold may be an artificially specified 80%, or 70%, etc., and the lower the resolution is, the less the representative image is, and the more the representative image cannot meet the user requirement, the deletion is required.
  • the album management method may further include:
  • the similarity calculation method may be further used to select a photo with repeated shooting content, and for these repeated photos, only the best shooting effect is retained.
  • the one that is, the highest resolution
  • the rest can be deleted to save storage space as much as possible.
  • the album management method provided in this embodiment is applied to an electronic device, and obtains an image sample set and a classification mark corresponding to each image sample in the image sample set, and presets according to the image sample set and the classification mark pair.
  • the learning model is trained, and then the training model is used to calculate the sharpness of at least one image to be processed in the album, and the image whose resolution is lower than the preset threshold is deleted to manage the album, thereby It can automatically delete photos in the album that have poor shooting results, without the need for manual operation by the user.
  • the method is simple, avoiding waste of storage space and strong practicality.
  • a photo album management method is applied to an electronic device, and the specific process may be as follows:
  • the electronic device detects whether there is a continuous shooting operation currently, and if so, acquires a plurality of captured images generated by the continuous shooting operation as a target image.
  • the electronic device generates a classification mark indicating the unclear for the target image, and adds the target image to the image sample set.
  • the classification mark may include both clear and unclear.
  • the image sample set mainly includes a positive sample and a negative sample, the classification mark of the positive sample may be clear, and the classification mark of the negative sample may be unclear.
  • the image sample set may include an image automatically collected by the electronic device according to the user's past deletion record, in addition to the image set by the user, for example, when detecting that the user has taken multiple images in a short time (for example, within ten seconds).
  • the electronic device may add the image that is subsequently deleted by the user in the plurality of images as a negative sample in the image sample set.
  • the electronic device acquires the image sample set, and trains the preset learning model according to the image sample set and the classification mark.
  • the learning model may be a CNN model.
  • the user may input the entire image and its corresponding classification mark into the learning model to adjust the weight value and parameter value of each layer of the neural network in the learning model. To optimize it and achieve training on the learning model.
  • the electronic device acquires the current time and the last management time recorded.
  • the electronic device determines an image to be processed from the album according to the current time and the last management time that has been recorded.
  • the image to be processed may be all images in the album, or may be partial images.
  • the electronic device may acquire the image to be processed in the album in real time for management, or may perform when a certain trigger condition is met, such as reaching a specified time or shooting. A sufficient number of new photos, and so on.
  • the foregoing step 205 may include:
  • step 2052A Determine whether the quantity is not less than a preset quantity. If yes, perform the following step 2053A, and if no, return to performing the above step 204.
  • the image of the shooting time between the current time and the recorded last management time is taken as the image to be processed.
  • the preset number may be an artificially set 20 or 15, etc., and when the number of new photos taken by the user reaches a preset number after the last management operation, the newly taken part of the photo may be managed as a to-be-processed image. .
  • step 205 may include:
  • step 2052B Determine whether the interval duration reaches a preset duration. If yes, perform the following step 2053B. If no, return to step 204 above.
  • the preset duration may be one month or two months set by an artificial one. If the current time reaches the preset duration from the last management operation, the photo in this period may be taken as a to-be-processed image. deal with.
  • the electronic device calculates the sharpness of the image to be processed by using the trained learning model, and at the same time, saves the current time as a management time record, and returns to performing the above step 204.
  • the CNN model obtained by forward processing the CNN model using the image sample set ie, the post-training model
  • image sharpness recognition that is, the probability value (ie, sharpness) at which each image meets the user's clear requirements can be calculated.
  • the electronic device deletes the image whose resolution is lower than a preset threshold, and calculates a similarity between the remaining images in the image to be processed.
  • the electronic device sorts the remaining images with the similarity higher than the preset similarity according to the definition from high to low, and deletes the remaining images after the first position to manage the album.
  • the similarity calculation method can be used to select a photo with repeated shooting content, and for these repeated photos, only the best shooting effect is retained (ie, The one with the highest resolution can be deleted, and the rest can be deleted to save storage space as much as possible.
  • the album management method provided in this embodiment is applied to an electronic device, wherein the electronic device can detect whether there is a continuous shooting operation currently, and if so, acquire a plurality of captured images generated by the continuous shooting operation as a target image.
  • the sharpness is sorted from high to low, and the remaining images after the first position are made.
  • the album is managed, and at the same time, the current time is saved as a management time record, and the operation of acquiring the current time and the recorded last management time is returned, so that the user can select according to the previous selection criteria of the user. Automatically filter out photos with poor shooting results and delete them without manual operation by the user.
  • the method is simple, avoiding waste of storage space and being practical.
  • the embodiment is further described from the perspective of the album management device, and the album management device may be implemented as an independent entity or integrated in an electronic device, such as a terminal.
  • the terminal can include a mobile phone, a tablet computer, a personal computer, and the like.
  • An embodiment of the present application provides a photo album management apparatus, which is applied to an electronic device, and includes:
  • An obtaining module configured to acquire an image sample set, and a classification mark corresponding to each image sample in the image sample set
  • a training module configured to train the preset learning model according to the image sample set and the classification mark
  • a calculation module configured to calculate a sharpness of at least one image to be processed in the album by using the trained learning model
  • a deleting module configured to delete the image whose resolution is lower than a preset threshold to manage the album.
  • the album management device further includes a determining module for:
  • the determining module is configured to:
  • the determining module is configured to:
  • an image taken in the album during the interval duration is taken as an image to be processed.
  • the deleting module is further configured to:
  • the classification mark includes unclear
  • the album management apparatus further includes an adding module for:
  • the acquiring module acquires the image sample set, detecting whether the electronic device currently has a continuous shooting operation;
  • a classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
  • the learning model is a deep neural network model
  • the training module is specifically configured to:
  • Each image sample in the image sample set and its corresponding classification mark are input into a preset depth neural network model to adjust the weight value and the parameter value of each layer of the neural network.
  • FIG. 6 specifically describes an album management apparatus provided by an embodiment of the present application, which is applied to an electronic device.
  • the album management apparatus may include: an obtaining module 10, a training module 20, a computing module 30, and a deleting module 40, where:
  • the obtaining module 10 is configured to acquire an image sample set and a classification mark corresponding to each image sample in the image sample set.
  • the classification mark may include clear and unclear
  • the image sample set may be set by the user, and mainly includes a positive sample and a negative sample.
  • the positive sample is usually an image with better shooting effect, and the corresponding classification mark can be clear.
  • the negative sample is usually an image with poor shooting effect, and the corresponding classification mark can be unclear.
  • the image in the image sample set may be automatically collected according to the user's past deletion record, in addition to the user's own setting, mainly involving a negative sample, that is, please refer to FIG.
  • the management device can also include an add module 50 for:
  • the acquiring module 10 acquires the image sample set, detecting whether the electronic device currently has a continuous shooting operation;
  • a classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
  • the electronic device can be added as a negative sample to the image sample set, so that when the image sample set is subsequently used for training, the trained model can be more in line with the user's behavior habit.
  • the training module 20 is configured to train the preset learning model according to the image sample set and the classification mark.
  • the learning model may be a Convolutional Neural Network (CNN) model, which is a deep neural network model for processing large images.
  • CNN Convolutional Neural Network
  • the user can input the entire image and its corresponding classification mark into the learning model to adjust the weight value and parameter value of each layer of the neural network in the learning model to optimize and realize the learning model. Training.
  • CNN Convolutional Neural Network
  • the training of the learning model may be performed in the electronic device or in the server.
  • the electronic device When performing in the server, the electronic device only needs to periodically send the image sample set that satisfies the condition to the server, so that The server trains the learning model according to the transmitted image sample set, and periodically updates the trained learning model to the electronic device.
  • the calculating module 30 is configured to calculate the sharpness of at least one image to be processed in the album by using the trained learning model.
  • the learning model obtained by performing the forward operation on the learning model by using the image sample set ie, training
  • the post model can be used for image sharpness recognition, that is, the probability value of each image to meet the user's clear requirements can be calculated.
  • the image to be processed may be all images in the album, or may be a specified partial image.
  • the acquisition of the image to be processed may be real-time.
  • the user may recognize the image as a to-be-processed image for each time a photo is taken, or may be periodic, for example, the latest photo taken by the user is reached.
  • the electronic device may be triggered to acquire the image to be processed for clarity recognition, that is, the album management device may further include a determining module 60, configured to:
  • the calculating module 30 calculates the sharpness of at least one image to be processed in the album by using the trained learning model, acquiring the current time and the last management time recorded;
  • the determining module 60 can detect the current time in real time, and determine whether the need is obtained according to the number of images captured by the user between the current time and the last management time, or according to the interval between the current time and the last management time.
  • the image to be processed is subjected to a sharpness recognition operation.
  • determining module 60 is specifically configured to:
  • the preset number may be an artificially set 20 or 15, etc., and each time the electronic device performs album management, the electronic device stores the management time at the time, and calculates the subsequent shooting of the user by using the current management time as a starting point.
  • the number of new photos when the specified number is reached, manages these newly taken photos and repeats the previous operation with the management time as a new starting point.
  • the determining module 60 can further be used to:
  • the image taken in the album during the interval is taken as the image to be processed.
  • the management of the album may be automatically started according to the time periodicity, for example, every preset time period, and the preset duration may be manually set by one month or two months, etc., mainly according to The user's own camera frequency depends on the frequency of the camera, and the preset duration can be shorter.
  • the deleting module 40 is configured to delete the image with the lower resolution than the preset threshold to manage the album.
  • the preset threshold may be an artificially specified 80%, or 70%, etc., and the lower the resolution is, the less the representative image is, and the more the representative image cannot meet the user requirement, the deletion is required.
  • the deleting module 40 can also Used for:
  • the similarity calculation method may be further used to select a photo with repeated shooting content, and for these repeated photos, only the best shooting effect is retained.
  • the one that is, the highest resolution
  • the rest can be deleted to save storage space as much as possible.
  • the foregoing units may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities.
  • the foregoing method embodiments and details are not described herein.
  • the album management apparatus provided in this embodiment is applied to an electronic device, and the acquisition module 10 acquires an image sample set and a classification mark corresponding to each image sample in the image sample set, and the training module 20 according to the image sample set and The classification mark trains the preset learning model, and then the calculation module 30 calculates the sharpness of at least one image to be processed in the album by using the trained learning model, and the deleting module 40 performs the image with the lower definition than the preset threshold.
  • Delete to manage the album so that the photo with bad shooting effect can be automatically deleted in the album, without manual operation by the user, the method is simple, the waste of storage space is avoided, and the utility is strong.
  • the embodiment of the present application further provides an electronic device, which may be a device such as a smart phone or a tablet computer.
  • the electronic device 900 includes a processor 901, a memory 902, a display screen 903, and a control circuit 904.
  • the processor 901 is electrically connected to the memory 902, the display screen 903, and the control circuit 904, respectively.
  • the processor 901 is a control center of the electronic device 900, and connects various parts of the entire electronic device using various interfaces and lines, executes the electronic by running or loading an application stored in the memory 902, and calling data stored in the memory 902.
  • the various functions and processing data of the device enable overall monitoring of the electronic device.
  • the processor 901 in the electronic device 900 loads the instructions corresponding to the process of one or more applications into the memory 902 according to the following steps, and is stored in the memory 902 by the processor 901.
  • the application thus implementing various functions:
  • the image whose resolution is lower than a preset threshold is deleted to manage the album.
  • the processor is further configured to perform: before calculating the sharpness of the at least one image to be processed in the album using the trained learning model:
  • the determining the image to be processed from the album according to the current time and the last management time recorded includes:
  • the determining the image to be processed from the album according to the current time and the last management time recorded includes:
  • an image taken in the album during the interval duration is taken as an image to be processed.
  • the processor is further configured to:
  • the classification mark includes unclearness
  • the processor is further configured to perform: before acquiring the image sample set:
  • a classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
  • the learning model is a deep neural network model
  • the training of the preset learning model according to the image sample set and the classification mark includes:
  • Each image sample in the image sample set and its corresponding classification mark are input into a preset depth neural network model to adjust the weight value and the parameter value of each layer of the neural network.
  • Memory 902 can be used to store applications and data.
  • the application stored in the memory 902 contains instructions executable in the processor.
  • Applications can form various functional modules.
  • the processor 901 executes various functional applications and data processing by running an application stored in the memory 902.
  • the display screen 903 can be used to display information entered by the user or information provided to the user as well as various graphical user interfaces of the terminal, which can be composed of images, text, icons, video, and any combination thereof.
  • the control circuit 904 is electrically connected to the display screen 903 for controlling the display screen 903 to display information.
  • the electronic device 900 further includes a radio frequency circuit 905, an input unit 906, an audio circuit 907, a sensor 908, and a power source 909.
  • the processor 901 is electrically connected to the radio frequency circuit 905, the input unit 906, the audio circuit 907, the sensor 908, and the power source 909, respectively.
  • the radio frequency circuit 905 is used for transmitting and receiving radio frequency signals to establish wireless communication with network devices or other electronic devices through wireless communication, and to transmit and receive signals with network devices or other electronic devices.
  • the input unit 906 can be configured to receive input digits, character information, or user characteristic information (eg, fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function controls.
  • the input unit 906 can include a fingerprint identification module.
  • the audio circuit 907 can provide an audio interface between the user and the terminal through a speaker and a microphone.
  • Electronic device 900 may also include at least one type of sensor 908, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may close the display panel and/or the backlight when the terminal moves to the ear.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the terminal can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • Power source 909 is used to power various components of electronic device 900.
  • the power supply 909 can be logically coupled to the processor 901 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system.
  • the electronic device 900 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored, which can be loaded by a processor to perform the steps in any of the album management methods provided by the embodiments of the present invention.
  • the storage medium may include: a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
  • ROM read only memory
  • RAM random access memory
  • magnetic disk a magnetic disk or an optical disk.
  • the steps in the album management method provided in the embodiment of the present invention can be implemented by using the instructions stored in the storage medium. Therefore, any album management method provided by the embodiment of the present invention can be implemented. For the beneficial effects, see the previous embodiments in detail, and details are not described herein again.

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)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

A photo album management method and apparatus, a storage medium, and an electronic device, the photo album management method comprising: acquiring an image sample set and a classification label corresponding to each image sample in the image sample set; training a preset learning model according to the image sample set and the classification labels; using the trained learning model to calculate the resolution of at least one image to be processed in a photo album; deleting photos having a resolution lower than a preset threshold so as to manage the photo album.

Description

相册管理方法、装置、存储介质及电子设备Album management method, device, storage medium and electronic device
本申请要求于2018年1月10日提交中国专利局、申请号为201810023865.8、发明名称为“相册管理方法、装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201810023865.8, entitled "Photo Album Management Method, Apparatus, Storage Media, and Electronic Equipment", which is filed on January 10, 2018, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种相册管理方法、装置、存储介质及电子设备。The present application relates to the field of computer technologies, and in particular, to a photo album management method, apparatus, storage medium, and electronic device.
背景技术Background technique
随着终端技术的发展,终端所能够支持的功能越来越强大。例如,终端具有摄像头,从而能够支持拍照功能等。With the development of terminal technologies, the functions that terminals can support are becoming more and more powerful. For example, the terminal has a camera so as to be able to support a photographing function and the like.
在很多场景下,用户可以使用终端的拍摄功能拍摄照片。例如,当用户去旅游或者与朋友聚会时,可以通过终端的拍摄功能记录当时的情景,此时,终端会将拍摄的图像存储到相册中,从而当用户想要回忆美好时光时,可以从相册中查看图像。In many scenarios, the user can take a photo using the terminal's shooting function. For example, when the user goes to travel or meets with a friend, the scene can be recorded by the terminal's shooting function. At this time, the terminal stores the captured image in the album, so that when the user wants to recall the good time, the album can be taken from the album. View images in .
但是,由于普通用户的拍照技术并不专业,导致相册中难免存在闭眼、重影、模糊等效果不好的照片,这些照片通常需要用户手动进行整理删除,比较浪费时间精力。However, since the ordinary user's photographing technology is not professional, it is inevitable that there are photos with bad effects such as closed eyes, ghosting, and blurring in the album. These photos usually require manual sorting and deletion by the user, which is a waste of time and effort.
发明内容Summary of the invention
本申请实施例提供一种相册管理方法、装置、存储介质及电子设备,能自动对相册中拍摄效果不佳的照片进行删除,方法简单。The embodiment of the present invention provides a photo album management method, device, storage medium, and electronic device, which can automatically delete a photo with poor shooting effect in an album, and the method is simple.
本申请实施例提供了一种相册管理方法,应用于电子设备,包括:An embodiment of the present application provides a method for managing a photo album, which is applied to an electronic device, including:
获取图像样本集、以及所述图像样本集中每一图像样本对应的分类标记;Obtaining an image sample set and a classification mark corresponding to each image sample in the image sample set;
根据所述图像样本集及分类标记对预设的学习模型进行训练;Performing a training on the preset learning model according to the image sample set and the classification mark;
利用训练后的学习模型计算相册中至少一张待处理图像的清晰度;Using the trained learning model to calculate the sharpness of at least one image to be processed in the album;
将所述清晰度低于预设阈值的图像进行删除,以对所述相册进行管理。The image whose resolution is lower than a preset threshold is deleted to manage the album.
本申请实施例还提供了一种相册管理装置,应用于电子设备,包括:The embodiment of the present application further provides an album management device, which is applied to an electronic device, and includes:
获取模块,用于获取图像样本集、以及所述图像样本集中每一图像样本对应的分类标记;An obtaining module, configured to acquire an image sample set, and a classification mark corresponding to each image sample in the image sample set;
训练模块,用于根据所述图像样本集及分类标记对预设的学习模型进行训练;a training module, configured to train the preset learning model according to the image sample set and the classification mark;
计算模块,用于利用训练后的学习模型计算相册中至少一张待处理图像的清晰度;a calculation module, configured to calculate a sharpness of at least one image to be processed in the album by using the trained learning model;
删除模块,用于将所述清晰度低于预设阈值的图像进行删除,以对所述相册进行管理。And a deleting module, configured to delete the image whose resolution is lower than a preset threshold to manage the album.
进一步地,所述相册管理装置还包括确定模块,用于:Further, the album management device further includes a determining module, configured to:
在所述计算模块利用训练后的学习模型计算相册中至少一张待处理图像的清晰度之前,获取当前时间、以及已记录的上一管理时间;Obtaining a current time and a recorded last management time before the calculating module calculates the sharpness of at least one image to be processed in the album by using the trained learning model;
根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
触发所述计算模块执行所述利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同时将所述当前时间作为管理时间记录保存,并返回执行所述获取当前时间、以及已记录的上一管理时间的操作。Trimming the calculation module to perform the operation of calculating the sharpness of at least one image to be processed in the album by using the trained learning model, while saving the current time as a management time record, and returning to perform the acquisition current time, And the last recorded management time operation.
进一步地,所述确定模块用于:Further, the determining module is configured to:
确定相册中拍摄时间在所述当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album in which the shooting time is between the current time and the last management time recorded;
判断所述数量是否不小于预设数量;Determining whether the quantity is not less than a preset quantity;
若是,则将拍摄时间在所述当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
进一步地,所述确定模块用于:Further, the determining module is configured to:
计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
判断所述间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
若是,则将相册中在所述间隔时长内拍摄的图像作为待处理图像。If so, an image taken in the album during the interval duration is taken as an image to be processed.
进一步地,所述删除模块还用于:Further, the deleting module is further configured to:
计算所述待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
进一步地,所述相册管理装置还包括添加模块,用于:Further, the album management device further includes an adding module, configured to:
在所述获取模块获取图像样本集之前,检测所述电子设备当前是否存在连续拍摄操作;Before the acquiring module acquires the image sample set, detecting whether the electronic device currently has a continuous shooting operation;
若存在,则获取所述连续拍摄操作生成的多张拍摄图像;If yes, acquiring a plurality of captured images generated by the continuous shooting operation;
获取用户从所述多张拍摄图像中删除的拍摄图像,作为目标图像;Acquiring a captured image deleted by the user from the plurality of captured images as a target image;
为所述目标图像生成指示不清晰的分类标记,并将所述目标图像添加到图像样本集中。A classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
本申请实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行上述任一项相册管理方法。The embodiment of the present application further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to execute any of the foregoing album management methods.
本申请实施例还提供了一种电子设备,包括处理器和存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于上述任一项所述的相册管理方法中的步骤。The embodiment of the present application further provides an electronic device, including a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used in any one of the foregoing The steps in the album management method described.
附图说明DRAWINGS
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其它有益效果显而易见。The technical solutions and other advantageous effects of the present application will be apparent from the detailed description of the embodiments of the present application.
图1为本申请实施例提供的相册管理方法的流程示意图。FIG. 1 is a schematic flowchart of a method for managing a photo album according to an embodiment of the present application.
图2为本申请实施例提供的相册管理方法的另一流程示意图。FIG. 2 is another schematic flowchart of a method for managing a photo album according to an embodiment of the present application.
图3为本申请实施例提供的相册管理流程的场景示意图。FIG. 3 is a schematic diagram of a scenario of a photo album management process according to an embodiment of the present application.
图4为本申请实施例提供的步骤204的流程示意图。FIG. 4 is a schematic flowchart of step 204 provided by an embodiment of the present application.
图5为本申请实施例提供的步骤204的另一流程示意图。FIG. 5 is another schematic flowchart of step 204 provided in the embodiment of the present application.
图6为本申请实施例提供的相册管理装置的结构示意图。FIG. 6 is a schematic structural diagram of an album management apparatus according to an embodiment of the present application.
图7为本申请实施例提供的相册管理装置的另一结构示意图。FIG. 7 is another schematic structural diagram of an album management apparatus according to an embodiment of the present application.
图8为本申请实施例提供的电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present application without creative efforts are within the scope of the present application.
本申请实施例提供一种相册管理方法、装置、存储介质及电子设备。The embodiment of the present application provides a photo album management method, device, storage medium, and electronic device.
一种相册管理方法,应用于电子设备,包括:获取图像样本集、以及该图像样本集中每一图像样本对应的分类标记;根据该图像样本集及分类标记对预设的学习模型进行训练;利用训练后的学习模型计算相册中至少一张待处理图像的清晰度;将该清晰度低于预设阈值的图像进行删除,以对该相册进行管理。An album management method is applied to an electronic device, comprising: acquiring an image sample set and a classification mark corresponding to each image sample in the image sample set; and training the preset learning model according to the image sample set and the classification mark; The trained learning model calculates the sharpness of at least one image to be processed in the album; and deletes the image whose resolution is lower than the preset threshold to manage the album.
在一些实施例中,在利用训练后的学习模型计算相册中至少一张待处理图像的清晰度之前,还包括:In some embodiments, before calculating the sharpness of at least one image to be processed in the album by using the trained learning model, the method further includes:
获取当前时间、以及已记录的上一管理时间;Get the current time and the last management time recorded;
根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
执行所述利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同时将所述当前时间作为管理时间记录保存,并返回执行所述获取当前时间、以及已记录的上一管理时间的操作。Performing the operation of calculating the sharpness of at least one image to be processed in the album by using the trained learning model, while saving the current time as a management time record, and returning to perform the acquisition current time and the recorded upper A management time operation.
在一些实施例中,所述根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像,包括:In some embodiments, the determining the image to be processed from the album according to the current time and the last management time recorded includes:
确定相册中拍摄时间在所述当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album in which the shooting time is between the current time and the last management time recorded;
判断所述数量是否不小于预设数量;Determining whether the quantity is not less than a preset quantity;
若是,则将拍摄时间在所述当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
在一些实施例中,所述根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像,包括:In some embodiments, the determining the image to be processed from the album according to the current time and the last management time recorded includes:
计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
判断所述间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
若是,则将相册中在所述间隔时长内拍摄的图像作为待处理图像。If so, an image taken in the album during the interval duration is taken as an image to be processed.
在一些实施例中,在将所述清晰度低于预设阈值的图像进行删除之后,还包括:In some embodiments, after deleting the image whose resolution is lower than a preset threshold, the method further includes:
计算所述待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
在一些实施例中,所述分类标记包括不清晰,在获取图像样本集之前,还包括:In some embodiments, the classification mark includes unclearness, and before acquiring the image sample set, the method further includes:
检测所述电子设备当前是否存在连续拍摄操作;Detecting whether the electronic device currently has a continuous shooting operation;
若存在,则获取所述连续拍摄操作生成的多张拍摄图像;If yes, acquiring a plurality of captured images generated by the continuous shooting operation;
获取用户从所述多张拍摄图像中删除的拍摄图像,作为目标图像;Acquiring a captured image deleted by the user from the plurality of captured images as a target image;
为所述目标图像生成指示不清晰的分类标记,并将所述目标图像添加到图像样本集中。A classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
在一些实施例中,所述学习模型为深度神经网络模型,所述根据所述图像样本集及分类标记对预设的学习模型进行训练,包括:In some embodiments, the learning model is a deep neural network model, and the training of the preset learning model according to the image sample set and the classification mark includes:
将所述图像样本集中的每张图像样本及其对应的分类标记输入预设的深度神经网络模型中,以对每层神经网络的权重值和参数值进行调整。Each image sample in the image sample set and its corresponding classification mark are input into a preset depth neural network model to adjust the weight value and the parameter value of each layer of the neural network.
如图1所示,图1是本申请实施例提供的相册管理方法的流程示意图,其应用于电子设备,具体流程可以如下:As shown in FIG. 1 , FIG. 1 is a schematic flowchart of a method for managing a photo album according to an embodiment of the present application, which is applied to an electronic device, and the specific process may be as follows:
101、获取图像样本集、以及该图像样本集中每一图像样本对应的分类标记。101. Acquire an image sample set and a classification mark corresponding to each image sample in the image sample set.
本实施例中,该分类标记可以包括清晰和不清晰,该图像样本集可以是用户自行设定的,其主要包括正样本和负样本。该正样本通常是拍摄效果较好的图像,对应的分类标记可以为清晰,该负样本通常是拍摄效果不好的图像,对应的分类标记可以为不清晰。需要指出的是,该图像样本集中的图像除了用户自己设定的之外,还可以包括电子设备根据用户以往的删除记录自动收集的,主要涉及负样本,也即,在上述步骤101之前,该相册管理方法还可以包括:In this embodiment, the classification mark may include clear and unclear, and the image sample set may be set by the user, and mainly includes a positive sample and a negative sample. The positive sample is usually an image with better shooting effect, and the corresponding classification mark can be clear. The negative sample is usually an image with poor shooting effect, and the corresponding classification mark can be unclear. It should be noted that the image in the image sample set may be automatically collected according to the user's previous deletion record, in addition to the user's own setting, mainly involving a negative sample, that is, before the above step 101, The album management method may further include:
检测该电子设备当前是否存在连续拍摄操作;Detecting whether the electronic device currently has a continuous shooting operation;
若存在,则获取该连续拍摄操作生成的多张拍摄图像;If yes, acquiring a plurality of captured images generated by the continuous shooting operation;
获取用户从该多张拍摄图像中删除的拍摄图像,作为目标图像;Acquiring a captured image deleted by the user from the plurality of captured images as a target image;
为该目标图像生成指示不清晰的分类标记,并将该目标图像添加到图像样本集中。A classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
本实施例中,当用户连续针对同一事物进行多次拍摄时,正常情况下只会在相册中保留拍摄效果最好,最符合用户要求的一张,其余的则进行删除,此时,电子设备可以将删除的照片作为负样本添加到图像样本集中,从而后续利用该图像样本集进行训练时,训练出的模型能更符合用户的行为习惯。In this embodiment, when the user continuously shoots for the same thing multiple times, under normal circumstances, only the best shooting effect is retained in the album, the one that best meets the user's requirements, and the rest are deleted. At this time, the electronic device The deleted photo can be added as a negative sample to the image sample set, so that when the image sample set is subsequently used for training, the trained model can be more in line with the user's behavior habit.
102、根据该图像样本集及分类标记对预设的学习模型进行训练。102. Train the preset learning model according to the image sample set and the classification mark.
本实施例中,该学习模型可以是卷积神经网络(Convolutional Neural Network,CNN)模型,该CNN模型是一种处理大型图像的深度神经网络模型。在训练过程中,用户可以将整张图像以及其对应的分类标记输入该学习模型中,以对学习模型中每层神经网络的权重值和参数值进行调整,使其最优化,实现对学习模型的训练。In this embodiment, the learning model may be a Convolutional Neural Network (CNN) model, which is a deep neural network model for processing large images. During the training process, the user can input the entire image and its corresponding classification mark into the learning model to adjust the weight value and parameter value of each layer of the neural network in the learning model to optimize and realize the learning model. Training.
需要说明的是,对学习模型的训练可以在电子设备中进行,也可以在服务器中进行,当在服务器中进行时,电子设备只需将满足条件的图像样本集定期发送至服务器即可,以便服务器根据发送的图像样本集训练学习模型,并定期将训练后的学习模型更新至电子设备中。It should be noted that the training of the learning model may be performed in the electronic device or in the server. When performing in the server, the electronic device only needs to periodically send the image sample set that satisfies the condition to the server, so that The server trains the learning model according to the transmitted image sample set, and periodically updates the trained learning model to the electronic device.
103、利用训练后的学习模型计算相册中至少一张待处理图像的清晰度。103. Calculate the sharpness of at least one image to be processed in the album by using the trained learning model.
本实施例中,由于图像样本集中的图像样本是以拍摄效果清不清晰为限定条件设置的负样本和正样本,故利用该图像样本集对学习模型进行前向运算得到的学习模型(也即训练后模型)后续可以用于图像清晰度识别,也即可以计算出每张图像达到用户清晰要求的概率值。该待处理图像可以是相册中的所有图像,也可以是指定的部分图像。In this embodiment, since the image samples in the image sample set are negative samples and positive samples which are set under the condition that the shooting effect is unclear, the learning model obtained by performing the forward operation on the learning model by using the image sample set (ie, training) The post model can be used for image sharpness recognition, that is, the probability value of each image to meet the user's clear requirements can be calculated. The image to be processed may be all images in the album, or may be a specified partial image.
需要指出的是,该待处理图像的获取可以是实时性的,比如用户每拍摄一张照片就将其作为待处理图像进行清晰度识别,也可以是周期性的,比如用户最新拍摄的照片达到一定数量,或者当前时间达到指定时间时,可以触发电子设备获取待处理图像进行清晰度识别,也即,在上述步骤103之前,该相册管理方法还可以包括:It should be noted that the acquisition of the image to be processed may be real-time. For example, the user may recognize the image as a to-be-processed image for each time a photo is taken, or may be periodic, for example, the latest photo taken by the user is reached. When the number of times, or the current time reaches the specified time, the electronic device may be triggered to obtain the image to be processed for clarity recognition, that is, before the step 103, the album management method may further include:
获取当前时间、以及已记录的上一管理时间;Get the current time and the last management time recorded;
根据该当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
执行该利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同时将该当前时间作为管理时间记录保存,并返回执行该获取当前时间、以及已记录的上一管理时间的操作。Performing the operation of calculating the sharpness of at least one image to be processed in the album by using the learned learning model, and saving the current time as the management time record, and returning to perform the acquisition current time and the recorded last management time Operation.
本实施例中,可以实时检测当前时间,并根据用户在当前时间和上一管理时间之间拍摄的图像数量,或者根据当前时间和上一管理时间之间的间隔时长确定是否需要获取待处理图像进行清晰度识别操作。In this embodiment, the current time can be detected in real time, and whether the image to be processed needs to be acquired according to the number of images captured by the user between the current time and the last management time or according to the interval between the current time and the last management time Perform a sharpness recognition operation.
进一步地,上述步骤“根据该当前时间、以及已记录的上一管理时间从相册中确定待处理图像”,具体可以包括:Further, the foregoing step, "determining an image to be processed from the album according to the current time and the last management time that has been recorded" may specifically include:
确定相册中拍摄时间在该当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album between the current time and the last management time recorded;
判断该数量是否不小于预设数量;Determine whether the quantity is not less than the preset quantity;
若是,则将拍摄时间在该当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
本实施例中,该预设数量可以是人为设定的20或15等,电子设备在每次进行相册管理之后,都会记录保存当时的管理时间,并以当前管理时间为起点计算用户后续拍摄的新照片数量,当到达指定数量时,就对这些新拍摄的照片进行管理,并将管理时间作为新起点重复之前的操作。In this embodiment, the preset number may be an artificially set 20 or 15, etc., and each time the electronic device performs album management, the electronic device stores the management time at the time, and calculates the subsequent shooting of the user by using the current management time as a starting point. The number of new photos, when the specified number is reached, manages these newly taken photos and repeats the previous operation with the management time as a new starting point.
或者,上述步骤“根据该当前时间、以及已记录的上一管理时间从相册中确定待处理图像”,进一步可以包括:Alternatively, the above step "determining the image to be processed from the album according to the current time and the last management time recorded" may further include:
计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
判断该间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
若是,则将相册中在该间隔时长内拍摄的图像作为待处理图像。If so, the image taken in the album during the interval is taken as the image to be processed.
本实施例中,对相册进行管理也可以是根据时间周期性自动出发的,比如每隔预设时长就触发一次,该预设时长可以是人为设定的一个月或两个月等,主要根据用户自身拍照频率而定,拍照频率越高,该预设时长可以越短。In this embodiment, the management of the album may be automatically started according to the time periodicity, for example, every preset time period, and the preset duration may be manually set by one month or two months, etc., mainly according to The user's own camera frequency depends on the frequency of the camera, and the preset duration can be shorter.
104、将该清晰度低于预设阈值的图像进行删除,以对该相册进行管理。104. Delete an image whose resolution is lower than a preset threshold to manage the album.
本实施例中,该预设阈值可以是人为规定的80%,或70%等,清晰度越低于该预设阈值,代表图像越不能达到用户要求,需要删除。In this embodiment, the preset threshold may be an artificially specified 80%, or 70%, etc., and the lower the resolution is, the less the representative image is, and the more the representative image cannot meet the user requirement, the deletion is required.
此外,由于很多用户经常会连续拍摄多张照片,虽然这些照片的清晰度可能不一样,但通常都是针对同一拍摄物拍摄的,若在对待处理图像进行处理的过程中,将满足清晰度的照片全部保留,难免会存在多张内容重复的照片,造成了电子设备存储空间的不必要浪费,也即,在上述步骤104之后,该相册管理方法还可以包括:In addition, since many users often take multiple photos in succession, although the resolution of these photos may be different, they are usually shot for the same subject. If the image to be processed is processed, the resolution will be satisfied. If the photos are all retained, it is inevitable that there will be multiple duplicate photos, which may cause unnecessary waste of the storage space of the electronic device. That is, after the above step 104, the album management method may further include:
计算该待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
本实施例中,对于筛选出的拍摄效果满足用户要求的待处理图像,可以进一步通过相似度计算的方法从中挑选出拍摄内容重复的照片,而对于这些重复的照片,只需保留拍摄效果最好(也即清晰度最高)的那张即可,其余的可以删除,从而尽可能节省存储空间。In this embodiment, for the image to be processed that the selected shooting effect meets the requirements of the user, the similarity calculation method may be further used to select a photo with repeated shooting content, and for these repeated photos, only the best shooting effect is retained. The one (that is, the highest resolution) can be deleted, and the rest can be deleted to save storage space as much as possible.
由上述可知,本实施例提供的相册管理方法,应用于电子设备,通过获取图像样本集、以及该图像样本集中每一图像样本对应的分类标记,并根据该图像样本集及分类标记对预设的学习模型进行训练,之后,利用训练后的学习模型计算相册中至少一张待处理图像的清晰度,并将该清晰度低于预设阈值的图像进行删除,以对该相册进行管理,从而能自动删除相册中拍摄效果不好的照片,无需用户手动操作,方法简单,避免了存储空间的浪费,实用性强。It can be seen from the above that the album management method provided in this embodiment is applied to an electronic device, and obtains an image sample set and a classification mark corresponding to each image sample in the image sample set, and presets according to the image sample set and the classification mark pair. The learning model is trained, and then the training model is used to calculate the sharpness of at least one image to be processed in the album, and the image whose resolution is lower than the preset threshold is deleted to manage the album, thereby It can automatically delete photos in the album that have poor shooting results, without the need for manual operation by the user. The method is simple, avoiding waste of storage space and strong practicality.
在本实施例中,将从相册管理装置的角度进行描述,具体将以该相册管理装置集成在电子设备中为例进行详细说明。In this embodiment, the description will be made from the perspective of the album management apparatus, and the integration of the album management apparatus in the electronic device will be specifically described as an example.
请参见图2和图3,一种相册管理方法,应用于电子设备,具体流程可以如下:Referring to FIG. 2 and FIG. 3, a photo album management method is applied to an electronic device, and the specific process may be as follows:
201、电子设备检测当前是否存在连续拍摄操作,若存在,则获取该连续拍摄操作生成的多张拍摄图像,作为目标图像。201. The electronic device detects whether there is a continuous shooting operation currently, and if so, acquires a plurality of captured images generated by the continuous shooting operation as a target image.
202、电子设备为该目标图像生成指示不清晰的分类标记,并将该目标图像添加到图像样本集中。202. The electronic device generates a classification mark indicating the unclear for the target image, and adds the target image to the image sample set.
譬如,该分类标记可以包括清晰和不清晰两种,该图像样本集主要包括正样本和负样本,该正样本的分类标记可以是清晰,该负样本的分类标记可以是不清晰。该图像样本集中除了用户自己设定的图像之外,还可以包括电子设备根据用户以往的删除记录自动收集的图像,比如,当检测到短时间内(比如十秒内)用户拍摄了多张图像时,电子设备可以将这多张图像中用户后续删除的图像作为负样本添加在图像样本集中。For example, the classification mark may include both clear and unclear. The image sample set mainly includes a positive sample and a negative sample, the classification mark of the positive sample may be clear, and the classification mark of the negative sample may be unclear. The image sample set may include an image automatically collected by the electronic device according to the user's past deletion record, in addition to the image set by the user, for example, when detecting that the user has taken multiple images in a short time (for example, within ten seconds). The electronic device may add the image that is subsequently deleted by the user in the plurality of images as a negative sample in the image sample set.
203、电子设备获取该图像样本集,并根据该图像样本集及分类标记对预设的学习模型进行训练。203. The electronic device acquires the image sample set, and trains the preset learning model according to the image sample set and the classification mark.
譬如,该学习模型可以是CNN模型,在训练过程中,用户可以将整张图像以及其对应的分类标记输入该学习模型中,以对学习模型中每层神经网络的权重值和参数值进行调整,使其最优化,实现对学习模型的训练。For example, the learning model may be a CNN model. During the training process, the user may input the entire image and its corresponding classification mark into the learning model to adjust the weight value and parameter value of each layer of the neural network in the learning model. To optimize it and achieve training on the learning model.
204、电子设备获取当前时间、以及已记录的上一管理时间。204. The electronic device acquires the current time and the last management time recorded.
205、电子设备根据该当前时间、以及已记录的上一管理时间从相册中确定待处理图像。205. The electronic device determines an image to be processed from the album according to the current time and the last management time that has been recorded.
譬如,该待处理图像可以是相册中的全部图像,也可以是部分图像,电子设备可以实时获取相册中的待处理图像进行管理,也可以在满足一定触发条件时进行,比如到达指定时间或者拍摄足够数量的新照片,等等。For example, the image to be processed may be all images in the album, or may be partial images. The electronic device may acquire the image to be processed in the album in real time for management, or may perform when a certain trigger condition is met, such as reaching a specified time or shooting. A sufficient number of new photos, and so on.
例如,请参见图4,当该触发条件为到达指定时间时,上述步骤205可以包括:For example, referring to FIG. 4, when the trigger condition is that the specified time is reached, the foregoing step 205 may include:
2051A、确定相册中拍摄时间在该当前时间与已记录的上一管理时间之间的图像的数量;2051A. Determine a number of images in the album in which the shooting time is between the current time and the last management time recorded;
2052A、判断该数量是否不小于预设数量,若是,则执行下述步骤2053A,若否,则返回执行上述步骤204。2052A. Determine whether the quantity is not less than a preset quantity. If yes, perform the following step 2053A, and if no, return to performing the above step 204.
2053A、将拍摄时间在该当前时间与已记录的上一管理时间之间的图像作为待处理图像。2053A. The image of the shooting time between the current time and the recorded last management time is taken as the image to be processed.
譬如,该预设数量可以是人为设定的20或15等,当距离上次管理操作之后用户拍摄的新照片数量达到预设数量时,可以将新拍摄的这部分照片作为待处理图像进行管理。For example, the preset number may be an artificially set 20 or 15, etc., and when the number of new photos taken by the user reaches a preset number after the last management operation, the newly taken part of the photo may be managed as a to-be-processed image. .
例如,请参见图5,当该触发条件为拍摄足够数量的新照片时,上述步骤205可以包括:For example, referring to FIG. 5, when the trigger condition is to take a sufficient number of new photos, the above step 205 may include:
2051B、计算当前时间与已记录的上一管理时间之间的间隔时长;2051B. Calculate the interval between the current time and the recorded last management time;
2052B、判断该间隔时长是否到达预设时长,若是,则执行下述步骤2053B,若否,则返回执行上述步骤204。2052B. Determine whether the interval duration reaches a preset duration. If yes, perform the following step 2053B. If no, return to step 204 above.
2053B、将相册中在该间隔时长内拍摄的图像作为待处理图像。2053B: The image taken in the album during the interval duration is taken as an image to be processed.
譬如,该预设时长可以是人为设定的一个月或两个月等,若当前时间距离上次管理操作的时间达到了预设时长,则可以将这段时间内的照片作为待处理图像进行处理。For example, the preset duration may be one month or two months set by an artificial one. If the current time reaches the preset duration from the last management operation, the photo in this period may be taken as a to-be-processed image. deal with.
206、电子设备利用训练后的学习模型计算该待处理图像的清晰度,与此同时,将该当前时间作为管理时间记录保存,并返回执行上述步骤204。206. The electronic device calculates the sharpness of the image to be processed by using the trained learning model, and at the same time, saves the current time as a management time record, and returns to performing the above step 204.
譬如,由于图像样本集中的图像样本是以拍摄效果清不清晰为限定条件设置的负样本和正样本,故利用该图像样本集对CNN模型进行前向运算得到的CNN模型(也即训练后模型)后续可以用于图像清晰度识别,也即可以计算出每张图像达到用户清晰要求的概率值(也即清晰度)。For example, since the image samples in the image sample set are negative samples and positive samples set with the unclear shooting effect, the CNN model obtained by forward processing the CNN model using the image sample set (ie, the post-training model) is used. Subsequent use can be used for image sharpness recognition, that is, the probability value (ie, sharpness) at which each image meets the user's clear requirements can be calculated.
207、电子设备将该清晰度低于预设阈值的图像进行删除,并计算该待处理图像中剩余图像彼此间的相似度。207. The electronic device deletes the image whose resolution is lower than a preset threshold, and calculates a similarity between the remaining images in the image to be processed.
208、电子设备将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序,并将位于首位之后的剩余图像进行删除,以对该相册进行管理。208. The electronic device sorts the remaining images with the similarity higher than the preset similarity according to the definition from high to low, and deletes the remaining images after the first position to manage the album.
譬如,对于筛选出的拍摄效果满足用户要求的待处理图像,可以进一步通过相似度计算的方法从中挑选出拍摄内容重复的照片,而对于这些重复的照片,只需保留拍摄效果最好(也即清晰度最高)的那张即可,其余的可以删除,从而尽可能节省存储空间。For example, for the selected image to be processed that meets the user's requirements, the similarity calculation method can be used to select a photo with repeated shooting content, and for these repeated photos, only the best shooting effect is retained (ie, The one with the highest resolution can be deleted, and the rest can be deleted to save storage space as much as possible.
由上述可知,本实施例提供的相册管理方法,应用于电子设备,其中电子设备可以检测当前是否存在连续拍摄操作,若存在,则获取该连续拍摄操作生成的多张拍摄图像,作为目标图像,接着,为该目标图像生成指示不清晰的分类标记,并将该目标图像添加到图像样本集中,接着,获取该图像样本集,并根据该图像样本集及分类标记对预设的学习模型进行训练,接着,获取当前时间、以及已记录的上一管理时间,并根据该当前时间、以及已记录的上一管理时间从相册中确定待处理图像,之后,利用训练后的学习模型计算该待处理图像的清晰度,接着,将该清晰度低于预设阈值的图像进行删除,并计算该待处理图像中剩余图像彼此间的相似度,之后将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序,并将位于首位之后的剩余图像进行删除,以对该相册进行管理,与此同时,将该当前时间作为管理时间记录保存,并返回执行获取当前时间、以及已记录的上一管理时间的操作,从而能根据用户以往的选择标准,自动筛选出拍摄效果不好的照片并进行删除,无需用户手动操作,方法简单,避免了存储空间的浪费,实用性强。It can be seen from the above that the album management method provided in this embodiment is applied to an electronic device, wherein the electronic device can detect whether there is a continuous shooting operation currently, and if so, acquire a plurality of captured images generated by the continuous shooting operation as a target image. Next, generating a classification mark indicating the unclearness for the target image, and adding the target image to the image sample set, and then acquiring the image sample set, and training the preset learning model according to the image sample set and the classification mark Then, obtaining the current time and the last management time recorded, and determining the image to be processed from the album according to the current time and the last management time recorded, and then calculating the to-be-processed by using the trained learning model The sharpness of the image is then deleted, and the image with the lower resolution than the preset threshold is deleted, and the similarity between the remaining images in the image to be processed is calculated, and then the remaining images with the similarity higher than the preset similarity are followed. The sharpness is sorted from high to low, and the remaining images after the first position are made. In addition, the album is managed, and at the same time, the current time is saved as a management time record, and the operation of acquiring the current time and the recorded last management time is returned, so that the user can select according to the previous selection criteria of the user. Automatically filter out photos with poor shooting results and delete them without manual operation by the user. The method is simple, avoiding waste of storage space and being practical.
根据上述实施例所描述的方法,本实施例将从相册管理装置的角度进一步进行描述,该相册管理装置具体可以作为独立的实体来实现,也可以集成在电子设备,比如终端中来实现,该终端可以包括手机、平板电脑以及个人计算机等。According to the method described in the foregoing embodiment, the embodiment is further described from the perspective of the album management device, and the album management device may be implemented as an independent entity or integrated in an electronic device, such as a terminal. The terminal can include a mobile phone, a tablet computer, a personal computer, and the like.
本申请实施例提供一种相册管理装置,应用于电子设备,其包括:An embodiment of the present application provides a photo album management apparatus, which is applied to an electronic device, and includes:
获取模块,用于获取图像样本集、以及所述图像样本集中每一图像样本对应的分类标 记;An obtaining module, configured to acquire an image sample set, and a classification mark corresponding to each image sample in the image sample set;
训练模块,用于根据所述图像样本集及分类标记对预设的学习模型进行训练;a training module, configured to train the preset learning model according to the image sample set and the classification mark;
计算模块,用于利用训练后的学习模型计算相册中至少一张待处理图像的清晰度;a calculation module, configured to calculate a sharpness of at least one image to be processed in the album by using the trained learning model;
删除模块,用于将所述清晰度低于预设阈值的图像进行删除,以对所述相册进行管理。And a deleting module, configured to delete the image whose resolution is lower than a preset threshold to manage the album.
在一些实施例中,所述相册管理装置还包括确定模块,用于:In some embodiments, the album management device further includes a determining module for:
在所述计算模块利用训练后的学习模型计算相册中至少一张待处理图像的清晰度之前,获取当前时间、以及已记录的上一管理时间;Obtaining a current time and a recorded last management time before the calculating module calculates the sharpness of at least one image to be processed in the album by using the trained learning model;
根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
触发所述计算模块执行所述利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同时将所述当前时间作为管理时间记录保存,并返回执行所述获取当前时间、以及已记录的上一管理时间的操作。Trimming the calculation module to perform the operation of calculating the sharpness of at least one image to be processed in the album by using the trained learning model, while saving the current time as a management time record, and returning to perform the acquisition current time, And the last recorded management time operation.
在一些实施例中,所述确定模块用于:In some embodiments, the determining module is configured to:
确定相册中拍摄时间在所述当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album in which the shooting time is between the current time and the last management time recorded;
判断所述数量是否不小于预设数量;Determining whether the quantity is not less than a preset quantity;
若是,则将拍摄时间在所述当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
在一些实施例中,所述确定模块用于:In some embodiments, the determining module is configured to:
计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
判断所述间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
若是,则将相册中在所述间隔时长内拍摄的图像作为待处理图像。If so, an image taken in the album during the interval duration is taken as an image to be processed.
在一些实施例中,在将所述清晰度低于预设阈值的图像进行删除之后,所述删除模块还用于:In some embodiments, after deleting the image whose resolution is lower than a preset threshold, the deleting module is further configured to:
计算所述待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
在一些实施例中,所述分类标记包括不清晰,所述相册管理装置还包括添加模块,用于:In some embodiments, the classification mark includes unclear, and the album management apparatus further includes an adding module for:
在所述获取模块获取图像样本集之前,检测所述电子设备当前是否存在连续拍摄操作;Before the acquiring module acquires the image sample set, detecting whether the electronic device currently has a continuous shooting operation;
若存在,则获取所述连续拍摄操作生成的多张拍摄图像;If yes, acquiring a plurality of captured images generated by the continuous shooting operation;
获取用户从所述多张拍摄图像中删除的拍摄图像,作为目标图像;Acquiring a captured image deleted by the user from the plurality of captured images as a target image;
为所述目标图像生成指示不清晰的分类标记,并将所述目标图像添加到图像样本集中。A classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
在一些实施例中,所述学习模型为深度神经网络模型,所述训练模块具体用于:In some embodiments, the learning model is a deep neural network model, and the training module is specifically configured to:
将所述图像样本集中的每张图像样本及其对应的分类标记输入预设的深度神经网络模型中,以对每层神经网络的权重值和参数值进行调整。Each image sample in the image sample set and its corresponding classification mark are input into a preset depth neural network model to adjust the weight value and the parameter value of each layer of the neural network.
请参阅图6,图6具体描述了本申请实施例提供的相册管理装置,应用于电子设备,该相册管理装置可以包括:获取模块10、训练模块20、计算模块30和删除模块40,其中:Referring to FIG. 6 , FIG. 6 specifically describes an album management apparatus provided by an embodiment of the present application, which is applied to an electronic device. The album management apparatus may include: an obtaining module 10, a training module 20, a computing module 30, and a deleting module 40, where:
(1)获取模块10(1) Acquisition module 10
获取模块10,用于获取图像样本集、以及该图像样本集中每一图像样本对应的分类标记。The obtaining module 10 is configured to acquire an image sample set and a classification mark corresponding to each image sample in the image sample set.
本实施例中,该分类标记可以包括清晰和不清晰,该图像样本集可以是用户自行设定的,其主要包括正样本和负样本。该正样本通常是拍摄效果较好的图像,对应的分类标记可以为清晰,该负样本通常是拍摄效果不好的图像,对应的分类标记可以为不清晰。需要指出的是,该图像样本集中的图像除了用户自己设定的之外,还可以包括电子设备根据用户以往的删除记录自动收集的,主要涉及负样本,也即,请参见图7,该相册管理装置还 可以包括添加模块50,用于:In this embodiment, the classification mark may include clear and unclear, and the image sample set may be set by the user, and mainly includes a positive sample and a negative sample. The positive sample is usually an image with better shooting effect, and the corresponding classification mark can be clear. The negative sample is usually an image with poor shooting effect, and the corresponding classification mark can be unclear. It should be noted that the image in the image sample set may be automatically collected according to the user's past deletion record, in addition to the user's own setting, mainly involving a negative sample, that is, please refer to FIG. The management device can also include an add module 50 for:
在该获取模块10获取图像样本集之前,检测该电子设备当前是否存在连续拍摄操作;Before the acquiring module 10 acquires the image sample set, detecting whether the electronic device currently has a continuous shooting operation;
若存在,则获取该连续拍摄操作生成的多张拍摄图像;If yes, acquiring a plurality of captured images generated by the continuous shooting operation;
获取用户从该多张拍摄图像中删除的拍摄图像,作为目标图像;Acquiring a captured image deleted by the user from the plurality of captured images as a target image;
为该目标图像生成指示不清晰的分类标记,并将该目标图像添加到图像样本集中。A classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
本实施例中,当用户连续针对同一事物进行多次拍摄时,正常情况下只会在相册中保留拍摄效果最好,最符合用户要求的一张,其余的则进行删除,此时,电子设备可以将删除的照片作为负样本添加到图像样本集中,从而后续利用该图像样本集进行训练时,训练出的模型能更符合用户的行为习惯。In this embodiment, when the user continuously shoots for the same thing multiple times, under normal circumstances, only the best shooting effect is retained in the album, the one that best meets the user's requirements, and the rest are deleted. At this time, the electronic device The deleted photo can be added as a negative sample to the image sample set, so that when the image sample set is subsequently used for training, the trained model can be more in line with the user's behavior habit.
(2)训练模块20(2) Training module 20
训练模块20,用于根据该图像样本集及分类标记对预设的学习模型进行训练。The training module 20 is configured to train the preset learning model according to the image sample set and the classification mark.
本实施例中,该学习模型可以是卷积神经网络(Convolutional Neural Network,CNN)模型,该CNN模型是一种处理大型图像的深度神经网络模型。在训练过程中,用户可以将整张图像以及其对应的分类标记输入该学习模型中,以对学习模型中每层神经网络的权重值和参数值进行调整,使其最优化,实现对学习模型的训练。In this embodiment, the learning model may be a Convolutional Neural Network (CNN) model, which is a deep neural network model for processing large images. During the training process, the user can input the entire image and its corresponding classification mark into the learning model to adjust the weight value and parameter value of each layer of the neural network in the learning model to optimize and realize the learning model. Training.
需要说明的是,对学习模型的训练可以在电子设备中进行,也可以在服务器中进行,当在服务器中进行时,电子设备只需将满足条件的图像样本集定期发送至服务器即可,以便服务器根据发送的图像样本集训练学习模型,并定期将训练后的学习模型更新至电子设备中。It should be noted that the training of the learning model may be performed in the electronic device or in the server. When performing in the server, the electronic device only needs to periodically send the image sample set that satisfies the condition to the server, so that The server trains the learning model according to the transmitted image sample set, and periodically updates the trained learning model to the electronic device.
(3)计算模块30(3) Calculation module 30
计算模块30,用于利用训练后的学习模型计算相册中至少一张待处理图像的清晰度。The calculating module 30 is configured to calculate the sharpness of at least one image to be processed in the album by using the trained learning model.
本实施例中,由于图像样本集中的图像样本是以拍摄效果清不清晰为限定条件设置的负样本和正样本,故利用该图像样本集对学习模型进行前向运算得到的学习模型(也即训练后模型)后续可以用于图像清晰度识别,也即可以计算出每张图像达到用户清晰要求的概率值。该待处理图像可以是相册中的所有图像,也可以是指定的部分图像。In this embodiment, since the image samples in the image sample set are negative samples and positive samples which are set under the condition that the shooting effect is unclear, the learning model obtained by performing the forward operation on the learning model by using the image sample set (ie, training) The post model can be used for image sharpness recognition, that is, the probability value of each image to meet the user's clear requirements can be calculated. The image to be processed may be all images in the album, or may be a specified partial image.
需要指出的是,该待处理图像的获取可以是实时性的,比如用户每拍摄一张照片就将其作为待处理图像进行清晰度识别,也可以是周期性的,比如用户最新拍摄的照片达到一定数量,或者当前时间达到指定时间时,可以触发电子设备获取待处理图像进行清晰度识别,也即,该相册管理装置还可以包括确定模块60,用于:It should be noted that the acquisition of the image to be processed may be real-time. For example, the user may recognize the image as a to-be-processed image for each time a photo is taken, or may be periodic, for example, the latest photo taken by the user is reached. A certain number, or when the current time reaches the specified time, the electronic device may be triggered to acquire the image to be processed for clarity recognition, that is, the album management device may further include a determining module 60, configured to:
在该计算模块30利用训练后的学习模型计算相册中至少一张待处理图像的清晰度之前,获取当前时间、以及已记录的上一管理时间;Before the calculating module 30 calculates the sharpness of at least one image to be processed in the album by using the trained learning model, acquiring the current time and the last management time recorded;
根据该当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
触发该计算模块执行该利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同时将该当前时间作为管理时间记录保存,并返回执行该获取当前时间、以及已记录的上一管理时间的操作。Trimming the calculation module to perform the operation of calculating the sharpness of at least one image to be processed in the album by using the trained learning model, while saving the current time as a management time record, and returning to perform the acquisition current time and the recorded The last administrative time operation.
本实施例中,确定模块60可以实时检测当前时间,并根据用户在当前时间和上一管理时间之间拍摄的图像数量,或者根据当前时间和上一管理时间之间的间隔时长确定是否需要获取待处理图像进行清晰度识别操作。In this embodiment, the determining module 60 can detect the current time in real time, and determine whether the need is obtained according to the number of images captured by the user between the current time and the last management time, or according to the interval between the current time and the last management time. The image to be processed is subjected to a sharpness recognition operation.
进一步地,该确定模块60具体可以用于:Further, the determining module 60 is specifically configured to:
确定相册中拍摄时间在该当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album between the current time and the last management time recorded;
判断该数量是否不小于预设数量;Determine whether the quantity is not less than the preset quantity;
若是,则将拍摄时间在该当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
本实施例中,该预设数量可以是人为设定的20或15等,电子设备在每次进行相册管 理之后,都会记录保存当时的管理时间,并以当前管理时间为起点计算用户后续拍摄的新照片数量,当到达指定数量时,就对这些新拍摄的照片进行管理,并将管理时间作为新起点重复之前的操作。In this embodiment, the preset number may be an artificially set 20 or 15, etc., and each time the electronic device performs album management, the electronic device stores the management time at the time, and calculates the subsequent shooting of the user by using the current management time as a starting point. The number of new photos, when the specified number is reached, manages these newly taken photos and repeats the previous operation with the management time as a new starting point.
或者,该确定模块60进一步可以用于:Alternatively, the determining module 60 can further be used to:
计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
判断该间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
若是,则将相册中在该间隔时长内拍摄的图像作为待处理图像。If so, the image taken in the album during the interval is taken as the image to be processed.
本实施例中,对相册进行管理也可以是根据时间周期性自动出发的,比如每隔预设时长就触发一次,该预设时长可以是人为设定的一个月或两个月等,主要根据用户自身拍照频率而定,拍照频率越高,该预设时长可以越短。In this embodiment, the management of the album may be automatically started according to the time periodicity, for example, every preset time period, and the preset duration may be manually set by one month or two months, etc., mainly according to The user's own camera frequency depends on the frequency of the camera, and the preset duration can be shorter.
(4)删除模块40(4) Delete module 40
删除模块40,用于将该清晰度低于预设阈值的图像进行删除,以对该相册进行管理。The deleting module 40 is configured to delete the image with the lower resolution than the preset threshold to manage the album.
本实施例中,该预设阈值可以是人为规定的80%,或70%等,清晰度越低于该预设阈值,代表图像越不能达到用户要求,需要删除。In this embodiment, the preset threshold may be an artificially specified 80%, or 70%, etc., and the lower the resolution is, the less the representative image is, and the more the representative image cannot meet the user requirement, the deletion is required.
此外,由于很多用户经常会连续拍摄多张照片,虽然这些照片的清晰度可能不一样,但通常都是针对同一拍摄物拍摄的,若在对待处理图像进行处理的过程中,将满足清晰度的照片全部保留,难免会存在多张内容重复的照片,造成了电子设备存储空间的不必要浪费,也即,在将该清晰度低于预设阈值的图像进行删除之后,该删除模块40还可以用于:In addition, since many users often take multiple photos in succession, although the resolution of these photos may be different, they are usually shot for the same subject. If the image to be processed is processed, the resolution will be satisfied. The photos are all retained, and it is inevitable that there are multiple duplicate photos, which causes unnecessary waste of the storage space of the electronic device, that is, after deleting the image whose resolution is lower than the preset threshold, the deleting module 40 can also Used for:
计算该待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
本实施例中,对于筛选出的拍摄效果满足用户要求的待处理图像,可以进一步通过相似度计算的方法从中挑选出拍摄内容重复的照片,而对于这些重复的照片,只需保留拍摄效果最好(也即清晰度最高)的那张即可,其余的可以删除,从而尽可能节省存储空间。In this embodiment, for the image to be processed that the selected shooting effect meets the requirements of the user, the similarity calculation method may be further used to select a photo with repeated shooting content, and for these repeated photos, only the best shooting effect is retained. The one (that is, the highest resolution) can be deleted, and the rest can be deleted to save storage space as much as possible.
具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。In the specific implementation, the foregoing units may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities. For the specific implementation of the foregoing, refer to the foregoing method embodiments, and details are not described herein.
由上述可知,本实施例提供的相册管理装置,应用于电子设备,通过获取模块10获取图像样本集、以及该图像样本集中每一图像样本对应的分类标记,训练模块20根据该图像样本集及分类标记对预设的学习模型进行训练,之后,计算模块30利用训练后的学习模型计算相册中至少一张待处理图像的清晰度,删除模块40将该清晰度低于预设阈值的图像进行删除,以对该相册进行管理,从而能自动删除相册中拍摄效果不好的照片,无需用户手动操作,方法简单,避免了存储空间的浪费,实用性强。It can be seen from the above that the album management apparatus provided in this embodiment is applied to an electronic device, and the acquisition module 10 acquires an image sample set and a classification mark corresponding to each image sample in the image sample set, and the training module 20 according to the image sample set and The classification mark trains the preset learning model, and then the calculation module 30 calculates the sharpness of at least one image to be processed in the album by using the trained learning model, and the deleting module 40 performs the image with the lower definition than the preset threshold. Delete to manage the album, so that the photo with bad shooting effect can be automatically deleted in the album, without manual operation by the user, the method is simple, the waste of storage space is avoided, and the utility is strong.
另外,本申请实施例还提供了一种电子设备,该电子设备可以是智能手机、平板电脑等设备。图8所示,电子设备900包括处理器901、存储器902、显示屏903以及控制电路904。其中,处理器901分别与存储器902、显示屏903、控制电路904电性连接。In addition, the embodiment of the present application further provides an electronic device, which may be a device such as a smart phone or a tablet computer. As shown in FIG. 8, the electronic device 900 includes a processor 901, a memory 902, a display screen 903, and a control circuit 904. The processor 901 is electrically connected to the memory 902, the display screen 903, and the control circuit 904, respectively.
处理器901是电子设备900的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器902内的应用程序,以及调用存储在存储器902内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 901 is a control center of the electronic device 900, and connects various parts of the entire electronic device using various interfaces and lines, executes the electronic by running or loading an application stored in the memory 902, and calling data stored in the memory 902. The various functions and processing data of the device enable overall monitoring of the electronic device.
在本实施例中,电子设备900中的处理器901会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器902中,并由处理器901来运行存储在存储器902中的应用程序,从而实现各种功能:In this embodiment, the processor 901 in the electronic device 900 loads the instructions corresponding to the process of one or more applications into the memory 902 according to the following steps, and is stored in the memory 902 by the processor 901. In the application, thus implementing various functions:
获取图像样本集、以及该图像样本集中每一图像样本对应的分类标记;Obtaining an image sample set and a classification mark corresponding to each image sample in the image sample set;
根据该图像样本集及分类标记对预设的学习模型进行训练;Training the preset learning model according to the image sample set and the classification mark;
利用训练后的学习模型计算相册中至少一张待处理图像的清晰度;Using the trained learning model to calculate the sharpness of at least one image to be processed in the album;
将该清晰度低于预设阈值的图像进行删除,以对该相册进行管理。The image whose resolution is lower than a preset threshold is deleted to manage the album.
在一些实施例中,在利用训练后的学习模型计算相册中至少一张待处理图像的清晰度之前,所述处理器还用于执行:In some embodiments, the processor is further configured to perform: before calculating the sharpness of the at least one image to be processed in the album using the trained learning model:
获取当前时间、以及已记录的上一管理时间;Get the current time and the last management time recorded;
根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
执行所述利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同时将所述当前时间作为管理时间记录保存,并返回执行所述获取当前时间、以及已记录的上一管理时间的操作。Performing the operation of calculating the sharpness of at least one image to be processed in the album by using the trained learning model, while saving the current time as a management time record, and returning to perform the acquisition current time and the recorded upper A management time operation.
在一些实施例中,所述根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像,包括:In some embodiments, the determining the image to be processed from the album according to the current time and the last management time recorded includes:
确定相册中拍摄时间在所述当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album in which the shooting time is between the current time and the last management time recorded;
判断所述数量是否不小于预设数量;Determining whether the quantity is not less than a preset quantity;
若是,则将拍摄时间在所述当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
在一些实施例中,所述根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像,包括:In some embodiments, the determining the image to be processed from the album according to the current time and the last management time recorded includes:
计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
判断所述间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
若是,则将相册中在所述间隔时长内拍摄的图像作为待处理图像。If so, an image taken in the album during the interval duration is taken as an image to be processed.
在一些实施例中,在将所述清晰度低于预设阈值的图像进行删除之后,所述处理器还用于执行:In some embodiments, after deleting the image whose resolution is lower than a preset threshold, the processor is further configured to:
计算所述待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
在一些实施例中,所述分类标记包括不清晰,在获取图像样本集之前,所述处理器还用于执行:In some embodiments, the classification mark includes unclearness, and the processor is further configured to perform: before acquiring the image sample set:
检测所述电子设备当前是否存在连续拍摄操作;Detecting whether the electronic device currently has a continuous shooting operation;
若存在,则获取所述连续拍摄操作生成的多张拍摄图像;If yes, acquiring a plurality of captured images generated by the continuous shooting operation;
获取用户从所述多张拍摄图像中删除的拍摄图像,作为目标图像;Acquiring a captured image deleted by the user from the plurality of captured images as a target image;
为所述目标图像生成指示不清晰的分类标记,并将所述目标图像添加到图像样本集中。A classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
在一些实施例中,所述学习模型为深度神经网络模型,所述根据所述图像样本集及分类标记对预设的学习模型进行训练,包括:In some embodiments, the learning model is a deep neural network model, and the training of the preset learning model according to the image sample set and the classification mark includes:
将所述图像样本集中的每张图像样本及其对应的分类标记输入预设的深度神经网络模型中,以对每层神经网络的权重值和参数值进行调整。Each image sample in the image sample set and its corresponding classification mark are input into a preset depth neural network model to adjust the weight value and the parameter value of each layer of the neural network.
存储器902可用于存储应用程序和数据。存储器902存储的应用程序中包含有可在处理器中执行的指令。应用程序可以组成各种功能模块。处理器901通过运行存储在存储器902的应用程序,从而执行各种功能应用以及数据处理。 Memory 902 can be used to store applications and data. The application stored in the memory 902 contains instructions executable in the processor. Applications can form various functional modules. The processor 901 executes various functional applications and data processing by running an application stored in the memory 902.
显示屏903可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。The display screen 903 can be used to display information entered by the user or information provided to the user as well as various graphical user interfaces of the terminal, which can be composed of images, text, icons, video, and any combination thereof.
控制电路904与显示屏903电性连接,用于控制显示屏903显示信息。The control circuit 904 is electrically connected to the display screen 903 for controlling the display screen 903 to display information.
在一些实施例中,如图8所示,电子设备900还包括:射频电路905、输入单元906、音频电路907、传感器908以及电源909。其中,处理器901分别与射频电路905、输入单元906、音频电路907、传感器908以及电源909电性连接。In some embodiments, as shown in FIG. 8, the electronic device 900 further includes a radio frequency circuit 905, an input unit 906, an audio circuit 907, a sensor 908, and a power source 909. The processor 901 is electrically connected to the radio frequency circuit 905, the input unit 906, the audio circuit 907, the sensor 908, and the power source 909, respectively.
射频电路905用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 905 is used for transmitting and receiving radio frequency signals to establish wireless communication with network devices or other electronic devices through wireless communication, and to transmit and receive signals with network devices or other electronic devices.
输入单元906可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元906可以包括指纹识别模组。The input unit 906 can be configured to receive input digits, character information, or user characteristic information (eg, fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function controls. The input unit 906 can include a fingerprint identification module.
音频电路907可通过扬声器、传声器提供用户与终端之间的音频接口。The audio circuit 907 can provide an audio interface between the user and the terminal through a speaker and a microphone.
电子设备900还可以包括至少一种传感器908,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。 Electronic device 900 may also include at least one type of sensor 908, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may close the display panel and/or the backlight when the terminal moves to the ear. . As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the terminal can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
电源909用于给电子设备900的各个部件供电。在一些实施例中,电源909可以通过电源管理系统与处理器901逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。 Power source 909 is used to power various components of electronic device 900. In some embodiments, the power supply 909 can be logically coupled to the processor 901 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system.
尽管图8中未示出,电子设备900还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 8, the electronic device 900 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。为此,本发明实施例提供一种存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本发明实施例所提供的任一种相册管理方法中的步骤。It will be understood by those skilled in the art that all or part of the steps of the various methods in the above embodiments may be completed by instructions or controlled by related hardware, which may be stored in a computer readable storage medium. And loaded and executed by the processor. To this end, an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored, which can be loaded by a processor to perform the steps in any of the album management methods provided by the embodiments of the present invention.
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。The storage medium may include: a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
由于该存储介质中所存储的指令,可以执行本发明实施例所提供的任一种相册管理方法中的步骤,因此,可以实现本发明实施例所提供的任一种相册管理方法所能实现的有益效果,详见前面的实施例,在此不再赘述。The steps in the album management method provided in the embodiment of the present invention can be implemented by using the instructions stored in the storage medium. Therefore, any album management method provided by the embodiment of the present invention can be implemented. For the beneficial effects, see the previous embodiments in detail, and details are not described herein again.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the foregoing operations, refer to the foregoing embodiments, and details are not described herein again.
综上该,虽然本申请已以优选实施例揭露如上,但上述优选实施例并非用以限制本申请,本领域的普通技术人员,在不脱离本申请的精神和范围内,均可作各种更动与润饰,因此本申请的保护范围以权利要求界定的范围为准。In the above, although the present application has been disclosed in the above preferred embodiments, the above-described preferred embodiments are not intended to limit the application, and those skilled in the art can make various kinds without departing from the spirit and scope of the present application. The scope of protection of the present application is subject to the scope defined by the claims.

Claims (20)

  1. 一种相册管理方法,应用于电子设备,其包括:A photo album management method is applied to an electronic device, which includes:
    获取图像样本集、以及所述图像样本集中每一图像样本对应的分类标记;Obtaining an image sample set and a classification mark corresponding to each image sample in the image sample set;
    根据所述图像样本集及分类标记对预设的学习模型进行训练;Performing a training on the preset learning model according to the image sample set and the classification mark;
    利用训练后的学习模型计算相册中至少一张待处理图像的清晰度;Using the trained learning model to calculate the sharpness of at least one image to be processed in the album;
    将所述清晰度低于预设阈值的图像进行删除,以对所述相册进行管理。The image whose resolution is lower than a preset threshold is deleted to manage the album.
  2. 根据权利要求1所述的相册管理方法,其中,在利用训练后的学习模型计算相册中至少一张待处理图像的清晰度之前,还包括:The album management method according to claim 1, wherein before calculating the sharpness of at least one image to be processed in the album by using the trained learning model, the method further comprises:
    获取当前时间、以及已记录的上一管理时间;Get the current time and the last management time recorded;
    根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
    执行所述利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同时将所述当前时间作为管理时间记录保存,并返回执行所述获取当前时间、以及已记录的上一管理时间的操作。Performing the operation of calculating the sharpness of at least one image to be processed in the album by using the trained learning model, while saving the current time as a management time record, and returning to perform the acquisition current time and the recorded upper A management time operation.
  3. 根据权利要求2所述的相册管理方法,其中,所述根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像,包括:The album management method according to claim 2, wherein the determining the image to be processed from the album according to the current time and the recorded last management time comprises:
    确定相册中拍摄时间在所述当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album in which the shooting time is between the current time and the last management time recorded;
    判断所述数量是否不小于预设数量;Determining whether the quantity is not less than a preset quantity;
    若是,则将拍摄时间在所述当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
  4. 根据权利要求2所述的相册管理方法,其中,所述根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像,包括:The album management method according to claim 2, wherein the determining the image to be processed from the album according to the current time and the recorded last management time comprises:
    计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
    判断所述间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
    若是,则将相册中在所述间隔时长内拍摄的图像作为待处理图像。If so, an image taken in the album during the interval duration is taken as an image to be processed.
  5. 根据权利要求1所述的相册管理方法,其中,在将所述清晰度低于预设阈值的图像进行删除之后,还包括:The album management method according to claim 1, wherein after deleting the image whose resolution is lower than a preset threshold, the method further includes:
    计算所述待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
    将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
    将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
  6. 根据权利要求1所述的相册管理方法,其中,所述分类标记包括不清晰,在获取图像样本集之前,还包括:The album management method according to claim 1, wherein the classification mark includes unclearness, and before acquiring the image sample set, the method further includes:
    检测所述电子设备当前是否存在连续拍摄操作;Detecting whether the electronic device currently has a continuous shooting operation;
    若存在,则获取所述连续拍摄操作生成的多张拍摄图像;If yes, acquiring a plurality of captured images generated by the continuous shooting operation;
    获取用户从所述多张拍摄图像中删除的拍摄图像,作为目标图像;Acquiring a captured image deleted by the user from the plurality of captured images as a target image;
    为所述目标图像生成指示不清晰的分类标记,并将所述目标图像添加到图像样本集中。A classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
  7. 根据权利要求1所述的相册管理方法,其中,所述学习模型为深度神经网络模型,所述根据所述图像样本集及分类标记对预设的学习模型进行训练,包括:The album management method according to claim 1, wherein the learning model is a deep neural network model, and the training of the preset learning model according to the image sample set and the classification mark comprises:
    将所述图像样本集中的每张图像样本及其对应的分类标记输入预设的深度神经网络模型中,以对每层神经网络的权重值和参数值进行调整。Each image sample in the image sample set and its corresponding classification mark are input into a preset depth neural network model to adjust the weight value and the parameter value of each layer of the neural network.
  8. 一种相册管理装置,应用于电子设备,其包括:An album management device is applied to an electronic device, including:
    获取模块,用于获取图像样本集、以及所述图像样本集中每一图像样本对应的分类标记;An obtaining module, configured to acquire an image sample set, and a classification mark corresponding to each image sample in the image sample set;
    训练模块,用于根据所述图像样本集及分类标记对预设的学习模型进行训练;a training module, configured to train the preset learning model according to the image sample set and the classification mark;
    计算模块,用于利用训练后的学习模型计算相册中至少一张待处理图像的清晰度;a calculation module, configured to calculate a sharpness of at least one image to be processed in the album by using the trained learning model;
    删除模块,用于将所述清晰度低于预设阈值的图像进行删除,以对所述相册进行管理。And a deleting module, configured to delete the image whose resolution is lower than a preset threshold to manage the album.
  9. 根据权利要求8所述的相册管理装置,其中,所述相册管理装置还包括确定模块,用于:The album management device according to claim 8, wherein the album management device further comprises a determining module, configured to:
    在所述计算模块利用训练后的学习模型计算相册中至少一张待处理图像的清晰度之前,获取当前时间、以及已记录的上一管理时间;Obtaining a current time and a recorded last management time before the calculating module calculates the sharpness of at least one image to be processed in the album by using the trained learning model;
    根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
    触发所述计算模块执行所述利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同时将所述当前时间作为管理时间记录保存,并返回执行所述获取当前时间、以及已记录的上一管理时间的操作。Trimming the calculation module to perform the operation of calculating the sharpness of at least one image to be processed in the album by using the trained learning model, while saving the current time as a management time record, and returning to perform the acquisition current time, And the last recorded management time operation.
  10. 根据权利要求9所述的相册管理装置,其中,所述确定模块用于:The album management device according to claim 9, wherein said determining module is configured to:
    确定相册中拍摄时间在所述当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album in which the shooting time is between the current time and the last management time recorded;
    判断所述数量是否不小于预设数量;Determining whether the quantity is not less than a preset quantity;
    若是,则将拍摄时间在所述当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
  11. 根据权利要求9所述的相册管理装置,其中,所述确定模块用于:The album management device according to claim 9, wherein said determining module is configured to:
    计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
    判断所述间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
    若是,则将相册中在所述间隔时长内拍摄的图像作为待处理图像。If so, an image taken in the album during the interval duration is taken as an image to be processed.
  12. 根据权利要求8所述的相册管理装置,其中,在将所述清晰度低于预设阈值的图像进行删除之后,所述删除模块还用于:The album management device according to claim 8, wherein the deleting module is further configured to: after deleting the image whose resolution is lower than a preset threshold;
    计算所述待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
    将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
    将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
  13. 根据权利要求8所述的相册管理装置,其中,所述分类标记包括不清晰,所述相册管理装置还包括添加模块,用于:The album management device according to claim 8, wherein the classification mark includes unclearness, and the album management device further includes an adding module, configured to:
    在所述获取模块获取图像样本集之前,检测所述电子设备当前是否存在连续拍摄操作;Before the acquiring module acquires the image sample set, detecting whether the electronic device currently has a continuous shooting operation;
    若存在,则获取所述连续拍摄操作生成的多张拍摄图像;If yes, acquiring a plurality of captured images generated by the continuous shooting operation;
    获取用户从所述多张拍摄图像中删除的拍摄图像,作为目标图像;Acquiring a captured image deleted by the user from the plurality of captured images as a target image;
    为所述目标图像生成指示不清晰的分类标记,并将所述目标图像添加到图像样本集中。A classification mark indicating an unclear is generated for the target image, and the target image is added to the image sample set.
  14. 根据权利要求8所述的相册管理装置,其中,所述学习模型为深度神经网络模型,所述训练模块具体用于:The album management device according to claim 8, wherein the learning model is a deep neural network model, and the training module is specifically configured to:
    将所述图像样本集中的每张图像样本及其对应的分类标记输入预设的深度神经网络模型中,以对每层神经网络的权重值和参数值进行调整。Each image sample in the image sample set and its corresponding classification mark are input into a preset depth neural network model to adjust the weight value and the parameter value of each layer of the neural network.
  15. 一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行权利要求1所述的相册管理方法。A storage medium, wherein the storage medium stores a plurality of instructions adapted to be loaded by a processor to perform the album management method of claim 1.
  16. 一种电子设备,其包括处理器和存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于执行权利要求1所述的相册管理方法中的步骤。An electronic device comprising a processor and a memory, the processor being electrically connected to the memory, the memory for storing instructions and data, the processor for performing the album management method according to claim 1. A step of.
  17. 根据权利要求16所述的电子设备,其中,在利用训练后的学习模型计算相册中至少一张待处理图像的清晰度之前,所述处理器还用于执行:The electronic device of claim 16, wherein the processor is further configured to perform: before calculating the sharpness of the at least one image to be processed in the album using the trained learning model:
    获取当前时间、以及已记录的上一管理时间;Get the current time and the last management time recorded;
    根据所述当前时间、以及已记录的上一管理时间从相册中确定待处理图像;Determining an image to be processed from the album according to the current time and the last management time recorded;
    执行所述利用训练后的学习模型计算相册中至少一张待处理图像的清晰度的操作,同 时将所述当前时间作为管理时间记录保存,并返回执行所述获取当前时间、以及已记录的上一管理时间的操作。Performing the operation of calculating the sharpness of at least one image to be processed in the album by using the trained learning model, while saving the current time as a management time record, and returning to perform the acquisition current time and the recorded upper A management time operation.
  18. 根据权利要求17所述的电子设备,其中,所述处理器具体用于执行:The electronic device of claim 17, wherein the processor is specifically configured to perform:
    确定相册中拍摄时间在所述当前时间与已记录的上一管理时间之间的图像的数量;Determining the number of images in the album in which the shooting time is between the current time and the last management time recorded;
    判断所述数量是否不小于预设数量;Determining whether the quantity is not less than a preset quantity;
    若是,则将拍摄时间在所述当前时间与已记录的上一管理时间之间的图像作为待处理图像。If so, an image of the shooting time between the current time and the last management time recorded is taken as the image to be processed.
  19. 根据权利要求17所述的电子设备,其中,所述处理器具体用于执行:The electronic device of claim 17, wherein the processor is specifically configured to perform:
    计算当前时间与已记录的上一管理时间之间的间隔时长;Calculate the interval between the current time and the last recorded management time;
    判断所述间隔时长是否到达预设时长;Determining whether the interval duration reaches a preset duration;
    若是,则将相册中在所述间隔时长内拍摄的图像作为待处理图像。If so, an image taken in the album during the interval duration is taken as an image to be processed.
  20. 根据权利要求16所述的电子设备,其中,在将所述清晰度低于预设阈值的图像进行删除之后,所述处理器还用于执行:The electronic device according to claim 16, wherein after deleting the image whose resolution is lower than a preset threshold, the processor is further configured to:
    计算所述待处理图像中剩余图像彼此间的相似度;Calculating a similarity between the remaining images in the image to be processed;
    将相似度高于预设相似度的剩余图像按照清晰度从高到底进行排序;Sorting the remaining images with similarity higher than the preset similarity according to the definition from high to low;
    将位于首位之后的剩余图像进行删除。The remaining images after the first position are deleted.
PCT/CN2018/121981 2018-01-10 2018-12-19 Photo album management method and apparatus, storage medium, and electronic device WO2019137167A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810023865.8 2018-01-10
CN201810023865.8A CN110109878A (en) 2018-01-10 2018-01-10 Photograph album management method, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
WO2019137167A1 true WO2019137167A1 (en) 2019-07-18

Family

ID=67219351

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/121981 WO2019137167A1 (en) 2018-01-10 2018-12-19 Photo album management method and apparatus, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN110109878A (en)
WO (1) WO2019137167A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191064A (en) * 2019-12-27 2020-05-22 西安闻泰电子科技有限公司 Intelligent photo aggregation method, electronic equipment and storage medium
CN111753642A (en) * 2020-05-09 2020-10-09 三生万物(北京)人工智能技术有限公司 Method and device for determining key frame
CN111814810A (en) * 2020-08-11 2020-10-23 Oppo广东移动通信有限公司 Image recognition method and device, electronic equipment and storage medium
CN112733664A (en) * 2020-12-31 2021-04-30 北京华安信联通信技术有限公司 Photo classification method
CN114648672A (en) * 2022-02-25 2022-06-21 北京百度网讯科技有限公司 Method and device for constructing sample image set, electronic equipment and readable storage medium
CN115098026A (en) * 2022-06-27 2022-09-23 四三九九网络股份有限公司 Method for saving non-repeated pictures based on iOS system photo album
CN117392483A (en) * 2023-12-06 2024-01-12 山东大学 Album classification model training acceleration method, system and medium based on reinforcement learning

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113032635A (en) * 2019-12-24 2021-06-25 中科寒武纪科技股份有限公司 Method and equipment for storing historical records
CN111447501A (en) * 2020-04-13 2020-07-24 深圳创维-Rgb电子有限公司 Photo management method and device, electronic equipment and storage medium
CN113688850A (en) * 2020-05-14 2021-11-23 武汉Tcl集团工业研究院有限公司 Image processing method and terminal
CN112463998A (en) * 2020-11-25 2021-03-09 京东方科技集团股份有限公司 Album resource processing method, apparatus, electronic device and storage medium
CN112613492B (en) * 2021-01-08 2022-02-11 哈尔滨师范大学 Data processing method and device
CN113076284A (en) * 2021-04-08 2021-07-06 立臻科技(昆山)有限公司 Image instant management method, device, equipment and storage medium
CN113225451B (en) * 2021-04-28 2023-06-27 维沃移动通信(杭州)有限公司 Image processing method and device and electronic equipment
CN113469250A (en) * 2021-06-30 2021-10-01 阿波罗智联(北京)科技有限公司 Image shooting method, image classification model training method and device and electronic equipment
CN114666506B (en) * 2022-03-29 2023-01-06 广州方舟信息科技有限公司 Screening method and device for continuously shot images and electronic equipment
CN116563170B (en) * 2023-07-10 2023-09-15 中国人民解放军空军特色医学中心 Image data processing method and system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955947A (en) * 2011-08-19 2013-03-06 北京百度网讯科技有限公司 Equipment and method for determining image definition
CN104408061A (en) * 2014-10-29 2015-03-11 深圳市中兴移动通信有限公司 Photo album management method and device
CN106412567A (en) * 2016-09-19 2017-02-15 北京小度互娱科技有限公司 Method and system for determining video definition
CN106777007A (en) * 2016-12-07 2017-05-31 北京奇虎科技有限公司 Photograph album Classified optimization method, device and mobile terminal
CN106920229A (en) * 2017-01-22 2017-07-04 北京奇艺世纪科技有限公司 Image obscuring area automatic testing method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9973647B2 (en) * 2016-06-17 2018-05-15 Microsoft Technology Licensing, Llc. Suggesting image files for deletion based on image file parameters

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955947A (en) * 2011-08-19 2013-03-06 北京百度网讯科技有限公司 Equipment and method for determining image definition
CN104408061A (en) * 2014-10-29 2015-03-11 深圳市中兴移动通信有限公司 Photo album management method and device
CN106412567A (en) * 2016-09-19 2017-02-15 北京小度互娱科技有限公司 Method and system for determining video definition
CN106777007A (en) * 2016-12-07 2017-05-31 北京奇虎科技有限公司 Photograph album Classified optimization method, device and mobile terminal
CN106920229A (en) * 2017-01-22 2017-07-04 北京奇艺世纪科技有限公司 Image obscuring area automatic testing method and system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191064A (en) * 2019-12-27 2020-05-22 西安闻泰电子科技有限公司 Intelligent photo aggregation method, electronic equipment and storage medium
CN111753642A (en) * 2020-05-09 2020-10-09 三生万物(北京)人工智能技术有限公司 Method and device for determining key frame
CN111753642B (en) * 2020-05-09 2024-02-20 三生万物(北京)人工智能技术有限公司 Method and device for determining key frame
CN111814810A (en) * 2020-08-11 2020-10-23 Oppo广东移动通信有限公司 Image recognition method and device, electronic equipment and storage medium
CN112733664A (en) * 2020-12-31 2021-04-30 北京华安信联通信技术有限公司 Photo classification method
CN112733664B (en) * 2020-12-31 2024-04-16 北京华安信联通信技术有限公司 Photo classification method
CN114648672A (en) * 2022-02-25 2022-06-21 北京百度网讯科技有限公司 Method and device for constructing sample image set, electronic equipment and readable storage medium
CN115098026A (en) * 2022-06-27 2022-09-23 四三九九网络股份有限公司 Method for saving non-repeated pictures based on iOS system photo album
CN115098026B (en) * 2022-06-27 2024-04-30 四三九九网络股份有限公司 Photo album picture non-duplication saving method based on iOS system
CN117392483A (en) * 2023-12-06 2024-01-12 山东大学 Album classification model training acceleration method, system and medium based on reinforcement learning
CN117392483B (en) * 2023-12-06 2024-02-23 山东大学 Album classification model training acceleration method, system and medium based on reinforcement learning

Also Published As

Publication number Publication date
CN110109878A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
WO2019137167A1 (en) Photo album management method and apparatus, storage medium, and electronic device
US11688043B2 (en) Video deblurring method and apparatus, storage medium, and electronic apparatus
CN109086709B (en) Feature extraction model training method and device and storage medium
CN108089788B (en) Thumbnail display control method and mobile terminal
WO2019105440A1 (en) Video editing and pushing method, system and intelligent mobile terminal
CN110263213B (en) Video pushing method, device, computer equipment and storage medium
WO2019120016A1 (en) Image processing method and apparatus, storage medium, and electronic device
CN108886574B (en) Shooting guide method, equipment and system
RU2628494C1 (en) Method and device for generating image filter
CN109446961B (en) Gesture detection method, device, equipment and storage medium
WO2018233480A1 (en) Photograph recommendation method and related product
WO2022111072A1 (en) Image photographing method and apparatus, and electronic device, server and storage medium
CN107871001B (en) Audio playing method and device, storage medium and electronic equipment
CN104902185B (en) Image pickup method and device
US20140293069A1 (en) Real-time image classification and automated image content curation
CN108229574B (en) Picture screening method and device and mobile terminal
CN107871000B (en) Audio playing method and device, storage medium and electronic equipment
CN107870999B (en) Multimedia playing method, device, storage medium and electronic equipment
CN108289057B (en) Video editing method and device and intelligent mobile terminal
CN109508398B (en) Photo classification method and terminal equipment thereof
CN108595573B (en) Page display method and device, storage medium and electronic equipment
CN109257649B (en) Multimedia file generation method and terminal equipment
CN108921178A (en) Obtain method, apparatus, the electronic equipment of the classification of image fog-level
CN111416996B (en) Multimedia file detection method, multimedia file playing device, multimedia file equipment and storage medium
CN111669495B (en) Photographing method, photographing device and electronic equipment

Legal Events

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

Ref document number: 18899681

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18899681

Country of ref document: EP

Kind code of ref document: A1