Pulse sequence processing method, image classification method, apparatus, device, and medium

By generating image pulse signal sequences and processing image data within a time window, the problems of slow processing speed and low accuracy of asynchronous processors are solved, thereby improving the reliability and computational efficiency of image classification models.

CN118941878BActive Publication Date: 2026-11-27SHANGHAI QI ZHI INSTITUTE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411171787.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2026-11-27
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

Asynchronous processors have limited ability to process data in parallel within each processing unit, resulting in slow data processing speed. Furthermore, the accuracy of the generated data depends on the hardware quality, leading to low reliability of image classification models and wasted computing resources.

Method used

By generating image pulse signal sequences, processing image data using time windows and weighted pulse signal sequences, filtering out signals that generate pulses and updating neuronal membrane potentials, and storing them in the output buffer for image classification model training.

Benefits of technology

It improves data processing speed and the accuracy of pulse signals, enhances the reliability of image classification models, and reduces the waste of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941878B_ABST
    Figure CN118941878B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a pulse sequence processing method, an image classification method, an apparatus, a device and a medium. A specific embodiment of the method comprises: receiving image data; generating an image pulse signal sequence; determining a to-be-input pulse signal sequence; performing the following steps: determining a time window sequence; performing the following steps: generating a weighted pulse signal sequence; obtaining an activated neuron; generating a neuron pulse signal, and updating an initial neuron and an initial membrane potential; generating a neuron pulse signal sequence; determining the neuron pulse signal sequence as the to-be-input pulse signal sequence; determining a hidden layer satisfying a preset processing condition as a to-be-processed hidden layer; and storing the neuron pulse signal sequence to an output buffer. The embodiment can improve the processing speed during data processing, improve the accuracy of the generated pulse signal, and thus improve the reliability of the image classification model trained using the pulse signal, and reduce the waste of computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed herein relate to the field of computer technology, specifically to pulse sequence processing methods, image classification methods, apparatus, devices, and media. Background Technology

[0002] Image classification is a method of assigning images to a specific category based on their different features. Currently, the common approach for image classification is as follows: First, the pulse sequence corresponding to the image is input into a spiking neural network. Then, an asynchronous processor is used to accelerate the processing of the pulse sequence within the spiking neural network and generate pulse signals. Finally, the generated pulse signals are used to train an image classification model to complete the image classification.

[0003] However, when classifying images using the above method, the following technical problems often arise:

[0004] First, asynchronous processors have limited ability to process data in parallel within their respective processing units, resulting in slower data processing speeds. Furthermore, the accuracy of data generated by asynchronous processors depends on their hardware quality; lower-quality asynchronous processors generate less accurate data, leading to less accurate pulse signals. This results in lower reliability of the image classification model trained using these pulse signals, leading to more errors in image classification and wasting computational resources during the process.

[0005] Second, asynchronous processors have a weak ability to identify generated error data, which can easily lead to the continuous accumulation of error data, resulting in slower processing speed and wasted computing resources when reprocessing the data. Summary of the Invention

[0006] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0007] Some embodiments of this disclosure provide pulse sequence processing methods, image classification methods, pulse sequence processing apparatuses, image classification devices, electronic devices, and computer-readable media for image classification to solve one or more of the technical problems mentioned in the background section above.

[0008] In a first aspect, some embodiments of this disclosure provide a pulse sequence processing method for image classification. The method includes: receiving image data, wherein the image data corresponds to image label information; generating an image pulse signal sequence corresponding to the image data based on the image data, wherein the image pulse signal sequence corresponds to various time steps; determining the image pulse signal sequence as an input pulse signal sequence; for each hidden layer in a preset number of hidden layers, performing the following steps: determining a time window sequence based on various time steps corresponding to the input pulse signal sequence; for each time window in the time window sequence, performing the following steps: generating a weighted pulse signal sequence corresponding to the time window based on the time window and the input pulse signal sequence; for each initial neuron in each initial neuron, processing the weighted pulse signal sequence... The input is fed into the initial neurons to obtain corresponding activated neurons. Each initial neuron has an initial membrane potential, and each activated neuron has an activation membrane potential. For each activated neuron, at least one neuronal pulse signal is generated, and the initial neuron and initial membrane potential corresponding to the activated neuron are updated. A neuronal pulse signal sequence is generated based on the generated neuronal pulse signals. The neuronal pulse signal sequence is determined as the input pulse signal sequence to be updated. The hidden layers that meet the preset processing conditions among the preset number of hidden layers are determined as hidden layers to be processed. The neuronal pulse signal sequence corresponding to the hidden layer to be processed is stored in the output buffer for training of the image classification model.

[0009] Secondly, some embodiments of this disclosure provide an image classification method, which includes: acquiring an image dataset; for each image data in the image dataset, performing the following steps: performing image segmentation processing on the image data to obtain a foreground target image; generating a corresponding neuronal pulse signal sequence based on the foreground target image; inputting the neuronal pulse signal sequence into a pre-trained image classification model to obtain image label information corresponding to the neuronal pulse signal sequence, wherein the image classification model is trained based on the neuronal pulse signal sequence stored in the output buffer, and the neuronal pulse signal sequence stored in the output buffer is generated by the method described in any implementation of the first aspect; and determining the category corresponding to the foreground target image based on the image label information.

[0010] Thirdly, some embodiments of this disclosure provide a pulse sequence processing apparatus for image classification. The apparatus includes: a receiving unit configured to receive image data, wherein the image data corresponds to image label information; a generating unit configured to generate an image pulse signal sequence corresponding to the image data based on the image data, wherein the image pulse signal sequence corresponds to each time step; a first determining unit configured to determine the image pulse signal sequence as an input pulse signal sequence; and an execution unit configured to, for each hidden layer in a preset number of hidden layers, perform the following steps: determining a time window sequence based on each time step corresponding to the input pulse signal sequence; for each time window in the time window sequence, performing the following steps: generating a weighted pulse signal sequence corresponding to the time window based on the time window and the input pulse signal sequence; and for each initial neuron in each initial neuron, performing the first determining unit to determine the first input pulse signal sequence as an input pulse signal sequence. The weighted pulse signal sequence is input to the initial neurons to obtain corresponding activated neurons. Each initial neuron has an initial membrane potential, and each activated neuron has an activation membrane potential. For each activated neuron, at least one neuronal pulse signal is generated, and the initial neuron and initial membrane potential corresponding to the activated neuron are updated. A neuronal pulse signal sequence is generated based on the generated neuronal pulse signals. The neuronal pulse signal sequence is determined as the input pulse signal sequence for updating the input pulse signal sequence. A second determining unit is configured to determine the hidden layers that meet the preset processing conditions among the preset number of hidden layers as hidden layers to be processed. A storage unit is configured to store the neuronal pulse signal sequence corresponding to the hidden layer to be processed into an output buffer for training of the image classification model.

[0011] Fourthly, some embodiments of this disclosure provide an image classification apparatus, comprising: an acquisition unit configured to acquire an image dataset; and an execution unit configured to perform the following steps for each image data in the image dataset: performing image segmentation processing on the image data to obtain a foreground target image; generating a corresponding neuronal pulse signal sequence based on the foreground target image; inputting the neuronal pulse signal sequence into a pre-trained image classification model to obtain image label information corresponding to the neuronal pulse signal sequence, wherein the image classification model is trained based on the neuronal pulse signal sequence stored in an output buffer, and the neuronal pulse signal sequence stored in the output buffer is generated by the method described in any implementation of the first aspect; and determining the category corresponding to the foreground target image based on the image label information.

[0012] Fifthly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0013] Sixthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0014] The above embodiments of this disclosure have the following beneficial effects: The pulse sequence processing method for image classification according to some embodiments of this disclosure can improve the processing speed of data processing, improve the accuracy of the generated pulse signals, and thus improve the reliability of the image classification model, reducing the waste of computational resources during image classification. Specifically, the reasons for slow data processing speed, low accuracy of generated pulse signals, low reliability of image classification models, and waste of computational resources during image classification are: the asynchronous processor has limited ability to perform parallel processing of data within each processing unit, resulting in slow data processing speed. Furthermore, the accuracy of data generated by the asynchronous processor depends on the hardware quality of the asynchronous processor; a lower-quality asynchronous processor generates less accurate data, which in turn leads to lower accuracy of the generated pulse signals, resulting in lower reliability of the image classification model trained using the pulse signals, leading to more errors in image classification and wasting computational resources during image classification. Based on this, the pulse sequence processing method for image classification according to some embodiments of this disclosure first receives image data, wherein the image data corresponds to image label information. This allows the acquisition of the original data to be processed. Secondly, based on the image data, an image pulse signal sequence corresponding to the image data is generated, wherein the image pulse signal sequence corresponds to each time step. Therefore, image data can be converted into a corresponding image pulse signal sequence, which can then be processed using a spiking neural network. The aforementioned image pulse signal sequence is then determined as the input pulse signal sequence. Next, for each hidden layer in a predetermined number of hidden layers, the following steps are performed: First, a time window sequence is determined based on each time step corresponding to the input pulse signal sequence. This allows for sequential processing of the data corresponding to each time window using the obtained time window sequence. Second, for each time window in the aforementioned time window sequence, the following steps are performed: First, a weighted pulse signal sequence is generated based on the aforementioned time window and the input pulse signal sequence. This allows for compression of each input pulse signal corresponding to the aforementioned time window, obtaining signals that have pulsed and discarding signals that have not pulsed, thus accelerating subsequent data processing. Second, for each initial neuron in each initial neuron, the aforementioned weighted pulse signal sequence is input to the initial neuron to obtain the corresponding activated neuron. Each initial neuron in each initial neuron corresponds to an initial membrane potential, and the activated neuron corresponds to an activation membrane potential. This yields the neuron that has received the pulse signal sequence. Then, for each of the obtained activated neurons, at least one neuronal pulse signal is generated based on the activated neuron, and the initial neuron and initial membrane potential corresponding to the activated neuron are updated.Therefore, by analyzing the activation membrane potential corresponding to activated neurons, it can be determined whether a neuron will emit a pulse, and signals that may emit pulses can be processed, thereby improving the accuracy of data processing. Then, based on the generated neuronal pulse signals, a neuronal pulse signal sequence is generated. This provides the input data for the next hidden layer. The aforementioned neuronal pulse signal sequence is then selected as the input pulse signal sequence to be updated. This allows the output data of the previous hidden layer to be used as the input for the next hidden layer. Next, hidden layers that meet the preset processing conditions from the preset number of hidden layers are selected as the hidden layers to be processed. This allows the selection of the last hidden layer to be processed. Finally, the neuronal pulse signal sequence corresponding to the hidden layer to be processed is stored in the output buffer for training the image classification model. Thus, the neuronal pulse sequence output by the last hidden layer can be used for model training. Furthermore, because the input pulse signals corresponding to each time window can be compressed, only signals that have emitted pulses are processed, ignoring signals that have not, thus improving the data processing speed. Furthermore, when processing data, by processing the neurons that receive the weighted pulse signals corresponding to each time window, it can be determined whether the neurons pulse in the corresponding time window. Then, different processing can be performed on the pulse signal sequences and neurons of different time windows, thereby improving the processing speed of data processing, improving the accuracy of the generated pulse signals, and thus improving the reliability of the image classification model and reducing the waste of computational resources during image classification. Attached Figure Description

[0015] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0016] Figure 1 This is a flowchart of some embodiments of the pulse sequence processing method for image classification according to the present disclosure;

[0017] Figure 2 This is a flowchart of some other embodiments of the image classification method according to the present disclosure;

[0018] Figure 3 This is a schematic diagram of the structure of some embodiments of the pulse sequence processing apparatus for image classification according to the present disclosure;

[0019] Figure 4 These are schematic diagrams illustrating the structure of some embodiments of the image classification apparatus according to the present disclosure;

[0020] Figure 5 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0021] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0022] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0023] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0024] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0025] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0026] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0027] Figure 1 A flow 100 of some embodiments of a pulse sequence processing method for image classification according to the present disclosure is shown. The pulse sequence processing method for image classification includes the following steps:

[0028] Step 101: Receive image data.

[0029] In some embodiments, the execution entity (e.g., a computing device) of the pulse sequence processing method for image classification can receive image data. This image data can be image data corresponding to an RGB image. The image data corresponds to image label information. This image label information can be a label used to characterize the category corresponding to the image data. The execution entity can be a server for generating and processing image pulse signal sequences. In practice, the execution entity can receive image data sent by a target server. This target server can be a server used for storing and managing image data.

[0030] Step 102: Based on the image data, generate the image pulse signal sequence corresponding to the image data.

[0031] In some embodiments, the execution entity can generate an image pulse signal sequence corresponding to the image data based on the image data. The image pulse signals in the image pulse signal sequence can be pulse signals corresponding to pixels in the image data. Each image pulse signal in the image pulse signal sequence corresponds to a timestamp. The image pulse signal sequence corresponds to various time steps. Each time step can be used to characterize the length of time within a unit. In practice, firstly, the execution entity can randomly set the step size of each time step within a preset step size range. Then, the timestamps can be mapped to the respective time steps. The preset step size range can be the time range that can be set for each time step. For example, the preset step size range can be [3ms, 8ms]. As an example: when the step size of each time step is 4ms, the time step corresponding to the pulse signal with a timestamp of 5ms is the second time step.

[0032] In some optional implementations of certain embodiments, the execution entity may generate an image pulse signal sequence corresponding to the image data based on the image data through the following steps:

[0033] The first step is to perform the following steps for each pixel in the image data described above:

[0034] The first sub-step involves determining the first color value as the product of the first color channel value corresponding to the aforementioned pixel and the first preset weight value. The image data includes individual pixels, and each pixel corresponds to a first color channel value, a second color channel value, and a third color channel value. The first color channel value can be the RGB value of the pixel in the color channel corresponding to red. The first preset weight value can be a pre-set value. Here, the specific setting of the first preset weight value is not limited. For example, the first preset weight value can be 0.3.

[0035] The second sub-step involves determining the second color value by multiplying the second color channel value corresponding to the aforementioned pixel by the second preset weight value. The second color channel value can be the RGB value of the aforementioned pixel in the color channel corresponding to blue. The second preset weight value can be a pre-set value. Here, the specific setting of the second preset weight value is not limited. For example, the second preset weight value can be 0.6.

[0036] The third sub-step involves determining the third color value by multiplying the third color channel value corresponding to the aforementioned pixel by the third preset weight value. The third color channel value can be the RGB value of the pixel in the color channel corresponding to green. The third preset weight value can be a pre-set value. Here, the specific setting of the third preset weight value is not limited. For example, the third preset weight value can be 0.1.

[0037] The fourth sub-step involves determining the sum of the first color value, the second color value, and the third color value as the grayscale value corresponding to the pixel.

[0038] The fifth sub-step involves generating a normalized value for each pixel based on its corresponding grayscale value. This normalized value can be a value obtained by processing the grayscale value. In practice, the executing entity can determine the normalized value as the ratio of the grayscale value to a preset value. This preset value can be 255.

[0039] The sixth sub-step involves generating the pixel pulse probability corresponding to the aforementioned pixel based on the normalized value. In practice, the executing entity can determine the normalized value as the pixel pulse probability. This pixel pulse probability can be used to characterize the probability that the aforementioned pixel generates a high-level pulse signal.

[0040] The seventh sub-step involves generating pixel pulse signals corresponding to each pixel based on the aforementioned pixel pulse probabilities and a preset pixel time window. The pixel time window can be the time range within which each pixel in the image data is used to generate the pulse signals. The pixel pulse signals can be the pulse signals generated by the pixels within the aforementioned time window. Each pixel pulse signal has a corresponding timestamp. The timestamp can be the time point at which the pixel pulse signal was generated. In practice, the executing entity can use a microprocessor to generate each pulse signal within the time range corresponding to the pixel time window. The probability that the generated pulse signal is high is equal to the aforementioned pixel pulse probability.

[0041] The second step involves generating an image pulse signal sequence based on the generated pixel pulse signals and the timestamp corresponding to each pixel pulse signal. In practice, the executing entity can sort the pixel pulse signals in ascending order using the timestamps to obtain the pixel pulse signal sequence. This pixel pulse signal sequence can then be identified as the image pulse signal sequence.

[0042] Step 103: Determine the image pulse signal sequence as the input pulse signal sequence.

[0043] In some embodiments, the execution entity may determine the image pulse signal sequence as the input pulse signal sequence.

[0044] Step 104: For each hidden layer in the preset number of hidden layers, perform the following steps:

[0045] Step 1041: Determine the time window sequence based on each time step corresponding to the input pulse signal sequence.

[0046] In some embodiments, the execution entity can determine a time window sequence based on each time step corresponding to the input pulse signal sequence. The hidden layer can be a hidden layer in a spiking neural network. Each time window in the time window sequence can correspond to multiple time steps. Each time window in the time window sequence has the same number of time steps. In practice, firstly, the execution entity can determine a time window as a set number of adjacent time steps. Then, it can sort the time windows in ascending order using the timestamps included in each time step to obtain the time window sequence. The set number of time steps can be a pre-defined value. The specific setting of the set number of time steps is not limited here. For example, when each time window corresponds to two time steps, each time step has a step size of 4ms, and the timestamp corresponding to the pulse signal in the first time step is 3ms, the timestamp corresponding to the pulse signal in the second time step is 5ms, the timestamp corresponding to the pulse signal in the third time step is 9ms, and the timestamp corresponding to the pulse signal in the fourth time step is 13ms, the first and second time steps can be determined as the first time window. Then, the third and fourth time steps can be defined as the second time window. At this time, the timestamps corresponding to the first time window are 3ms and 5ms, and the timestamps corresponding to the second time window are 9ms and 13ms. When sorting, the first time window is placed before the second time window according to the order of the timestamps from earliest to latest, resulting in the corresponding time window sequence {first time window, second time window}.

[0047] Step 1042, for each time window in the time window sequence, perform the following steps:

[0048] Step 10421: Based on the time window and the input pulse signal sequence, generate the weighted pulse signal sequence corresponding to the time window.

[0049] In some embodiments, the execution entity may generate a weighted pulse signal sequence corresponding to the time window based on the time window and the input pulse signal sequence. The weighted pulse signal sequence may be a bit sequence consisting of "0"s and "1"s, obtained by compressing each input pulse signal corresponding to the time window in the input pulse signal sequence.

[0050] In some optional implementations of certain embodiments, the execution entity can generate a weighted pulse signal sequence corresponding to the time window based on the time window and the input pulse signal sequence through the following steps:

[0051] The first step is to determine each input pulse signal in the above-mentioned input pulse signal sequence corresponding to the above-mentioned time window as a time pulse signal.

[0052] The second step is to generate a corresponding time pulse signal sequence based on the aforementioned time pulse signals. In practice, the executing entity can sort the aforementioned time pulse signals in order from earliest to latest using the timestamps corresponding to each time pulse signal to obtain the aforementioned time pulse signal sequence.

[0053] The third step is to generate the number of time pulses corresponding to the time pulse signal sequence based on the aforementioned time pulse signals. This number of time pulses can be the number of time pulse signals in the time pulse signal sequence that are "1". In practice, the execution entity can obtain the number of time pulses using the POPCNT instruction.

[0054] The fourth step is to generate a weighted pulse signal sequence corresponding to the aforementioned time pulse signal sequence, based on the number of time pulses. In practice, the executing entity can convert the number of time pulses into a corresponding binary number. Then, the binary number can be used to determine the weighted pulse sequence. For example, when the time pulse signal sequence is "1010100", the corresponding number of time pulses is 3. The binary number corresponding to the number of time pulses is "011", and "011" is the corresponding weighted pulse sequence.

[0055] Step 10422: For each initial neuron among the initial neurons, the above weighted pulse signal sequence is input into the initial neuron to obtain the corresponding activated neuron.

[0056] In some embodiments, the executing entity may input the weighted pulse signal sequence to each of the initial neurons to obtain a corresponding activated neuron. Each of the initial neurons corresponds to an initial membrane potential. The activated neuron corresponds to an activation membrane potential. The initial neurons may be pre-defined neurons in a spiking neural network. The initial membrane potential may be the membrane potential corresponding to the initial neuron. The activated neuron may be an initial neuron that has received the weighted pulse signal sequence. The activation membrane potential may be the membrane potential corresponding to the activated neuron.

[0057] Step 10423: For each of the obtained activated neurons, generate at least one neuronal pulse signal based on the activated neuron, and update the initial neuron and initial membrane potential corresponding to the activated neuron.

[0058] In some embodiments, the execution entity may, for each of the obtained activated neurons, generate at least one neuronal pulse signal based on the activated neuron, and update the initial neuron and initial membrane potential corresponding to the activated neuron. The neuronal pulse signal may be the pulse signal corresponding to the activated neuron.

[0059] In some optional implementations of certain embodiments, the execution entity may generate at least one neuronal pulse signal based on the activated neuron through the following steps: and update the initial neuron and initial membrane potential corresponding to the activated neuron:

[0060] The first step is to generate the activation membrane potential value corresponding to the activated neuron based on the activation membrane potential of the activated neuron. This activation membrane potential value can be a digital signal corresponding to the activation membrane potential. In practice, the executing entity can convert the activation membrane potential into the corresponding activation membrane potential value using an analog-to-digital converter.

[0061] The second step is to identify the initial neurons corresponding to the activated neurons as the target neurons.

[0062] The third step is to determine the initial membrane potential corresponding to the target neuron as the target membrane potential.

[0063] The fourth step is to generate a target membrane potential value based on the aforementioned target membrane potential. This target membrane potential value can be a digital signal corresponding to the target membrane potential. In practice, the executing entity can convert the target membrane potential into a corresponding target membrane potential value using an analog-to-digital converter.

[0064] The fifth step is to determine the cumulative membrane potential value by summing the activated membrane potential value and the target membrane potential value. In practice, firstly, the executing entity can obtain the sum of the activated membrane potential value and the target membrane potential value using a shift-and-add method. Then, the obtained sum can be determined as the cumulative membrane potential value.

[0065] Step 6: Based on the accumulated membrane potential value, generate at least one neuronal pulse signal, and update the initial neuron and initial membrane potential corresponding to the activated neuron. The neuronal pulse signal can be the pulse signal output by the activated neuron.

[0066] In some optional implementations of certain embodiments, the execution entity may generate at least one neuronal pulse signal based on the accumulated membrane potential value through the following steps, and update the initial neuron and initial membrane potential corresponding to the activated neuron:

[0067] The first step, in response to determining that the above-mentioned cumulative membrane potential value meets the preset threshold condition, is to perform the following steps:

[0068] The first sub-step involves identifying the activated neurons as the corresponding initial neurons and updating them. The preset threshold condition can be that the accumulated membrane potential value is less than a preset threshold. This preset threshold can be a pre-defined value. The specific setting of this preset threshold is not limited here.

[0069] The second sub-step involves data conversion processing of the aforementioned accumulated membrane potential value to obtain the accumulated membrane potential. This accumulated membrane potential can be an analog signal corresponding to the accumulated membrane potential value. In practice, the executing entity can convert the accumulated membrane potential value into the corresponding accumulated membrane potential using a digital-to-analog converter.

[0070] The third sub-step involves determining the accumulated membrane potential as the initial membrane potential corresponding to the updated initial neuron, in order to update the initial membrane potential.

[0071] The fourth sub-step involves generating null signals as neuron pulse signals. These neuron pulse signals are timestamped. The null signals can be pulse signals with a corresponding logic number of "0" and a low voltage level. In practice, the executing entity can generate the null signals using a microprocessor. Alternatively, the executing entity can define a voltage level that meets a preset low-level range as low. This low-level range can be greater than or equal to 0 volts and less than 0.3 volts.

[0072] In some optional implementations of certain embodiments, the execution entity may generate at least one neuronal pulse signal based on the accumulated membrane potential value through the following steps, and update the initial neuron and initial membrane potential corresponding to the activated neuron:

[0073] The first step, in response to the determination that the above-mentioned cumulative membrane potential value does not meet the preset threshold condition, is to perform the following steps:

[0074] The first sub-step involves identifying the initial neuron corresponding to the activated neuron as the neuron to be input.

[0075] The second sub-step involves determining each image pulse signal corresponding to the time window in the above image pulse signal sequence as a pulse signal to be processed.

[0076] The third sub-step involves performing the following steps for each of the aforementioned pulse signals to be processed:

[0077] Sub-step one involves inputting the aforementioned pulse signal to be processed into the aforementioned input neuron to obtain the neuron to be processed. The aforementioned neuron to be processed can be a neuron that has received the aforementioned pulse signal to be processed. The aforementioned neuron to be processed corresponds to a membrane potential to be processed. The aforementioned membrane potential to be processed can be the membrane potential corresponding to the aforementioned neuron to be processed.

[0078] Sub-step two involves performing data conversion processing on the membrane potentials corresponding to the neurons to be processed, obtaining the membrane potential values. These membrane potential values ​​can be digital signals corresponding to the membrane potentials. In practice, the executing entity can use an analog-to-digital converter to convert the membrane potentials to be processed into membrane potential values.

[0079] Sub-step three: In response to determining that the above-mentioned membrane potential value meets the above-mentioned preset threshold condition, the following steps are performed:

[0080] First, the neurons to be processed are identified as active neurons, and these active neurons are updated.

[0081] Secondly, the membrane potential to be processed is determined as the activation membrane potential corresponding to the activated neuron to be updated, so as to update the activation membrane potential.

[0082] Then, null signals are generated as neuron pulse signals. In practice, the aforementioned execution entity can generate null signals using a microprocessor.

[0083] Sub-step four: In response to determining that the above-mentioned membrane potential value does not meet the above-mentioned preset threshold condition, the following steps are performed:

[0084] First, a spike signal is generated as a neuron pulse signal. This spike signal can be a pulse signal with a corresponding logic number of "1" and a high voltage level. In practice, the execution entity can generate the spike signal using a microprocessor. Furthermore, the execution entity can define a voltage level that meets a preset high voltage range as a high voltage level. This preset high voltage range can be greater than or equal to 1.8 volts and less than 3.3 volts.

[0085] Next, a preset quiescent membrane potential is determined as the membrane potential to be processed, and the membrane potential to be processed is updated to obtain the updated membrane potential to be processed. The quiescent membrane potential can be a membrane potential whose corresponding digital signal is less than the preset threshold.

[0086] Then, the neurons to be processed are identified as active neurons, and the active neurons are updated.

[0087] Finally, the updated membrane potential to be processed is determined as the activation membrane potential corresponding to the updated activated neuron, so as to update the above activation membrane potential.

[0088] The fourth sub-step involves storing the generated neuron pulse signals into an output buffer. Each neuron pulse signal corresponds to a timestamp. This output buffer can be used to store the data to be output.

[0089] The fifth sub-step involves identifying the updated activated neuron as the initial neuron corresponding to the aforementioned activated neuron, and then updating the aforementioned initial neuron to obtain the updated initial neuron.

[0090] The sixth sub-step involves determining the updated activation membrane potential as the initial membrane potential corresponding to the updated initial neuron, in order to update the aforementioned initial membrane potential.

[0091] The above technical solution and its related content, as an inventive point of this disclosure, solve the second technical problem mentioned in the background: "When an asynchronous processor detects erroneous data, it rolls back to the state before the erroneous data occurred and reprocesses the data. When processing a large amount of data or generating a large amount of erroneous data, this easily leads to slow processing speed and wasted computing resources." Factors leading to slow processing speed and wasted computing resources are often as follows: When an asynchronous processor detects erroneous data, it rolls back to the state before the erroneous data occurred and reprocesses the data. When processing a large amount of data or generating a large amount of erroneous data, this easily leads to slow processing speed and wasted computing resources. If these factors are solved, the data processing speed can be improved and the waste of computing resources reduced. To achieve this effect, in response to determining that the cumulative membrane potential value does not meet the preset threshold condition, this disclosure performs the following steps: First, the initial neuron corresponding to the activated neuron is determined as the input neuron. Thus, the initial neuron before receiving the weighted pulse signal sequence can be determined. Then, each image pulse signal corresponding to the time window in the image pulse signal sequence is determined as a pulse signal to be processed. Thus, each pulse signal before weighted processing can be obtained. Next, for each of the aforementioned pulse signals to be processed, the following steps are performed: First, the pulse signal to be processed is input to the input neuron to obtain the neuron to be processed, wherein the neuron to be processed corresponds to a membrane potential to be processed. Thus, each pulse signal before weighted processing can be sequentially input into the input neuron to be processed. Second, the membrane potential corresponding to the neuron to be processed is processed by data conversion to obtain the membrane potential value to be processed. Thus, the membrane potential value of the neuron to be processed after inputting a pulse signal to be processed can be obtained. Then, in response to determining that the membrane potential value to be processed meets the preset threshold condition, the following steps are performed: First, the neuron to be processed is identified as an activated neuron to update the activated neuron. Thus, when the membrane potential value to be processed is less than the preset threshold, it can be determined that the neuron to be processed has not been activated by the pulse signal to be processed. Second, the membrane potential to be processed is identified as the activation membrane potential corresponding to the updated activated neuron to update the activation membrane potential. Therefore, the activation membrane potential can be updated. The membrane potential after receiving one pulse signal can be determined as the activation membrane potential, and a second pulse signal can be received based on the first pulse signal. Then, a null signal is generated as the neuron's pulse signal. Thus, the output of the null signal indicates that the neuron has not been activated. Then, in response to determining that the membrane potential value does not meet the preset threshold condition, the following steps are performed: First, a tip signal is generated as the neuron's pulse signal.Therefore, when the membrane potential value to be processed is greater than a preset threshold, the activation of the neuron to be processed can be indicated by outputting a pulse signal. Next, the preset resting membrane potential is determined as the membrane potential to be processed, and the membrane potential to be processed is updated to obtain the updated membrane potential. This allows the membrane potential to be reset. Then, the neuron to be processed is determined as the activated neuron, and the activated neuron is updated. This allows the activated neuron to be updated. Then, the updated membrane potential to be processed is determined as the activation membrane potential corresponding to the updated activated neuron, and the activation membrane potential is updated. This allows the reset membrane potential to be determined as the activation membrane potential, indirectly resetting the activation membrane potential. Then, the generated neuronal pulse signals are stored in the output buffer, where each neuronal pulse signal corresponds to a timestamp. This allows the generated neuronal pulse signals to be obtained. Then, the updated activated neuron is determined as the initial neuron corresponding to the activated neuron, and the initial neuron is updated to obtain the updated initial neuron. This allows the updated initial neuron to be obtained. Finally, the updated activation membrane potential is determined as the initial membrane potential corresponding to the updated initial neuron, and the aforementioned initial membrane potential is updated accordingly. Thus, the updated initial membrane potential can be obtained. Because the accumulated membrane potential value can be immediately reprocessed using the pulse signals before weighted processing when the accumulated membrane potential value does not meet the preset threshold condition, the ability to identify generated erroneous data can be improved, reducing the continuous accumulation of erroneous data, increasing the processing speed during data processing, and reducing the waste of computational resources.

[0092] Step 1043: Generate a neuronal pulse signal sequence based on the generated neuronal pulse signals.

[0093] In some embodiments, the executing entity can generate a neuron pulse signal sequence based on the generated neuron pulse signals. In practice, the executing entity can sort the neuron pulse signals in ascending order using the timestamps corresponding to the neuron pulse signals to obtain the neuron pulse signal sequence.

[0094] Step 1044: Determine the neuronal pulse signal sequence as the input pulse signal sequence in order to update the input pulse signal sequence.

[0095] In some embodiments, the execution entity may determine the neuronal pulse signal sequence as the input pulse signal sequence in order to update the input pulse signal sequence.

[0096] Step 105: Select the hidden layers that meet the preset processing conditions from the preset number of hidden layers as the hidden layers to be processed.

[0097] In some embodiments, the executing entity may determine the hidden layers that meet the preset processing conditions among the preset number of hidden layers as hidden layers to be processed. The preset processing condition may be that the hidden layer is the last hidden layer processed among the preset number of hidden layers.

[0098] Step 106: Store the neuron spiking signal sequence corresponding to the hidden layer to be processed into the output buffer for use in training the image classification model.

[0099] In some embodiments, the execution entity may store the neuron spiking signal sequence corresponding to the hidden layer to be processed into an output buffer for training an image classification model. The image classification model may be a neural network model that takes the neuron spiking sequence corresponding to the image data as input and the image label information corresponding to the image data as output. For example, the neural network model may be a convolutional neural network.

[0100] The above embodiments of this disclosure have the following beneficial effects: The pulse sequence processing method for image classification according to some embodiments of this disclosure can improve the processing speed of data processing, improve the accuracy of the generated pulse signals, and thus improve the reliability of the image classification model, reducing the waste of computational resources during image classification. Specifically, the reasons for slow data processing speed, low accuracy of generated pulse signals, low reliability of image classification models, and waste of computational resources during image classification are: the asynchronous processor has limited ability to perform parallel processing of data within each processing unit, resulting in slow data processing speed. Furthermore, the accuracy of data generated by the asynchronous processor depends on the hardware quality of the asynchronous processor; a lower-quality asynchronous processor generates less accurate data, which in turn leads to lower accuracy of the generated pulse signals, resulting in lower reliability of the image classification model trained using the pulse signals, leading to more errors in image classification and wasting computational resources during image classification. Based on this, the pulse sequence processing method for image classification according to some embodiments of this disclosure first receives image data, wherein the image data corresponds to image label information. This allows the acquisition of the original data to be processed. Secondly, based on the image data, an image pulse signal sequence corresponding to the image data is generated, wherein the image pulse signal sequence corresponds to each time step. Therefore, image data can be converted into a corresponding image pulse signal sequence, which can then be processed using a spiking neural network. The aforementioned image pulse signal sequence is then determined as the input pulse signal sequence. Next, for each hidden layer in a predetermined number of hidden layers, the following steps are performed: First, a time window sequence is determined based on each time step corresponding to the input pulse signal sequence. This allows for sequential processing of the data corresponding to each time window using the obtained time window sequence. Second, for each time window in the aforementioned time window sequence, the following steps are performed: First, a weighted pulse signal sequence is generated based on the aforementioned time window and the input pulse signal sequence. This allows for compression of each input pulse signal corresponding to the aforementioned time window, obtaining signals that have pulsed and discarding signals that have not pulsed, thus accelerating subsequent data processing. Second, for each initial neuron in each initial neuron, the aforementioned weighted pulse signal sequence is input to the initial neuron to obtain the corresponding activated neuron. Each initial neuron in each initial neuron corresponds to an initial membrane potential, and the activated neuron corresponds to an activation membrane potential. This yields the neuron that has received the pulse signal sequence. Then, for each of the obtained activated neurons, at least one neuronal pulse signal is generated based on the activated neuron, and the initial neuron and initial membrane potential corresponding to the activated neuron are updated.Therefore, by analyzing the activation membrane potential corresponding to activated neurons, it can be determined whether a neuron will emit a pulse, and signals that may emit pulses can be processed, thereby improving the accuracy of data processing. Then, based on the generated neuronal pulse signals, a neuronal pulse signal sequence is generated. This provides the input data for the next hidden layer. The aforementioned neuronal pulse signal sequence is then selected as the input pulse signal sequence to be updated. This allows the output data of the previous hidden layer to be used as the input for the next hidden layer. Next, hidden layers that meet the preset processing conditions from the preset number of hidden layers are selected as the hidden layers to be processed. This allows the selection of the last hidden layer to be processed. Finally, the neuronal pulse signal sequence corresponding to the hidden layer to be processed is stored in the output buffer for training the image classification model. Thus, the neuronal pulse sequence output by the last hidden layer can be used for model training. Furthermore, because the input pulse signals corresponding to each time window can be compressed, only signals that have emitted pulses are processed, ignoring signals that have not, thus improving the data processing speed. Furthermore, when processing data, by processing the neurons that receive the weighted pulse signals corresponding to each time window, it can be determined whether the neurons pulse in the corresponding time window. Then, different processing can be performed on the pulse signal sequences and neurons of different time windows, thereby improving the processing speed of data processing, improving the accuracy of the generated pulse signals, and thus improving the reliability of the image classification model and reducing the waste of computational resources during image classification.

[0101] Further reference Figure 2 This illustrates a flow 200 of another embodiment of the image classification method. The flow 200 of this image classification method includes the following steps:

[0102] Step 201: Obtain the image dataset.

[0103] In some embodiments, the executing entity may obtain an image dataset. In practice, the executing entity may obtain the image dataset from the target server.

[0104] Step 202: For each image data in the image dataset, perform the following steps:

[0105] Step 2021: Perform image segmentation processing on the image data to obtain the foreground target image.

[0106] In some embodiments, the execution entity can perform image segmentation processing on the image data to obtain a foreground target image. The foreground target image can be an image distinct from the background image. In practice, the execution entity can perform image segmentation processing on the image data using a segmentation model to obtain the foreground target image.

[0107] Step 2022: Based on the foreground target image, generate the corresponding neuronal pulse signal sequence.

[0108] In some embodiments, the execution entity may generate a corresponding neuronal pulse signal sequence based on the foreground target image. The method for generating the neuronal pulse sequence can be found in the specific implementation of steps 101 to 1043, and will not be repeated here.

[0109] Step 2023: Input the neuronal pulse signal sequence into the pre-trained image classification model to obtain the image label information corresponding to the neuronal pulse signal sequence.

[0110] In some embodiments, the execution entity can input the neuronal spike signal sequence into a pre-trained image classification model to obtain image label information corresponding to the neuronal spike signal sequence. The image classification model is trained based on the neuronal spike signal sequence stored in the output buffer, and the neuronal spike signal sequence stored in the output buffer is obtained through... Figure 1 The steps in the corresponding embodiments are generated.

[0111] In some optional implementations of certain embodiments, the image classification model described above can be trained by the aforementioned execution entity through the following steps:

[0112] The first step is to obtain a sample set from the output buffer. The samples in the sample set include images, corresponding neuronal pulse signal sequences, and corresponding image label information. The neuronal pulse signal sequences can be the neuronal pulse signal sequences corresponding to the images in the samples. The image label information can be the image label information corresponding to the images in the samples.

[0113] The second step involves performing the following training steps based on the sample set:

[0114] The first sub-step involves inputting the neuronal spike signal sequences of at least one sample in the sample set into an initial neural network to obtain image label information corresponding to each of the at least one sample. The initial neural network includes a feature extraction network and an output layer. The feature extraction network can be a neural network capable of extracting features from the neuronal spike signal sequences. For example, the feature extraction network can be a convolutional neural network. The output layer can be an activation function that maps the extracted features to the probability that the image belongs to each image label. For example, the activation function can be a normalized exponential function (softmax).

[0115] The second sub-step involves comparing the image label information corresponding to each sample in the at least one set of samples with the corresponding sample image label information. In practice, firstly, the executing entity can generate a probability distribution of the image label information corresponding to each sample in the at least one set of samples using a normalized exponential function. Then, the executing entity can generate a probability distribution of the sample image label information corresponding to each sample in the at least one set of samples using a normalized exponential function. Finally, the executing entity can generate a loss value between the probability distribution of the image label information corresponding to each sample in the at least one set of samples and the probability distribution of the corresponding sample image category information using a cross-entropy loss function.

[0116] The third sub-step determines whether the initial neural network has reached the preset optimization objective based on the comparison results. In practice, when the loss value between the image label information corresponding to a sample and the corresponding sample image label information is less than a preset loss threshold, the sample is identified as a positive sample. The positive samples can be used to represent samples that meet the loss value condition. The loss value condition can be that the loss value between the image label information corresponding to a sample and the corresponding sample image label information is less than a preset loss threshold. The optimization objective can be that the proportion of positive samples in all samples is greater than a preset accuracy threshold. The loss threshold can be a pre-set value. Here, the specific setting of the loss threshold is not limited. The accuracy threshold can also be a pre-set value. Here, the specific setting of the accuracy threshold is not limited.

[0117] The fourth sub-step is to determine the initial neural network as an image classification model in response to the determination that the initial neural network achieves the above optimization objective.

[0118] The fifth sub-step, in response to the determination that the initial neural network has not achieved the above optimization objective, adjusts the network parameters of the initial neural network, uses unused samples to form a sample set, uses the adjusted initial neural network as the initial neural network, and executes the above training steps again. In practice, the above execution entity can use the backpropagation algorithm (BP algorithm) and gradient descent methods (such as mini-batch gradient descent algorithm) to adjust the network parameters of the initial neural network.

[0119] Step 2024: Determine the category corresponding to the foreground target image based on the image label information.

[0120] In some embodiments, the executing entity can determine the category corresponding to the foreground target image based on the image label information. In practice, the executing entity can determine the category corresponding to the foreground target image using the image label information. For example, when the image label information is "fruit," the category corresponding to the foreground target image is fruit. When the image category information is "animal," the category corresponding to the foreground target image is animal.

[0121] The above embodiments of this disclosure have the following beneficial effects: the image classification method of some embodiments of this disclosure can improve the reliability of the image classification model, improve the accuracy of image classification, and reduce the waste of computing resources. Specifically, the reason for the low reliability of the image classification model, the low accuracy of image classification, and the waste of computing resources is that the asynchronous processor has limited ability to process data in parallel within each processing unit, resulting in slow data processing speed. Moreover, the accuracy of the data generated by the asynchronous processor depends on the hardware quality of the asynchronous processor. A low-quality asynchronous processor generates data with lower accuracy, which in turn leads to lower accuracy of the generated pulse signals, resulting in lower reliability of the image classification model trained using the pulse signals, leading to more image classification errors and wasting computing resources during image classification. Based on this, the image classification method of some embodiments of this disclosure first obtains an image dataset. Thus, the original data to be processed can be obtained. Then, for each image data in the above image dataset, the following steps are performed: First, the above image data is processed by image segmentation to obtain a foreground target image. Thus, the foreground target to be processed can be quickly located, improving the processing speed and accuracy of subsequent image classification processing. Then, based on the above foreground target image, a corresponding neuronal pulse signal sequence is generated. Therefore, the neuronal pulse signal sequence corresponding to the foreground target image can be obtained. Then, this neuronal pulse signal sequence is input into a pre-trained image classification model to obtain the image label information corresponding to the neuronal pulse signal sequence. The image classification model is trained based on the neuronal pulse signal sequence stored in the output buffer, which is obtained through... Figure 1 The steps in the corresponding embodiments are generated. Therefore, image label information corresponding to the aforementioned foreground target image can be generated from the obtained neuronal pulse signal sequence. Finally, based on the aforementioned image label information, the category corresponding to the aforementioned foreground target image is determined. Thus, the category of the aforementioned foreground target image can be obtained. Because the foreground target images to be identified in each image data can be segmented and processed first, and then the foreground target images are classified, the accuracy of image classification can be improved, the error results of image classification can be reduced, and the waste of computational resources can be reduced.

[0122] Further reference Figure 3 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a pulse sequence processing apparatus for image classification, which are similar to... Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0123] like Figure 3As shown, a pulse sequence processing apparatus 300 for image classification in some embodiments includes: a receiving unit 301, a generating unit 302, a first determining unit 303, an execution unit 304, a second determining unit 305, and a storage unit 306. The receiving unit 301 is configured to receive image data, wherein the image data corresponds to image label information; the generating unit 302 is configured to generate an image pulse signal sequence corresponding to the image data based on the image data, wherein the image pulse signal sequence corresponds to each time step; the first determining unit 303 is configured to determine the image pulse signal sequence as the input pulse signal sequence; the execution unit 304 is configured to perform the following steps for each hidden layer in a preset number of hidden layers: determining a time window sequence based on each time step corresponding to the input pulse signal sequence; for each time window in the time window sequence, performing the following steps: generating a weighted pulse signal sequence corresponding to the time window based on the time window and the input pulse signal sequence; and inputting the weighted pulse signal sequence into each initial neuron in each initial neuron. The process involves obtaining corresponding activated neurons, where each of the initial neurons has an initial membrane potential, and the activated neurons have an activation membrane potential. For each activated neuron, at least one neuronal pulse signal is generated, and the initial neuron and initial membrane potential corresponding to the activated neuron are updated. A neuronal pulse signal sequence is generated based on the generated neuronal pulse signals. The neuronal pulse signal sequence is determined as the input pulse signal sequence for updating the input pulse signal sequence. A second determining unit 305 is configured to determine the hidden layers that meet the preset processing conditions among the preset number of hidden layers as hidden layers to be processed. A storage unit 306 is configured to store the neuronal pulse signal sequence corresponding to the hidden layer to be processed into an output buffer for training the image classification model.

[0124] It is understandable that the units described in the device 300 are related to the reference. Figure 1 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 300 and the units contained therein, and will not be repeated here.

[0125] Further reference Figure 4 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an image classification device, which are similar to... Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0126] like Figure 4As shown, an image classification apparatus 400 in some embodiments includes an acquisition unit 401 and an execution unit 402. The acquisition unit 401 is configured to acquire an image dataset; the execution unit 402 is configured to perform the following steps for each image data in the image dataset: perform image segmentation processing on the image data to obtain a foreground target image; generate a corresponding neuronal pulse signal sequence based on the foreground target image; input the neuronal pulse signal sequence into a pre-trained image classification model to obtain image label information corresponding to the neuronal pulse signal sequence, wherein the image classification model is trained based on the neuronal pulse signal sequence stored in the output buffer, and the neuronal pulse signal sequence stored in the output buffer is obtained through... Figure 1 The steps in the corresponding embodiments are generated; based on the above image label information, the category corresponding to the above foreground target image is determined.

[0127] It is understandable that the units described in the device 400 are related to the reference. Figure 2 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to device 400 and the units contained therein, and will not be repeated here.

[0128] The following is for reference. Figure 5 It shows a schematic diagram of the structure of an electronic device 500 suitable for implementing some embodiments of the present disclosure. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0129] like Figure 5 As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0130] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 5 Each box shown can represent a device or multiple devices as needed.

[0131] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 509, or installed from storage device 508, or installed from ROM 502. When the computer program is executed by processing device 501, it performs the functions defined in the methods of some embodiments of this disclosure.

[0132] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, 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 device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0133] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0134] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: receive image data, wherein the image data corresponds to image tag information; generate an image pulse signal sequence corresponding to the image data based on the image data, wherein the image pulse signal sequence corresponds to each time step; determine the image pulse signal sequence as the input pulse signal sequence; for each hidden layer in a preset number of hidden layers, perform the following steps: determine a time window sequence based on each time step corresponding to the input pulse signal sequence; for each time window in the time window sequence, perform the following steps: generate a weighted pulse signal sequence corresponding to the time window based on the time window and the input pulse signal sequence; for each initial neuron in each initial neuron, generate a weighted pulse signal sequence corresponding to the input pulse signal sequence; and for each initial neuron, generate a weighted pulse signal sequence corresponding to the input pulse signal sequence. The impulse signal sequence is input to the initial neurons to obtain the corresponding activated neurons. Each initial neuron has an initial membrane potential, and each activated neuron has an activation membrane potential. For each activated neuron, at least one neuronal impulse signal is generated, and the initial neuron and initial membrane potential corresponding to the activated neuron are updated. A neuronal impulse signal sequence is generated based on the generated neuronal impulse signals. The neuronal impulse signal sequence is determined as the input impulse signal sequence to update the input impulse signal sequence. The hidden layers that meet the preset processing conditions among the preset number of hidden layers are determined as the hidden layers to be processed. The neuronal impulse signal sequence corresponding to the hidden layers to be processed is stored in the output buffer for training of the image classification model.

[0135] Or, the electronic device may: acquire an image dataset; for each image data in the image dataset, perform the following steps: perform image segmentation processing on the image data to obtain a foreground target image; generate a corresponding neuronal pulse signal sequence based on the foreground target image; input the neuronal pulse signal sequence into a pre-trained image classification model to obtain image label information corresponding to the neuronal pulse signal sequence, wherein the image classification model is trained based on the neuronal pulse signal sequence stored in the output buffer, and the neuronal pulse signal sequence stored in the output buffer is obtained through... Figure 1 The steps in the corresponding embodiments are generated; based on the above image label information, the category corresponding to the above foreground target image is determined.

[0136] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0138] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a receiving unit, a generating unit, a first determining unit, an executing unit, a second determining unit, and a storage unit. The names of these units do not necessarily limit the specific unit; for example, a receiving unit may also be described as a "unit for receiving image data."

[0139] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0140] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A pulse sequence processing method for image classification, comprising: Receive image data, wherein the image data corresponds to image tag information; Based on the image data, an image pulse signal sequence corresponding to the image data is generated, wherein the image pulse signal sequence corresponds to each time step, wherein the image data includes each pixel, and each pixel corresponds to a first color channel value, a second color channel value, and a third color channel value, and the generation of the image pulse signal sequence corresponding to the image data includes: For each pixel in the image data, perform the following steps: The product of the first color channel value and the first preset weight value corresponding to the pixel is determined as the first color value; The product of the second color channel value and the second preset weight value corresponding to the pixel is determined as the second color value; The product of the third color channel value corresponding to the pixel and the third preset weight value is determined as the third color value; The sum of the first color value, the second color value, and the third color value is determined as the gray value corresponding to the pixel. Based on the grayscale value corresponding to the pixel, a normalized value corresponding to the pixel is generated. Based on the normalized value, the pixel pulse probability corresponding to the pixel point is generated; Based on the pixel pulse probability and the preset pixel time window, a pixel pulse signal corresponding to the pixel is generated, wherein each pixel pulse signal has a timestamp. Based on the generated pixel pulse signals and the timestamp corresponding to each pixel pulse signal, an image pulse signal sequence is generated; The image pulse signal sequence is determined as the input pulse signal sequence; For each of the preset number of hidden layers, perform the following steps: Determine the time window sequence based on each time step corresponding to the input pulse signal sequence; For each time window in the time window sequence, perform the following steps: Based on the time window and the input pulse signal sequence, a weighted pulse signal sequence corresponding to the time window is generated, wherein generating the weighted pulse signal sequence corresponding to the time window includes: Each input pulse signal in the sequence of input pulse signals corresponding to the time window is determined as a time pulse signal; Based on the aforementioned time pulse signals, a corresponding time pulse signal sequence is generated; Based on the various time pulse signals, generate the number of time pulses corresponding to the time pulse signal sequence; Based on the number of time pulses, a weighted pulse signal sequence corresponding to the time pulse signal sequence is generated, wherein generating the weighted pulse signal sequence corresponding to the time pulse signal sequence based on the number of time pulses includes: converting the number of time pulses into a corresponding binary number; and determining the binary number as the weighted pulse signal sequence. For each initial neuron among the initial neurons, the weighted pulse signal sequence is input to the initial neuron to obtain the corresponding activated neuron, wherein each initial neuron among the initial neurons corresponds to an initial membrane potential, and the activated neuron corresponds to an activation membrane potential; For each of the obtained activated neurons, at least one neuronal pulse signal is generated based on the activated neuron, and the initial neuron and initial membrane potential corresponding to the activated neuron are updated. Based on the generated neuron pulse signals, a neuron pulse signal sequence is generated; The neuronal pulse signal sequence is determined as the input pulse signal sequence in order to update the input pulse signal sequence; Hidden layers that meet the preset processing conditions among the preset number of hidden layers are identified as hidden layers to be processed; The neuron spiking signal sequence corresponding to the hidden layer to be processed is stored in the output buffer for use in training the image classification model.

2. The method according to claim 1, wherein, The step of generating at least one neuronal pulse signal based on the activated neuron, and updating the initial neuron and initial membrane potential corresponding to the activated neuron, includes: Based on the activation membrane potential corresponding to the activated neuron, the activation membrane potential value corresponding to the activated neuron is generated. The initial neuron corresponding to the activated neuron is identified as the target neuron; The initial membrane potential corresponding to the target neuron is determined as the target membrane potential; Based on the target membrane potential, a target membrane potential value is generated; The sum of the activated membrane potential value and the target membrane potential value is determined as the cumulative membrane potential value; Based on the accumulated membrane potential value, at least one neuronal pulse signal is generated, and the initial neuron and initial membrane potential corresponding to the activated neuron are updated.

3. The method according to claim 2, wherein, The step of generating at least one neuronal pulse signal based on the accumulated membrane potential value, and updating the initial neuron and initial membrane potential corresponding to the activated neuron, includes: In response to determining that the cumulative membrane potential value meets a preset threshold condition, the following steps are performed: The activated neuron is identified as the corresponding initial neuron, and the initial neuron is updated accordingly; The cumulative membrane potential value is processed by data conversion to obtain the cumulative membrane potential; The accumulated membrane potential is determined as the initial membrane potential corresponding to the updated initial neuron, so as to update the initial membrane potential; Null signals are generated as neuron pulse signals, wherein the neuron pulse signals correspond to timestamps.

4. An image classification method, comprising: Obtain the image dataset; For each image in the image dataset, perform the following steps: The image data is segmented to obtain a foreground target image; Based on the foreground target image, a corresponding neuronal pulse signal sequence is generated; The neuronal pulse signal sequence is input into a pre-trained image classification model to obtain image label information corresponding to the neuronal pulse signal sequence. The image classification model is trained based on the neuronal pulse signal sequence stored in the output buffer, and the neuronal pulse signal sequence stored in the output buffer is generated by the method described in any one of claims 1-3. Based on the image label information, the category corresponding to the foreground target image is determined.

5. The method according to claim 4, wherein, The image classification model was trained in the following way: A sample set is obtained from the output buffer, wherein the samples in the sample set include images, sample neuron pulse signal sequences corresponding to the images, and sample image label information corresponding to the images; Perform the following training steps based on the sample set: The sample neuron pulse signal sequence of at least one sample in the sample set is input into the initial neural network to obtain the image label information corresponding to each sample in the at least one sample. The initial neural network includes a feature extraction network and an output layer. Compare the image label information corresponding to each sample in the at least one sample with the corresponding sample image label information; Based on the comparison results, determine whether the initial neural network has achieved the preset optimization objective; In response to determining that the initial neural network achieves the optimization objective, the initial neural network is determined as an image classification model; In response to the determination that the initial neural network has not achieved the optimization objective, the network parameters of the initial neural network are adjusted, and a sample set is formed using unused samples. The adjusted initial neural network is then used as the initial neural network, and the training steps are performed again.

6. A pulse sequence processing apparatus for image classification, comprising: The receiving unit is configured to receive image data, wherein the image data corresponds to image tag information; The generation unit is configured to generate an image pulse signal sequence corresponding to the image data based on the image data, wherein the image pulse signal sequence corresponds to each time step, wherein the image data includes each pixel, and each pixel corresponds to a first color channel value, a second color channel value, and a third color channel value, and the generation of the image pulse signal sequence corresponding to the image data based on the image data includes: for each pixel in the image data, performing the following steps: determining the product of the first color channel value and a first preset weight value corresponding to the pixel as a first color value; determining the product of the second color channel value and a second preset weight value corresponding to the pixel as a second color value. The process involves: determining the third color value by multiplying the third color channel value corresponding to the pixel and a third preset weight value; determining the grayscale value corresponding to the pixel by summing the first color value, the second color value, and the third color value; generating a normalized value corresponding to the pixel based on the grayscale value; generating a pixel pulse probability corresponding to the pixel based on the normalized value; generating pixel pulse signals corresponding to the pixel based on the pixel pulse probability and a preset pixel time window, wherein each pixel pulse signal corresponds to a timestamp; and generating an image pulse signal sequence based on the generated pixel pulse signals and the timestamps corresponding to each pixel pulse signal. The first determining unit is configured to determine the image pulse signal sequence as the input pulse signal sequence; An execution unit is configured to perform the following steps for each hidden layer in a preset number of hidden layers: determining a time window sequence based on each time step corresponding to the input pulse signal sequence; and for each time window in the time window sequence, performing the following steps: generating a weighted pulse signal sequence corresponding to the time window based on the time window and the input pulse signal sequence, wherein generating the weighted pulse signal sequence corresponding to the time window based on the time window and the input pulse signal sequence includes: determining each input pulse signal in the input pulse signal sequence corresponding to the time window as a time pulse signal; generating a corresponding time pulse signal sequence based on the time pulse signals; generating a number of time pulses corresponding to the time pulse signal sequence based on the time pulse signals; and generating a weighted pulse signal sequence corresponding to the time pulse signal sequence based on the number of time pulses, wherein... Based on the number of time pulses, a weighted pulse signal sequence corresponding to the time pulse signal sequence is generated, including: converting the number of time pulses into a corresponding binary number; determining the binary number as a weighted pulse signal sequence; for each initial neuron in each initial neuron, inputting the weighted pulse signal sequence into the initial neuron to obtain a corresponding activated neuron, wherein each initial neuron in each initial neuron corresponds to an initial membrane potential, and the activated neuron corresponds to an activation membrane potential; for each activated neuron in each obtained activated neuron, generating at least one neuronal pulse signal based on the activated neuron, and updating the initial neuron and initial membrane potential corresponding to the activated neuron; generating a neuronal pulse signal sequence based on the generated neuronal pulse signals; determining the neuronal pulse signal sequence as the input pulse signal sequence for updating the input pulse signal sequence; The second determining unit is configured to determine the hidden layers that meet the preset processing conditions among the preset number of hidden layers as hidden layers to be processed. The storage unit is configured to store the neuron spiking signal sequence corresponding to the hidden layer to be processed into the output buffer for training of the image classification model.

7. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 5.

8. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image classification method and device based on spiking neural network

    CN115496947A

  • Training method of spiking neural network for image classification

    CN115546556A