Image deconvolution method and apparatus, device and medium
By multiplying the feature map and the elements of the deconvolution kernel matrix during the image deconvolution process, determining the target position of the product result and spreading it out, the problems of low efficiency and high hardware resource consumption in the existing technology are solved, and more efficient image deconvolution is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KUNLUNXIN TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2023-02-09
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, image deconvolution computation is inefficient and consumes a lot of hardware resources, especially the implementation of deconvolution computation in convolutional neural networks is inefficient.
By multiplying each pixel element in the feature map with each element in the deconvolution kernel matrix, the target position of each product result in the target result map is determined. Based on the deconvolution parameters and the positional relationship of adjacent elements, the product results are distributed and filled into the target result map, simplifying the image deconvolution process.
It improves the efficiency of image deconvolution, reduces the consumption of hardware resources, and achieves more efficient image processing.
Smart Images

Figure CN116129245B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of chip technology, and more particularly to the fields of artificial intelligence and image processing, specifically to an image deconvolution method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0002] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0003] Convolutional neural networks (CNNs) have a wide presence and application in the field of deep learning-based image processing technology. They are a type of feedforward neural network that incorporates convolutional computations and has a deep structure. Based on this, deconvolutional computations or convolutional gradient calculations are needed to optimize image processing techniques.
[0004] The methods described in this section are not necessarily methods that had been previously conceived or adopted. Unless otherwise specified, no method described in this section should be assumed to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to be accepted in any prior art. Summary of the Invention
[0005] This disclosure provides an image deconvolution method, apparatus, electronic device, computer-readable storage medium, and computer program product.
[0006] According to one aspect of this disclosure, an image deconvolution method is provided, comprising: acquiring a feature map containing multiple pixel elements, a deconvolution kernel matrix containing multiple deconvolution kernel elements, and deconvolution parameters; for each of the multiple deconvolution kernel elements, calculating the product of the deconvolution kernel element and each of the multiple pixel elements to obtain multiple product results; for each of the multiple product results, determining a target position in a target result map based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters; and determining the target result map based on the respective target positions of the multiple product results.
[0007] According to another aspect of this disclosure, an image deconvolution apparatus is provided, comprising: an acquisition unit configured to acquire a feature map containing a plurality of pixel elements, a deconvolution kernel matrix containing a plurality of deconvolution kernel elements, and deconvolution parameters; a calculation unit configured to calculate, for each of the plurality of deconvolution kernel elements, the product of the deconvolution kernel element and each of the plurality of pixel elements to obtain a plurality of product results; a first determination unit configured to, for each of the plurality of product results, determine a target position in a target result map based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters; and a second determination unit configured to determine the target result map based on the respective target positions of the plurality of product results.
[0008] According to another aspect of this disclosure, a chip is provided that includes the image deconvolution device described above.
[0009] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the image deconvolution method described above.
[0010] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the above-described image deconvolution method.
[0011] According to another aspect of this disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, is capable of implementing the above-described image deconvolution method.
[0012] According to one or more embodiments of this disclosure, image deconvolution efficiency can be improved.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0014] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0015] Figure 1 A schematic diagram of an exemplary system in which various methods described herein may be implemented, according to exemplary embodiments of the present disclosure;
[0016] Figure 2 A flowchart of an image deconvolution method according to an exemplary embodiment of the present disclosure is shown;
[0017] Figures 3A-3B A schematic diagram of an image deconvolution process according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 4 A structural block diagram of an image deconvolution apparatus according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0021] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.
[0022] The terminology used in the description of the various examples described in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.
[0023] In related technologies, the feature map is typically multiplied by the transposed deconvolution kernel matrix to obtain an intermediate result matrix, and then the col2im operation is used to rearrange the intermediate result matrix to obtain the target result map. This implementation method is inefficient, and storing the intermediate result matrix requires additional hardware resources.
[0024] Based on this, this disclosure provides an image deconvolution method, which multiplies each element in the feature map with each element in the deconvolution kernel matrix to obtain multiple product results. For each product result, its target position in the target result map is determined. By distributing multiple product results to the target result map according to their corresponding positions, the image deconvolution result can be obtained more easily and quickly, improving efficiency while saving hardware resources.
[0025] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0026] Figure 1 A schematic diagram of an exemplary system 100 in which the various methods and apparatus described herein can be implemented according to embodiments of this disclosure is shown. Reference Figure 1 The system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to execute one or more applications.
[0027] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable the execution of image deconvolution methods.
[0028] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to users of client devices 101, 102, 103, 104, 105, and / or 106 under a Software as a Service (SaaS) model.
[0029] exist Figure 1 In the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can sequentially interact with server 120 using one or more client applications to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from system 100. Therefore, Figure 1 This is an example of a system used to implement the various methods described herein, and is not intended to be limiting.
[0030] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to send at least one of the following: feature maps, deconvolution kernel matrices, and deconvolution parameters. The client devices can provide an interface that allows users to interact with the client devices. The client devices can also output information to the user via this interface. Although... Figure 1 Only six client devices are described, but those skilled in the art will understand that this disclosure can support any number of client devices.
[0031] Client devices 101, 102, 103, 104, 105, and / or 106 may include various categories of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices can run various categories and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices can run a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short message service (SMS) applications, and can use various communication protocols.
[0032] Network 110 can be any type of network well known to those skilled in the art, and can use any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.) to support data communication. By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0033] Server 120 may include one or more general-purpose computers, special-purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0034] The computing unit in server 120 can run one or more operating systems, including any of the aforementioned operating systems and any commercially available server operating system. Server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0035] In some implementations, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0036] In some implementations, server 120 can be a server for a distributed system or a server integrated with blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.
[0037] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. Databases 130 may reside in various locations. For example, a database used by server 120 may be local to server 120, or it may be located away from server 120 and may communicate with server 120 via a network-based or dedicated connection. Databases 130 may be of different categories. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data from and from the databases in response to commands.
[0038] In some embodiments, one or more of the databases 130 may also be used by an application to store application data. The databases used by the application may be different categories of databases, such as key-value stores, object stores, or regular stores supported by a file system.
[0039] Figure 1 The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatus described in this disclosure.
[0040] Figure 2 A flowchart of an image deconvolution method 200 according to an exemplary embodiment of the present disclosure is shown. Figure 2 As shown, method 200 includes:
[0041] Step S201: Obtain a feature map containing multiple pixel elements, a deconvolution kernel matrix containing multiple deconvolution kernel elements, and deconvolution parameters;
[0042] Step S202: For each of the plurality of deconvolution kernel elements, calculate the product of the deconvolution kernel element and each of the plurality of pixel elements to obtain a plurality of product results;
[0043] Step S203: For each of the multiple product results, based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters, determine the target position of the product result in the target result map; and
[0044] Step S204: Determine the target result map based on the respective target positions of the multiple product results.
[0045] Therefore, by multiplying each pixel in the feature map with each element in the deconvolution kernel matrix to obtain multiple product results, and then determining the target position in the target result map for each product result, the target result map can be obtained based on the target positions of the multiple product results, thereby improving the efficiency of image deconvolution.
[0046] In some examples, deconvolution parameters include the horizontal deconvolution stride, the vertical deconvolution stride, the size of the deconvolution kernel, the size of the feature map, the size of the target result map, and anisotropic padding information for the feature map.
[0047] In some examples, the feature map can also be a differential feature map obtained during image processing, so that the gradient information of the feature map can be obtained through deconvolution, which meets the needs of practical application scenarios.
[0048] According to some embodiments, in step S203, for each of the plurality of product results, determining the target position of the product result in the target result image based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters includes: for the third product result among the plurality of product results, in response to determining that the first pixel element corresponding to the third product result is located at a first reference position in the feature map, and in response to determining that the first deconvolution kernel element corresponding to the third product result is located at a second reference position in the deconvolution kernel matrix, determining the target position of the third product result in the target result image as a preset reference position; for the fourth product result among the plurality of product results, in response to determining that the second pixel element corresponding to the fourth product result is adjacent to the first pixel element, and in response to determining that the fourth product result corresponds to the first deconvolution kernel element, determining the target position of the fourth product result in the target result image based on the preset reference position, the relative positional relationship between the first pixel element and the second pixel element, and the deconvolution parameters.
[0049] Therefore, it is possible to first determine the reference position of a specific product result, and then determine the target position of the product result corresponding to the adjacent pixel elements in turn based on the deconvolution parameters and the relative positional relationship between adjacent pixel elements, thereby further improving efficiency.
[0050] In some examples, the relative positional relationship between the first pixel element and the second pixel element may include at least one of the following: the first pixel element is to the left of the second pixel element, the first pixel element is to the right of the second pixel element, the first pixel element is above the second pixel element, and the first pixel element is below the second pixel element.
[0051] In some examples, after first determining the reference position of the third product result, and then determining the target position of the fourth product result adjacent to the third product result based on the reference position, the target positions of more adjacent product results can be determined based on the position of the fourth product result, and so on to obtain all results. Thus, starting from the reference position, the target positions of the product results corresponding to adjacent pixel elements can be determined sequentially based on the deconvolution parameters and the relative positional relationships between adjacent pixel elements, thereby accurately and efficiently obtaining the target positions of all product results.
[0052] According to some embodiments, step S203, for each of the plurality of product results, determining the target position of the product result in the target result map based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters, further includes: for the fifth product result among the plurality of product results, in response to determining that the fifth product result corresponds to the first pixel element, and in response to determining that the second deconvolution kernel element corresponding to the fifth product result is adjacent to the first deconvolution kernel element, determining the target position of the fifth product result in the target result map based on the preset reference position, the relative positional relationship between the first deconvolution kernel element and the second deconvolution kernel element, and the deconvolution parameters. Therefore, it is possible to further determine the target positions of product results corresponding to adjacent deconvolution kernel elements sequentially based on the deconvolution parameters and the relative positional relationship between adjacent deconvolution kernel elements, improving the efficiency of determining the target positions of each product result.
[0053] According to some embodiments, determining the target position of the fourth product result in the target result image based on the preset reference position, the relative positional relationship between the first pixel element and the second pixel element, and the deconvolution parameters includes: determining the relative offset between the target position of the fourth product result in the target result image and the preset reference position based on the relative positional relationship between the first pixel element and the second pixel element and the deconvolution parameters; and determining the target position of the fourth product result in the target result image based on the preset reference position and the relative offset. Therefore, it is possible to determine the offset of the product result corresponding to adjacent pixel elements in a continuous dimension (e.g., horizontal or vertical) in the target result image based on the deconvolution parameters, thereby enabling a simple and quick determination of the target position of the product result by jumping according to the offset.
[0054] According to some embodiments, step S204, determining the target result image based on the respective target positions of the plurality of product results, includes: for each of the plurality of product results, determining the storage address of the product result in the target storage unit used to store the target result image based on the target position of the product result and a preset storage rule; and storing the plurality of product results in the target storage unit based on the respective storage addresses of the plurality of product results to obtain the target result image. Therefore, it is possible to determine the corresponding storage location based on the target position of each product result, so that the plurality of product results can be distributed and stored in the target storage unit, thereby enabling the filling of the target result image while writing the product results into the storage unit, further improving efficiency.
[0055] In some examples, the initial storage address of the multiple product results in the target storage unit can be determined based on preset storage rules, so as to ensure that the target result image can be directly read from the target storage unit according to the reading rules corresponding to the preset storage rules.
[0056] According to some embodiments, step S204, determining the target result map based on the respective target positions of the plurality of product results, includes: in response to determining that the target positions of the first product result and the second product result among the plurality of product results are both first positions, calculating the sum of the first product result and the second product result; and determining that the first target result element located at the first position in the target result map is the sum of the first product result and the second product result. When multiple product results correspond to the same target position in the target result map, the multiple product results are accumulated and summed to obtain the corresponding target result element, thereby obtaining an accurate target result map.
[0057] Figures 3A-3B A schematic diagram of an image deconvolution process according to an exemplary embodiment of this disclosure is shown. See also Figure 3A As shown in this example, the feature map size is 3×3, the deconvolution kernel matrix size is 2×2, the horizontal deconvolution stride and the vertical deconvolution stride are both 2, and the target result map size is 6×6, thus obtaining the product of 36 feature map pixel elements and deconvolution kernel elements.
[0058] In this example, each element in the deconvolution kernel matrix can be multiplied with the feature map sequentially. Based on the position of the corresponding pixel element in the feature map, the position of the corresponding deconvolution kernel element in the deconvolution kernel matrix, and the aforementioned deconvolution parameters, the target position of each product result in the target result map can be determined. Based on the target position, multiple product results can be distributed and filled into the target result map to obtain the image deconvolution result accurately and efficiently.
[0059] See Figure 3A As shown, the horizontal offset of the product of adjacent pixel elements in each row of the feature map multiplied by the same deconvolution kernel element can be determined to be 2 (e.g., the horizontal offset of A11×B11 and A12×B11 is 2), and the vertical offset of the product of adjacent pixel elements in each column multiplied by the same deconvolution kernel element can be determined to be 2 (e.g., the horizontal offset of A11×B11 and A21×B11 is 2). This allows the nine product results corresponding to each of the four deconvolution kernel elements to be hashed and stored in the target result image according to the aforementioned offset parameters, resulting in the image shown below. Figure 3B The first target result diagram is shown.
[0060] Therefore, it is possible to determine the offset (including horizontal and vertical offset) of the product result corresponding to adjacent pixel elements in a continuous dimension (including horizontal or vertical) of the target result image based on the deconvolution parameters, so that the target position of the product result can be determined easily and quickly by jumping according to the offset.
[0061] In some examples, deconvolution operations can be performed simultaneously on multiple feature maps to obtain multiple target result maps. In this case, the multiple target result maps can be stored in different locations within the target storage unit according to a preset storage rule. For example, the batch offset of the product results at the same position in adjacent target result maps can be determined based on the deconvolution parameters, and the storage location of multiple product results in each target result map can be determined accordingly. See also Figure 3B As shown, when the target storage unit is a two-dimensional storage array, the batch offset of the first target result image and the second target result image can be calculated according to the size of the first target result image to achieve direct storage of the first target result image and the second target result image.
[0062] According to one aspect of this disclosure, an image deconvolution apparatus is also provided. Figure 4 A structural block diagram of an image deconvolution apparatus 400 according to an exemplary embodiment of the present disclosure is shown. Figure 4 As shown, the device 400 includes:
[0063] The acquisition unit 401 is configured to acquire a feature map containing multiple pixel elements, a deconvolution kernel matrix containing multiple deconvolution kernel elements, and deconvolution parameters;
[0064] The calculation unit 402 is configured to calculate the product of each of the plurality of deconvolution kernel elements and each of the plurality of pixel elements for each of the plurality of deconvolution kernel elements, so as to obtain a plurality of product results;
[0065] The first determining unit 403 is configured to, for each of the plurality of product results, determine the target position of the product result in the target result map based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters; and
[0066] The second determining unit 404 is configured to determine the target result map based on the respective target positions of the multiple product results.
[0067] According to some embodiments, the second determining unit 404 includes: a first determining subunit, configured to determine, for each of the plurality of product results, the storage address of the product result in a target storage unit for storing the target result image, based on the target location of the product result and a preset storage rule; and a storage unit, configured to store the plurality of product results in the target storage unit based on the respective storage addresses of the plurality of product results, to obtain the target result image.
[0068] According to some embodiments, the second determining unit 404 includes: a calculation subunit configured to calculate the sum of the first product result and the second product result in response to determining that the target positions corresponding to the first product result and the second product result in the plurality of product results are each a first position; and a second determining subunit configured to determine that the first target result element located at the first position in the target result graph is the sum of the first product result and the second product result.
[0069] According to some embodiments, the first determining unit 403 is configured to: for a third product result among the plurality of product results, in response to determining that a first pixel element corresponding to the third product result is located at a first reference position in the feature map, and in response to determining that a first deconvolution kernel element corresponding to the third product result is located at a second reference position in the deconvolution kernel matrix, determine the target position of the third product result in the target result map as a preset reference position; for a fourth product result among the plurality of product results, in response to determining that a second pixel element corresponding to the fourth product result is adjacent to the first pixel element, and in response to determining that the fourth product result corresponds to the first deconvolution kernel element, determine the target position of the fourth product result in the target result map based on the preset reference position, the relative positional relationship between the first pixel element and the second pixel element, and the deconvolution parameters.
[0070] According to some embodiments, the first determining unit 403 is further configured to: for the fifth product result among the plurality of product results, in response to determining that the fifth product result corresponds to the first pixel element, and in response to determining that the second deconvolution kernel element corresponding to the fifth product result is adjacent to the first deconvolution kernel element, determine the target position of the fifth product result in the target result image based on the preset reference position, the relative positional relationship between the first deconvolution kernel element and the second deconvolution kernel element, and the deconvolution parameters.
[0071] According to some embodiments, the first determining unit 403 is configured to: determine the relative offset between the target position of the fourth product result in the target result image and the preset reference position based on the relative positional relationship between the first pixel element and the second pixel element and the deconvolution parameters; and determine the target position of the fourth product result in the target result image based on the preset reference position and the relative offset.
[0072] According to one aspect of this disclosure, a chip is also provided, including the image deconvolution device 400 as described above.
[0073] According to another aspect of this disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the image deconvolution method described above.
[0074] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to cause the computer to perform the above-described image deconvolution method.
[0075] According to another aspect of this disclosure, a computer program product is also provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the above-described image deconvolution method.
[0076] refer to Figure 5The present invention describes a structural block diagram of an electronic device 500 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0077] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0078] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information to device 500. Input unit 506 can receive input numerical or character information and generate key signal inputs related to user settings and / or function control of the electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 507 can be any type of device capable of presenting information, and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, a hard disk and an optical disk. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0079] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the image deconvolution method. For example, in some embodiments, the image deconvolution method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the image deconvolution method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the image deconvolution method by any other suitable means (e.g., by means of firmware).
[0080] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0081] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0082] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0083] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0084] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0085] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0086] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0087] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of the invention is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as the technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.
Claims
1. An image deconvolution method, comprising: Obtain a feature map containing multiple pixel elements, a deconvolution kernel matrix containing multiple deconvolution kernel elements, and deconvolution parameters; For each of the plurality of deconvolution kernel elements, calculate the product of the deconvolution kernel element and each of the plurality of pixel elements to obtain multiple product results; For each of the plurality of product results, based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters, the target position of the product result in the target result map is determined, including: For the third product result among the multiple product results, in response to determining that the first pixel element corresponding to the third product result is located at the first reference position in the feature map, and in response to determining that the first deconvolution kernel element corresponding to the third product result is located at the second reference position in the deconvolution kernel matrix, the target position of the third product result in the target result map is determined as the preset reference position. For the fourth product result among the plurality of product results, in response to determining that the second pixel element corresponding to the fourth product result is adjacent to the first pixel element, and in response to determining that the fourth product result corresponds to the first deconvolution kernel element, based on the preset reference position, the relative positional relationship between the first pixel element and the second pixel element, and the deconvolution parameters, the target position of the fourth product result in the target result image is determined; and The target result map is determined based on the respective target positions of the multiple product results.
2. The method of claim 1, wherein, Determining the target result map based on the respective target positions of the multiple product results includes: For each of the plurality of product results, based on the target location of the product result and a preset storage rule, the storage address of the product result in the target storage unit used to store the target result map is determined; and Based on the respective storage addresses of the multiple product results, the multiple product results are stored in the target storage unit to obtain the target result diagram.
3. The method as described in claim 1 or 2, wherein, Determining the target result map based on the respective target positions of the multiple product results includes: In response to determining that the target positions corresponding to the first product result and the second product result in the plurality of product results are both the first position, the sum of the first product result and the second product result is calculated; and The first target result element located at the first position in the target result graph is determined to be the sum of the first product result and the second product result.
4. The method of claim 1, wherein, The step of determining the target position in the target result map for each of the plurality of product results, based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters, further includes: For the fifth product result among the plurality of product results, in response to determining that the fifth product result corresponds to the first pixel element, and in response to determining that the second deconvolution kernel element corresponding to the fifth product result is adjacent to the first deconvolution kernel element, the target position of the fifth product result in the target result image is determined based on the preset reference position, the relative positional relationship between the first deconvolution kernel element and the second deconvolution kernel element, and the deconvolution parameters.
5. The method of claim 1, wherein, Determining the target position of the fourth product result in the target result image based on the preset reference position, the relative positional relationship between the first pixel element and the second pixel element, and the deconvolution parameters includes: Based on the relative positional relationship between the first and second pixel elements and the deconvolution parameters, the relative offset between the target position and the preset reference position of the fourth product result in the target result image is determined; and Based on the preset reference position and the relative offset, the target position of the fourth product result in the target result map is determined.
6. An image deconvolution apparatus, comprising: The acquisition unit is configured to acquire a feature map containing multiple pixel elements, a deconvolution kernel matrix containing multiple deconvolution kernel elements, and deconvolution parameters; The calculation unit is configured to calculate the product of each of the plurality of deconvolution kernel elements and each of the plurality of pixel elements for each of the plurality of deconvolution kernel elements, so as to obtain a plurality of product results; The first determining unit is configured to, for each of the plurality of product results, determine the target position of the product result in the target result map based on the position of the pixel element corresponding to the product result in the feature map, the position of the deconvolution kernel element corresponding to the product result in the deconvolution kernel matrix, and the deconvolution parameters. The first determining unit is further configured to: For the third product result among the multiple product results, in response to determining that the first pixel element corresponding to the third product result is located at the first reference position in the feature map, and in response to determining that the first deconvolution kernel element corresponding to the third product result is located at the second reference position in the deconvolution kernel matrix, the target position of the third product result in the target result map is determined as the preset reference position. For the fourth product result among the plurality of product results, in response to determining that the second pixel element corresponding to the fourth product result is adjacent to the first pixel element, and in response to determining that the fourth product result corresponds to the first deconvolution kernel element, the target position of the fourth product result in the target result image is determined based on the preset reference position, the relative positional relationship between the first pixel element and the second pixel element and the deconvolution parameters. as well as The second determining unit is configured to determine the target result map based on the respective target positions of the multiple product results.
7. The apparatus of claim 6, wherein, The second determining unit includes: The first determining subunit is configured to, for each of the plurality of product results, determine the storage address of the product result in the target storage unit used to store the target result graph, based on the target location of the product result and a preset storage rule; and The storage unit is configured to store the multiple product results into the target storage unit based on the respective storage addresses of the multiple product results, so as to obtain the target result graph.
8. The apparatus of claim 6 or 7, wherein, The second determining unit includes: The calculation subunit is configured to, in response to determining that the target positions corresponding to the first product result and the second product result in the plurality of product results are both the first position, calculate the sum of the first product result and the second product result; and The second determining subunit is configured to determine that the first target result element located at the first position in the target result graph is the sum of the first product result and the second product result.
9. The apparatus of claim 6, wherein, The first determining unit is further configured to: For the fifth product result among the plurality of product results, in response to determining that the fifth product result corresponds to the first pixel element, and in response to determining that the second deconvolution kernel element corresponding to the fifth product result is adjacent to the first deconvolution kernel element, the target position of the fifth product result in the target result image is determined based on the preset reference position, the relative positional relationship between the first deconvolution kernel element and the second deconvolution kernel element, and the deconvolution parameters.
10. The apparatus of claim 6, wherein, The first determining unit is configured as follows: Based on the relative positional relationship between the first pixel element and the second pixel element and the deconvolution parameters, the relative offset between the target position of the fourth product result in the target result image and the preset reference position is determined. as well as Based on the preset reference position and the relative offset, the target position of the fourth product result in the target result map is determined.
11. A chip comprising the means as claimed in any one of claims 6-10.
12. An electronic device, comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; in The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.
14. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the method according to any one of claims 1-5.