Image recognition method, device, electronic device and storage medium

By using convolution processing that associates a convolution window with the boundary position in the panoramic image, the problem of insufficient semantic information learning of panoramic images in the existing technology is solved, and the recall rate and accuracy of target detection are improved.

CN114677595BActive Publication Date: 2025-09-23ARASHI VISION INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210456956.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2025-09-23
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

Existing image detection models are unable to learn the semantic information of panoramic images, resulting in low object detection recall rate and inability to effectively identify the same object located at the image boundary as the same object.

Method used

By obtaining a convolution window of the panoramic image and determining the target area based on the position of the convolution window and the boundary, convolution processing is performed to associate the boundary data and learn the semantic information of the panoramic image.

Benefits of technology

The target detection recall rate is improved, and the complete area of ​​the target object can be identified in the panoramic image, thereby improving the accuracy of target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114677595B_ABST
    Figure CN114677595B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose an image recognition method, apparatus, electronic device, and storage medium. The embodiments of the present application obtain a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, wherein the first boundary is parallel to the second boundary. A first target area is determined within the panoramic image based on the position between the convolution window and the first boundary. The convolution window is used to convolve the data in the first target area and the second target area to obtain a convolution value, wherein the second target area is the area corresponding to when the convolution window intersects the first boundary on the panoramic image. Based on the convolution value, the panoramic image is subjected to target object recognition to obtain a recognition result of the target object. In the embodiments of the present application, the data in the first target area can be associated with the data in the second target area during the convolution. Thus, the present solution can learn the semantic information of the panoramic image and improve the recall rate of target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning technology, and specifically to an image recognition method, device, electronic device, and storage medium. Background Art

[0002] A panoramic image composed of multiple images records all 360-degree information in a certain direction of the shooting scene. Although the panoramic image has been projected into a plane, the scene content on both sides of the 360-degree direction of the unfolded panorama is related, and the semantics of its content expression is still panoramic.

[0003] However, existing image detection models can only extract features in the form of planar images and cannot learn the semantic information of panoramic images, resulting in information gaps. The same target located on two boundaries will be detected as two different targets, resulting in a low target detection recall rate. Therefore, there is an urgent need for an image detection method that can learn the semantic information of panoramic images and improve the target detection recall rate.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0005] The embodiments of the present application provide an image recognition method, apparatus, electronic device, and storage medium to improve the target detection recall rate while learning the semantic information of a panoramic image.

[0006] The present invention provides an image recognition method, including:

[0007] Acquire a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary;

[0008] determining a first target region within the panoramic image based on a position between the convolution window and the first boundary, wherein a boundary of the first target region overlaps with the second boundary;

[0009] Using a convolution window, convolution processing is performed on data in the first target area and the second target area to obtain a convolution value, where the second target area is an area corresponding to when the convolution window intersects the first boundary on the panoramic image;

[0010] Based on the convolution value, the target object is recognized in the panoramic image to obtain the recognition result of the target object.

[0011] The present application also provides an image recognition device, including:

[0012] an acquisition unit, configured to acquire a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary;

[0013] a region determining unit, configured to determine a first target region in the panoramic image based on a position between the convolution window and the first boundary, wherein a boundary of the first target region overlaps with the second boundary;

[0014] a convolution processing unit, configured to perform convolution processing on data in the first target area and the second target area using a convolution window to obtain a convolution value, wherein the second target area is an area corresponding to when the convolution window intersects the first boundary on the panoramic image;

[0015] The image recognition unit is used to perform target object recognition on the panoramic image domain based on the convolution value to obtain a recognition result of the target object.

[0016] An embodiment of the present application can obtain a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary; based on the position between the convolution window and the first boundary, a first target area is determined in the panoramic image, and a boundary of the first target area overlaps with the second boundary; using the convolution window, convolution processing is performed on the data in the first target area and the second target area to obtain a convolution value, and the second target area is the area corresponding to when the convolution window intersects with the first boundary on the panoramic image; based on the convolution value, target object recognition is performed on the panoramic image to obtain a recognition result of the target object.

[0017] In the present application, if the first boundary and the second boundary of the panoramic image are spliced, a complete target object can be obtained in the panoramic image, wherein, based on the position between the convolution window and the first boundary, that is, when the convolution window intersects with the first boundary, the first target area can be determined from the panoramic image, and a boundary of the first target area overlaps with the second boundary, and the convolution window is used to perform convolution processing on the data in the first target area and the second target area, and the second target area is the area corresponding to the convolution window when the first boundary intersects with the first boundary on the panoramic image. In this way, during convolution, the data in the first target area can be associated with the data in the second target area to learn the semantic information of the panoramic image, so that the target object can be identified in the panoramic image. The area where the target object is located is distributed at the first boundary and the second boundary, which can improve the target detection recall rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 This is an exemplary system architecture block diagram of the image recognition method provided in the embodiments of the present application;

[0020] Figure 2a This is a flow chart of an image recognition method provided in an embodiment of the present application;

[0021] Figure 2b is a flowchart of another image recognition method provided in an embodiment of the present application;

[0022] Figure 2c is a schematic diagram of the replication area provided in an embodiment of the present application;

[0023] Figure 2d This is a schematic diagram corresponding to the panoramic image provided by the embodiment of the present application after target object recognition;

[0024] Figure 3a is a schematic diagram of the movement of a target sub-window provided in an embodiment of the present application;

[0025] Figure 3b is a schematic diagram of the movement of another target sub-window provided in an embodiment of the present application;

[0026] Figure 4 is a structural diagram of an image recognition device provided in an embodiment of the present application;

[0027] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0029] Embodiments of the present application provide an image recognition method, apparatus, electronic device, and storage medium.

[0030] The image recognition device can be integrated into an electronic device, such as a terminal or a server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, or personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.

[0031] In some embodiments, the image recognition device may also be integrated into multiple electronic devices. For example, the image recognition device may be integrated into multiple servers, and the image recognition method of the present application may be implemented by multiple servers.

[0032] In some embodiments, the server may also be implemented in the form of a terminal.

[0033] For example, a panoramic image and a convolution window are obtained, where the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary; based on the position between the convolution window and the first boundary, a first target area is determined in the panoramic image, and a boundary of the first target area overlaps with the second boundary; using the convolution window, convolution processing is performed on the data in the first target area and the second target area to obtain a convolution value, where the second target area is the area corresponding to when the convolution window intersects with the first boundary on the panoramic image; based on the convolution value, target object recognition is performed on the panoramic image to obtain a recognition result of the target object.

[0034] Figure 1 The following schematically shows an exemplary system architecture block diagram applying the technical solution of the present application.

[0035] like Figure 1 As shown, system architecture 100 may include terminal device 110, network 120, and server 130. Terminal device 110 may include various electronic devices such as smartphones, tablet computers, laptop computers, and desktop computers. Server 130 may be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. Network 120 may be a communication medium of various connection types capable of providing a communication link between terminal device 110 and server 130, such as a wired communication link or a wireless communication link.

[0036] Depending on implementation needs, the system architecture in the embodiments of the present application can have any number of terminal devices, networks, and servers. For example, server 130 can be a server group consisting of multiple server devices. In addition, the technical solutions provided in the embodiments of the present application can be applied to terminal device 110, server 130, or can be implemented by both terminal device 110 and server 130, and this application does not impose any special restrictions on this.

[0037] See also Figure 1 , Figure 1 This is a scene diagram of the image recognition system provided in an embodiment of the present application. The system may include an image recognition server 10 and a storage terminal 11. The storage terminal 11 stores panoramic images. The image recognition server 10 and the storage terminal 11 are in communication with each other and will not be repeated here.

[0038] The image recognition server 10 may include a processor, a memory, etc.; the storage terminal 11 may include a cloud server, etc.

[0039] It should be noted that Figure 1 The system scenario diagram shown is only an example. The image detection server and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application. A person skilled in the art will know that with the evolution of the system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems. The following are detailed descriptions. It should be noted that the order of description of the following embodiments does not limit the preferred order of the embodiments.

[0040] The embodiments of the present disclosure first aim to provide an image recognition method that can obtain a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary; based on the position between the convolution window and the first boundary, a first target area is determined in the panoramic image, and a boundary of the first target area overlaps with the second boundary; using the convolution window, convolution processing is performed on the data in the first target area and the second target area to obtain a convolution value, and the second target area is the area corresponding to the convolution window when the first boundary intersects on the panoramic image; based on the convolution value, target object recognition is performed on the panoramic image to obtain a recognition result of the target object.

[0041] In this way, in one embodiment of the present invention, when the convolution window intersects with the first boundary, a first target area can be determined from the panoramic image, a boundary of the first target area overlaps with the second boundary, and the convolution window is used to perform convolution processing on the data in the first target area and the second target area, and the second target area is the area corresponding to the convolution window when the intersects with the first boundary on the panoramic image. In this way, the data in the first target area can be associated with the data in the second target area during convolution, and the semantic information of the panoramic image can be learned.

[0042] Therefore, after convolution processing is performed on the data of the first target area and the second target area, when identifying the target object in the panoramic image, the second target area can be referenced by the first target area. This is conducive to identifying the target object from the panoramic image and improving the target detection recall rate. This invention can be applied to all deep learning computer vision tasks such as target detection and target segmentation.

[0043] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0044] In this embodiment, an image recognition method is provided, such as Figure 2a As shown, the specific process of the image recognition method can be as follows:

[0045] The present invention provides an image recognition method, including:

[0046] 210. Acquire a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary.

[0047] The panoramic image can display a complete object after the first boundary and the second boundary are spliced ​​together. For example, the area at the left boundary of the panoramic image contains part of the object, and the area at the right boundary of the panoramic image also contains part of the object. After splicing the left and right boundaries of the panoramic image, the complete object can be displayed.

[0048] The convolution window is used to extract features from the panoramic image. For example, the convolution window is a convolution kernel, and the size of the convolution kernel can be (2m+1)*(2n+1), where m and n are natural numbers, and so on. If the panoramic image records all information for 360° horizontally and 180° vertically, the first boundary and the second boundary are the horizontal boundaries of the panoramic image. If the panoramic image records all information for 360° horizontally and 180° vertically, the first boundary and the second boundary are the vertical boundaries of the panoramic image. For example, if the first boundary is the left horizontal boundary of the panoramic image, the second boundary is the right horizontal boundary of the panoramic image; if the first boundary is the right horizontal boundary of the panoramic image, the second boundary is the left horizontal boundary of the panoramic image.

[0049] In some embodiments, considering that a specific value needs to be padded at the border of the panoramic image when performing convolution processing on the panoramic image, and the horizontal border size of the convolution window may not be equal to the vertical border size, when performing convolution processing on the panoramic image, the parameters in the convolution window can be involved in the convolution calculation. In this way, it is necessary to know the padding width of the specific data padded at the border of the panoramic image. The border size of the convolution window is an odd number. Before obtaining the second preset size, the method further includes:

[0050] Obtaining a size of a first boundary of the convolution window, where the first boundary of the convolution window is parallel to a first boundary or a second boundary of the panoramic image;

[0051] The second preset size is obtained by subtracting one from the size of the first boundary of the convolution window and dividing the size by two.

[0052] The size of the first boundary of the convolution window is equal to the number of data at a boundary of the convolution window, and the boundary is parallel to the first boundary or the second boundary of the panoramic image. For example, the number of data at the boundary of the convolution window may be 3, and the size of the boundary of the convolution window is equal to 3.

[0053] For example, the first boundary is the left boundary of the panoramic image, the second boundary is the right boundary of the panoramic image, and the size of the convolution window is (2m+1)*(2n+1), where (2m+1) is the boundary size of the convolution window in the horizontal direction and (2n+1) is the boundary size of the convolution window in the vertical direction. m and n are natural numbers.

[0054] For example, the first boundary is the upper boundary of the panoramic image, the second boundary is the lower boundary of the panoramic image, and the size of the convolution window is (2m+1)*(2n+1), where (2m+1) is the boundary size of the convolution window in the horizontal direction and (2n+1) is the boundary size of the convolution window in the vertical direction. m and n are natural numbers.

[0055] Among them, the shape of the convolution window can be rectangular, that is, the size of the boundary of the convolution window in the horizontal direction can be equal to the size in the vertical direction, or the size of the boundary of the convolution window in the horizontal direction can be unequal to the size in the vertical direction, and so on.

[0056] In some embodiments, in order to fill specific data at a border of the panoramic image, the panoramic image further includes a third border and a fourth border, where the third border is parallel to the fourth border. Acquiring the panoramic image includes:

[0057] Obtaining a second preset size and preset filling data;

[0058] translating the third boundary by a second preset size to obtain a first filling boundary, where the first filling boundary is outside the panoramic image;

[0059] Determining a first extended area outside the panoramic image according to the third boundary and the first filling boundary, and filling the first extended area with the preset filling data to obtain a first filling area, wherein the first filling area shares the third boundary with the panoramic image;

[0060] translating the fourth boundary by a second preset size to obtain a second filling boundary, where the second filling boundary is outside the panoramic image;

[0061] Determining a second extended area outside the panoramic image based on the fourth boundary and the second filling boundary, and filling the second extended area with the preset filling data to obtain a second filling area, wherein the second filling area shares the fourth boundary with the panoramic image;

[0062] The first filling area, the second filling area, and the panoramic image are combined to obtain a combined panoramic image.

[0063] If the panoramic image records all information covering 360° horizontally and 180° vertically, the third and fourth boundaries are the vertical boundaries of the panoramic image. If the panoramic image records all information covering 360° horizontally and 180° vertically, the third and fourth boundaries are the horizontal boundaries of the panoramic image. For example, if the third boundary is the upper vertical boundary of the panoramic image, the fourth boundary is the lower vertical boundary of the panoramic image.

[0064] Among them, the first filling boundary is used to limit the range of the filling data at the third boundary. For example, if the first boundary is the left boundary of the panoramic image, the second boundary is the right boundary of the panoramic image, the third boundary is the upper boundary of the panoramic image, and the fourth boundary is the lower boundary of the panoramic image, then the first filling boundary is the boundary above the upper boundary.

[0065] The first expansion area is the area between the first filling boundary and the third boundary. For example, if the third boundary is the upper boundary of the panoramic image, the first expansion area is the area between the boundary above the upper boundary and the upper boundary.

[0066] The second filling boundary is used to limit the range of the filling data at the fourth boundary. For example, if the fourth boundary is the lower boundary of the panoramic image, the second filling boundary is the boundary below the lower boundary.

[0067] The second expansion area is used for the area between the second filling boundary and the fourth boundary. For example, if the fourth boundary is the lower boundary of the panoramic image, the second expansion area is the area between the boundary below the lower boundary and the lower boundary.

[0068] The first filling area is a first extended area filled with preset filling data.

[0069] The second filling area is a second extended area filled with preset filling data.

[0070] The combined panoramic image is a panoramic image in which the boundaries of the panoramic image are padded with preset padding data. For example, if the panoramic image records all information of 360° horizontally and 180° vertically, the combined panoramic image is padded with preset padding data above the upper boundary and below the lower boundary of the panoramic image, so that when the convolution window intersects the upper boundary or the lower boundary of the panoramic image, the data in the convolution window can participate in the convolution calculation.

[0071] 220. Determine a first target area in the panoramic image based on a position between the convolution window and the first boundary, where a boundary of the first target area overlaps with the second boundary.

[0072] The first target area is an area associated with the convolution window when it intersects the first boundary in the panoramic image, a boundary of the area overlaps with the second boundary, and the area and the convolution window are on the same horizontal line.

[0073] In some embodiments, in order to determine the first target area in the panoramic image, determining the first target area in the panoramic image based on a position between the convolution window and the first boundary includes:

[0074] When the convolution window intersects the first boundary, determining a target subwindow in the convolution window, the target subwindow is located outside the panoramic image, and a window boundary of the target subwindow overlaps with the first boundary;

[0075] translating the target sub-window on the panoramic image so that the target sub-window is located within the panoramic image and a first window boundary of the target sub-window overlaps with a second window boundary, thereby obtaining a position of the target sub-window in the panoramic image;

[0076] A first target area is determined in the panoramic image according to the position of the target sub-window in the panoramic image.

[0077] The position between the convolution window and the first boundary includes the convolution window intersecting the first boundary, and the convolution window and the first boundary have at least one intersection point. For example, when the size of the convolution window is 3*3 and the center of the convolution window is on the first column of data on the leftmost side of the panoramic image, the convolution window has at least one intersection point with the first boundary, and so on.

[0078] A target subwindow is divided from the convolution window by the first boundary or an extension of the first boundary line, the target subwindow is located outside the panoramic image, and a window boundary of the target subwindow overlaps with the first boundary. For example, when the convolution window and the first boundary have two intersection points, the target subwindow is divided from the convolution window by the first boundary line. When the convolution window and the first boundary have one intersection point, the target subwindow is divided from the convolution window by the extension of the first boundary line.

[0079] The first target area is an area corresponding to the target sub-window on the panoramic image, and the area overlaps with the second boundary.

[0080] In some embodiments, considering that a portion of the target object is distributed at a first boundary of the panoramic image and another portion of the target object is distributed at a second boundary of the panoramic image, in order to associate data at the first boundary and data at the second boundary of the panoramic image through a convolution window, the horizontal boundary size of the convolution window may not be equal to the vertical boundary size. Thus, a first preset size is calculated through the convolution window to determine the data to be associated from the panoramic image, and the boundary size of the convolution window is an odd number. Before obtaining the first preset size, the method further includes:

[0081] Obtaining a size of a second boundary of the convolution window, where the second boundary of the convolution window is perpendicular to the first boundary or the second boundary of the panoramic image;

[0082] The first preset size is obtained by subtracting one from the size of the second boundary of the convolution window and dividing the result by two.

[0083] The size of the second boundary of the convolution window is equal to the number of data at a boundary of the convolution window, and the boundary is perpendicular to the first boundary or the second boundary of the panoramic image.

[0084] For example, the first boundary is the left boundary of the panoramic image, the second boundary is the right boundary of the panoramic image, and the size of the convolution window is (2m+1)*(2n+1), where (2m+1) is the boundary size of the convolution window in the horizontal direction and (2n+1) is the boundary size of the convolution window in the vertical direction. m and n are natural numbers.

[0085] For example, the first boundary is the upper boundary of the panoramic image, the second boundary is the lower boundary of the panoramic image, and the size of the convolution window is (2m+1)*(2n+1), where (2m+1) is the boundary size of the convolution window in the horizontal direction and (2n+1) is the boundary size of the convolution window in the vertical direction. m and n are natural numbers.

[0086] In some embodiments, in order to determine a first target region from within a panoramic image, determining the first target region within the panoramic image based on a position between a convolution window and a first boundary, where a boundary of the first target region overlaps with a second boundary, includes:

[0087] Get a first preset size;

[0088] translating the second boundary by a first preset dimension to obtain a boundary of the first copy area;

[0089] determining a first copy area within the panoramic image based on the second boundary and the boundary of the first copy area;

[0090] copying the first copy area to obtain a copy of the first copy area;

[0091] translating the copy of the first copy area so that it is outside the panoramic image and shares a first boundary with the panoramic image;

[0092] When the convolution window intersects the first boundary, a first target region is determined within the copy of the first copy region, the first target region corresponding to the local region in the convolution window.

[0093] The boundary of the first copy area is used to define the fill area in the panoramic image. The boundary of the first copy area is in the panoramic image. For example, if the first preset size is 2 pixels, the boundary of the first copy area is obtained by translating the first boundary into the panoramic image by 2 pixels.

[0094] The first copy area is an area between the second boundary and the boundary of the first copy area in the panoramic image.

[0095] The copy of the first copy area is the content corresponding to the copy of the first copy area.

[0096] For example, Figure 2c As shown, the panoramic image A, the first boundary B, the second boundary C, the third boundary D, the fourth boundary E, the boundary F of the first copy area, and the first copy area G are copied to obtain a copy of the first copy area G, and the copy of the first copy area G is translated so that it is located outside the panoramic image and shares the first boundary with the panoramic image, so that when the convolution window intersects with the first boundary, the local area of ​​the convolution window that is not on the panoramic image is on the first copy area G, so that the first target area can be determined within the copy of the first copy area G, and the first target area corresponds to the local area in the convolution window.

[0097] 230. Use a convolution window to perform convolution processing on data in the first target area and the second target area to obtain a convolution value, where the second target area is a region corresponding to when the convolution window intersects the first boundary on the panoramic image.

[0098] The convolution value is a value obtained after the convolution window performs convolution processing on the data in the first target area and the second target area.

[0099] The second target area is the area corresponding to the intersection of the convolution window and the first boundary on the panoramic image. For example, when the size of the convolution window is 3*3, and the area in the convolution window intersects the first boundary, for example, a 2*3 area of ​​the convolution window is on the panoramic image, then a portion of the panoramic image corresponds to the 2*3 area in the convolution window, and the portion of the panoramic image is the second target area.

[0100] like Figure 2b As shown, in some embodiments, considering that a complete target object can be obtained in the panoramic image after the first boundary and the second boundary of the panoramic image are spliced ​​together, in order to avoid incorrect target object recognition in the panoramic image, a first target area is determined in the panoramic image based on the position between the convolution window and the first boundary, further comprising:

[0101] 221. Determine a third target area in the panoramic image based on a position between the convolution window and the second boundary, where a boundary of the third target area overlaps with the first boundary;

[0102] Using a convolution window, convolution processing is performed on the data in the first target area and the second target area to obtain a convolution value, and further comprising:

[0103] 231. Use a convolution window to perform convolution processing on data in the third target area and the fourth target area to obtain a convolution value, where the fourth target area is a region corresponding to when the convolution window intersects the second boundary on the panoramic image.

[0104] The third target area is an area associated with the convolution window when it intersects the second boundary in the panoramic image, a boundary of the area overlaps with the first boundary, and the area and the convolution window are on the same horizontal line.

[0105] The fourth target area is the area corresponding to the intersection of the convolution window and the second boundary on the panoramic image. For example, when the size of the convolution window is 3*3, and the area in the convolution window intersects the second boundary, for example, a 2*3 area of ​​the convolution window is on the panoramic image, then the portion of the panoramic image corresponds to the 2*3 area in the convolution window, and the portion of the panoramic image is the fourth target area.

[0106] In some embodiments, in order to determine the third target area in the panoramic image, determining the third target area in the panoramic image based on a position between the convolution window and the second boundary includes:

[0107] When the convolution window intersects the second boundary, determining a target subwindow in the convolution window, the target subwindow is located outside the panoramic image, and a window boundary of the target subwindow overlaps the second boundary;

[0108] translating the target sub-window on the panoramic image so that the target sub-window is located within the panoramic image and a window boundary of the target sub-window overlaps with the first boundary, thereby obtaining a position of the target sub-window in the panoramic image;

[0109] A third target area is determined in the panoramic image according to the position of the target sub-window in the panoramic image.

[0110] The position between the convolution window and the second boundary includes the convolution window intersecting the second boundary, and the convolution window and the second boundary have at least one intersection point. For example, when the size of the convolution window is 3*3 and the center of the convolution window is on the first column of data on the leftmost side of the panoramic image, the convolution window and the second boundary have at least one intersection point, and so on.

[0111] The target subwindow is divided from the convolution window by the second boundary or an extension of the second boundary line, the target subwindow is located outside the panoramic image, and a window boundary of the target subwindow overlaps with the second boundary. For example, when the convolution window and the second boundary have two intersection points, the target subwindow is divided from the convolution window by the second boundary line. When the convolution window and the second boundary have one intersection point, the target subwindow is divided from the convolution window by the extension of the second boundary line.

[0112] The third target area is an area corresponding to the target sub-window on the panoramic image, and the area overlaps with the second boundary.

[0113] In some embodiments, in order to determine a third target region from within the panoramic image, determining the third target region within the panoramic image based on a position between the convolution window and the second boundary, where a boundary of the third target region overlaps with the first boundary, includes:

[0114] Get a first preset size;

[0115] translating the first boundary by a first preset dimension to obtain a boundary of a second copy area;

[0116] determining a second copy area within the panoramic image based on the first boundary and the boundary of the second copy area;

[0117] copying the second copy area to obtain a copy of the second copy area;

[0118] translating the copy of the second copy area so that it is outside the panoramic image and shares a second boundary with the panoramic image;

[0119] When the convolution window intersects the second boundary, a third target region is determined within the copy of the second copy region, the third target region corresponding to the local region in the convolution window.

[0120] The boundary of the second copy area is used to define the fill area in the panoramic image, and the boundary of the second copy area is in the panoramic image. For example, if the first preset size is 2 pixels, the boundary of the second copy area is obtained by translating the second boundary into the panoramic image by 2 pixels.

[0121] The second copy area is an area between the first boundary and the boundary of the second copy area in the panoramic image.

[0122] For example, Figure 2c As shown, the panoramic image A, the first boundary B, the second boundary C, the third boundary D, the fourth boundary E, the boundary H of the second copy area, and the second copy area I, the second copy area I is copied to obtain a copy of the second copy area I, and the copy of the second copy area I is translated so that it is located outside the panoramic image and shares the second boundary with the panoramic image, so that when the convolution window intersects the second boundary, the local area of ​​the convolution window that is not on the panoramic image is on the second copy area I, so that the third target area can be determined within the copy of the second copy area I, and the third target area corresponds to the local area in the convolution window.

[0123] In some embodiments, considering performing convolution processing on the panoramic image, a convolution window is used to perform convolution processing on the data in the first target area and the second target area to obtain a convolution value, further comprising:

[0124] Get the preset moving step length;

[0125] Move the convolution window across the panoramic image based on the moving step size;

[0126] When the convolution window does not intersect with the panoramic image, a target area corresponding to the convolution window is determined on the panoramic image;

[0127] Perform a dot product operation on the data in the convolution window and the data in the target area to obtain the convolution value.

[0128] The preset moving step size is the step size that the convolution window moves on the padded image. For example, the preset moving step size may be one pixel, and the convolution window moves one pixel on the padded image each time it is convolved.

[0129] The target area is the area completely covered by the convolution window on the panoramic image. For example, if the padded image is 300*100 in size, the convolution window is 3*3 in size, and the coordinates of the convolution window on the padded image are (200, 50), (203, 50), (200, 53), and (203, 53), then the target area is the area enclosed by (200, 50), (203, 50), (200, 53), and (203, 53) on the padded image.

[0130] 240. Based on the convolution value, target object recognition is performed on the panoramic image to obtain a recognition result of the target object.

[0131] The target object is an object to be recognized in the panoramic image. For example, the target object may be a house, with a portion of the house near a first boundary and another portion of the house near a second boundary. When performing image recognition on the area where the target object is located in the panoramic image, the area where the target object is located can be identified from the first boundary and the second boundary of the panoramic image.

[0132] For example, Figure 2d As shown, S is the target object in the panoramic image. Based on the convolution value, the target object is identified in the panoramic image to obtain the target object S.

[0133] An embodiment of the present application can obtain a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary; based on the position between the convolution window and the first boundary, a first target area is determined in the panoramic image, and a boundary of the first target area overlaps with the second boundary; using the convolution window, convolution processing is performed on the data in the first target area and the second target area to obtain a convolution value, and the second target area is the area corresponding to when the convolution window intersects with the first boundary on the panoramic image; based on the convolution value, target object recognition is performed on the panoramic image to obtain a recognition result of the target object.

[0134] From the above, it can be seen that if the first boundary and the second boundary of the panoramic image are spliced, a complete target object can be obtained in the panoramic image, wherein, based on the position between the convolution window and the first boundary, that is, when the convolution window intersects with the first boundary, the first target area can be determined from the panoramic image, and one boundary of the first target area overlaps with the second boundary, and the convolution window is used to convolve the data in the first target area and the second target area, and the second target area is the area corresponding to when the convolution window intersects with the first boundary on the panoramic image. In this way, during convolution, the data in the first target area can be associated with the data in the second target area to learn the semantic information of the panoramic image, so that the target object can be identified in the panoramic image. The area where the target object is located is distributed at the first boundary and the second boundary, which can improve the target detection recall rate.

[0135] The method described in the above embodiment will be further described below.

[0136] In this embodiment, the method of the embodiment of the present application will be described in detail by taking the feature map of a panoramic image as an example.

[0137] The specific process of an image recognition method is as follows:

[0138] (1) Obtain a feature map of the panoramic image, a convolution window, a second preset size, and preset padding data, where the feature map includes a first boundary, a second boundary, a third boundary, and a fourth boundary, where the first boundary is parallel to the second boundary, and the third boundary is parallel to the fourth boundary.

[0139] In some embodiments, the size of the boundary of the convolution window is an odd number, and before obtaining the second preset size, the method further includes:

[0140] Obtaining a size of a boundary of the convolution window, where the boundary of the convolution window is perpendicular to the first boundary or the second boundary;

[0141] The size of the convolution window boundary is reduced by one and divided by two to obtain a second preset size.

[0142] (2) translating the third boundary by the second preset size to obtain a first filling boundary, and translating the fourth boundary by the second preset size to obtain a second filling boundary, wherein the first filling boundary is outside the feature map, and the second filling boundary is outside the feature map.

[0143] (3) Based on the third boundary and the first filling boundary, a first expanded area is determined outside the feature map, and based on the fourth boundary and the second filling boundary, a second expanded area is determined outside the feature map. The first expanded area shares the third boundary with the feature map, and the second expanded area shares the fourth boundary with the feature map.

[0144] (4) Filling the first extended area with the preset filling data to obtain a first filling area, and filling the second extended area with the preset filling data to obtain a second filling area.

[0145] (5) Combining the first filling area, the second filling area, and the feature map to obtain a combined feature map.

[0146] (6) When the convolution window slides on the combined feature map, the convolution window intersects with the first boundary, and a target sub-window is determined in the convolution window. The target sub-window is located outside the feature map, and a window boundary of the target sub-window overlaps with the first boundary; and the target sub-window is translated on the feature map so that the target sub-window is located within the feature map, and a window boundary of the target sub-window overlaps with the second boundary, thereby obtaining the position of the target sub-window in the panoramic image.

[0147] (7) According to the position of the target sub-window in the feature map, a first target region is determined in the feature map, and a boundary of the first target region overlaps with the second boundary.

[0148] (8) Using a convolution window, convolution processing is performed on the data in the first target area and the second target area to obtain a convolution value, where the second target area is an area corresponding to when the convolution window intersects the first boundary on the panoramic image.

[0149] (11) Based on the convolution value, the panoramic image is subjected to target object recognition to obtain a recognition result of the target object.

[0150] For example, Figure 3a As shown, the feature map is T01, T02 is a convolution window with a convolution size of 3*3, T03 is the first boundary, T04 is the second boundary, T05 is the third boundary, T06 is the fourth boundary, T07 is the first filling boundary, T08 is the second filling boundary, T09 is the first filling area, T10 is the second filling area, T11 is the target sub-window, and T12 is the first target area. The convolution window moves on the feature map with a unit step size so that the center of the convolution window passes through each feature point of the feature map.

[0151] For example, Figure 3b As shown, the convolution window can also be a 5*5 convolution window, which moves on the feature map with a step size of one unit so that the center of the convolution window passes through each feature point of the feature map.

[0152] From the above, it can be seen that the feature exchange between the first boundary and the second boundary of the feature map is realized, so that the left and right sides of the planar representation of the panoramic image feature map are connected in content, making the feature points on the boundary no different from other internal points.

[0153] To better implement the above method, the present application also provides an image recognition device. The image recognition device can be integrated into an electronic device, such as a terminal or a server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc. The server can be a single server or a server cluster consisting of multiple servers.

[0154] For example, in this embodiment, the method of the embodiment of the present application will be described in detail by taking the image recognition device specifically integrated into the server as an example.

[0155] For example, Figure 4 As shown, the image recognition device may include an acquisition unit 410, a region determination unit 420, a convolution processing unit 430, and an image recognition unit 440, as follows:

[0156] (1) Acquisition unit 410.

[0157] The acquisition unit 410 is configured to acquire a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary.

[0158] In some embodiments, the size of the boundary of the convolution window is an odd number, and before obtaining the second preset size, the method further includes:

[0159] Obtaining a size of a first boundary of the convolution window, where the first boundary of the convolution window is parallel to a first boundary or a second boundary of the panoramic image;

[0160] The size of the first boundary of the convolution window is subtracted by one and divided by two to obtain a second preset size.

[0161] In some embodiments, the panoramic image further includes a third boundary and a fourth boundary, and the third boundary is parallel to the fourth boundary. Acquiring the panoramic image includes:

[0162] Obtaining a second preset size and preset filling data;

[0163] translating the third boundary by a second preset size to obtain a first filling boundary, where the first filling boundary is outside the panoramic image;

[0164] Determining a first extended area outside the panoramic image based on the third boundary and the first filling boundary, and filling the first extended area with the preset filling data to obtain a first filling area, wherein the first filling area shares the third boundary with the panoramic image;

[0165] translating the fourth boundary by a second preset size to obtain a second filling boundary, where the second filling boundary is outside the panoramic image;

[0166] Determining a second extended area outside the panoramic image based on the fourth boundary and the second filling boundary, and filling the second extended area with the preset filling data to obtain a second filling area, wherein the second filling area shares the fourth boundary with the panoramic image;

[0167] The first filling area, the second filling area, and the panoramic image are combined to obtain a combined panoramic image.

[0168] (2) Region determination unit 420.

[0169] The region determining unit 420 is configured to determine a first target region in the panoramic image based on a position between the convolution window and the first boundary, wherein a boundary of the first target region overlaps with the second boundary.

[0170] In some embodiments, determining a first target region within the panoramic image based on a position between the convolution window and the first boundary includes:

[0171] When the convolution window intersects the first boundary, determining a target subwindow in the convolution window, the target subwindow is located outside the panoramic image, and a window boundary of the target subwindow overlaps with the first boundary;

[0172] translating the target sub-window on the panoramic image so that the target sub-window is located within the panoramic image and a first window boundary of the target sub-window overlaps with a second window boundary, thereby obtaining a position of the target sub-window in the panoramic image;

[0173] A first target area is determined in the panoramic image according to the position of the target sub-window in the panoramic image.

[0174] In some embodiments, the size of the boundary of the convolution window is an odd number, and before obtaining the first preset size, the method further includes:

[0175] Obtaining a size of a second boundary of the convolution window, where the second boundary of the convolution window is perpendicular to the first boundary or the second boundary of the panoramic image;

[0176] The first preset size is obtained by subtracting one from the size of the second boundary of the convolution window and dividing the result by two.

[0177] In some embodiments, determining a first target region within the panoramic image based on a position between the convolution window and the first boundary, where a boundary of the first target region overlaps with the second boundary, includes:

[0178] Get a first preset size;

[0179] translating the second boundary by a first preset dimension to obtain a boundary of the first copy area;

[0180] determining a first copy area within the panoramic image based on the second boundary and the boundary of the first copy area;

[0181] copying the first copy area to obtain a copy of the first copy area;

[0182] translating the copy of the first copy area so that it is outside the panoramic image and shares a first boundary with the panoramic image;

[0183] When the convolution window intersects the first boundary, a first target region is determined within the copy of the first copy region, the first target region corresponding to the local region in the convolution window.

[0184] (3) Convolution processing unit 430.

[0185] The convolution processing unit 430 is configured to perform convolution processing on the data in the first target area and the second target area to obtain a convolution value, where the second target area is the area corresponding to when the convolution window intersects the first boundary on the panoramic image.

[0186] In some embodiments, determining a first target area within the panoramic image based on a position between the convolution window and the first boundary further includes:

[0187] determining a third target region within the panoramic image based on a position between the convolution window and the second boundary, wherein a boundary of the third target region overlaps with the first boundary;

[0188] Using a convolution window, convolution processing is performed on the data in the first target area and the second target area to obtain a convolution value, and further comprising:

[0189] A convolution window is used to perform convolution processing on data in the third target area and the fourth target area to obtain a convolution value, where the fourth target area is a region corresponding to when the convolution window intersects the second boundary on the panoramic image.

[0190] In some embodiments, determining a first target area within the panoramic image based on a position between the convolution window and the first boundary includes:

[0191] When the convolution window intersects the second boundary, determining a target subwindow in the convolution window, the target subwindow is located outside the panoramic image, and a window boundary of the target subwindow overlaps the second boundary;

[0192] translating the target sub-window on the panoramic image so that the target sub-window is located within the panoramic image and a window boundary of the target sub-window overlaps with the first boundary, thereby obtaining a position of the target sub-window in the panoramic image;

[0193] A third target area is determined in the panoramic image according to the position of the target sub-window in the panoramic image.

[0194] In some embodiments, determining a third target region in the panoramic image based on a position between the convolution window and the second boundary, where a boundary of the third target region overlaps with the first boundary, includes:

[0195] Get a first preset size;

[0196] translating the first boundary by a first preset dimension to obtain a boundary of a second copy area;

[0197] determining a second copy area within the panoramic image based on the first boundary and the boundary of the second copy area;

[0198] copying the second copy area to obtain a copy of the second copy area;

[0199] translating the copy of the second copy area so that it is outside the panoramic image and shares a second boundary with the panoramic image;

[0200] When the convolution window intersects the second boundary, a third target region is determined within the copy of the second copy region, the third target region corresponding to the local region in the convolution window.

[0201] In some embodiments, a convolution window is used to perform convolution processing on the padded image to obtain a convolution value, further comprising:

[0202] Get the preset moving step length;

[0203] Move the convolution window across the panoramic image based on the moving step size;

[0204] When the convolution window does not intersect with the panoramic image, a target area corresponding to the convolution window is determined on the panoramic image;

[0205] Perform a dot product operation on the data in the convolution window and the data in the target area to obtain the convolution value.

[0206] (4) Image recognition unit 440.

[0207] The image recognition unit 440 is configured to perform target object recognition on the panoramic image based on the convolution value to obtain a recognition result of the target object.

[0208] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can be found in the previous method embodiments and will not be repeated here.

[0209] As can be seen from the above, the image recognition device of this embodiment acquires a panoramic image and a convolution window by an acquisition unit, and the panoramic image includes a first boundary and a second boundary, and the first boundary is parallel to the second boundary; the area determination unit determines a first target area in the panoramic image based on the position between the convolution window and the first boundary, and a boundary of the first target area overlaps with the second boundary; the convolution processing unit uses the convolution window to convolve the data in the first target area and the second target area to obtain a convolution value, and the second target area is the area corresponding to when the convolution window intersects with the first boundary on the panoramic image; the image recognition unit performs target object recognition on the panoramic image based on the convolution value to obtain a recognition result of the target object.

[0210] Therefore, the embodiment of the present application can learn the semantic information of the panoramic image and improve the target detection recall rate.

[0211] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal or a server. The terminal may be a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer, personal digital assistant (PDA), or other terminal device. The server may be a single server or a server cluster consisting of multiple servers.

[0212] like Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device includes: a memory 510, a processor 520 and a communication module 530.

[0213] The memory 510 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a disk, or a solid-state drive. The memory 510 is used to store programs, and the processor 520 executes the programs after receiving execution instructions.

[0214] The processor 520 may be an integrated circuit chip with data processing capabilities. The processor 520 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. It can implement or execute the various methods, steps, and logic diagrams of the present invention. The general-purpose processor may be a microprocessor or any conventional processor.

[0215] The communication module 530 is used for communication between the electronic device and external devices, and realizes the transmission and reception of network signals and data. The above-mentioned network signals may include wireless signals or wired signals.

[0216] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described again here.

[0217] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0218] As can be seen from the above, the electronic device provided in this embodiment can perform element fusion weighted processing on the elements located in the two boundary areas in the 360-degree direction of the panoramic image according to the present invention, and can perform convolution operations across the boundaries, thereby realizing feature exchange at the feature map boundary, making the convolution operation on the boundary no different from the non-boundary convolution operation, thereby learning the semantic information of the panoramic image while also improving the accuracy and recall rate of target detection. The present invention can be applied to panoramic image processing scenarios and is not limited to all deep learning computer vision tasks such as target detection and target segmentation.

[0219] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0220] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores multiple computer programs. The computer programs can be loaded by a processor to execute the steps of any image recognition method provided in the embodiment of the present application.

[0221] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0222] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0223] Since the computer program stored in the storage medium can execute the steps of any image recognition method provided in the embodiments of the present application, the beneficial effects that can be achieved by any image recognition method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0224] The above is a detailed introduction to an image recognition method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An image recognition method, characterized in that: include: Acquire a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, the first boundary is parallel to the second boundary, and the first boundary and the second boundary are two boundaries of the panoramic image in a 360-degree direction; determining a first target region in the panoramic image based on a position between the convolution window and the first boundary, wherein a boundary of the first target region overlaps with the second boundary; Using the convolution window, convolve data in the first target area and the second target area to obtain a convolution value, where the second target area is an area corresponding to when the convolution window intersects the first boundary on the panoramic image; Based on the convolution value, target object recognition is performed on the panoramic image to obtain a recognition result of the target object.

2. The image recognition method according to claim 1, wherein: The determining a first target area in the panoramic image based on a position between the convolution window and the first boundary includes: When the convolution window intersects the first boundary, determining a target sub-window in the convolution window, where the target sub-window is located outside the panoramic image, and a window boundary of the target sub-window overlaps with the first boundary; translating the target sub-window on the panoramic image so that the target sub-window is located within the panoramic image and a window boundary of the target sub-window overlaps with the second boundary, thereby obtaining a position of the target sub-window in the panoramic image; A first target area is determined in the panoramic image according to the position of the target sub-window in the panoramic image.

3. The image recognition method according to claim 1, wherein: The determining, based on a position between the convolution window and the first boundary, a first target area in the panoramic image, wherein a boundary of the first target area overlaps with the second boundary, includes: Get a first preset size; translating the second boundary by the first preset dimension to obtain a boundary of a first copy area; determining a first copy area within the panoramic image according to the second boundary and the boundary of the first copy area; copying the first copy area to obtain a copy of the first copy area; translating the copy of the first copy area so that it is outside the panoramic image and shares the first boundary with the panoramic image; When the convolution window intersects the first boundary, a first target area is determined within the copy of the first copy area, the first target area corresponding to the local area in the convolution window.

4. The image recognition method according to claim 1, wherein: The panoramic image further includes a third boundary and a fourth boundary, the third boundary is parallel to the fourth boundary, and the third boundary and the fourth boundary are two boundaries of the panoramic image in a 180-degree direction; The obtaining of the panoramic image comprises: Obtaining a second preset size and preset filling data; translating the third boundary by the second preset size to obtain a first filling boundary, where the first filling boundary is outside the panoramic image; determining a first extended area outside the panoramic image according to the third boundary and the first filling boundary, and filling the first extended area with the preset filling data to obtain a first filling area, wherein the first filling area shares the third boundary with the panoramic image; translating the fourth boundary by the second preset dimension to obtain a second filling boundary, where the second filling boundary is outside the panoramic image; determining a second extended area outside the panoramic image according to the fourth boundary and the second filling boundary, and filling the second extended area with the preset filling data to obtain a second filling area, wherein the second filling area shares the fourth boundary with the panoramic image; The first filling area, the second filling area, and the panoramic image are combined to obtain a combined panoramic image.

5. The image recognition method according to claim 4, wherein: The size of the boundary of the convolution window is an odd number. Before obtaining the second preset size, the method further includes: Acquire a size of a first boundary of the convolution window, where the first boundary of the convolution window is parallel to the first boundary or the second boundary of the panoramic image; A second preset size is obtained by subtracting one from the size of the first boundary of the convolution window and dividing the result by two.

6. The image recognition method according to claim 1, wherein: The method further comprises: performing convolution processing on the data in the first target area and the second target area using the convolution window to obtain a convolution value; Get the preset moving step length; Moving the convolution window on the panoramic image based on the moving step size; When the convolution window does not intersect with the panoramic image, determining a target area corresponding to the convolution window on the panoramic image; Perform a dot product operation on the data in the convolution window and the data in the target area to obtain a convolution value.

7. The image recognition method according to claim 1, wherein: The determining of a first target area in the panoramic image based on a position between the convolution window and the first boundary further includes: determining a third target area in the panoramic image based on a position between the convolution window and the second boundary, wherein a boundary of the third target area overlaps with the first boundary; The method further comprises: performing convolution processing on the data in the first target area and the second target area using the convolution window to obtain a convolution value; The convolution window is used to perform convolution processing on data in the third target area and the fourth target area to obtain a convolution value, where the fourth target area is an area corresponding to when the convolution window intersects the second boundary on the panoramic image.

8. The image recognition method according to claim 7, wherein: The determining a third target area in the panoramic image based on a position between the convolution window and the second boundary includes: When the convolution window intersects the second boundary, determining a target sub-window in the convolution window, where the target sub-window is located outside the panoramic image, and a window boundary of the target sub-window overlaps with the second boundary; translating the target sub-window on the panoramic image so that the target sub-window is located within the panoramic image and a window boundary of the target sub-window overlaps with the first boundary, thereby obtaining a position of the target sub-window in the panoramic image; A third target area is determined in the panoramic image according to the position of the target sub-window in the panoramic image.

9. The image recognition method according to claim 7, wherein: The determining, based on a position between the convolution window and the second boundary, a third target area in the panoramic image, wherein a boundary of the third target area overlaps with the first boundary, includes: Get a first preset size; translating the first boundary by the first preset dimension to obtain a boundary of a second copy area; determining a second copy area within the panoramic image according to the first boundary and the boundary of the second copy area; copying the second copy area to obtain a copy of the second copy area; translating the copy of the second copy area so that it is outside the panoramic image and shares the second boundary with the panoramic image; When the convolution window intersects the second boundary, a third target area is determined within the copy of the second copy area, the third target area corresponding to the local area in the convolution window.

10. The image recognition method according to claim 3, wherein: The size of the boundary of the convolution window is an odd number. Before obtaining the first preset size, the method further includes: Acquire a size of a second boundary of the convolution window, where the second boundary of the convolution window is perpendicular to the first boundary or the second boundary of the panoramic image; A first preset size is obtained by subtracting one from the size of the second boundary of the convolution window and dividing the result by two.

11. An image recognition device, characterized in that: include: an acquisition unit, configured to acquire a panoramic image and a convolution window, wherein the panoramic image includes a first boundary and a second boundary, the first boundary and the second boundary being two boundaries in a 360-degree direction of the panoramic image, and the first boundary is parallel to the second boundary; a region determining unit, configured to determine a first target region in the panoramic image based on a position between the convolution window and the first boundary, wherein a boundary of the first target region overlaps with the second boundary; a convolution processing unit, configured to use the convolution window to perform convolution processing on data in the first target area and a second target area to obtain a convolution value, wherein the second target area is an area corresponding to when the convolution window intersects the first boundary on the panoramic image; An image recognition unit is configured to perform target object recognition on the panoramic image based on the convolution value to obtain a recognition result of the target object.

12. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the image recognition method according to any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the image recognition method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • A method, an apparatus and a computer program product for coding a 360-degree panoramic video

    CN108293136A

  • Panoramic image continuous segmentation method

    CN111461125A