Cross-domain image comparison method and system using semantic segmentation
11610391 · 2023-03-21
Assignee
Inventors
Cpc classification
G06V20/41
PHYSICS
G06V10/75
PHYSICS
G06V10/25
PHYSICS
International classification
G06V10/75
PHYSICS
Abstract
A cross-domain image comparison method and a cross-domain image comparison system are provided. The cross-domain image comparison method includes the following steps. Two videos in cross-domain are obtained. The videos are generated by different types of devices. A plurality of semantic segmentation areas are obtained from one frame of each of the videos. A region of interest pair (ROI pair) is obtained according to moving paths of the semantic segmentation areas in the videos. Two bounding boxes and two central points of the ROI pair are obtained. A similarity between the frames is obtained according to the bounding boxes and the central points.
Claims
1. A cross-domain image comparison method, comprising: obtaining two videos in cross-domain, wherein the videos are generated by different types of devices; obtaining a plurality of semantic segmentation areas from one frame of each of the videos; obtaining a region of interest pair (ROI pair) according to moving paths of the semantic segmentation areas in the videos; obtaining two bounding boxes and two central points of the bounding boxes, wherein each of the two bounding boxes surrounds one of the semantic segmentation areas; and obtaining a similarity between the frames according to the bounding boxes and the central points.
2. The cross-domain image comparison method according to claim 1, wherein one of the videos is captured by a camera and another one of the videos is generated by a computer.
3. The cross-domain image comparison method according to claim 1, wherein in the step of obtaining the semantic segmentation areas, the semantic segmentation areas are obtained via a semantic segmentation model, and the semantic segmentation model is a Fully Convolutional Networks model (FCN model), an U-net model or an efficient neural network model (Enet model).
4. The cross-domain image comparison method according to claim 1, the step of obtaining the similarity between the frames includes: averaging a position similarity degree of the ROI pair, an angle similarity degree of the ROI pair, a size similarity degree of the ROI pair and a contour similarity of the ROI pair with weightings, to obtain the similarity between the frames.
5. The cross-domain image comparison method according to claim 4, wherein the step of obtaining the similarity between the frames further includes: analyzing an Euclidean distance between the central points, to obtain the position similarity degree of the ROI pair.
6. The cross-domain image comparison method according to claim 4, wherein the step of obtaining the similarity between the frames further includes: analyzing a relative angle between the bounding boxes, to obtain the angle similarity degree of the ROI pair.
7. The cross-domain image comparison method according to claim 4, wherein the step of obtaining the similarity between the frames further includes: analyzing a diagonal length of each of the bounding boxes, to obtain the size similarity degree of the ROI pair.
8. The cross-domain image comparison method according to claim 4, wherein the step of obtaining the similarity between the frames further includes: analyzing two counters of the semantic segmentation areas corresponding the ROI pair, to obtain the contour similarity degree.
9. The cross-domain image comparison method according to claim 8, wherein the counters are resized to be identical size.
10. The cross-domain image comparison method according to claim 1, wherein the two semantic segmentation areas corresponding the ROI pair are obtained from the two different videos.
11. A cross-domain image comparison system, comprising: an inputting unit, used for obtaining two videos in cross-domain, wherein the videos are generated by different types of devices; a semantic segmentation unit, used for obtaining a plurality of semantic segmentation areas from one frame of each of the videos; a ROI unit, used for obtaining a region of interest pair (ROI pair) according to moving paths of the semantic segmentation areas in the videos; a bounding box unit, used for obtaining two bounding boxes and two central points of the bounding boxes, wherein each of the two bounding surrounds one of the semantic segmentation areas; and a similarity unit, used for obtaining a similarity between the frames according to the bounding boxes and the central points.
12. The cross-domain image comparison system according to claim 11, wherein one of the videos is captured by a camera and another one of the videos is generated by a computer.
13. The cross-domain image comparison system according to claim 11, wherein the semantic segmentation unit obtains the semantic segmentation areas via a semantic segmentation model, and the semantic segmentation model is a Fully Convolutional Networks model (FCN model), an U-net model or an efficient neural network model (Enet model).
14. The cross-domain image comparison system according to claim 11, wherein the similarity unit includes: a score calculator, used for averaging a position similarity degree of the ROI pair, an angle similarity degree of the ROI pair, a size similarity degree of the ROI pair and a contour similarity degree of the ROI pair with weightings, to obtain the similarity between the frames.
15. The cross-domain image comparison system according to claim 14, wherein the similarity unit further includes: a position similarity analyzer, used for analyzing an Euclidean distance between the central points, to obtain the position similarity degree of the ROI pair.
16. The cross-domain image comparison system according to claim 14, wherein the similarity unit further includes: an angle similarity analyzer, used for analyzing a relative angle between the bounding boxes, to obtain the angle similarity degree of the ROI pair.
17. The cross-domain image comparison system according to claim 14, wherein the similarity unit further includes: a size similarity analyzer, used for analyzing a diagonal length of each of the bounding boxes, to obtain the size similarity degree of the ROI pair.
18. The cross-domain image comparison system according to claim 14, wherein the similarity unit further includes: a contour similarity analyzer, used for analyzing two counters of the semantic segmentation areas corresponding the ROI pair, to obtain the contour similarity degree.
19. The cross-domain image comparison system according to claim 18, wherein the contour similarity analyzer resizes the counters to be identical size.
20. The cross-domain image comparison system according to claim 11, wherein the two semantic segmentation areas corresponding the ROI pair are obtained from the two different videos.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10) In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the disclosed embodiments. It will be apparent, however, that one or more embodiments may be practiced without these specific details. In other instances, well-known structures and devices are schematically shown in order to simplify the drawing.
DETAILED DESCRIPTION
(11) Please refer to
(12) Please refer to
(13) Please refer to
(14) Next, in the step S120, the semantic segmentation unit 120 obtains a plurality of semantic segmentation areas S11, S12, S21, S22 from the frames F1, F2 of the videos VD1, VD2. As shown in
(15) Then, in the step S130, the ROI unit 130 obtains regions of interest pair (ROI pair) R01, R02 according to moving paths of the semantic segmentation areas S11, S12, S21, S22 in the videos VD1, VD2. The semantic segmentation areas S11, S12 corresponding the ROI pair R01 are obtained from the different videos VD1, VD2. The semantic segmentation areas S21, S22 corresponding the ROI pair R02 are obtained from the different videos VD1, VD2. As shown in
(16) According to the moving path of the semantic segmentation area S12 in the video VD1 and the moving path of the semantic segmentation area S22 in the video VD2, the ROI unit 130 finds that the moving path of the semantic segmentation area S12 and the moving of the semantic segmentation area S22 are similar. The semantic segmentation area S12 and the semantic segmentation area S22 are deemed as another identical object, so the semantic segmentation area S12 and the semantic segmentation area S22 are linked to be the ROI pair R02. After obtaining the ROI pair R01, the ROI pair R01 can be analyzed to obtain the similarity between the frame F1 and the frame F2. Similarly, after obtaining the ROI pair R02, the ROI pair R02 can be analyzed to obtain the similarity between the frame F1 and the frame F2. If the similarity between the semantic segmentation area S11 and the semantic segmentation area S21 in the ROI pair R01 is high, then it can be inferred that the frame F1 and the frame F2 have high similarity; if the similarity between the semantic segmentation area S12 and the semantic segmentation area S22 in the ROI pair R02 is high, then it can be inferred that the frame F1 and the frame F2 have high similarity.
(17) Afterwards, in the step S140, the bounding box unit 140 obtains bounding boxes B11, B12, B21, B22 and central points C11, C12, C21, C22 of the ROI pairs R01, R02. As shown in
(18) For example, the central points C11, C12, C21, C22 may be the intersections of diagonal lines of the bounding boxes B11, B12, B21, B22 respectively. So far, the cross-domain image comparison system 100 already obtains the counters, the bounding boxes B11, B12, B21, B22 and the central points C11, C12, C21, C22 of the semantic segmentation areas S11, S12, S21, S22 in the ROI pairs R01, R02. According to the above mentioned information, the similarity between the frame F1 and the frame F2 can be obtained in the following steps.
(19) Then, in the step S150, the similarity unit 150 obtains the similarity between the frame F1 and the frame F2 at least according to the bounding boxes B11, B12, B21, B22 and the central points C11, C12, C21, C22. As shown in
(20) Please refer to
(21) Please refer to
(22) As shown in
(23) The position similarity analyzer 151 obtains the position similarity degree sim.sub.pos of the ROI pair R01 and the ROI pair R02 according to the above information. The position similarity degree sim.sub.pos may be calculated according to the following equation (1).
(24)
(25) |ROI pair| is the number of the ROI pairs R01, R02. In this case, the number of the ROI pairs R01, R02 is 2. That is to say, if the central point C11 is close to the central point C21, and the central point C12 is close to the central point C22, the position similarity degree sim.sub.pos will approach to 1. On the contrary, if the central point C11 is far from the central point C21, and the central point C12 is far from the central point C22, the position similarity degree sim.sub.pos will approach to 0.
(26) Please refer to
(27) As shown in
(28) The angle similarity analyzer 152 obtains the angle similarity degree sim.sub.orie of the ROI pair R01 and the ROI pair R02 according to the relative angles r.sub.1, r.sub.2. The angle similarity degree sim.sub.orie may be calculated according to the following equation (2).
(29)
(30) That is to say, if the degree of inclination of the bounding box B11 is close to that of the bounding box B21 and the degree of inclination of bounding box B12 is close to that of the bounding box B22, the angle similarity degree sim.sub.orie will approach to 1. On the contrary, if the degree of inclination of the bounding box B11 is far from that of the bounding box B21 and the degree of inclination of the bounding box B12 is far from that of the bounding box B22, the angle similarity degree sim.sub.orie will approach to 0.
(31) Refer to
(32) The size similarity analyzer 153 obtains the size similarity degree sim.sub.size of the ROI pair R01 and the ROI pair R02 according to the diagonal lengths d.sub.1,1, d.sub.1,2, d.sub.2,1, d.sub.2,2. The size similarity degree sim.sub.size may be calculated according to the following equation (3).
(33)
(34) That is to say, if the size of the bounding box B11 is close to the size of the bounding box B21 and the size of the bounding box B12 is close to the size of the bounding box B22, the size similarity degree sim.sub.size will approach to 1. On the contrary, if the size of the bounding box B11 is far from the size of the bounding box B21 and the size of the bounding box B12 is far from the size of the bounding box B22, the size similarity degree sim.sub.size will approach to 0.
(35) Please refer to
(36) As shown in
(37) Afterwards, the process proceeds to the step S155. As shown in
(38) According to the embodiments described above, the cross-domain image comparison system 100 and the cross-domain image comparison method apply the semantic segmentation technology to reduce the complexity of the videos in cross-domain, and analyzes the ROI pairs to obtain the similarity. As such, the similarity between the videos and the video in cross-domain can be obtained to assist the application of the self-driving simulation, the dance training or the gymnastic training. The operation of those elements is illustrated via a flowchart.
(39) It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed embodiments. It is intended that the specification and examples be considered as exemplary only, with a true scope of the disclosure being indicated by the following claims and their equivalents.