The present disclosure relates to an image retrieving device and an image retrieving method.
Conventionally, there is an image retrieving device (hereinafter referred to as a “conventional image retrieving device”) including an image retrieving unit that retrieves a gallery image including a subject included in an image to be identified (hereinafter referred to as a “query image”) from among a plurality of images to be identified (hereinafter referred to as “gallery images”).
Meanwhile, as an image retrieval technique for retrieving an image similar to an image to be identified, Patent Literature 1 discloses a technique in which an image retrieving unit gives an image to be identified to a classifier and acquires an image similar to the image to be identified from the classifier.
Patent Literature 1: Japanese Patent Laid-Open Publication No. 2020-119508
In the conventional image retrieving device, there is a problem that the reliability of retrieval by the image retrieving unit cannot be checked. Therefore, it is not known whether the subject included in the gallery image retrieved by the image retrieving unit is the same as the subject included in the query image with a high probability, or is not the same with a high probability and there is a sufficient possibility of another subject.
Even with the image retrieval technique disclosed in Patent Literature 1, the reliability of retrieval by the image retrieving unit cannot be checked. Therefore, even if the image retrieval technique can be applied to a conventional image retrieving device, the above problem cannot be solved.
The present disclosure has been made to solve the above problems, and an object of the present disclosure is to obtain an image retrieving device and an image retrieving method capable of confirming the reliability of retrieval by an image retrieving unit.
An image retrieving device according to the present disclosure includes: processing circuitry configured to give a query image that is an image to be identified to a first learning model, acquire a feature vector of the query image from the first learning model, give each of a plurality of gallery images that are the images to be identified to the first learning model, and acquire a feature vector of each of the gallery images from the first learning model; give a query image to a second learning model, and acquire, from the second learning model, reliability of retrieval when K (K is an integer equal to or more than one) gallery images having a relatively high possibility of including a subject included in the query image are retrieved from the plurality of gallery images; retrieve K gallery images from the plurality of gallery images on the basis of the feature vector of the acquired query image and the feature vector of each of the gallery images; and specify the reliability of retrieval from the acquired reliability.
According to the present disclosure, it is possible to check the reliability of retrieval by the image retrieving unit.
Hereinafter, in order to explain the present disclosure in more detail, a mode for carrying out the present disclosure will be described based on the accompanying drawings.
The image retrieving device illustrated in
The feature vector acquiring unit 1 is implemented by, for example, a feature vector acquiring circuit 11 illustrated in
The feature vector acquiring unit 1 includes a first learning model 5. The first learning model 5 is generated by a learning device illustrated in
The feature vector acquiring unit 1 acquires a query image q that is an image to be identified, and acquires a gallery image group G including N gallery images g1 to gN that are images to be identified. N is an integer equal to or more than one.
The feature vector acquiring unit 1 gives the query image q to the first learning model 5 and acquires the feature vector Fvq of the query image q from the first learning model 5.
Moreover, the feature vector acquiring unit 1 gives the gallery image gn (n=1, . . . , N) to the first learning model 5 and acquires the feature vector Fvg,n of the gallery image gn from the first learning model 5.
Each of the feature vector Fvq and the feature vector Fvg,n, indicates the position in an image feature space. If the image feature space is a two-dimensional feature space, it is conceivable that the horizontal axis of the feature space indicates, for example, the distance between the left eye and the right eye of a human who is a subject, and the vertical axis of the feature space indicates, for example, the distance from the outer corner of the eye to the nose.
The image feature space is not limited to a two-dimensional feature space and may be, for example, a three-dimensional feature space.
The feature vector acquiring unit 1 outputs, to the image retrieving unit 3, each of the gallery image group G, the feature vector Fvq of the query image q, and the feature vector Fvg,n of the gallery image gn.
The reliability acquiring unit 2 is implemented by, for example, a reliability acquiring circuit 12 illustrated in
The reliability acquiring unit 2 includes a second learning model 6. The second learning model 6 is generated by a learning device illustrated in
The reliability acquiring unit 2 acquires the query image q.
The reliability acquiring unit 2 gives the query image q to the second learning model 6 and acquires the retrieval reliability D when K gallery images g1′ to gK′ having a relatively high possibility of including the subject included in the query image q among the N gallery images g1 to gN from the second learning model 6. K is an integer equal to or more than one and equal to or less than N.
The reliability acquiring unit 2 outputs the acquired reliability D to the reliability specifying unit 4.
The image retrieving unit 3 is implemented by, for example, an image retrieving circuit 13 illustrated in
The image retrieving unit 3 acquires each of the gallery image group G, the feature vector Fvq of the query image q, and the feature vector Fvg,n of the gallery image gn (n=1, . . . , N).
On the basis of the feature vector Fvq of the query image q and the feature vector Fvg,n of the gallery image gn, the image retrieving unit 3 retrieves K gallery images g1′ to gK′ having a relatively high possibility of including the subject included in the query image q from among the N gallery images g1 to gN.
The image retrieving unit 3 outputs the K gallery images g1′ to gK′ to the outside as image retrieval results, thereby causing a display or the like to display the K gallery images g1′ to gK′, for example.
The reliability specifying unit 4 is implemented by, for example, a reliability specifying circuit 14 illustrated in
The reliability specifying unit 4 acquires the reliability D from the reliability acquiring unit 2.
The reliability specifying unit 4 specifies the reliability of the retrieval by the image retrieving unit 3 from the reliability D acquired by the reliability acquiring unit 2.
In the image retrieving device illustrated in
The reliability specifying unit 4 outputs the reliability D of the retrieval by the image retrieving unit 3 to the outside, thereby causing a display or the like to display the reliability D of the retrieval by the image retrieving unit 3, for example.
In the image retrieving device illustrated in
In
Each of the feature vector acquiring circuit 11, the reliability acquiring circuit 12, the image retrieving circuit 13 and the reliability specifying circuit 14 corresponds to, for example, a single circuit, a composite circuit, a programmed processor, a parallel-programmed processor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a combination thereof.
The components of the image retrieving device are not limited to those implemented by dedicated hardware, and the image retrieving device may be implemented by software, firmware, or a combination of software and firmware.
The software or firmware is stored in a memory of a computer as a program. The computer means hardware that executes a program and corresponds to, for example, a central processing unit (CPU), a central processing device, a processing device, an arithmetic device, a microprocessor, a microcomputer, a processor or a digital signal processor (DSP).
In a case where the image retrieving device is implemented by software, firmware, or the like, a program for causing a computer to execute each processing procedure performed in the feature vector acquiring unit 1, the reliability acquiring unit 2, the image retrieving unit 3, and the reliability specifying unit 4 is stored in a memory 21. Then, a processor 22 of the computer executes the program stored in the memory 21.
Furthermore,
The learning device illustrated in
The first learning model generating unit 31 is implemented by, for example, a first learning model generating circuit 41 illustrated in
The first learning model generating unit 31 acquires a learning image group GG including learning images gg1 to ggM, which are M images for learning. M is an integer equal to or more than K. Identification information idm indicating a subject included in the learning image ggm is added to the learning image ggm.
The first learning model generating unit 31 extracts a feature vector Fvgg,m of the learning image ggm (m=1, . . . , M).
The first learning model generating unit 31 generates the first learning model 5 by using the M learning images gg1 to ggM and the M feature vectors Fvgg,1 to Fvgg,M.
That is, the first learning model generating unit 31 gives the learning image ggm (m=1, . . . , M) to the first learning model 5 and gives the feature vector Fvgg,m (m=1, . . . , M) to the first learning model 5 as teacher data, thereby causing the first learning model 5 to learn the feature vector Fvgg m of the learning image ggm.
When causing the first learning model 5 to learn the feature vector Fvgg,m of the learning image ggm, the first learning model generating unit 31 causes the first learning model 5 to learn the position in the image feature space indicated by the feature vector Fvgg,m by using, for example, a distance learning method called Triplet Loss as illustrated in
The first learning model generating unit 31 provides the learned first learning model 5 to the feature vector acquiring unit 1 of the image retrieving device illustrated in
The second learning model generating unit 32 is implemented by, for example, a second learning model generating circuit 42 illustrated in
The second learning model generating unit 32 acquires a learning image group GG including learning images gg1 to ggM, which are M learning images.
The second learning model generating unit 32 calculates the reliability Dm on the basis of the identification information idm added to the learning image ggm (m=1, . . . , M).
For example, if the second learning model generating unit 32 calculates the reliability D1, the second learning model generating unit 32 calculates a ratio indicating the same subject as the identification information id1 added to the learning image gg1 among the identification information id1 to idM added to the learning images gg1 to ggM.
For example, if the second learning model generating unit 32 calculates the reliability D2, the second learning model generating unit 32 calculates a ratio indicating the same subject as the identification information id2 added to the learning image gg2 among the identification information id1 to idM added to the learning images gg1 to ggM.
The second learning model generating unit 32 generates the second learning model 6 by using the M learning images gg1 to ggM and the M reliabilities D1 to DM.
That is, the second learning model generating unit 32 causes the second learning model 6 to learn the reliability Dm by giving the learning image ggm (m=1, . . . , M) to the second learning model 6 and giving the reliability Dm to the second learning model 6 as teacher data.
The second learning model generating unit 32 gives the learned second learning model 6 to the reliability acquiring unit 2 of the image retrieving device illustrated in
In
Each of the first learning model generating circuit 41 and the second learning model generating circuit 42 corresponds to, for example, a single circuit, a composite circuit, a programmed processor, a parallel-programmed processor, ASIC, FPGA, or a combination thereof.
The components of the learning device are not limited to those implemented by dedicated hardware, and the learning device may be implemented by software, firmware, or a combination of software and firmware.
In a case where the learning device is implemented by software, firmware, or the like, a program for causing a computer to execute each processing procedure performed in the first learning model generating unit 31 and the second learning model generating unit 32 is stored in a memory 51. Then, a processor 52 of the computer executes the program stored in the memory 51.
Furthermore,
First, the operation of the learning device illustrated in
The first learning model generating unit 31 acquires the learning image group GG including M learning images gg1 to ggM as illustrated in
In the example of
Therefore, in the example of
The first learning model generating unit 31 extracts a feature vector Fvgg,m, of the learning image ggm (m=1, . . . , M). Since the processing itself of extracting the feature vector Fvgg,m of the learning image ggm is a known technique, detailed description thereof will be omitted.
The first learning model generating unit 31 gives the learning image ggm (m=1, . . . , M) to the first learning model 5 and gives the feature vector Fvgg,m (m=1, . . . , M) to the first learning model 5 as teacher data, thereby causing the first learning model 5 to learn the feature vector Fvgg m of the learning image ggm.
When causing the first learning model 5 to learn the feature vector Fvgg,m of the learning image ggm, the first learning model generating unit 31 causes the first learning model 5 to learn the feature vector Fvgg m of the learning image ggm in such a way that the positions of the learning images, in which the subjects indicated by the identification information idm are the same, keep close to each other among the M learning images gg1 to ggM, as illustrated in
In the learning device illustrated in
In the learning device illustrated in
In the example of
The image feature space illustrated in
The first learning model generating unit 31 provides the learned first learning model 5 to the feature vector acquiring unit 1 of the image retrieving device illustrated in
The second learning model generating unit 32 acquires a learning image group GG including learning images gg1 to ggm, which are M learning images.
The second learning model generating unit 32 calculates the reliability Dm on the basis of the identification information idm added to the learning image ggm (m=1, . . . , M).
That is, the second learning model generating unit 32 sequentially acquires each of the learning images ggm from the learning image group GG and sets the acquired learning image ggm as a reference image ggref.
The second learning model generating unit 32 calculates, as the reliability Dm, a ratio indicating the same subject as the subject indicated by the identification information idm added to the reference image ggref among the identification information id1 to idM added to the M learning images gg1 to ggm.
For example, if M=10 and the number of learning images ggm including the same subject as the subject indicated by the identification information idm added to the reference image ggref is six, the reliability Dm is 60=(6/10)×100 [%].
For example, if M=8 and the number of learning images ggm including the same subject as the subject indicated by the identification information idm added to the reference image ggref is five, the reliability Dm is 62.5=(5/8)×100 [%].
The second learning model generating unit 32 causes the second learning model 6 to learn the reliability Dm by giving the learning image ggm (m=1, . . . , M) to the second learning model 6 and giving the reliability Dm (m=1, . . . , M) to the second learning model 6 as teacher data.
The second learning model generating unit 32 gives the learned second learning model 6 to the reliability acquiring unit 2 of the image retrieving device illustrated in
Next, the operation of the image retrieving device illustrated in
The feature vector acquiring unit 1 acquires, for example, a query image q and a gallery image group G including N gallery images g1 to gN as illustrated in
In the example of
The feature vector acquiring unit 1 gives the query image q to the first learning model 5 and acquires the feature vector Fvq of the query image q from the first learning model 5 (Step ST1 in
Moreover, the feature vector acquiring unit 1 gives the gallery image gn (n=1, . . . , N) to the first learning model 5 and acquires the feature vector Fvg,m of the gallery image gn from the first learning model 5 (Step ST2 in
The feature vector acquiring unit 1 outputs, to the image retrieving unit 3, each of the gallery image group G, the feature vector Fvq of the query image q, and the feature vector Fvg,m of the gallery image gn.
The reliability acquiring unit 2 acquires the query image q.
The reliability acquiring unit 2 gives the query image q to the second learning model 6 and acquires the reliability D from the second learning model 6 (Step ST3 in
The reliability acquiring unit 2 outputs the reliability D to the reliability specifying unit 4.
The image retrieving unit 3 acquires each of the gallery image group G, the feature vector Fvq of the query image q, and the feature vector Fvg,m of the gallery image gn (n=1, . . . , N) from the feature vector acquiring unit 1.
The image retrieving unit 3 calculates a Euclidean distance Ln between the feature vector Fvq of the query image q and the feature vector Fvg,m of the gallery image gn as the similarity Sn between the query image q and the gallery image gn (n=1, . . . , N). The shorter the Euclidean distance Ln, the higher the similarity Sn between the query image q and the gallery image gn. Since the calculation processing of the Euclidean distance Ln itself is a known technique, detailed description thereof will be omitted.
From the N gallery images g1 to gN, the image retrieving unit 3 retrieves K gallery images to gK′ having a relatively high similarity Sn with the query image q as K gallery images g1′ to gK′ having a relatively high possibility of including the subject included in the query image q (Step ST4 in
In the example of
In
The similarity Sk of the gallery image gk′ (k=1, . . . , K) to the query image q is represented by a Euclidean distance Lk between the feature vector Fvq of the query image q and the feature vector Fvg,k of the gallery image gk′.
In the example of
Herein, the similarity Sk of the gallery image gk′ to the query image q is represented by the Euclidean distance Lk. However, this is merely an example, and the similarity Sk may be represented by, for example, cosine similarity of the gallery image gk′ with respect to the query image q.
In the example of
In the case of K=2, the image retrieving unit 3 outputs the gallery images g1′ and g2′ to the outside as K gallery images g1′ to gK′ having a relatively high possibility of including the subject included in the query image q.
Moreover, in the case of K=5, there are the gallery images g1′, g3′, and g4′ including the subject included in the query image q and the gallery images g2′ and g5′ not including the subject included in the query image q among the K gallery images g1′ to gK′.
In the case of K=5, the image retrieving unit 3 outputs the gallery images g1′, g2′, g3′, g4′, and g5′ to the outside as the K gallery images g1′ to gK′ having a relatively high possibility of including the subject included in the query image q.
The image retrieving unit 3 outputs the K gallery images g1′ to gK′ to the outside as image retrieval results, thereby causing a display or the like to display the K gallery images g1′ to gK′, for example.
The reliability specifying unit 4 acquires the reliability D from the reliability acquiring unit 2.
The reliability specifying unit 4 specifies the reliability of the retrieval by the image retrieving unit 3 from the reliability D acquired by the reliability acquiring unit 2 (Step ST5 in
In the image retrieving device illustrated in
The reliability specifying unit 4 outputs the reliability D of the retrieval by the image retrieving unit 3 to the outside, thereby causing a display or the like to display the reliability D of the retrieval by the image retrieving unit 3, for example.
In the example of
In the example of
In the first embodiment described above, the image retrieving device includes: the feature vector acquiring unit 1 to give a query image that is an image to be identified to the first learning model 5, acquire a feature vector of the query image from the first learning model 5, give each of a plurality of gallery images that are images to be identified to the first learning model 5, and acquire a feature vector of each of the gallery images from the first learning model 5; and the reliability acquiring unit 2 to give the query image to the second learning model 6, and acquire, from the second learning model 6, reliability of retrieval when K (K is an integer equal to or more than one) gallery images having a relatively high possibility of including a subject included in the query image among the plurality of gallery images are retrieved. Moreover, the image retrieving device further includes: the image retrieving unit 3 to retrieve K gallery images from among the plurality of gallery images on the basis of the feature vector of the query images and the feature vector of each of the gallery images acquired by the feature vector acquiring unit 1; and a reliability specifying unit 4 to specify the reliability of the retrieval by the image retrieving unit 3 from the reliability acquired by the reliability acquiring unit 2. Therefore, the image retrieving device can check the reliability of retrieval by the image retrieving unit 3.
In a second embodiment, an image retrieving device will be described in which a reliability acquiring unit 61 gives a query image q to a second learning model 63 and acquires the reliability of the group from the second learning model 63 as the reliability of retrieval.
The image retrieving device illustrated in
The M learning images gg1 to ggM are grouped by reliability. The M learning images gg1 to ggM are classified into, for example, J groups GP1 to GPJ−. J is an integer equal to or more than one and equal to or less than M.
If J=3 and M=16, for example, there is a case where the learning images gg1 to gg3 are classified into the group GP1 with the reliability ○○%, the learning images gg4 to gg10 are classified into the group GP2 with the reliability ΔΔ%, and the learning images gg11 to gg16 are classified into the group GP3with the reliability □□%.
The second learning model 63 is a learning model in which the learning of the reliability Dj for the group GPj is performed when the learning image ggm (m=1, . . . , M) and the reliability Dj for the group GPj including the learning image ggm are given.
The reliability acquiring unit 61 is implemented by, for example, a reliability acquiring circuit 15 illustrated in
The reliability acquiring unit 61 includes a second learning model 63. The second learning model 63 is generated by a learning device illustrated in
The reliability acquiring unit 61 acquires a query image q.
The reliability acquiring unit 61 gives the query image q to the second learning model 63 and acquires the reliability Dj′ for the group GPj′ as the reliability of the retrieval when K gallery images g1′ to gK′ having a relatively high possibility of including the subject included in the query image q among the N gallery images g1 to gN are retrieved from the second learning model 63.
The reliability acquiring unit 61 outputs the reliability Dj′ for the group GPj′ to the reliability specifying unit 62.
The reliability specifying unit 62 is implemented by, for example, a reliability specifying circuit 16 illustrated in
The reliability specifying unit 62 acquires the reliability Dj′ for the group GPj′ from the reliability acquiring unit 61.
The reliability specifying unit 62 specifies the reliability of the retrieval by the image retrieving unit 3 from the reliability Dj′ for the group GPj′ acquired by the reliability acquiring unit 61.
In the image retrieving device illustrated in
The reliability specifying unit 62 outputs the reliability Dj′ of the retrieval by the image retrieving unit 3 to the outside, thereby causing a display or the like to display the reliability Dj′ of the retrieval by the image retrieving unit 3, for example.
In
Each of the feature vector acquiring circuit 11, the reliability acquiring circuit 15, the image retrieving circuit 13 and the reliability specifying circuit 16 corresponds to, for example, a single circuit, a composite circuit, a programmed processor, a parallel-programmed processor, ASIC, FPGA or a combination thereof.
The components of the image retrieving device are not limited to those implemented by dedicated hardware, and the image retrieving device may be implemented by software, firmware, or a combination of software and firmware.
In a case where the image retrieving device is implemented by software, firmware, or the like, a program for causing a computer to execute each processing procedure performed in the feature vector acquiring unit 1, the reliability acquiring unit 61, the image retrieving unit 3, and the reliability specifying unit 62 is stored in the memory 21 illustrated in
Furthermore,
The learning device illustrated in
The second learning model generating unit 33 is implemented by, for example, a second learning model generating circuit 43 illustrated in
The second learning model generating unit 33 acquires a learning image group GG including learning images gg1 to ggm, which are M learning images.
The second learning model generating unit 33 acquires the reliability Dj for the group GPj (j=1, . . . , J) including the learning image ggm (m=1, . . . , M).
The second learning model generating unit 33 generates the second learning model 63 by using the learning image ggm (m=1, . . . , M) and the reliability Dj for the group GPj (j=1, . . . , J).
That is, the second learning model generating unit 33 gives the learning image ggm (m=1, . . . , M) to the second learning model 63 and gives the reliability Dj for the group GPj to the second learning model 63 as teacher data, thereby causing the second learning model 63 to learn the reliability Dj for the group GPj.
The second learning model generating unit 33 gives the learned second learning model 63 to the reliability acquiring unit 61 of the image retrieving device illustrated in
In
Each of the first learning model generating circuit 41 and the second learning model generating circuit 43 corresponds to, for example, a single circuit, a composite circuit, a programmed processor, a parallel-programmed processor, ASIC, FPGA or a combination thereof.
The components of the learning device are not limited to those implemented by dedicated hardware, and the learning device may be implemented by software, firmware, or a combination of software and firmware.
In a case where the learning device is implemented by software, firmware, or the like, a program for causing a computer to execute each processing procedure in the first learning model generating unit 31 and the second learning model generating unit 33 is stored in the memory 51 illustrated in
Furthermore,
First, the operation of the learning device illustrated in
In the learning device illustrated in
The second learning model generating unit 33 acquires a learning image group GG including learning images gg1 to ggM, which are M learning images.
Moreover, the second learning model generating unit 33 acquires the reliability Dj for the group GPj (j=1, . . . , J) including the learning image ggm (m=1, . . . , M).
The second learning model generating unit 33 may recognize the group GPj including the learning image ggm in advance, or may acquire information indicating the group GPj including the learning image ggm from the outside.
The second learning model generating unit 33 gives the learning image ggm (m=1, . . . , M) to the second learning model 63 and gives the reliability Dj for the group GPj to the second learning model 63 as teacher data, thereby causing the second learning model 63 to learn the reliability Dj for the group GPj.
The second learning model generating unit 33 gives the learned second learning model 63 to the reliability acquiring unit 61 of the image retrieving device illustrated in
Next, the operation of the image retrieving device illustrated in
The reliability acquiring unit 61 acquires a query image q.
The reliability acquiring unit 61 gives the query image q to the second learning model 63 and acquires the reliability Dj′ for the group GPj′ from the second learning model 63.
The reliability acquiring unit 61 outputs the reliability Dj′ for the group GPj′ to the reliability specifying unit 62.
The reliability specifying unit 62 acquires the reliability Dj′ for the group GPj′ from the reliability acquiring unit 61.
The reliability specifying unit 62 specifies the reliability of the retrieval by the image retrieving unit 3 from the reliability Dj′ for the group GPj′ acquired by the reliability acquiring unit 61.
That is, the reliability specifying unit 62 sets the reliability Dj′ for the group GPj′ as the reliability of the retrieval by the image retrieving unit 3.
The reliability specifying unit 62 outputs the reliability Dj′ of the retrieval by the image retrieving unit 3 to the outside, thereby causing a display or the like to display the reliability Dj′ of the retrieval by the image retrieving unit 3, for example.
In the second embodiment described above, learning images, which are a plurality of images for learning, are grouped by reliability, and the second learning model 63 is a learning model in which learning of reliability is performed when each learning image is given and the reliability for a group including each learning image is given as teacher data. The reliability acquiring unit 61 of the image retrieving device illustrated in
In a third embodiment, an image retrieving device will be described in which a reliability acquiring unit 64 gives a query image q to a second learning model 66 and acquires the reliability of a distance class from the second learning model 66 as the reliability of retrieval.
The image retrieving device illustrated in
The M learning images gg1 to ggM included in the learning image group GG are classified into, for example, U distance classes CLu (u=1, . . . , U). U is an integer equal to or more than one and equal to or less than M.
That is, each of the M learning images gg1 to ggM is sequentially set as the reference image ggref. The degree of similarity between each of the reference images ggref and the learning image ggm′ that is included in the learning image group GG and is each of the learning images ggm other than the reference image ggref is represented by the distance between the position of the reference image ggref in the image space and the position of each of the learning images ggm′ in the image space.
Then, each learning image ggm′ is classified into any one of the U distance classes CL1 to CLu depending on the distance to the reference image ggref.
The second learning model 66 is a learning model in which the degree of reliability Du for the distance class CLu is learned when the reference image ggref and the degree of reliability Du for the distance class CLu (u=1, . . . , U) are given.
The reliability D u for the distance class CLu is calculated from a first frequency Pu that is a ratio of the learning image including the subject included in the reference image ggref and a second frequency Pu′ that is a ratio of the learning image not including the subject included in the reference image ggref among the learning images ggm included in the distance class CLu, as shown in the following expression (1).
D
u
=P
u/(Pu+Pu′) (1)
The reliability acquiring unit 64 is implemented by, for example, a reliability acquiring circuit 17 illustrated in
The reliability acquiring unit 64 includes a second learning model 66. The second learning model 66 is generated by a learning device illustrated in
The reliability acquiring unit 64 acquires a query image q.
The reliability acquiring unit 64 gives the query image q to the second learning model 66 and acquires the reliability Du′ of the distance class CLu′ (u=1, . . . , U) as the reliability of the retrieval when K gallery images g1′ to gK′ having a relatively high possibility of including the subject included in the query image q among the N gallery images g1 to gN are retrieved from the second learning model 66.
The reliability acquiring unit 64 outputs the reliability Du′ of the distance class CLu′ to the reliability specifying unit 65.
The reliability specifying unit 65 is implemented by, for example, a reliability specifying circuit 18 illustrated in
The reliability specifying unit 65 acquires the reliability Du′ for the distance class CLu′ (u=1, . . . , U) from the reliability acquiring unit 64.
The reliability specifying unit 65 acquires the reliability Dk′ of the distance class CLk′ including the gallery image gk′ (k=1, . . . , K) retrieved by the image retrieving unit 3 from the U distance classes CL1′ to CLu′ as the reliability of the retrieval by the image retrieving unit 3.
The reliability specifying unit 65 calculates the reliability of the retrieval by the image retrieving unit 3 from the acquired reliability Dk′ of the distance class CLk′.
The reliability specifying unit 65 outputs the reliability of the retrieval by the image retrieving unit 3 to the outside, thereby causing a display or the like to display the reliability of the retrieval by the image retrieving unit 3, for example.
In
Each of the feature vector acquiring circuit 11, the reliability acquiring circuit 17, the image retrieving circuit 13 and the reliability specifying circuit 18 corresponds to, for example, a single circuit, a composite circuit, a programmed processor, a parallel-programmed processor, ASIC, FPGA or a combination thereof.
The components of the image retrieving device are not limited to those implemented by dedicated hardware, and the image retrieving device may be implemented by software, firmware, or a combination of software and firmware.
In a case where the image retrieving device is implemented by software, firmware, or the like, a program for causing a computer to execute each processing procedure performed in the feature vector acquiring unit 1, the reliability acquiring unit 64, the image retrieving unit 3, and the reliability specifying unit 65 is stored in the memory 21 illustrated in
Furthermore,
The learning device illustrated in
The second learning model generating unit 34 is implemented by, for example, a second learning model generating circuit 44 illustrated in
The second learning model generating unit 34 acquires a learning image group GG including learning images gg1 to ggM, which are M learning images.
The second learning model generating unit 34 acquires the reliability Du for the distance class CLu (u=1, . . . , U) including the learning image ggm (m=1, . . . , M).
The second learning model generating unit 34 generates the second learning model 66 by using the learning image ggm (m=1, . . . , M) and the reliability Du for the distance class CLu (u=1, . . . , U).
That is, the second learning model generating unit 34 sequentially sets each of the M learning images gg1 to ggM as the reference image ggref.
Then, the second learning model generating unit 34 gives the set reference image ggref to the second learning model 66 and gives the teacher data to the second learning model 66, thereby causing the second learning model 66 to learn the reliability Du for the distance class CLu (u=1, . . . , U). The teacher data is the reliability Du for the distance class CLu (u=1, . . . , U) including the learning image ggm′, which is each learning image ggm other than the set reference image ggref, among the learning images gg1 to ggM included in the learning image group GG.
The second learning model generating unit 34 gives the learned second learning model 66 to the reliability acquiring unit 64 of the image retrieving device illustrated in
In
Each of the first learning model generating circuit 41 and the second learning model generating circuit 44 corresponds to, for example, a single circuit, a composite circuit, a programmed processor, a parallel-programmed processor, ASIC, FPGA or a combination thereof.
The components of the learning device are not limited to those implemented by dedicated hardware, and the learning device may be implemented by software, firmware, or a combination of software and firmware.
In a case where the learning device is implemented by software, firmware, or the like, a program for causing a computer to execute each processing procedure in the first learning model generating unit 31 and the second learning model generating unit 34 is stored in the memory 51 illustrated in
Furthermore,
First, the operation of the learning device illustrated in
In the learning device illustrated in
For example, if M=5 and the reference image ggref is the learning image gg2, the learning image gg1′ is the learning image gg1, the learning image gg2′ is the learning image gg3, the learning image gg3′ is the learning image gg4, and the learning image gg4′ is the learning image gg5.
For example, if M=5 and the reference image ggref is the learning image gg3, the learning image gg1′ is the learning image gg1, the learning image gg2′ is the learning image gg2, and the learning image gg3′ is the learning image gg4, and the learning image gg4′ is the learning image gg5.
The learning image ggm′ (m=1, . . . , M−1) is classified into any one of the distance classes CLu (u=1, . . . , U) of the U distance classes CL1 to CLu depending on the distance to the reference image ggref.
The second learning model generating unit 34 acquires a learning image group GG including learning images gg1 to ggM, which are M learning images.
The second learning model generating unit 34 acquires the reliability Du for the distance class CLu (u=1, . . . , U) including the learning image ggm (m=1, . . . , M).
That is, the second learning model generating unit 34 sequentially sets each of the M learning images gg1 to ggM as the reference image ggref and acquires the reliability Du for the distance class CLu (u=1, . . . , U) including the learning image gg′ that is each learning image ggm other than the set reference image ggref among the M learning images gg1 to ggM.
The second learning model generating unit 34 gives the set reference image ggref to the second learning model 66 and gives the teacher data to the second learning model 66, thereby causing the second learning model 66 to learn the reliability Du for the distance class CLu (u=1, . . . , U). The teacher data is the reliability Du for the distance class CLu (u=1, . . . , U) including the (M−1) learning images gg1′ to ggM−1.
The second learning model generating unit 34 gives the learned second learning model 66 to the reliability acquiring unit 64 of the image retrieving device illustrated in
Next, the operation of the image retrieving device illustrated in
The reliability acquiring unit 64 acquires a query image q.
The reliability acquiring unit 64 gives the query image q to the second learning model 66 and acquires the reliability Du′ for the distance class CLu′ (u=1, . . . , U) from the second learning model 66.
The reliability acquiring unit 64 outputs the reliability Du′ of the distance class CLu′ to the reliability specifying unit 65.
The reliability Du′ for the distance class CLu′ can be calculated from a first frequency Pu, which is a ratio of the gallery image including the subject included in the query image q, and a second frequency Pu′, which is a ratio of the gallery image not including the subject included in the query image q, among the gallery images gn (n=1, . . . , N) included in the distance class CLu′, as shown in the following expression (2).
D
u
′=P
u/(Pu+Pu′) (2)
In
The reliability specifying unit 65 acquires the reliability Du′ for the distance class CLu′ (u=1, . . . , U) from the reliability acquiring unit 64.
The reliability specifying unit 65 acquires K gallery images to gK′ from the image retrieving unit 3 and acquires the Euclidean distance Lk between the feature vector Fvq of the query image q and the gallery image gk′ (k=1, . . . , H) from the image retrieving unit 3.
The reliability specifying unit 65 specifies the distance class CLk ′ including the gallery image gk′ among the U distance classes CL1′ to CLu′ on the basis of the Euclidean distance Lk between the feature vector Fvq of the query image q and the gallery image gk′ (k=1, . . . , H).
Then, the reliability specifying unit 65 specifies the reliability Dk′ of the distance class CLk′ including the gallery image gk′ (k=1, . . . , K) retrieved by the image retrieving unit 3 from the reliability Du′ of the U distance classes CL1′ to CLu′.
For example, when K=2 and the gallery image gk′ retrieved by the image retrieving unit 3 is the gallery images and g2′, the reliability specifying unit 65 acquires the reliability Dk′ for the distance class CLk′ including the gallery image and the reliability Dk′ for the distance class CLk′ including the gallery image g2′.
For example, when K=5 and the gallery image gk′ retrieved by the image retrieving unit 3 is the gallery images g4′ and g5′ the reliability specifying unit 65 acquires the reliability Dk′ for the distance class CLk′ including the gallery image and the reliability Dk′ for the distance class CLk′ including the gallery image g2′ . Moreover, the reliability specifying unit 65 acquires the reliability Dk′ for the distance class CLk′ including the gallery image g3′, the reliability Dk′ for the distance class CLk′ including the gallery image g4′, and the reliability Dk′ for the distance class CLk′ including the gallery image g5′.
When the number of the gallery images gk′ retrieved by the image retrieving unit 3 is one and the number of the reliability Dk′ for the acquired distance class CLk′ is one, the reliability specifying unit 65 outputs the reliability Dk′ for one distance class CLk′ to the outside as the reliability Dj′ of the retrieval by the image retrieving unit 3.
When the number of the gallery images gk′ retrieved by the image retrieving unit 3 is plural and the number of the reliabilities Dk′ for the acquired distance classes CLk′ is plural, the reliability specifying unit 65 calculates an average value, a median value, or the like of the reliabilities Dk′ for the plurality of distance classes CLk′ as the reliability Dj of the retrieval by the image retrieving unit 3.
The reliability specifying unit 65 outputs the reliability Dj′ of the retrieval by the image retrieving unit 3 to the outside, thereby causing a display or the like to display the reliability Dj′ of the retrieval by the image retrieving unit 3, for example.
In the third embodiment described above, the image retrieving device illustrated in
Note that, in the present disclosure, it is possible to freely combine each of the embodiments, to modify any components of each embodiment, or to omit any components in each embodiment.
The present disclosure is suitable for an image retrieving device and an image retrieving method.
1: feature vector acquiring unit, 2, 61, 64: reliability acquiring unit, 3: image retrieving unit, 4, 62, 65: reliability specifying unit, 5: first learning model, 6, 63, 66: second learning model, 11: feature vector acquiring circuit, 12, 15, 17: reliability acquiring circuit, 13: image retrieving circuit, 14, 16, 18: reliability specifying circuit, 21: memory, 22: processor, 31: first learning model generating unit, 32, 33, 34: second learning model generating unit, 41: first learning model generating circuit, 42, 43, 44: second learning model generating circuit, 51: memory, 52: processor
This application is a Continuation of PCT International Application No. PCT/JP2021/031270 filed on Aug. 26, 2021, which is hereby expressly incorporated by reference into the present application.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2021/031270 | Aug 2021 | US |
Child | 18419849 | US |