A method and apparatus for processing an image data stream
By encoding, smoothing, and decoding the image data stream, and utilizing the pulse coding and decoding units of the binary sequence, some spiking neurons are randomly turned off, solving the problem of excessive hardware resource consumption in spiking neural networks and improving processing speed and resource utilization.
Patent Information
- Application Number
- CN202311219478.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-09-20
AI Technical Summary
Existing spiking neural networks consume excessive hardware resources, especially when computing a large number of neuron connections, leading to serious resource waste and affecting application performance.
By encoding, smoothing, and decoding the image data stream, and utilizing the pulse coding and decoding units of the binary sequence, some spiking neurons are randomly turned off, reducing resource consumption.
The resource consumption of the spiking neural network was optimized, improving the processing speed and resource utilization of the hardware system, and reducing the number of calculations for the natural exponential function.
Smart Images

Figure CN117292001B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and specifically to a method and apparatus for processing image data streams. Background Technology
[0002] Spiking neural networks (SNNs) are widely used. Before applying a spiking neural network, it is necessary to continuously adjust the weight values of the spiking synapses connecting the spiking neurons until they are optimal.
[0003] Existing spiking neural networks (SNNs) learn based on pulse timing information. The modification of each synaptic weight parameter is related to the time difference between the pulses fired by the spiking neurons at both ends. This consumes a large amount of storage, counters, and DSP resources in hardware to store and calculate the pulse firing time of each neuron, as well as to calculate and store the updates of the multiple synaptic weights of each neuron at each time point. On the other hand, since network computation involves a large number of natural exponential function operations, this consumes a lot of hardware resources. For each neuron in the network, when there are many synapses connected to it, the hardware resources consumed by this operation are immeasurable, resulting in excessive resource consumption and severely affecting the application effect of spiking neural networks. Summary of the Invention
[0004] To address the problems in the prior art, embodiments of the present invention provide a method and apparatus for processing image data streams, which can at least partially solve the problems existing in the prior art.
[0005] On one hand, the present invention proposes a method for processing image data streams, including:
[0006] The input image data stream is acquired, and the input image data stream is encoded to obtain the original pulse sequence;
[0007] The original pulse sequence is smoothed using a spiking neural network to obtain the target pulse sequence.
[0008] The target pulse sequence is decoded to obtain the output image data stream.
[0009] The encoding process for the input image data stream includes:
[0010] The input image data stream is encoded using a pulse coding unit based on a binary sequence.
[0011] The decoding process of the target pulse sequence includes:
[0012] The target pulse sequence is decoded by a pulse decoding unit based on binary sequences.
[0013] The step of performing image smoothing processing on the original pulse sequence based on a spiking neural network to obtain the target pulse sequence includes:
[0014] Obtain the number of pixels in the image row of the original pulse sequence. If it is determined that the number of pixels in the image row is greater than a preset threshold for the number of pixels in the image row, then randomly shut down some spiking neurons in the current hidden layer of the spiking neural network.
[0015] The current pulse sequence is used to replace the original pulse sequence, and the steps of obtaining the number of image row pixels of the original pulse sequence and subsequent steps are performed until the number of current image row pixels is less than the preset number of image row pixels threshold, and the current pulse sequence at this time is taken as the target pulse sequence.
[0016] The random shutdown of some spiking neurons in the current hidden layer of the spiking neural network includes:
[0017] Obtain the flag bits of each spiking neuron in the original pulse sequence and the current pulse sequence, and randomly select the pulse sequence flag bit of the spiking neuron whose flag bit is 1 to be set to zero.
[0018] The random selection of the pulse sequence flag position to zero for spiking neurons whose flag bit is 1 includes:
[0019] The system randomization function randomly selects the pulse sequence flag position to zero for spiking neurons whose flag bit is 1.
[0020] On one hand, the present invention proposes an image data stream processing apparatus, comprising:
[0021] The encoding processing unit is used to acquire the input image data stream, encode the input image data stream, and obtain the original pulse sequence.
[0022] A smoothing unit is used to perform image smoothing processing on the original pulse sequence based on a spiking neural network to obtain a target pulse sequence;
[0023] The decoding processing unit is used to decode the target pulse sequence to obtain an output image data stream.
[0024] In another aspect, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the following method:
[0025] The input image data stream is acquired, and the input image data stream is encoded to obtain the original pulse sequence;
[0026] The original pulse sequence is smoothed using a spiking neural network to obtain the target pulse sequence.
[0027] The target pulse sequence is decoded to obtain the output image data stream.
[0028] This invention provides a computer-readable storage medium, comprising:
[0029] The computer-readable storage medium stores a computer program that, when executed by a processor, implements the following method:
[0030] The input image data stream is acquired, and the input image data stream is encoded to obtain the original pulse sequence;
[0031] The original pulse sequence is smoothed using a spiking neural network to obtain the target pulse sequence.
[0032] The target pulse sequence is decoded to obtain the output image data stream.
[0033] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the following method:
[0034] The input image data stream is acquired, and the input image data stream is encoded to obtain the original pulse sequence;
[0035] The original pulse sequence is smoothed using a spiking neural network to obtain the target pulse sequence.
[0036] The target pulse sequence is decoded to obtain the output image data stream.
[0037] The image data stream processing method and apparatus provided in this embodiment of the invention acquires an input image data stream, encodes the input image data stream to obtain an original pulse sequence, performs image smoothing processing on the original pulse sequence based on a spiking neural network to obtain a target pulse sequence, and decodes the target pulse sequence to obtain an output image data stream. This method can reduce the resource consumption during the computation process of the spiking neural network, thereby optimizing the application effect of the spiking neural network. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0039] Figure 1 This is a flowchart illustrating an image data stream processing method provided in an embodiment of the present invention.
[0040] Figure 2 This is a schematic diagram of a pulse code unit based on a vertical binary sequence.
[0041] Figure 3 This is an interface diagram of a pulse code unit based on a vertical binary sequence.
[0042] Figure 4 This is a schematic diagram of an SNN training algorithm applied to image smoothing.
[0043] Figure 5 This is a schematic diagram of the digital circuit implementation of the pulse sequence detection unit in an SNN network.
[0044] Figure 6 This is a schematic diagram of the control of the gating clock enable signal of the spiking neuron unit.
[0045] Figure 7 This is a schematic diagram of the training algorithm for image smoothing after the SNN coding layer.
[0046] Figure 8 This is a schematic diagram of the training algorithm for image smoothing before the SNN decoding layer.
[0047] Figure 9 This is a schematic diagram of a pulse decoding unit based on a vertical binary sequence.
[0048] Figure 10 This is an interface diagram of a pulse decoding unit based on a vertical binary sequence.
[0049] Figure 11 This is a flowchart illustrating an image data stream processing method provided in another embodiment of the present invention.
[0050] Figure 12 This is a schematic diagram of the structure of an image data stream processing device provided in an embodiment of the present invention.
[0051] Figure 13 This is a schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.
[0053] Figure 1 This is a flowchart illustrating an image data stream processing method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the image data stream processing method provided in this embodiment of the invention includes:
[0054] Step S1: Acquire the input image data stream, encode the input image data stream to obtain the original pulse sequence.
[0055] Step S2: Perform image smoothing processing on the original pulse sequence based on a spiking neural network to obtain the target pulse sequence.
[0056] Step S3: Decode the target pulse sequence to obtain the output image data stream.
[0057] In step S1 above, the device acquires an input image data stream and encodes the input image data stream to obtain an original pulse sequence. The device can be a computer device, etc., that executes this method. The acquisition, storage, use, and processing of data in this application's technical solution all comply with relevant regulations. The encoding processing of the input image data stream includes:
[0058] A pulse coding unit based on a binary sequence encodes the input image data stream. For example... Figure 2 As shown, the circuit structure of the pulse code unit includes a FIFO input buffer unit, a control unit, an image line counting unit, and a register output buffer unit.
[0059] The FIFO input buffer unit is used to buffer the input image data stream.
[0060] Image row counting unit, used to count the number of pixels in an image row.
[0061] Handshake && read FIFO: Handshake signal used to reverse the input image data stream, and FIFO design used to store the input image data stream.
[0062] Pulse sequence conversion is used to convert an input image data stream into a raw pulse sequence.
[0063] The register output buffer unit is used to buffer the original pulse sequence and finally output the original pulse sequence.
[0064] The control unit is used to control the image line counting unit, handshake && read FIFO and pulse sequence conversion, specifically including start and stop control, etc.
[0065] like Figure 3 As shown in Table 1, the meanings of the coding layer interface signals are explained below:
[0066] Table 1
[0067]
[0068]
[0069] In step S2 above, the device performs image smoothing processing on the original pulse sequence based on a spiking neural network to obtain the target pulse sequence. Image smoothing processing refers to the processing of image pixel data with large values. In an SNN network, each spiking neuron transmits a pulse signal. The pulse signal sequence, encoded using a binary method, represents the value of the image pixel data. Pulse signals at different positions represent different data values, which aligns with the direct processing method of image pixel data by the SNN network.
[0070] The step of performing image smoothing processing on the original pulse sequence based on a spiking neural network to obtain the target pulse sequence includes:
[0071] The number of pixels per row in the original pulse sequence is obtained. If the number of pixels per row is greater than a preset threshold, some spiking neurons in the current hidden layer of the spiking neural network are randomly disabled. The preset threshold can be set according to actual conditions. Figure 4 As shown, the number of spiking neurons that are randomly turned off each time can be set independently according to the actual situation.
[0072] The current pulse sequence is used to replace the original pulse sequence, and the steps of obtaining the number of image row pixels of the original pulse sequence and subsequent steps are performed until the number of image row pixels is less than the preset image row pixel number threshold. The current pulse sequence at this point is then used as the target pulse sequence. Figure 5 As shown, if the number of image row pixels in the current pulse sequence T is greater than the preset image row pixel number threshold H, the current pulse sequence is updated again to obtain the updated number of image row pixels in the current pulse sequence T. If this value is greater than the preset image row pixel number threshold H, the current pulse sequence is updated again, and so on, until the number of image row pixels in the current pulse sequence is less than the preset image row pixel number threshold.
[0073] It should be noted that if the number of pixels in the image row of the original pulse sequence M is less than the preset threshold H for the number of pixels in the image row, then the original pulse sequence M can be directly determined as the target pulse sequence N.
[0074] The random shutdown of a portion of the spiking neurons in the current hidden layer of the spiking neural network includes:
[0075] Obtain the flag bits of each spiking neuron in the original pulse sequence and the current pulse sequence, and randomly select spiking neurons whose flag bits are 1 to set their pulse sequence flag bits to zero. For example... Figure 4 As shown, it is possible to... Figure 4 The two spiking neuron flags in the dashed box are set to 1, while the spiking sequence flag of the spiking neuron is set to zero, thus randomly shutting down some spiking neurons in the current hidden layer.
[0076] The random selection of the pulse sequence flag position to zero for spiking neurons whose flag bit is 1 includes:
[0077] The system randomization function randomly selects the pulse sequence flag position to zero for spiking neurons whose flag bit is 1. For example... Figure 6 As shown, the method of setting the clock signal of the spiking neuron unit by controlling the system randomization function is used to realize the release of pulses by the spiking neuron group.
[0078] like Figure 7 As shown, the algorithm for image smoothing processing is trained after the encoding layer. Figure 8 As shown, the algorithm training for image smoothing processing after the decoding layer is implemented.
[0079] In step S3 above, the device decodes the target pulse sequence to obtain an output image data stream.
[0080] The decoding process for the target pulse sequence includes:
[0081] A pulse decoding unit based on binary sequences decodes the target pulse sequence. For example... Figure 9 As shown, the circuit structure of the pulse decoding unit includes a register input buffer unit, a control unit, an image line counting unit, and a register output buffer unit.
[0082] The register input buffer unit is used to buffer the target pulse sequence.
[0083] Image row counting unit, used to count the number of pixels in an image row.
[0084] The handshake signal VR is a signal used to reverse the target pulse sequence.
[0085] Image data conversion is used to convert a target pulse sequence into an output image data stream.
[0086] The register output buffer unit is used to buffer the original pulse sequence and finally output the original pulse sequence.
[0087] The control unit is used to control the image line counting unit, the handshake signal VR, and image data conversion, specifically including start / stop control, etc.
[0088] like Figure 10 As shown in Table 2, the meanings of the decoding layer interface signals are explained below:
[0089] Table 2
[0090]
[0091]
[0092] like Figure 11 As shown, after outputting the image data stream, it can be further output to the pooling layer.
[0093] Further explanation is provided below in conjunction with the accompanying figures:
[0094] Regarding the design and implementation unit of pulse code based on binary conversion, its circuit schematic is as follows: Figure 2 As shown, the module interface is as follows Figure 3 As shown in Table 1, the meanings of the u_img_data_code2_spk interface signals of the encoding layer are as follows.
[0095] First, we store the simulated data input from the outside. Here, we use a synchronous FIFO design with a data width of 8 bits and a depth of 6. When the FIFO is full, a read operation is initiated, and the read pointer moves to the next position. At the same time, this invention designs a handshake signal. Through the AND operation of the fifo_valid and fifo_ready signals, the input signal is suppressed, thereby preventing data loss because the write operation cannot be performed when the read request is pulled high.
[0096] Secondly, the 8-bit data read from the synchronous FIFO is the 8-bit fixed-point number after the input data is fixed-point converted. Based on the binary conversion encoding theory, it is used as the input pulse sequence signal. The 8-bit data of the 8-bit fixed-point number is respectively input into the LIF neurons of the first layer. Through digital combination logic and timing logic control, the encoded pulses are input into the first layer of the neural network at the correct time.
[0097] The circuit schematic of the pulse decoding design and implementation unit based on binary conversion is as follows: Figure 9As shown, this unit uses multiple counter modules, sequential trigger modules, and multiplexer modules, resulting in a relatively dense module distribution and numerous connections within the circuit. The module interfaces for this part of the circuit design are as follows: Figure 10 As shown in Table 2, the meanings of the u_spk_decode2_data interface signals in the decoding layer are as follows.
[0098] First, a pulse counting module is used to count the input pulses. A handshake operation between the input pulse data valid signal (in_valid) and the input pulse data ready signal (in_ready) ensures continuous counting by counters x and y. Simultaneously, the input start pulse (in_sof) signal is delayed by n cycles, and the number of delay cycles is also counted. By employing encoder-layer counters and decoder-layer counters, the overall input and output data volumes of the SNN system are aligned.
[0099] A timing trigger buffers the input pulse sequence signal to ensure the decoding layer receives a correct and stable pulse sequence to be decoded. Upon receiving the pulse sequence signal, the decoding layer module selects the pulse signal based on its position in the sequence. For example, if a pulse signal is at position 7 in the sequence, it will be decoded as 2. 7 That is, the image pixel data it represents is 2 7 By repeatedly performing this operation on pulse signals at different positions in the sequence, a pulse sequence will be decoded into pixel data of an image and output to the Pooling layer.
[0100] In view of this, the present invention, combined with the image smoothing process, provides a training algorithm and low-power digital circuit implementation method for SNN network image smoothing processing. This effectively reduces the hardware DSP resource consumption of SNN network and the storage resource consumption for related impulse data and weight data after synaptic update. Furthermore, this process effectively reduces the number of calculations of the natural exponential function on the hardware, reduces the consumption of LUT resources and the number of times LUT data is read, and greatly improves the processing speed, resource utilization and stability of the hardware system.
[0101] Applications of intelligent tasks based on spiking neural networks (training and computation) include, but are not limited to: disease classification based on spiking neural networks in the field of biochemistry, traffic light status recognition based on spiking neural networks in the field of transportation, and target detection, image enhancement, and image filtering based on spiking neural networks in the field of computer image processing.
[0102] The image data stream processing method provided in this embodiment of the invention acquires an input image data stream, encodes the input image data stream to obtain an original pulse sequence, performs image smoothing processing on the original pulse sequence based on a spiking neural network to obtain a target pulse sequence, and decodes the target pulse sequence to obtain an output image data stream. This method can reduce the resource consumption during the computation process of the spiking neural network, thereby optimizing the application effect of the spiking neural network.
[0103] Further, the encoding process for the input image data stream includes:
[0104] The input image data stream is encoded using a pulse coding unit based on a binary sequence. This can be referred to the above embodiments for explanation, and will not be repeated here.
[0105] Further, the decoding process for the target pulse sequence includes:
[0106] The target pulse sequence is decoded by a pulse decoding unit based on a binary sequence. This can be referred to the above embodiments for further explanation, and will not be repeated here.
[0107] Further, the step of performing image smoothing processing on the original pulse sequence based on a spiking neural network to obtain the target pulse sequence includes:
[0108] The number of pixels per row in the original pulse sequence is obtained. If the number of pixels per row is greater than a preset threshold, some spiking neurons in the current hidden layer of the spiking neural network are randomly turned off. This can be referred to the above embodiment for explanation, and will not be repeated here.
[0109] The current pulse sequence is used to replace the original pulse sequence, and the steps of obtaining the number of image row pixels of the original pulse sequence and subsequent steps are performed until the number of image row pixels is less than the preset image row pixel number threshold. The current pulse sequence at this point is then used as the target pulse sequence. This can be referred to the above embodiments for explanation, and will not be repeated here.
[0110] Further, the random shutdown of some spiking neurons in the current hidden layer of the spiking neural network includes:
[0111] Obtain the flag bits of each spiking neuron in the original pulse sequence and the current pulse sequence, and randomly select the pulse sequence flag bit of the spiking neuron whose flag bit is 1 to be set to zero. Refer to the above embodiment for further details.
[0112] Further, the random selection of the pulse sequence flag position to zero for spiking neurons whose flag bit is 1 includes:
[0113] The system randomization function randomly selects the pulse sequence flag position to zero for spiking neurons whose flag bit is 1. This can be referred to the above embodiment for explanation, and will not be repeated here.
[0114] Figure 12 This is a schematic diagram of the structure of an image data stream processing device provided in an embodiment of the present invention, as shown below. Figure 12 As shown, the image data stream processing apparatus provided in this embodiment of the invention includes an encoding processing unit 1201, a smoothing processing unit 1202, and a decoding processing unit 1203, wherein:
[0115] The encoding processing unit 1201 is used to acquire the input image data stream and encode the input image data stream to obtain the original pulse sequence; the smoothing processing unit 1202 is used to perform image smoothing processing on the original pulse sequence based on the spiking neural network to obtain the target pulse sequence; the decoding processing unit 1203 is used to decode the target pulse sequence to obtain the output image data stream.
[0116] Specifically, the encoding processing unit 1201 in the device is used to acquire the input image data stream, encode the input image data stream to obtain the original pulse sequence; the smoothing processing unit 1202 is used to perform image smoothing processing on the original pulse sequence based on the spiking neural network to obtain the target pulse sequence; and the decoding processing unit 1203 is used to decode the target pulse sequence to obtain the output image data stream.
[0117] The image data stream processing apparatus provided in this embodiment of the invention acquires an input image data stream, encodes the input image data stream to obtain an original pulse sequence, performs image smoothing processing on the original pulse sequence based on a spiking neural network to obtain a target pulse sequence, and decodes the target pulse sequence to obtain an output image data stream. This reduces the resource consumption during the computation process of the spiking neural network, thereby optimizing the application effect of the spiking neural network.
[0118] The embodiments of the image data stream processing apparatus provided in this invention can be used to execute the processing flow of the above-described method embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above-described method embodiments.
[0119] Figure 13 This is a schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention, such as... Figure 13 As shown, the computer device includes: a memory 1301, a processor 1302, and a computer program stored in the memory 1301 and executable on the processor 1302. When the processor 1302 executes the computer program, it implements the following method:
[0120] The input image data stream is acquired, and the input image data stream is encoded to obtain the original pulse sequence;
[0121] The original pulse sequence is smoothed using a spiking neural network to obtain the target pulse sequence.
[0122] The target pulse sequence is decoded to obtain the output image data stream.
[0123] This embodiment discloses a computer program product, which includes a computer program that, when executed by a processor, implements the following method:
[0124] The input image data stream is acquired, and the input image data stream is encoded to obtain the original pulse sequence;
[0125] The original pulse sequence is smoothed using a spiking neural network to obtain the target pulse sequence.
[0126] The target pulse sequence is decoded to obtain the output image data stream.
[0127] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the following method:
[0128] The input image data stream is acquired, and the input image data stream is encoded to obtain the original pulse sequence;
[0129] The original pulse sequence is smoothed using a spiking neural network to obtain the target pulse sequence.
[0130] The target pulse sequence is decoded to obtain the output image data stream.
[0131] Compared with existing technical solutions, the image data stream processing method provided in this embodiment of the invention, which acquires an input image data stream, encodes the input image data stream to obtain an original pulse sequence, performs image smoothing processing on the original pulse sequence based on a spiking neural network to obtain a target pulse sequence, and decodes the target pulse sequence to obtain an output image data stream, can reduce the resource consumption during the spiking neural network calculation process and thus optimize the application effect of the spiking neural network.
[0132] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0133] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0134] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0135] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0136] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0137] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for processing image data streams, characterized in that, include: The input image data stream is acquired, and the input image data stream is encoded to obtain the original pulse sequence; The original pulse sequence is smoothed using a spiking neural network to obtain the target pulse sequence. The target pulse sequence is decoded to obtain an output image data stream; The step of performing image smoothing processing on the original pulse sequence based on a spiking neural network to obtain the target pulse sequence includes: Obtain the number of pixels in the image row of the original pulse sequence. If it is determined that the number of pixels in the image row is greater than a preset threshold for the number of pixels in the image row, then randomly shut down some spiking neurons in the current hidden layer of the spiking neural network. The current pulse sequence is used to replace the original pulse sequence, and the steps of obtaining the number of image row pixels of the original pulse sequence and subsequent steps are performed until the number of current image row pixels is less than the preset number of image row pixels threshold, and the current pulse sequence at this time is taken as the target pulse sequence.
2. The image data stream processing method according to claim 1, characterized in that, The encoding process for the input image data stream includes: The input image data stream is encoded using a pulse coding unit based on a binary sequence.
3. The image data stream processing method according to claim 1, characterized in that, The decoding process for the target pulse sequence includes: The target pulse sequence is decoded by a pulse decoding unit based on binary sequences.
4. The image data stream processing method according to claim 1, characterized in that, The random shutdown of a portion of the spiking neurons in the current hidden layer of the spiking neural network includes: Obtain the flag bits of each spiking neuron in the original pulse sequence and the current pulse sequence, and randomly select the pulse sequence flag bit of the spiking neuron whose flag bit is 1 to be set to zero.
5. The image data stream processing method according to claim 4, characterized in that, The random selection of the pulse sequence flag position to zero for spiking neurons whose flag bit is 1 includes: The system randomization function randomly selects the pulse sequence flag position to zero for spiking neurons whose flag bit is 1.
6. An image data stream processing apparatus, characterized in that, include: The encoding processing unit is used to acquire the input image data stream, encode the input image data stream, and obtain the original pulse sequence. A smoothing unit is used to perform image smoothing processing on the original pulse sequence based on a spiking neural network to obtain a target pulse sequence; A decoding processing unit is used to decode the target pulse sequence to obtain an output image data stream; The step of performing image smoothing processing on the original pulse sequence based on a spiking neural network to obtain the target pulse sequence includes: Obtain the number of pixels in the image row of the original pulse sequence. If it is determined that the number of pixels in the image row is greater than a preset threshold for the number of pixels in the image row, then randomly shut down some spiking neurons in the current hidden layer of the spiking neural network. The current pulse sequence is used to replace the original pulse sequence, and the steps of obtaining the number of image row pixels of the original pulse sequence and subsequent steps are performed until the number of current image row pixels is less than the preset number of image row pixels threshold, and the current pulse sequence at this time is taken as the target pulse sequence.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 5.
9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Image data classification method and device based on low-bit pulse neural network
CN114332545A
Water meter reading area detection method based on spiking neural network and related device
CN116343211A
