Image processing method and device based on index table

By constructing an index table-based image processing method, the problem that existing model acceleration methods are difficult to achieve accuracy and speed requirements on low-computing platforms is solved, and efficient model inference and cost-reducing effects are achieved.

CN119397042BActive Publication Date: 2025-04-25CHINA MOBILE INFORMATION SYST INTEGRATION CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510004922.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-04-25
Estimated Expiration
2045-01-02

AI Technical Summary

Technical Problem

Existing model acceleration methods are difficult to meet the accuracy and speed requirements on serial computing platforms or platforms with low computing power, resulting in higher hardware and energy costs.

Method used

By constructing an image processing method based on an index table, an index table containing the model input and output is pre-established, the index table is queried to obtain the image processing results of the to-process images, changing the model inference calculation logic, and converting the forward calculation of the model into index calculation.

Benefits of technology

This greatly improves the speed of model inference, reduces the demand for computing power, and reduces hardware and energy costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397042B_ABST
    Figure CN119397042B_ABST
Patent Text Reader

Abstract

An embodiment of the present specification provides an image processing method and device based on an index table, the method comprising: first obtaining an image to be processed, and then querying the index table to see whether there is an index number corresponding to the pixel value of the image to be processed, and if so, outputting the index value mapped by the index number as the image processing result of the image to be processed, wherein the index table is constructed based on the input image and output image processing result of the image processing model. The index table constructed in this embodiment can speed up the overall running time of the image processing model, greatly improving the model inference speed, and has low computing power requirements, thereby reducing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of data processing technology, and in particular to an image processing method and device based on an index table. Background Art

[0002] Model acceleration is an important research direction in the field of deep learning, which aims to improve the reasoning speed of the model while maintaining or improving the performance of the model. Existing model acceleration methods include: lightweight model design, re-parameterization, network pruning, weight quantization, low-rank decomposition, knowledge distillation, etc. The above model acceleration methods can reduce the model calculation amount to varying degrees and achieve the effect of accelerating forward reasoning;

[0003] However, the models after these acceleration methods still need to perform more complex linear and nonlinear operations, and are still relatively dependent on parallel computing platforms (such as GPU, NPU, etc.) to varying degrees. When performing model reasoning on serial computing platforms or platforms with lower computing power (CPU, FPGA, etc.), it is difficult to meet the accuracy and speed requirements. As a result, the terminal platforms that need to run model reasoning often have higher computing power and power consumption requirements, which makes it impossible to reduce hardware and energy costs. Therefore, how to more effectively accelerate the model while reducing computing power and costs is a future research direction. Summary of the invention

[0004] An objective of one embodiment of the present specification is to provide an image processing method and apparatus based on an index table to solve the problem of low efficiency of playing images based on an index table by cloud applications.

[0005] To solve the above technical problems, an embodiment of this specification is implemented as follows:

[0006] In a first aspect, an embodiment of the present specification provides an image processing method based on an index table, comprising:

[0007] Get the image to be processed;

[0008] Querying whether there is an index number corresponding to the pixel value of the image to be processed in the index table; the index table is constructed based on the input image and output image processing results of the image processing model;

[0009] If so, the index value mapped by the index number is output as the image processing result of the image to be processed.

[0010] In a second aspect, another embodiment of the present specification provides an image processing device based on an index table, comprising:

[0011] An image acquisition module is configured to acquire an image to be processed;

[0012] An index number query module is configured to query whether there is an index number corresponding to the pixel value of the image to be processed in an index table; the index table is constructed based on an input image of an input image processing model and an image processing result output by the image processing model;

[0013] If yes, a result output module is run, wherein the result output module is configured to output the index value mapped by the index number as the image processing result of the image to be processed.

[0014] In the third aspect, another embodiment of the present specification provides an image processing device based on an index table, comprising: a memory, a processor, and computer executable instructions stored on the memory and executable on the processor, wherein the computer executable instructions, when executed by the processor, implement the steps of the image processing method based on the index table as described in the first aspect above.

[0015] In a fourth aspect, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the image processing method based on the index table as described in the first aspect above are implemented.

[0016] In a fifth aspect, another embodiment of the present specification provides a computer program product, wherein the computer program product includes an image processing program based on an index table, and the image processing program based on the index table is executed by a processor to implement the steps of the data access processing method as described in the first aspect above.

[0017] The image processing method based on the index table provided in the present embodiment first obtains the image to be processed, and then queries the index table whether there is an index number corresponding to the pixel value of the image to be processed. If so, the index value mapped by the index number is output as the image processing result of the image to be processed, wherein the index table is constructed based on the input image and the output image processing result of the image processing model. The index table constructed in the present embodiment can accelerate the overall running time of the image processing model, greatly improve the model reasoning speed, and has low computing power requirements, thereby reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in one or more embodiments of the present specification, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1A processing flow chart of an image processing method based on an index table provided in one embodiment of the present specification;

[0020] Figure 2 A schematic diagram of a receptive field augmentation process provided in one embodiment of this specification;

[0021] Figure 3 A schematic diagram of a parameter determination method provided in one embodiment of this specification;

[0022] Figure 4 A processing flow chart of an image processing method based on an index table applied to an image processing scenario provided by one embodiment of this specification;

[0023] Figure 5 A schematic diagram of an image processing device based on an index table provided in one embodiment of the present specification;

[0024] Figure 6 A schematic diagram of the structure of an image processing device based on an index table provided in one embodiment of the present specification. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0026] This specification provides an image processing method embodiment based on an index table:

[0027] Reference Figure 1 , which shows a processing flow chart of an image processing method based on an index table provided in this embodiment, referring to Figure 4 , which shows a processing flow chart of an image processing method based on an index table applied to an image processing scenario provided by this embodiment.

[0028] Reference Figure 1 The image processing method based on the index table provided in this embodiment specifically includes the following steps S102 to S106.

[0029] Step S102, obtaining an image to be processed.

[0030] The image processing method based on the index table provided in this embodiment accelerates the calculation process of the image processing model in order to reduce the time and cost of the image processing model operation. Specifically, by pre-establishing an index table containing model input and model output, after obtaining the image to be processed, the model output (i.e., image processing result) corresponding to the image to be processed can be queried from the index table by table lookup, thereby changing the existing model reasoning calculation logic, converting the forward calculation of the model into index calculation, and improving the model reasoning speed. Among them, the image processing model can be a model based on a neural network architecture, or the image processing model can be used to process computer vision tasks.

[0031] The image to be processed may be an image with a bit depth of x or an image with x-bit precision, for example, x=8, which indicates that the pixel value of each pixel of the image can be represented by 8 bits (1 byte) or 256 different colors or gray levels (from 0 to 255).

[0032] Step S104, querying whether there is an index number corresponding to the pixel value of the image to be processed in the index table.

[0033] Optionally, the index table is constructed based on the input image of the input image processing model and the image processing result output by the image processing model; the index table stores the pixel values ​​of the input image, the image processing result, and the mapping relationship between the pixel values ​​of the input image and the image processing result. If the pixel values ​​of the input image are known, the image processing result mapped to the pixel values ​​of the input image can be found through the mapping relationship. Optionally, the index table can also be called a model parameter index table.

[0034] The index parameters of the index table include an index number and an index value, wherein the index number refers to the search number of the data in the table, and the index value refers to the data in the table pointed to by the index number; wherein the index number can be obtained by standardizing the pixel values ​​of the input image, for example, if the pixel values ​​of the pixels of the input image are 0, 16, 32, 48, 64, 80, the corresponding index numbers can be 1, 2, 3, 4, 5, 6.

[0035] The size of the index table can be ,in is the receptive field size, is the number of network layers of the image processing model, The number of values ​​that can be input. The number of values ​​that can be input here It is related to the accuracy of the input image. The higher the image accuracy, The larger the value, the more common the 8-bit precision image is. is 256. Optionally, in this embodiment, the receptive field size Set to , that is, the dimension of the corresponding index table is 4.

[0036] In the specific execution process, the index table can be pre-constructed, and the image processing result output by the image processing model is obtained by inputting the input image into the image processing model, and the index table is constructed based on the mapping relationship between the input image and the image processing result and the input image and the image processing result. In an optional implementation manner provided in this embodiment, the index table is constructed in the following manner:

[0037] Acquire the input image, and segment the input image based on the receptive field to obtain image blocks;

[0038] Inputting the image block into the image processing model to obtain the image processing result;

[0039] The index table is constructed based on a mapping relationship between the pixel values ​​of the image blocks and the image processing results.

[0040] The receptive field refers to the input area that neurons in a neural network can perceive. In a convolutional neural network, the calculation of an element on a feature map is affected by a certain area on the input image, and this area is the receptive field of the element.

[0041] Specifically, the image processing model may include multiple neural network layers. In the process of the image processing model processing the input image based on the neural network layer, it is necessary to segment the input image based on the receptive field, and perform image processing on the obtained image blocks as units to obtain the image processing results. After that, an index table can be constructed according to the mapping relationship between the input image and the image processing results.

[0042] Furthermore, since the size of the index table is related to the size of the receptive field of the input image, in order to reduce the size of the index table to reduce storage pressure, the receptive field may be augmented when constructing the index table, and the index table may be constructed based on the augmented receptive field. In an optional implementation provided in this embodiment, the receptive field is augmented in the following manner:

[0043] Determining at least one rotation angle for rotating the input image;

[0044] Rotate the input image based on the at least one rotation angle to obtain a rotated image;

[0045] The rotated image is segmented based on the receptive field to obtain the image block.

[0046] Specifically, the rotated image can be obtained by rotating the original input image according to at least one rotation angle, and the rotated image can be segmented based on the receptive field to obtain image blocks, the image blocks can be input into the image processing model to obtain at least one image processing result, and the at least one image processing result can be added to obtain the image processing result corresponding to the input image.

[0047] For example, see Figure 2 Schematic diagram of the receptive field augmentation process shown in the figure, where the input image is 3*3, the receptive field is 2*2, the original input image is 0°, and the corresponding receptive field is in the upper left corner, then the input image is rotated 90° clockwise around the center, and the receptive field is in the upper right corner, then the input image is rotated 180° clockwise around the center, and the receptive field is in the lower right corner, and finally the input image is rotated 270° clockwise around the center, and the receptive field is in the lower left corner. At this point, the receptive fields of the input images of 0°, 90°, 180°, and 270° are merged, and the receptive field is augmented to 3*3;

[0048] Among them, during the image processing process, the image processing model can calculate the image processing result by the following formula:

[0049]

[0050] in is the input image patch, is a deep neural network, The feature maps are augmented to Degree of operation, It is the reverse augmentation operation.

[0051] It should be noted that the above example is a receptive field augmentation cycle. Each time the cycle is repeated, the receptive field size can be increased by 1. In practice, multiple receptive field augmentation cycles can be performed as needed to achieve a receptive field of any size through a receptive field of 2*2 to meet different task requirements.

[0052] Furthermore, since the size of the index table is also related to the number of input values Therefore, in order to reduce the size of the index table, the input value may also be sampled. In an optional implementation provided by this embodiment, the following method is used to sample and obtain the sampled pixel value:

[0053] Determining a preset pixel value of a pixel point of the input image based on the bit depth of the input image;

[0054] The preset pixel value is sampled according to the determined sampling interval to obtain the sampled pixel value.

[0055] For example, if the bit depth of the input image is 8, that is, the input image is an 8-bit bitmap, each pixel has possible input pixel values, the input pixel values ​​can be The sampling interval is uniformly sampled, and the uniform sampling points, that is, the input pixel values ​​are 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, and 255 respectively.

[0056] After the index table is constructed, the image processing result corresponding to the image to be processed can be obtained according to the index table. Specifically, according to the obtained pixel value of the image to be processed, it is queried whether there is an index number corresponding to the pixel value of the image to be processed in the index table. If yes, step S106 is executed to output the index value mapped by the index number as the image processing result of the image to be processed. If not, the image processing result of the image to be processed can be calculated according to the index value mapped by the associated index number determined based on the pixel value of the image to be processed.

[0057] In an optional implementation manner provided by this embodiment, if the result of executing the step of querying whether there is an index number corresponding to the pixel value of the image to be processed in the index table is no, the following operations are performed:

[0058] Determining an associated index number based on a pixel value of the image to be processed;

[0059] An image processing result of the image to be processed is calculated based on the index value mapped by the associated index sequence number.

[0060] Furthermore, in an optional implementation manner provided by this embodiment, the associated index number is determined based on the pixel value of the image to be processed in the following manner, including:

[0061] Determine the reference pixel value corresponding to each index number in the index table;

[0062] Calculating a difference between the reference pixel value and the pixel value, and sorting the reference pixel values ​​based on the difference to obtain a pixel value sequence;

[0063] The index number corresponding to the reference pixel value at a preset position in the pixel value sequence is used as the associated index number.

[0064] For example, the reference pixel values ​​corresponding to the index numbers in the index table are 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, and 255. If the pixel value of the image to be processed is 24, and 24 is between the sampling pixel values ​​16 and 32, the difference between the reference pixel value and the pixel value of the image to be processed is calculated, and the first two bits of the pixel value sequence obtained by sorting the reference pixel values ​​based on the difference are: 16 and 32, so the index numbers corresponding to 16 and 32 are used as associated index numbers, and the image processing results of the image to be processed are calculated based on the index values ​​16 and 32 mapped by the associated index numbers.

[0065] During the specific execution process, in the process of calculating the image processing result of the image to be processed based on the index value mapped by the associated index number, the pixel value corresponding to the associated index number can be split according to the bit position to obtain the sub-pixel value, and the weight of the index value mapped by the associated index number is determined based on the sub-pixel value, and the image processing result of the image to be processed is calculated based on the weight. In an optional implementation manner provided by this embodiment, the image processing result of the image to be processed is calculated based on the index value mapped by the associated index number in the following manner:

[0066] Splitting the pixel value corresponding to the associated index number according to the bit position to obtain sub-pixel values;

[0067] The weight of the index value mapped by the associated index number is determined based on the sub-pixel value, and the image processing result of the image to be processed is calculated based on the weight and the index value mapped by the associated index number.

[0068] For example, the pixel value corresponding to the associated index number is and , since the sampling interval of the input pixel value is , corresponding to 4 bits in binary, so this embodiment divides the input pixel value in binary into two parts, that is, the first 4 bits are high bits and the last 4 bits are low bits, so as to ensure that the interval between two adjacent high bits is , so we get and The values ​​of the most significant bits are and , used to determine the nearest sampling point; the values ​​of the least significant bits are and , used to determine boundary vertices and weights.

[0069] like Figure 3 As shown in the diagram of the parameter (i.e. weight) determination method, the two boundary vertices are fixed as and , another vertex by comparing and To determine, because So I chose , otherwise select ; The weight of each vertex is the area of ​​the corresponding triangle, calculated as , ,and ,in (sampling interval). Finally, the output value is calculated as a weighted sum, that is: .

[0070] Similarly, the multi-dimensional case can be solved by the value of the least significant bit (respectively , , , of , , , ), selects a matching case out of a total of 24 cases, and then computes the output value as a weighted sum:

[0071]

[0072] in , , , , .

[0073] Step S106: outputting the index value mapped by the index number as the image processing result of the image to be processed.

[0074] After the index number corresponding to the pixel value of the image to be processed is queried in the index table, it indicates that the image processing result of the image to be processed is stored in the index table, and the index value mapped by the index number can be output as the image processing result of the image to be processed.

[0075] To summarize, the image processing method based on the index table provided in this embodiment constructs an index table in advance according to the input image and the output image processing result of the image processing model, so that after obtaining the image to be processed, it is possible to query whether there is an index number corresponding to the pixel value of the image to be processed in the index table. If so, the index value to be mapped is output as the image processing result of the image to be processed. This can accelerate the overall running time of the image processing model, greatly improve the model reasoning speed, and has low computing power requirements, thereby reducing costs.

[0076] The following combination Figure 4, taking the application of the image processing method based on the index table provided in this embodiment in the image processing scene as an example, the image processing method based on the index table provided in this embodiment is further described. Figure 4 The image processing method based on the index table applied to the image processing scenario specifically includes steps S402 to S414.

[0077] Step S402, obtaining an image to be processed.

[0078] Prior to this, an input image is obtained, and at least one rotation angle for rotating the input image is determined; the input image is rotated based on the at least one rotation angle to obtain a rotated image; the rotated image is segmented based on the receptive field to obtain image blocks; the image blocks are input into an image processing model to obtain image processing results; and an index table is constructed based on a mapping relationship between pixel values ​​of the image blocks and image processing results.

[0079] Step S404, querying whether there is an index number corresponding to the pixel value of the image to be processed in the index table;

[0080] If yes, execute the following step S406;

[0081] If not, execute the following steps S408 to S414.

[0082] Step S406: output the index value mapped by the index number as the image processing result of the image to be processed.

[0083] Step S408, determining the reference pixel value corresponding to each index number in the index table.

[0084] Step S410, calculating the difference between the reference pixel value and the pixel value, and sorting the reference pixel values ​​based on the difference to obtain a pixel value sequence.

[0085] Step S412: taking the index number corresponding to the reference pixel value at a preset position in the pixel value sequence as the associated index number.

[0086] Step S414, calculating the image processing result of the image to be processed based on the index value mapped by the associated index number.

[0087] Figure 5 A schematic diagram of an image processing device based on an index table provided by an embodiment of the present invention, such as Figure 5 As shown, the device comprises:

[0088] An image acquisition module 502 is configured to acquire an image to be processed;

[0089] An index number query module 504 is configured to query whether there is an index number corresponding to the pixel value of the image to be processed in an index table; the index table is constructed based on the input image of the input image processing model and the image processing result output by the image processing model;

[0090] If yes, the result output module 506 is run, and the result output module 506 is configured to output the index value mapped by the index number as the image processing result of the image to be processed.

[0091] The image processing device based on the index table provided in this embodiment first obtains the image to be processed by running the image acquisition module 502, and then runs the index number query module 504 to query whether there is an index number corresponding to the pixel value of the image to be processed in the index table. If so, run the result output module 506 to output the index value mapped by the index number as the image processing result of the image to be processed, which can accelerate the overall running time of the image processing model, greatly improve the model reasoning speed, and has low computing power requirements, thereby reducing costs.

[0092] The image processing device based on the index table provided in one embodiment of the present specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0093] Furthermore, an embodiment of the present specification also provides an image processing device based on an index table, Figure 6 A schematic diagram of the structure of an image processing device based on an index table provided in an embodiment of this specification, such as Figure 6 As shown, the device includes: a memory 601, a processor 602, a bus 603 and a communication interface 604. The memory 601, the processor 602 and the communication interface 604 communicate through the bus 603, and the communication interface 604 may include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.

[0094] Figure 6 In the embodiment, the memory 601 stores computer executable instructions that can be run on the processor 602. When the computer executable instructions are executed by the processor 602, the following process is implemented:

[0095] Get the image to be processed;

[0096] Querying whether there is an index number corresponding to the pixel value of the image to be processed in an index table; the index table is constructed based on an input image of an input image processing model and an image processing result output by the image processing model;

[0097] If so, the index value mapped by the index number is output as the image processing result of the image to be processed.

[0098] The image processing device based on the index table provided in this embodiment first obtains the image to be processed through the cooperation of the memory 601, the processor 602, the bus 603 and the communication interface 604, and then queries whether there is an index number corresponding to the pixel value of the image to be processed in the index table. If so, the index value mapped by the index number is output as the image processing result of the image to be processed, wherein the index table is constructed based on the input image and the output image processing result of the image processing model. The index table constructed in this embodiment can speed up the overall running time of the image processing model, greatly improve the model reasoning speed, and has low computing power requirements, thereby reducing costs.

[0099] The image processing device based on the index table provided in one embodiment of the present specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0100] Furthermore, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:

[0101] Get the image to be processed;

[0102] Querying whether there is an index number corresponding to the pixel value of the image to be processed in an index table; the index table is constructed based on an input image of an input image processing model and an image processing result output by the image processing model;

[0103] If so, the index value mapped by the index number is output as the image processing result of the image to be processed.

[0104] The computer-readable storage medium provided in this embodiment first obtains the image to be processed, and then queries whether there is an index number corresponding to the pixel value of the image to be processed in the index table. If so, the index value mapped by the index number is output as the image processing result of the image to be processed, wherein the index table is constructed based on the input image and output image processing result of the image processing model. The index table constructed in this embodiment can accelerate the overall running time of the image processing model, greatly improve the model reasoning speed, and has low computing power requirements, thereby reducing costs.

[0105] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0106] The computer-readable storage medium provided in an embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0107] Furthermore, another embodiment of the present specification also provides a computer program product, which implements the following process when executed by a processor:

[0108] Get the image to be processed;

[0109] Querying whether there is an index number corresponding to the pixel value of the image to be processed in an index table; the index table is constructed based on an input image of an input image processing model and an image processing result output by the image processing model;

[0110] If so, the index value mapped by the index number is output as the image processing result of the image to be processed.

[0111] The computer program product provided in this embodiment first obtains an image to be processed, and then queries an index table to see whether there is an index number corresponding to the pixel value of the image to be processed. If so, the index value mapped by the index number is output as the image processing result of the image to be processed, wherein the index table is constructed based on the input image and output image processing result of the image processing model. The index table constructed in this embodiment can accelerate the overall running time of the image processing model, greatly improve the model reasoning speed, and has low computing power requirements, thereby reducing costs.

[0112] The computer program product provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0113] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0114] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0117] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0118] Memory may include non-permanent storage in a computer-readable storage medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable storage medium.

[0119] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0120] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0121] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0122] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. An image processing method based on an index table, characterized in that: The method comprises: Get the image to be processed; Querying whether there is an index number corresponding to the pixel value of the image to be processed in an index table; the index table is constructed based on an input image of an input image processing model and an image processing result output by the image processing model; If so, outputting the index value mapped by the index number as the image processing result of the image to be processed; If not, determine the associated index number based on the pixel value of the image to be processed; split the pixel value corresponding to the associated index number according to the bit to obtain sub-pixel value; determine the weight of the index value mapped by the associated index number based on the sub-pixel value, and calculate the image processing result of the image to be processed based on the weight and the index value mapped by the associated index number.

2. The image processing method based on the index table according to claim 1, characterized in that: If the result of the step of querying whether there is an index number corresponding to the pixel value of the image to be processed in the index table is no, further performing the following operations: Determining an associated index number based on a pixel value of the image to be processed; An image processing result of the image to be processed is calculated based on the index value mapped by the associated index sequence number.

3. The image processing method based on the index table according to claim 2, characterized in that: The determining of the associated index number based on the pixel value of the image to be processed includes: Determine the reference pixel value corresponding to each index number in the index table; Calculating a difference between the reference pixel value and the pixel value, and sorting the reference pixel values ​​based on the difference to obtain a pixel value sequence; The index number corresponding to the reference pixel value at a preset position in the pixel value sequence is used as the associated index number.

4. The image processing method based on the index table according to claim 1, characterized in that: The index table is constructed in the following way: Acquire the input image, and segment the input image based on the receptive field to obtain image blocks; Inputting the image block into the image processing model to obtain the image processing result; Constructing the index table based on the mapping relationship between the pixel value of the image block and the image processing result; Among them, each index number in the index table corresponds to a pixel value of each image block, and each index value in the index table corresponds to each image processing result.

5. The image processing method based on the index table according to claim 4, characterized in that: The step of segmenting the input image based on the receptive field to obtain image blocks includes: Determining at least one rotation angle for rotating the input image; Rotate the input image based on the at least one rotation angle to obtain a rotated image; The rotated image is segmented based on the receptive field to obtain the image block.

6. The image processing method based on the index table according to claim 1, characterized in that: The pixel values ​​of the input image include sampled pixel values; The sampled pixel value is determined in the following manner: Determining a preset pixel value of a pixel point of the input image based on the bit depth of the input image; The preset pixel value is sampled according to the determined sampling interval to obtain the sampled pixel value.

7. An image processing device based on an index table, characterized in that: include: An image acquisition module is configured to acquire an image to be processed; An index number query module is configured to query whether there is an index number corresponding to the pixel value of the image to be processed in an index table; the index table is constructed based on an input image of an input image processing model and an image processing result output by the image processing model; If so, run the result output module, and the result output module is configured to output the index value mapped by the index number as the image processing result of the image to be processed; if not, determine the associated index number based on the pixel value of the image to be processed; split the pixel value corresponding to the associated index number according to the bit to obtain sub-pixel value; determine the weight of the index value mapped by the associated index number based on the sub-pixel value, and calculate the image processing result of the image to be processed based on the weight and the index value mapped by the associated index number.

8. An image processing device based on an index table, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer executable instructions, and when the computer executable instructions are executed on the processor, the steps of the method described in any one of claims 1 to 6 can be implemented.

9. A computer-readable storage medium having computer-executable instructions stored therein, characterized in that: When the computer executable instructions are executed by a processor, the steps of the method described in any one of claims 1 to 6 can be implemented.

10. A computer program product, characterized in that The computer program product comprises an image processing program based on an index table, and when the image processing program based on the index table is executed by a processor, the steps of the method described in any one of claims 1 to 6 can be implemented.

Citation Information

Patent Citations

  • Image processing method and device and computing equipment

    CN115578272A