CN110909193B - Image ordering display method, system, device and storage medium - Google Patents

Image ordering display method, system, device and storage medium Download PDF

Info

Publication number
CN110909193B
CN110909193B CN201911153777.0A CN201911153777A CN110909193B CN 110909193 B CN110909193 B CN 110909193B CN 201911153777 A CN201911153777 A CN 201911153777A CN 110909193 B CN110909193 B CN 110909193B
Authority
CN
China
Prior art keywords
images
similarity
image
sorted
calculated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911153777.0A
Other languages
Chinese (zh)
Other versions
CN110909193A (en
Inventor
黄小虎
罗超
胡泓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ctrip Computer Technology Shanghai Co Ltd
Original Assignee
Ctrip Computer Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ctrip Computer Technology Shanghai Co Ltd filed Critical Ctrip Computer Technology Shanghai Co Ltd
Priority to CN201911153777.0A priority Critical patent/CN110909193B/en
Publication of CN110909193A publication Critical patent/CN110909193A/en
Application granted granted Critical
Publication of CN110909193B publication Critical patent/CN110909193B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/55Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Abstract

The invention discloses an image ordering display method, an image ordering display system, an image ordering display device and a storage medium, wherein the image ordering display method comprises the following steps: acquiring images to be sequenced; performing image quality score calculation on the images to be ranked so as to obtain the image quality scores to be ranked; performing similarity calculation on the images to be ranked, and classifying the images to be ranked, the similarity of which is within a preset threshold range, into a group of images to obtain a plurality of groups of images; sorting the quality scores of the images to be sorted on the groups of images; and respectively selecting at least one image with the highest quality from each group of images for display. The invention can lead the image ordering with high quality to be more forward, lead the image content browsed by the user to be more diversified, and optimize the front-end display effect.

Description

Image ordering display method, system, device and storage medium
Technical Field
The invention relates to the technical field of internet products, in particular to an image ordering display method, an image ordering display system, image ordering display equipment and a storage medium.
Background
With the improvement of the living standard of people and the popularization of the Internet, more and more users tend to select a proper hotel for the travel of the users through a convenient and quick way of ordering on the Internet. Through the OTA (Online Travel Agency) platform, a user can browse and compare related hotels according to own likes, and hotel images are taken as the most visual display mode of the hotels, so that the method has important influence on order conversion of the user.
In the existing OTA platform, hotel images mostly take shooting time as ordering keywords, images with early shooting time are arranged in front, images with late shooting time are arranged in back, and image quality is uneven. Furthermore, since the images adjacent to the image page may be similar or identical in presentation content in terms of time ordering, the presentation is not sufficiently diversified, resulting in the user spending more time searching for the image he wants to see. At present, the existing ordering mode is not friendly enough in user experience, and the order conversion rate is affected.
Disclosure of Invention
The invention aims to overcome the defects that in the prior art, hotel images are uneven in image quality and a plurality of images adjacent to an image page are likely to be similar or completely consistent in display content and are not diversified enough in the sorting method using shooting time as a sorting keyword.
The invention solves the technical problems by the following technical scheme:
the invention provides an image ordering display method, which comprises the following steps:
acquiring images to be sequenced;
performing image quality score calculation on the images to be ranked so as to obtain the image quality scores to be ranked;
performing similarity calculation on the images to be ranked, and classifying the images to be ranked, the similarity of which is within a preset threshold range, into a group of images to obtain a plurality of groups of images;
sorting the quality scores of the images to be sorted on the groups of images;
and respectively selecting at least one image with the highest quality from each group of images for display.
In the scheme, the image sorting display method is constructed by utilizing the image quality score calculation mode and the image similarity calculation mode, the problems that the image quality is uneven, a plurality of images adjacent to an image page are likely to be similar or completely consistent in display content and are not diversified are solved, the image sorting display method is adopted to enable the image sorting with high quality to be more forward, the image content browsed by a user to be more diversified, and the front-end display effect is optimized.
Preferably, the step of calculating the image quality score of the image to be ranked to obtain the image quality score to be ranked includes:
labeling the quality of the sample image to obtain a labeled image with quality;
constructing a basic convolutional neural network structure;
designing an objective function;
setting a network super-parameter;
training the network until convergence, and storing the network weight;
and loading the trained network weight, and performing scoring test on the images to be sequenced.
In the scheme, the image quality score calculation is carried out on the images to be sorted by adopting a quality score evaluation method based on deep learning, so that the accuracy of the image quality score calculation to be sorted is improved.
Preferably, the step of designing the objective function adopts a cross entropy loss algorithm after L2 regularization is added.
In the scheme, cross entropy loss added with L2 regularization is used in the step of designing the objective function, so that network weights are appropriately punished in the training process, the weights are controlled within an ideal range, and overfitting is restrained.
Preferably, the step of loading trains the network weights and performs scoring test on the images to be sequenced in the library includes:
loading trained network weights;
Inputting images to be sequenced;
and outputting the quality probability through a softmax function, wherein the quality probability is calculated through weighted average post-processing, and the quality score after weighted processing is in a threshold range.
In the scheme, the posterior probability output of the softmax function is used for carrying out weighted average post-processing calculation when the scoring test is carried out on the images to be sequenced, so that the distribution of the image quality scores is more uniform.
Preferably, the step of calculating the similarity of the images to be sorted and classifying the images to be sorted with the similarity within a preset threshold value range into a group of images to obtain a plurality of groups of images includes:
preprocessing the images to be sequenced, wherein the preprocessing comprises scaling, gray processing and affine transformation so as to obtain a similarity image to be calculated;
extracting SIFT (Scale-invariant feature transform, scale invariant feature transform) feature points and ORB (oriented fast and rotated brief, rapid feature point extraction and description) feature points from the similarity image to be calculated to obtain SIFT feature points and ORB feature points of the similarity image to be calculated;
the ORB characteristic points are input into a similarity calculation formula, and first similarity between every two images to be calculated is calculated;
Judging whether the first similarity is larger than or equal to a preset first similarity threshold, if so, the two corresponding similarity images to be calculated are similar, and if not, judging whether the first similarity is larger than a preset second similarity threshold;
if the first similarity is larger than a second similarity threshold, inputting SIFT feature points of the two corresponding similarity images to be calculated into the similarity calculation formula, and calculating the second similarity between the similarity images to be calculated;
if the first similarity is smaller than or equal to the second similarity threshold, the two corresponding similarity images to be calculated are dissimilar;
judging whether the second similarity is larger than a preset third similarity threshold value or not; if so, the two corresponding similarity images to be calculated are similar, and if not, the two corresponding similarity images to be calculated are dissimilar;
the first similarity threshold > the second similarity threshold;
the preset third similarity threshold value is between the first similarity threshold value and the second similarity threshold value.
In the scheme, a mode of combining SIFT feature points and ORB feature points is adopted when the similarity of the images to be sorted is calculated, so that feature dimension is higher, expression capability is stronger, and accuracy of the similarity calculation of the images to be sorted is improved.
Preferably, the image ordering and displaying method further comprises the following steps:
after the images to be sorted are acquired, performing image quality score calculation on the images to be sorted, and adding a classification label to the images to be sorted before the quality scores of the images to be sorted are obtained, wherein the classification label represents the type of the content shown in the images to be sorted;
the step of calculating the image quality score of the images to be ranked to obtain the quality score of the images to be ranked comprises the following steps:
performing image quality score calculation on the images to be sorted with the same classification labels to obtain quality scores of the images to be sorted with the same classification labels;
the method comprises the steps of carrying out similarity calculation on the images to be ranked, classifying the images to be ranked, of which the similarity is within a preset threshold range, into a group of images, and obtaining a plurality of groups of images, wherein the steps comprise: and carrying out similarity calculation on the images to be sequenced with the same classification labels, and classifying the images to be sequenced with the similarity within a preset threshold range into a group of images to obtain a plurality of groups of images.
In the scheme, after the images to be sorted are acquired, image quality score calculation is carried out on the images to be sorted, classification labels are added to the images to be sorted before the quality scores of the images to be sorted are obtained, and the images to be sorted are classified according to the content, so that similarity calculation of the images to be sorted is carried out only in the images to be sorted of the same type, the workload of similarity calculation of the images to be sorted is reduced, and the similarity calculation efficiency of the images to be sorted is improved.
The invention also provides an image ordering display system, which comprises:
the acquisition module is used for acquiring images to be sequenced;
the quality score calculating module is used for calculating the image quality score of the images to be sorted so as to obtain the quality score of the images to be sorted;
the similarity calculation module is used for calculating the similarity of the images to be sorted and classifying the images to be sorted, the similarity of which is within a preset threshold range, into a group of images so as to obtain a plurality of groups of images;
the sorting module is used for sorting the quality scores of the images to be sorted for the groups of images;
and the display module is used for respectively selecting at least one image with the highest quality from each group of images for display.
Preferably, the mass fraction calculating module includes:
the labeling unit is used for carrying out quality division on the sample image so as to obtain a labeled image with quality division;
the building unit is used for building a basic convolutional neural network structure;
a design unit for designing an objective function;
the setting unit is used for setting network super-parameters;
the training unit is used for training the network to be converged and storing the network weight;
and the test unit is used for loading the trained network weights and performing scoring test on the images to be sequenced.
Preferably, the design unit adopts a cross entropy loss algorithm after L2 regularization is added.
Preferably, the test unit includes:
the loading subunit is used for loading the trained network weights;
an input subunit for inputting images to be ordered;
and the output subunit outputs the quality score probability through a softmax function, wherein the quality score probability is calculated through weighted average post-processing, and the quality score after weighted processing is in a threshold range.
Preferably, the similarity calculation module includes:
the preprocessing unit is used for preprocessing the images to be sequenced, wherein the preprocessing comprises scaling, gray processing and affine transformation so as to obtain a similarity image to be calculated;
the feature extraction unit is used for extracting SIFT feature points and ORB feature points from the similarity image to be calculated so as to obtain SIFT feature points and ORB feature points of the similarity image to be calculated;
the similarity calculation unit inputs ORB characteristic points into a similarity calculation formula, and calculates first similarity between every two similarity images to be calculated; judging whether the first similarity is larger than or equal to a preset first similarity threshold, if so, the two corresponding similarity images to be calculated are similar, and if not, judging whether the first similarity is larger than a preset second similarity threshold; if the first similarity is larger than the second similarity threshold, inputting SIFT feature points of the two corresponding similarity images to be calculated into the similarity calculation formula, and calculating the second similarity between the similarity images to be calculated; if the first similarity is smaller than or equal to the second similarity threshold, the two corresponding similarity images to be calculated are dissimilar; judging whether the second similarity is larger than a preset third similarity threshold value or not; if so, the two corresponding similarity images to be calculated are similar, and if not, the two corresponding similarity images to be calculated are dissimilar;
The first similarity threshold > the second similarity threshold;
the preset third similarity threshold value is between the first similarity threshold value and the second similarity threshold value.
Preferably, the image ordering display system further comprises a label module:
the label module is used for carrying out image quality score calculation on the images to be sequenced after the images to be sequenced are acquired so as to add a classification label to the images to be sequenced before the quality scores of the images to be sequenced are obtained, wherein the classification label represents the type of the content shown in the images to be sequenced;
the quality score calculating module is used for calculating the image quality scores of the images to be sorted with the same classification labels so as to obtain the quality scores of the images to be sorted with the same classification labels;
the similarity calculation module is configured to perform similarity calculation on the images to be ranked, and classify the images to be ranked with similarity within a preset threshold range into a group of images, so as to obtain a plurality of groups of images, where the step of obtaining the group of images includes: and carrying out similarity calculation on the images to be sequenced with the same classification labels, and classifying the images to be sequenced with the similarity within a preset threshold range into a group of images to obtain a plurality of groups of images.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the image ordering display method when executing the computer program.
The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the aforementioned image ordering display method.
The invention has the positive progress effects that:
the method comprises the steps of obtaining images to be sequenced; performing image quality score calculation on the images to be ranked so as to obtain the image quality scores to be ranked; performing similarity calculation on the images to be ranked, and classifying the images to be ranked, the similarity of which is within a preset threshold range, into a group of images to obtain a plurality of groups of images; sorting the quality scores of the images to be sorted on the groups of images; and respectively selecting at least one image with the highest quality from each group of images for display. Compared with the sorting method in the prior art that the hotel images take shooting time as sorting keywords, the method can enable the sorting of the images with high quality to be more forward, enable the content of the images browsed by the user to be more diversified, and optimize the front-end display effect.
Drawings
Fig. 1 is a flowchart of an image sorting display method according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of an image sorting display method according to embodiment 2 of the present invention.
Fig. 3-1 is a flow chart of step 102 in embodiment 3 of the present invention.
Fig. 3-2 is a flow chart of step 103 in embodiment 3 of the present invention.
Fig. 4 is a schematic block diagram of an image ordering display system according to embodiment 4 of the present invention.
Fig. 5 is a schematic block diagram of an image ordering display system according to embodiment 5 of the present invention.
Fig. 6-1 is a schematic structural diagram of a mass fraction calculating module in embodiment 6 of the present invention.
Fig. 6-2 is a schematic structural diagram of a similarity calculation module in embodiment 6 of the present invention.
Fig. 7 is a schematic structural diagram of an electronic device according to embodiment 7 of the present invention.
Detailed Description
The invention is further illustrated by means of the following examples, which are not intended to limit the scope of the invention.
Example 1
As shown in fig. 1, the embodiment discloses an image ordering display method, which includes the following steps:
s101, acquiring images to be sequenced; in this embodiment, the images to be ranked may be hotel images, and this embodiment may be applied to image ranking of multiple scenes of an OTA platform, where different types of images to be ranked are selected according to different application scenes. In particular, when images in the image library are screened, images uploaded at a specific time can be searched from the image library according to a time period set by a user, and also can be screened and sequenced according to image categories preset by the user, wherein the image screening mode is not limited, and the user can carry out screening setting according to own needs. If not, the images to be sequenced in the invention are all images in the library.
And step S102, performing picture quality score calculation on the images to be ranked so as to obtain the quality scores of the images to be ranked. In this embodiment, the quality score is calculated for each image to be sorted, and the score is 1 to 5, and the higher the score is, the higher the quality score is.
Step S103, similarity calculation is carried out on the images to be ranked, and the images to be ranked, the similarity of which is within a preset threshold range, are classified into a group of images, so that a plurality of groups of images are obtained.
And step S104, carrying out quality sorting on the images to be sorted on the groups of images.
In this embodiment, the quality score of the image is calculated with a score of 1 to 5, and the higher the score, the higher the quality score.
Step S105, at least one image with the highest quality is selected from each group of images for display.
According to the image sorting display method disclosed by the embodiment, the quality score and the similarity are calculated on the images to be sorted by adopting the quality score calculation mode and the similarity calculation mode, so that different groups of images with high quality scores are displayed when the images are displayed. Compared with the sorting method in the prior art that hotel images take shooting time as sorting keywords, the method can enable the sorting of images with high quality to be more forward, enable the content of images browsed by users to be more diversified, and optimize the front-end display effect.
Example 2
As shown in fig. 2, in this embodiment, a process of adding classification labels to images to be ranked is added in embodiment 1, and specifically includes the following steps:
step S201, obtaining images to be sequenced; in this embodiment, the images to be ranked may be hotel images, and this embodiment may be applied to image ranking of multiple scenes of an OTA platform, where different types of images to be ranked are selected according to different application scenes. In particular, when images in the image library are screened, images uploaded at a specific time can be searched from the image library according to a time period set by a user, and also can be screened and sequenced according to image categories preset by the user, wherein the image screening mode is not limited, and the user can carry out screening setting according to own needs. If not, the images to be sequenced in the invention are all images in the library.
Step S202, adding a classification label to the images to be ranked, wherein the classification label represents the type of the content shown in the images to be ranked.
For example, the categories of content shown in the hotel image may include, but are not limited to: hotel appearance, recreational, dining, guest room, and the like. Specifically, after the image features are extracted by using the deep convolutional neural network, the image features are input into the full-connection layer to classify the image types, the classified images are provided with a label, the label is used as the type of the image, and the subsequent images are sequenced in sequence under the same type in the same hotel.
Step S203, image quality score calculation is performed on the images to be ranked with the same classification labels, so as to obtain quality scores of the images to be ranked with the same classification labels.
And calculating the quality score of each image to be ranked, wherein the score is 1-5, and the quality score is higher as the score is higher.
And step S204, carrying out similarity calculation on the images to be sorted with the same classification labels, and classifying the images to be sorted with the similarity within a preset threshold range into a group of images to obtain a plurality of groups of images.
Step S205, quality sorting of the images to be sorted is carried out on the images in the groups.
In this embodiment, the quality score of the image is calculated with a score of 1 to 5, and the higher the score, the higher the quality score.
And S206, respectively selecting at least one image with the highest quality from each group of images for display.
According to the image sorting display method disclosed by the embodiment, after the images to be sorted are acquired, image quality score calculation is carried out on the images to be sorted, so that classification labels are added to the images to be sorted before the quality scores of the images to be sorted are obtained, and the images to be sorted are classified according to the content, so that similarity calculation of the images to be sorted is carried out only in the images to be sorted of the same type, the workload of similarity calculation of the images to be sorted is reduced, and the similarity calculation efficiency of the images to be sorted is improved.
Example 3
In this embodiment, in embodiment 1, step S102 and step S103 are thinned.
In this embodiment, as shown in FIG. 3-1, step S102 includes the following steps:
and S1021, labeling the quality of the sample image to obtain a labeled image with quality. Specifically, manual labeling can be adopted, and the quality of the mass fraction can be determined according to the requirements of a labeling operator.
And step S1022, constructing a basic convolutional neural network structure.
Step S1023, designing an objective function. The method for designing the objective function in specific implementation adopts a cross entropy loss algorithm after L2 regularization is added. The algorithm penalizes the network weight appropriately in the training process, controls the weight within an ideal range, and inhibits fitting. The objective function formula is as follows:
the former term of the formula is standard cross entropy loss, the latter term is L2 regular, lce is standard cross entropy loss function, W j Is the weight of the network, lambda is the super parameter and is set to 4.
In step S1024, setting the network super-parameters, in this embodiment, when setting the network super-parameters, the initial learning rate learning rate=0.01, and the learning rate is reduced to one tenth of the last time after each 5 epochs, the momentum momentum=0.9, and the weight decay weight decay=0.00001.
Step S1025, training the network to be converged, and storing the network weight.
And step S1026, loading the trained network weights, and performing scoring test on the images to be sequenced.
In this embodiment, step S1026 includes the following steps:
loading trained network weights.
Inputting images to be sequenced;
and outputting the quality probability through a softmax function, wherein the quality probability is calculated through weighted average post-processing, and the quality score after weighted processing is in a threshold range.
In this embodiment, the conventional one-hot encoding expression is no longer used, but the post-processing calculation of weighted average is performed on the posterior probability output of the softmax function, and the quality score after the weighted processing is between 1 and 5. In One-hot encoding expression, the quality of an image is divided into integer values, the integer values being One of 1,2,3,4, 5. And after weighted average processing calculation is carried out on posterior probability output of the softmax function, the output mass fraction is a small value between 1 and 5, the granularity is finer, and the degree of distinction is stronger.
In this embodiment, the calculation formula of the mass fraction probability:
x T representing network inputs, w representing network weights, P representing probability values for each input x, ultimately belonging to each quality score.
In this embodiment, the weight mass fraction calculation formula:
k represents the weight of each probability, and k is a natural number of 1 or more and 5 or less. Q represents the final weighted mass fraction.
In this embodiment, a quality score evaluation method based on deep learning is adopted to perform image quality score calculation on the images to be ranked, so that accuracy of the quality score calculation on the images to be ranked is improved. Meanwhile, the posterior probability output of the softmax function is used for carrying out weighted average post-processing calculation when the scoring test is carried out on the images to be sequenced, so that the distribution of the image quality scores is more uniform. The above steps can of course be equally applied in step S203 of embodiment 2 to achieve image quality score calculations for specific identical labels.
In this embodiment, as shown in fig. 3-2, step S103 includes the following steps:
s1031, preprocessing the images to be sequenced, wherein the preprocessing comprises scaling, gray processing and affine transformation so as to obtain a similarity image to be calculated;
s1032, extracting SIFT feature points and ORB feature points from the similarity image to be calculated to obtain SIFT feature points and ORB feature points of the similarity image to be calculated;
s1033, inputting ORB characteristic points into a similarity calculation formula, and calculating first similarity between every two images to be calculated;
S1034, judging whether the first similarity is larger than or equal to a preset first similarity threshold (e.g., 400), if so, the two corresponding similarity images to be calculated are similar, and if not, executing step S1035.
S1035, judging whether the first similarity is larger than a preset second similarity threshold (such as 200); if yes, S1036 is performed. If not, the two corresponding similarity images to be calculated are dissimilar.
S1036, inputting SIFT feature points of the two corresponding similarity images to be calculated into a similarity calculation formula, and calculating second similarity between the similarity images to be calculated.
S1037, judging whether the second similarity is larger than a preset third similarity threshold (e.g., 350), if yes, the two corresponding similarity images to be calculated are similar, and if not, the two corresponding similarity images to be calculated are dissimilar.
First similarity threshold > second similarity threshold.
The preset third similarity threshold value is between the first similarity threshold value and the second similarity threshold value.
The similarity formula is calculated in this embodiment:
wherein, matchRate is the matching rate, namely, scoring the similarity; kpts1 is a feature point of one picture, kpts2 is a feature point of another picture, the unit is the number of successfully matched feature points of the two pictures, and min is the minimum value of the number of the feature points of the two pictures.
The above formula is merely an example, and other similarity calculation formulas may be adopted according to practical situations.
In the embodiment, a mode of combining SIFT feature points and ORB feature points is adopted in the similarity calculation of the images to be sorted, so that feature dimensions are higher, expression capacity is stronger, and accuracy of the similarity calculation of the images to be sorted is improved. Of course, the above steps can be equally applied to step S204 of embodiment 2 to achieve image similarity calculation for specific identical labels.
Example 4
As shown in fig. 4, the present embodiment provides an image sorting display system, which includes an acquisition module 301, a quality score calculation module 302, a similarity calculation module 303, a sorting module 304, and a display module 305.
An acquiring module 301, configured to acquire images to be ranked.
The quality score calculating module 302 is configured to perform image quality score calculation on the images to be ranked, so as to obtain quality scores of the images to be ranked.
The similarity calculation module 303 is configured to perform similarity calculation on images to be ranked, and classify the images to be ranked, whose similarity is within a preset threshold range, into a group of images, so as to obtain a plurality of groups of images.
The sorting module 304 is configured to sort the quality scores of the images to be sorted for several groups of images.
And the display module 305 is used for respectively selecting at least one image with the highest quality from each group of images for display.
According to the image sorting display system disclosed by the embodiment, the quality score and the similarity are calculated on the images to be sorted by adopting the quality score calculation mode and the similarity calculation mode, so that different groups of images with high quality scores are displayed when the images are displayed. Compared with the sorting method in the prior art that hotel images take shooting time as sorting keywords, the method can enable the sorting of images with high quality to be more forward, enable the content of images browsed by users to be more diversified, and optimize the front-end display effect.
Example 5
As shown in fig. 5, in this embodiment, a tag module is added to embodiment 4, and the image sorting display system provided in this embodiment specifically includes an obtaining module 401, a tag module 402, a quality score calculating module 403, a similarity calculating module 404, a sorting module 405, and a display module 406.
An acquisition module 401, configured to acquire images to be ranked.
The tag module 402 is configured to add a classification tag to the image to be ranked, where the classification tag indicates a category of content shown in the image to be ranked.
The quality score calculating module 403 is configured to perform image quality score calculation on the images to be ranked having the same classification label, so as to obtain quality scores of the images to be ranked having the same classification label.
The similarity calculation module 404 is configured to perform similarity calculation on images to be sorted having the same classification label, and classify the images to be sorted having a similarity within a preset threshold range into a group of images, so as to obtain a plurality of groups of images.
The sorting module 405 is configured to sort the quality scores of the images to be sorted for the groups of images.
And the display module 406 is used for respectively selecting at least one image with the highest quality from each group of images for display.
According to the image sorting display system disclosed by the embodiment, after the images to be sorted are acquired, image quality score calculation is carried out on the images to be sorted, so that classification labels are added to the images to be sorted before the quality scores of the images to be sorted are obtained, and the images to be sorted are classified according to the content, so that similarity calculation of the images to be sorted is carried out only in the images to be sorted of the same type, the workload of similarity calculation of the images to be sorted is reduced, and the similarity calculation efficiency of the images to be sorted is improved.
Example 6
As shown in fig. 6-1, in the present embodiment, in embodiment 4, the unit setting is performed on the mass fraction calculating module 302.
In this embodiment, the mass fraction calculation module 302 includes a labeling unit 3021, a building unit 3022, a design unit 3023, a setting unit 3024, a training unit 3025, and a testing unit 3026.
The labeling unit 3021 is configured to quality-divide the sample image to obtain a labeled image with quality division.
A construction unit 3022 for constructing a basic convolutional neural network structure.
A design unit 3023 for designing an objective function; the design unit adopts a cross entropy loss algorithm after L2 regularization is added. The algorithm penalizes the network weight appropriately in the training process, controls the weight within an ideal range, and inhibits fitting. The objective function formula is as follows:
the former term of the formula is standard cross entropy loss, the latter term is L2 regular, lce is standard cross entropy loss function, W j Is the weight of the network, lambda is the super parameter and is set to 4.
A setting unit 3024, configured to set the network super parameter.
The training unit 3025 is configured to train the network to converge and store the network weight.
And the test unit 3026 is used for loading the trained network weights and performing scoring test on the images to be sequenced.
The test unit 3026 is further configured to load the trained network weights.
The test unit 3026 is further configured to input images to be sorted.
The test unit 3026 is further configured to output a quality score probability through a softmax function, where the quality score probability is calculated through weighted average post-processing, and the weighted quality score is between the threshold range.
In this embodiment, the probability calculation formula of mass fraction:
x T representing network inputs, w representing network weights, P representing probability values for each input x, ultimately belonging to each quality score.
In this embodiment, the weight mass fraction calculation formula:
k represents the weight of each probability, and k is a natural number of 1 or more and 5 or less. Q represents the final weighted mass fraction.
In this embodiment, the quality score calculating module performs image quality score calculation on the images to be ranked by adopting a quality score evaluation method based on deep learning, so that accuracy of the quality score calculation of the images to be ranked is improved. Meanwhile, the posterior probability output of the softmax function is used for carrying out weighted average post-processing calculation when the scoring test is carried out on the images to be sequenced, so that the distribution of the image quality scores is more uniform.
As shown in fig. 6-2, in this embodiment, in embodiment 4, the unit setting is performed on the similarity calculation module 303.
The similarity calculation module 303 includes:
a preprocessing unit 3031, configured to perform preprocessing on the images to be sequenced, where the preprocessing includes scaling, gray processing, and affine transformation, so as to obtain a similarity image to be calculated;
a feature extraction unit 3032, configured to extract SIFT feature points and ORB feature points of the similarity image to be calculated, so as to obtain SIFT feature points and ORB feature points of the similarity image to be calculated;
The similarity calculation unit 3033 inputs the ORB feature points into a similarity calculation formula to calculate a first similarity between every two similarity images to be calculated; in this embodiment, it is determined whether the first similarity is greater than or equal to a preset first similarity threshold (e.g., 400), if yes, the two corresponding images to be calculated are similar, and if no, it is determined whether the first similarity is greater than a preset second similarity threshold (e.g., 200). If the first similarity is greater than a second similarity threshold (e.g. 200), inputting SIFT feature points of the two corresponding similarity images to be calculated into a similarity calculation formula, and calculating the second similarity between the similarity images to be calculated. If the first similarity is smaller than or equal to a preset second similarity threshold (e.g. 200), the two corresponding similarity images to be calculated are dissimilar. And judging whether the second similarity is larger than a preset third similarity threshold (e.g. 350), if so, the two corresponding similarity images to be calculated are similar, and if not, the two corresponding similarity images to be calculated are dissimilar.
First similarity threshold > second similarity threshold.
The preset third similarity threshold value is between the first similarity threshold value and the second similarity threshold value.
The similarity formula is calculated in this embodiment:
wherein, matchRate is the matching rate, namely, scoring the similarity; kpts1 is a feature point of one picture, kpts2 is a feature point of another picture, the unit is the number of successfully matched feature points of the two pictures, and min is the minimum value of the number of the feature points of the two pictures.
The above formula is merely an example, and other similarity calculation formulas may be adopted according to practical situations.
In this embodiment, the similarity calculation module adopts a mode of combining SIFT feature points and ORB feature points when calculating the similarity of the images to be sorted, so that feature dimensions are higher, expression capability is stronger, and accuracy of calculating the similarity of the images to be sorted is improved.
Example 7
Fig. 7 is a schematic structural diagram of an electronic device according to embodiment 3 of the present invention. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed implements the image ordering display methods provided by embodiments 1 to 3. The electronic device 30 shown in fig. 7 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 7, the electronic device 30 may be embodied in the form of a general purpose computing device, which may be a server device, for example. Components of electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, a bus 33 connecting the different system components, including the memory 32 and the processor 31.
The bus 33 includes a data bus, an address bus, and a control bus.
Memory 32 may include volatile memory such as Random Access Memory (RAM) 321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as the image sorting presentation methods provided in embodiments 1 to 3 of the present invention, by running a computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through an input/output (I/O) interface 35. Also, model-generating device 30 may also communicate with one or more networks, such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet, via network adapter 36. As shown, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in connection with the model-generating device 30, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, data backup storage systems, and the like.
It should be noted that although several units/modules or sub-units/modules of an electronic device are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present invention. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
Example 8
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the image ordering display method provided by embodiments 1 to 3.
More specifically, among others, readable storage media may be employed including, but not limited to: portable disk, hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible embodiment, the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps of implementing the image ordering presentation method provided in embodiments 1 to 3, when said program product is run on the terminal device.
Wherein the program code for carrying out the invention may be written in any combination of one or more programming languages, which program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on the remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the invention, but such changes and modifications fall within the scope of the invention.

Claims (12)

1. An image ordering display method, which is characterized by comprising the following steps:
acquiring images to be sequenced;
performing image quality score calculation on the images to be ranked so as to obtain the image quality scores to be ranked;
performing similarity calculation on the images to be ranked, and classifying the images to be ranked, the similarity of which is within a preset threshold range, into a group of images to obtain a plurality of groups of images;
Sorting the quality scores of the images to be sorted on the groups of images;
at least one image with the highest quality is selected from each group of images for display;
the step of calculating the similarity of the images to be sorted, classifying the images to be sorted with the similarity within a preset threshold range into a group of images, and obtaining a plurality of groups of images comprises the following steps:
preprocessing the images to be sequenced, wherein the preprocessing comprises scaling, gray processing and affine transformation so as to obtain a similarity image to be calculated;
extracting SIFT feature points and ORB feature points from the similarity image to be calculated to obtain SIFT feature points and ORB feature points of the similarity image to be calculated;
inputting ORB corner feature points into a similarity calculation formula, and calculating first similarity between every two similarity images to be calculated;
judging whether the first similarity is larger than or equal to a preset first similarity threshold, if so, the two corresponding similarity images to be calculated are similar, and if not, judging whether the first similarity is larger than a preset second similarity threshold;
if the first similarity is larger than the second similarity threshold, inputting SIFT feature points of the two corresponding similarity images to be calculated into the similarity calculation formula, and calculating the second similarity between the similarity images to be calculated;
If the first similarity is smaller than or equal to the second similarity threshold, the two corresponding similarity images to be calculated are dissimilar;
judging whether the second similarity is larger than a preset third similarity threshold value or not; if so, the two corresponding similarity images to be calculated are similar, and if not, the two corresponding similarity images to be calculated are dissimilar;
the first similarity threshold > the second similarity threshold;
the preset third similarity threshold value is between the first similarity threshold value and the second similarity threshold value.
2. The image sorting display method according to claim 1, wherein the step of performing image quality score calculation on the image to be sorted to obtain the image quality score to be sorted includes:
labeling the quality of the sample image to obtain a labeled image with quality;
constructing a basic convolutional neural network structure;
designing an objective function;
setting a network super-parameter;
training the network until convergence, and storing the network weight;
and loading the trained network weight, and performing scoring test on the images to be sequenced.
3. The image ordering display method of claim 2, wherein the step of designing the objective function employs a cross entropy loss algorithm after adding L2 regularization.
4. The image ordering display method as set forth in claim 2, wherein the step of loading trains the network weights and scoring the images to be ordered in the library includes:
loading trained network weights;
inputting images to be sequenced;
and outputting the quality probability through a softmax function, wherein the quality probability is calculated through weighted average post-processing, and the quality score after weighted processing is in a threshold range.
5. The image ordering display method as claimed in claim 1, further comprising the steps of:
after the images to be sorted are acquired, performing image quality score calculation on the images to be sorted, and adding a classification label to the images to be sorted before the quality scores of the images to be sorted are obtained, wherein the classification label represents the type of the content shown in the images to be sorted;
the step of calculating the image quality score of the images to be ranked to obtain the quality score of the images to be ranked comprises the following steps:
performing image quality score calculation on the images to be sorted with the same classification labels to obtain quality scores of the images to be sorted with the same classification labels;
the method comprises the steps of carrying out similarity calculation on the images to be ranked, classifying the images to be ranked, of which the similarity is within a preset threshold range, into a group of images, and obtaining a plurality of groups of images, wherein the steps comprise: and carrying out similarity calculation on the images to be sequenced with the same classification labels, and classifying the images to be sequenced with the similarity within a preset threshold range into a group of images to obtain a plurality of groups of images.
6. An image ordering display system, the image ordering display system comprising:
the acquisition module is used for acquiring images to be sequenced;
the quality score calculating module is used for calculating the image quality score of the images to be sorted so as to obtain the quality score of the images to be sorted;
the similarity calculation module is used for calculating the similarity of the images to be sorted and classifying the images to be sorted, the similarity of which is within a preset threshold range, into a group of images so as to obtain a plurality of groups of images;
the sorting module is used for sorting the quality scores of the images to be sorted for the groups of images;
the display module is used for respectively selecting at least one image with the highest quality from each group of images for display;
the similarity calculation module comprises:
the preprocessing unit is used for preprocessing the images to be sequenced, wherein the preprocessing comprises scaling, gray processing and affine transformation so as to obtain a similarity image to be calculated;
the feature extraction unit is used for extracting SIFT feature points and ORB feature points from the similarity image to be calculated so as to obtain SIFT feature points and ORB feature points of the similarity image to be calculated;
the similarity calculation unit inputs ORB characteristic points into a similarity calculation formula, and calculates first similarity between every two similarity images to be calculated; judging whether the first similarity is larger than or equal to a preset first similarity threshold, if so, the two corresponding similarity images to be calculated are similar, and if not, judging whether the first similarity is larger than a preset second similarity threshold; if the first similarity is larger than the second similarity threshold, inputting SIFT feature points of the two corresponding similarity images to be calculated into the similarity calculation formula, and calculating the second similarity between the similarity images to be calculated; if the first similarity is smaller than or equal to the second similarity threshold, the two corresponding similarity images to be calculated are dissimilar;
Judging whether the second similarity is larger than a preset third similarity threshold value or not; if so, the two corresponding similarity images to be calculated are similar, and if not, the two corresponding similarity images to be calculated are dissimilar;
the first similarity threshold > the second similarity threshold;
the preset third similarity threshold value is between the first similarity threshold value and the second similarity threshold value.
7. The image ordering display system of claim 6, wherein the mass fraction calculation module includes:
the labeling unit is used for carrying out quality division on the sample image so as to obtain a labeled image with quality division;
the building unit is used for building a basic convolutional neural network structure;
a design unit for designing an objective function;
the setting unit is used for setting network super-parameters;
the training unit is used for training the network to be converged and storing the network weight;
and the test unit is used for loading the trained network weights and performing scoring test on the images to be sequenced.
8. The image ordering display system of claim 7, wherein the design unit employs a cross entropy loss algorithm after adding L2 regularization.
9. The image ordering display system of claim 7, wherein the test unit includes:
The loading subunit is used for loading the trained network weights;
an input subunit for inputting images to be ordered;
and the output subunit outputs the quality score probability through a softmax function, wherein the quality score probability is calculated through weighted average post-processing, and the quality score after weighted processing is in a threshold range.
10. The image ordering display system of claim 6, further comprising a label module:
the label module is used for carrying out image quality score calculation on the images to be sequenced after the images to be sequenced are acquired so as to add a classification label to the images to be sequenced before the quality scores of the images to be sequenced are obtained, wherein the classification label represents the type of the content shown in the images to be sequenced;
the quality score calculating module is used for calculating the image quality scores of the images to be sorted with the same classification labels so as to obtain the quality scores of the images to be sorted with the same classification labels;
the similarity calculation module is configured to perform similarity calculation on the images to be ranked, and classify the images to be ranked with similarity within a preset threshold range into a group of images, so as to obtain a plurality of groups of images, where the step of obtaining the group of images includes: and carrying out similarity calculation on the images to be sequenced with the same classification labels, and classifying the images to be sequenced with the similarity within a preset threshold range into a group of images to obtain a plurality of groups of images.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the image ordering presentation method of any of claims 1 to 5 when the computer program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the image ordering presentation method according to any one of claims 1 to 5.
CN201911153777.0A 2019-11-22 2019-11-22 Image ordering display method, system, device and storage medium Active CN110909193B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911153777.0A CN110909193B (en) 2019-11-22 2019-11-22 Image ordering display method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911153777.0A CN110909193B (en) 2019-11-22 2019-11-22 Image ordering display method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN110909193A CN110909193A (en) 2020-03-24
CN110909193B true CN110909193B (en) 2024-01-05

Family

ID=69818777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911153777.0A Active CN110909193B (en) 2019-11-22 2019-11-22 Image ordering display method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN110909193B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112099709B (en) * 2020-09-14 2023-02-24 Oppo广东移动通信有限公司 Method and device for arranging multimedia objects, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016189307A1 (en) * 2015-05-26 2016-12-01 Sonalytic Limited Audio identification method
CN106528879A (en) * 2016-12-14 2017-03-22 北京小米移动软件有限公司 Picture processing method and device
CN107194898A (en) * 2017-06-23 2017-09-22 携程计算机技术(上海)有限公司 The method for pushing of the methods of exhibiting of hotel's image, storage medium and hotel information
CN107729384A (en) * 2017-09-18 2018-02-23 维沃移动通信有限公司 Image ranking method and mobile terminal
JP2018124798A (en) * 2017-02-01 2018-08-09 東芝テック株式会社 Image search device and image search program
CN109325412A (en) * 2018-08-17 2019-02-12 平安科技(深圳)有限公司 Pedestrian recognition method, device, computer equipment and storage medium
CN109711245A (en) * 2018-11-05 2019-05-03 广东工业大学 A kind of closed loop detection method based on image candidate region
CN109801256A (en) * 2018-12-15 2019-05-24 华南理工大学 A kind of image aesthetic quality appraisal procedure based on area-of-interest and global characteristics

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016189307A1 (en) * 2015-05-26 2016-12-01 Sonalytic Limited Audio identification method
CN106528879A (en) * 2016-12-14 2017-03-22 北京小米移动软件有限公司 Picture processing method and device
JP2018124798A (en) * 2017-02-01 2018-08-09 東芝テック株式会社 Image search device and image search program
CN107194898A (en) * 2017-06-23 2017-09-22 携程计算机技术(上海)有限公司 The method for pushing of the methods of exhibiting of hotel's image, storage medium and hotel information
CN107729384A (en) * 2017-09-18 2018-02-23 维沃移动通信有限公司 Image ranking method and mobile terminal
CN109325412A (en) * 2018-08-17 2019-02-12 平安科技(深圳)有限公司 Pedestrian recognition method, device, computer equipment and storage medium
CN109711245A (en) * 2018-11-05 2019-05-03 广东工业大学 A kind of closed loop detection method based on image candidate region
CN109801256A (en) * 2018-12-15 2019-05-24 华南理工大学 A kind of image aesthetic quality appraisal procedure based on area-of-interest and global characteristics

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Finger gesture and pattern recognition based device security system";Shivam Khare等;《 2015 International Conference on Signal Processing and Communication (ICSC)》;第1-4页 *
"基于年龄变化的人脸识别";范铭升等;《科技风》;第1页 *

Also Published As

Publication number Publication date
CN110909193A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
Shinde et al. YOLO based human action recognition and localization
US11604822B2 (en) Multi-modal differential search with real-time focus adaptation
CN112632385A (en) Course recommendation method and device, computer equipment and medium
CN110297935A (en) Image search method, device, medium and electronic equipment
US10482146B2 (en) Systems and methods for automatic customization of content filtering
CN110059807A (en) Image processing method, device and storage medium
CN103164713A (en) Image classification method and device
CN111898703B (en) Multi-label video classification method, model training method, device and medium
CN110597978B (en) Article abstract generation method, system, electronic equipment and readable storage medium
CN107545276A (en) The various visual angles learning method of joint low-rank representation and sparse regression
CN107203558B (en) Object recommendation method and device, and recommendation information processing method and device
CN112148831B (en) Image-text mixed retrieval method and device, storage medium and computer equipment
CN112052387A (en) Content recommendation method and device and computer readable storage medium
JP2018509664A (en) Model generation method, word weighting method, apparatus, device, and computer storage medium
CN111950728A (en) Image feature extraction model construction method, image retrieval method and storage medium
Zhu et al. Topic hypergraph hashing for mobile image retrieval
CN114417058A (en) Video material screening method and device, computer equipment and storage medium
Chatfield et al. Efficient on-the-fly category retrieval using convnets and GPUs
CN111125469A (en) User clustering method and device for social network and computer equipment
CN113569895A (en) Image processing model training method, processing method, device, equipment and medium
CN110909193B (en) Image ordering display method, system, device and storage medium
US20100169292A1 (en) Slideshow video file detection
CN113190696A (en) Training method of user screening model, user pushing method and related devices
Liu et al. LIRIS-Imagine at ImageCLEF 2011 Photo Annotation Task.
CN111709473A (en) Object feature clustering method and device

Legal Events

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