Data processing method, device and equipment, readable storage medium and program product
By using a spatial light modulator and a time domain processor in the optical domain neural network to convolve the 3D video data, a pseudo 3D convolution feature map is generated, which solves the problem that the optical domain neural network cannot extract the time domain and spatial domain features of the 3D video data. problem and achieve efficient video data processing.
Patent Information
- Application Number
- CN202410296692.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2024-10-18
AI Technical Summary
Existing optical domain neural networks cannot support the extraction of temporal and spatial domain features of three-dimensional video data, resulting in poor performance in video tasks.
By utilizing the first spatial light modulator and the time domain processor in the first optical convolutional neural network, convolution processing is performed according to the two-dimensional spatial data of the three-dimensional video data to obtain the two-dimensional spatial convolution data, and for the two-dimensional spatial domain The time domain data in the convolution data is convolved to generate a pseudo three-dimensional convolution feature map. The time domain processor may include a detector or a second spatial light modulator that performs time domain convolution through multiplication and addition processing.
It realizes the equivalent three-dimensional convolution operation in the optical domain, reduces the network operation amount and energy consumption, greatly improves the operation speed, and can effectively extract the time domain and spatial domain characteristics of three-dimensional video data.
Smart Images

Figure CN118798288A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, equipment, readable storage medium and program product. Background Art
[0002] Existing optical domain neural networks can realize parallel light-speed computing, which greatly improves the computing speed compared to electrical domain neural networks, while reducing the computational complexity and energy consumption of electrical domain computing. However, current optical domain neural networks can only realize 2D (two-dimensional) convolution operations and cannot simultaneously extract the temporal and spatial domain features of video data, and have poor effects on video tasks.
[0003] From the above, the optical domain neural network in the prior art cannot support the extraction of temporal and spatial domain features of three-dimensional video data. Summary of the invention
[0004] The purpose of the present invention is to provide a data processing method, device, equipment, readable storage medium and program product to solve the problem in the prior art that the optical domain neural network cannot support the extraction of time domain and spatial domain features of three-dimensional video data.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a data processing method, including:
[0006] Using a first spatial light modulator in a first optical convolutional neural network, two-dimensional spatial domain convolution data is obtained according to the two-dimensional spatial domain data of the three-dimensional video data;
[0007] Using the time domain processor in the first optical convolutional neural network, convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data;
[0008] Wherein, the time domain processor comprises: a detector, or a second spatial light modulator;
[0009] The first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
[0010] Optionally, the using the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes:
[0011] Using the time domain processor in the first optical convolutional neural network, a multiplication process in the convolution process is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and an addition process in the convolution process is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0012] Optionally, in the case where the time domain processor includes a second spatial light modulator, the using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data includes:
[0013] Using the time domain processor in the first optical convolutional neural network, multiplication processing in convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data, and sensing is performed using the detector in the first optical convolutional neural network to obtain first intermediate data obtained after the multiplication processing.
[0014] Optionally, performing the addition process in the convolution process on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes:
[0015] According to the size and step length of the convolution kernel for the one-dimensional time domain data, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0016] Optionally, the time domain processor satisfies at least one of the following settings:
[0017] The input frame rate of the three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal;
[0018] The exposure time of the detector included in the time domain processor is determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data;
[0019] The input control clock signal of the three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data, the number of frames of the three-dimensional video data and the input frame rate of the three-dimensional video data;
[0020] The input of the three-dimensional video data is triggered by the rising edge of the clock signal;
[0021] The acquisition of the detector included in the time domain processor is triggered by the bandwidth of the clock signal;
[0022] The input period of the three-dimensional video data, the control period of the second spatial light modulator included in the time domain processor, and the acquisition period of the detector in the first optical convolutional neural network are determined according to the same clock signal.
[0023] An embodiment of the present invention further provides a data processing device, including:
[0024] A first processing module, configured to obtain two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data by using a first spatial light modulator in the first optical convolutional neural network;
[0025] A second processing module is used to use the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data;
[0026] Wherein, the time domain processor comprises: a detector, or a second spatial light modulator;
[0027] The first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
[0028] Optionally, the using the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes:
[0029] Using the time domain processor in the first optical convolutional neural network, a multiplication process in the convolution process is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and an addition process in the convolution process is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0030] Optionally, in the case where the time domain processor includes a second spatial light modulator, the using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data includes:
[0031] Using the time domain processor in the first optical convolutional neural network, multiplication processing in convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data, and sensing is performed using the detector in the first optical convolutional neural network to obtain first intermediate data obtained after the multiplication processing.
[0032] Optionally, performing the addition process in the convolution process on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes:
[0033] According to the size and step length of the convolution kernel for the one-dimensional time domain data, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0034] Optionally, the time domain processor satisfies at least one of the following settings:
[0035] The input frame rate of the three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal;
[0036] The exposure time of the detector included in the time domain processor is determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data;
[0037] The input control clock signal of the three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data, the number of frames of the three-dimensional video data and the input frame rate of the three-dimensional video data;
[0038] The input of the three-dimensional video data is triggered by the rising edge of the clock signal;
[0039] The acquisition of the detector included in the time domain processor is triggered by the bandwidth of the clock signal;
[0040] The input period of the three-dimensional video data, the control period of the second spatial light modulator included in the time domain processor, and the acquisition period of the detector in the first optical convolutional neural network are determined according to the same clock signal.
[0041] An embodiment of the present invention further provides a data processing device, including: a processor;
[0042] The processor is used to obtain two-dimensional spatial domain convolution data according to the two-dimensional spatial domain data of the three-dimensional video data using the first spatial light modulator in the first optical convolutional neural network;
[0043] Using the time domain processor in the first optical convolutional neural network, convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data;
[0044] Wherein, the time domain processor comprises: a detector, or a second spatial light modulator;
[0045] The first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
[0046] Optionally, the using the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes:
[0047] Using the time domain processor in the first optical convolutional neural network, a multiplication process in the convolution process is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and an addition process in the convolution process is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0048] Optionally, in the case where the time domain processor includes a second spatial light modulator, the using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data includes:
[0049] Using the time domain processor in the first optical convolutional neural network, multiplication processing in convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data, and sensing is performed using the detector in the first optical convolutional neural network to obtain first intermediate data obtained after the multiplication processing.
[0050] Optionally, performing the addition process in the convolution process on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes:
[0051] According to the size and step length of the convolution kernel for the one-dimensional time domain data, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0052] Optionally, the time domain processor satisfies at least one of the following settings:
[0053] The input frame rate of the three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal;
[0054] The exposure time of the detector included in the time domain processor is determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data;
[0055] The input control clock signal of the three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data, the number of frames of the three-dimensional video data and the input frame rate of the three-dimensional video data;
[0056] The input of the three-dimensional video data is triggered by the rising edge of the clock signal;
[0057] The acquisition of the detector included in the time domain processor is triggered by the bandwidth of the clock signal;
[0058] The input period of the three-dimensional video data, the control period of the second spatial light modulator included in the time domain processor, and the acquisition period of the detector in the first optical convolutional neural network are determined according to the same clock signal.
[0059] An embodiment of the present invention further provides a data processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, the above-mentioned data processing method is implemented.
[0060] An embodiment of the present invention further provides a readable storage medium on which a program is stored. When the program is executed by a processor, the steps in the above-mentioned data processing method are implemented.
[0061] An embodiment of the present invention further provides a computer program product, including computer instructions, which implement the steps of the above-mentioned data processing method when executed by a processor.
[0062] The beneficial effects of the above technical solution of the present invention are as follows:
[0063] In the above scheme, the data processing method obtains two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data by using the first spatial light modulator in the first optical convolution neural network; uses the time domain processor in the first optical convolution neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data; wherein the time domain processor includes: a detector, or a second spatial light modulator; the first optical convolution neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolution neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens; it can support the extraction of time domain and spatial domain features of three-dimensional video data by using the optical domain neural network, realize the optical domain equivalent three-dimensional convolution operation processing, reduce the network operation amount, greatly improve the operation speed, reduce the processing energy consumption, and well solve the problem that the optical domain neural network in the prior art cannot support the extraction of time domain and spatial domain features of three-dimensional video data. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic diagram of a data processing method according to an embodiment of the present invention;
[0065] Figure 2 Schematic diagram of 2D and 3D convolution principles of an embodiment of the present invention;
[0066] Figure 3 Schematic diagram of pseudo 3D convolution principle of an embodiment of the present invention;
[0067] Figure 4 Schematic diagram of a pseudo 3D optical convolutional neural network according to an embodiment of the present invention;
[0068] Figure 5 Schematic diagram of video 3D data input and detector exposure acquisition control signals according to an embodiment of the present invention;
[0069] Figure 6 A schematic diagram of the structure of a data processing device according to an embodiment of the present invention;
[0070] Figure 7 The figure is a schematic diagram of the structure of a data processing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0071] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0072] The following first introduces the relevant contents of this plan.
[0073] Visual information is an important way for humans to perceive the world. With the development and popularization of mobile devices, images and videos have become two important types of data for user communication. Accordingly, convolutional neural networks (CNNs) have rapidly emerged and are used in many fields due to their excellent ability to process visual information. However, CNNs are generally used to process two-dimensional information such as images, while videos are three-dimensional information and have information in both time and space dimensions. Generally, there are two ways to use neural networks to process video information: one is to decompose the video into multiple frames of images and complete feature extraction operations through a single or multiple neural networks, but this method ignores the correlation between different frames of the video; the other method is to use 3D convolution to capture information in time and space dimensions, but the model parameters and training time of the corresponding 3D CNN (three-dimensional convolutional neural network) are greatly increased compared to 2D CNN, which greatly limits its application. It can also be understood that the current electrical domain neural network can realize feature processing of video data through 3D (three-dimensional) convolution, but the number of parameters of the 3D CNN network model is greatly increased compared to the 2D CNN network model, and the amount of computation and time of network training are also greatly increased, which limits its application in many types of video tasks.
[0074] On the other hand, traditional electrical neural networks have limited data storage and computing speeds and high energy consumption; as a result, optical neural networks have gradually developed. Optical computing has the characteristics of low power consumption, speed of light, and parallel processing, and therefore has higher application potential in many portable, energy-saving and efficient scenarios. Optical neural networks generally still perform calculations by splitting the video into multiple frames of images, and are unable to simultaneously extract features from both time and spatial domain information, so there is still room for improvement in the performance of video-type tasks. In other words, current optical neural networks cannot achieve 3D convolution. They generally split the 3D video input into multiple frames of images, and then perform calculations through trained 2D optical convolutional neural networks in turn. They are unable to simultaneously extract information from the time and space domains, and their accuracy in video-type tasks needs to be improved.
[0075] Based on the above, the present invention provides a data processing method to solve the problem that the optical domain neural network in the prior art cannot support the extraction of temporal and spatial domain features of three-dimensional video data, such as Figure 1 As shown, including:
[0076] Step 11: using the first spatial light modulator in the first optical convolutional neural network to obtain two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data;
[0077] Step 12: Use the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data; wherein the time domain processor includes: a detector, or a second spatial light modulator; the first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
[0078] Among them, "obtaining two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data" may include: obtaining two-dimensional spatial convolution data according to the frame-by-frame two-dimensional spatial data of the three-dimensional video data; and / or, the two-dimensional spatial data may be embodied as a picture, but is not limited to this.
[0079] The data processing method provided by the embodiment of the present invention obtains two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data by using the first spatial light modulator in the first optical convolution neural network; uses the time domain processor in the first optical convolution neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data; wherein the time domain processor includes: a detector, or a second spatial light modulator; the first optical convolution neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolution neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens; it can support the extraction of time domain and spatial domain features of three-dimensional video data by using the optical domain neural network, realize the optical domain equivalent three-dimensional convolution operation processing, reduce the network operation amount, greatly improve the operation speed, reduce the processing energy consumption, and well solve the problem that the optical domain neural network in the prior art cannot support the extraction of time domain and spatial domain features of three-dimensional video data.
[0080] Among them, the use of the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes: using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain first intermediate data; and performing addition processing in convolution processing on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data. In this way, a pseudo three-dimensional convolution feature map can be obtained. Among them, the time domain processor may also include a computing unit, "using the time domain processor in the first optical convolutional neural network to perform multiplication processing in the convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and performing addition processing in the convolution processing on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data", which may include: using the detector or the second spatial light modulator included in the time domain processor to perform multiplication processing in the convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and using the computing unit included in the time domain processor to perform addition processing in the convolution processing on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data, but is not limited to this.
[0081] In an embodiment of the present invention, when the time domain processor includes a second spatial light modulator, the time domain processor in the first optical convolutional neural network is used to perform multiplication processing in convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain the first intermediate data, including: using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data, and using the detector in the first optical convolutional neural network to sense and obtain the first intermediate data obtained after the multiplication processing. In this way, the first intermediate data can be accurately obtained using the second spatial light modulator. Among them, the detector in the first optical convolutional neural network can also belong to the time domain processor, but is not limited to this.
[0082] The performing of the addition process in the convolution process on the first intermediate data to obtain the pseudo 3D convolution feature map corresponding to the 3D video data includes: performing the addition process in the convolution process on the first intermediate data according to the size and step length of the convolution kernel for the one-dimensional time domain data to obtain the pseudo 3D convolution feature map corresponding to the 3D video data. In this way, the first intermediate data can be accurately added.
[0083] In an embodiment of the present invention, the time domain processor satisfies at least one of the following settings: (1) the input frame rate of the three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal; (2) the exposure time of the detector included in the time domain processor is determined according to the value of the convolution kernel at different positions for the one-dimensional time domain data; (3) the input control clock signal of the three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the value of the convolution kernel at different positions for the one-dimensional time domain data, the number of frames of the three-dimensional video data and the input frame rate of the three-dimensional video data; (4) the input of the three-dimensional video data is triggered by the rising edge of the clock signal; (5) the acquisition of the detector included in the time domain processor is triggered by the bandwidth of the clock signal; (6) the input period of the three-dimensional video data, the control period of the second spatial light modulator included in the time domain processor and the acquisition period of the detector in the first optical convolution neural network are determined according to the same clock signal. In this way, the accuracy of the obtained pseudo three-dimensional convolution feature map can be guaranteed as much as possible. Wherein, when the time domain processor includes a detector but does not include a second spatial modulator, the time domain processor can simultaneously satisfy setting items (1) to (3) to better determine a unique system setting; when the time domain processor includes a second spatial modulator, a corresponding convolution kernel value can be set on the second spatial modulator, and then: the control period of the second spatial light modulator, the acquisition period of the detector and the video input remain related, such as satisfying setting item (6); but this is not limited to this.
[0084] The number of the first lens and the second lens may both be G, where G is an integer greater than 1; and when the time domain processor includes a detector, the number of the detectors may correspond to G; when the time domain processor includes a second spatial light modulator, the number of the second spatial light modulator may be 1; the method of using the first spatial light modulator in the first optical convolutional neural network to obtain two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data includes: using the first spatial light modulator in the first optical convolutional neural network to obtain G groups of two-dimensional spatial convolution data (specifically G groups of tiled input) according to the two-dimensional spatial data of the three-dimensional video data A group of three-dimensional video data can correspond to a group of two-dimensional spatial convolution data); the time domain processor in the first optical convolution neural network is used to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data, including: using the time domain processor in the first optical convolution neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the G groups of the two-dimensional spatial convolution data (respectively), to obtain pseudo three-dimensional convolution feature maps corresponding to the three-dimensional video data (respectively) in the G groups (specifically, it can be G groups of pseudo three-dimensional convolution feature maps). This can support the implementation of multi-convolution kernel operations. Among them, the first optical convolution neural network can be understood as including G component groups, and the setting positions of each component in each component group can be corresponding. A component group can include: a first lens, a second lens and a detector, but is not limited to this.
[0085] The data processing method provided by the embodiment of the present invention is described below by way of example.
[0086] In response to the above technical problems, an embodiment of the present invention provides a data processing method, which can be specifically implemented as a pseudo-three-dimensional photon convolution calculation and processing scheme for video data (it can also be called a method for processing the convolution features of video data in the optical domain or a method for performing pseudo-3D convolution operations in the photon domain), which is used for video feature extraction, so that the features of the video in the time and space domains can be extracted simultaneously, and the high-speed, low-computational, and low-energy consumption characteristics of the optical neural network can be retained, so as to realize high-speed parallel processing of video data in the optical domain. Among them, the pseudo-3D convolution can be a 3D convolution that is simplified to a superposition of 2D spatial convolution and 1D temporal convolution, for example: first, a 2D spatial convolution is realized through a lens 4F system and a spatial light modulator, and a 1D temporal convolution is realized through the exposure acquisition control of the detector and the subsequent addition calculation unit, and finally a feature map after the pseudo-3D convolution of the video is output; it can be understood that the equivalent three-dimensional convolution operation processing in the optical domain can be realized through devices such as a spatial light modulator, which can reduce the amount of network operations, greatly improve the operation speed, and reduce the energy consumption of the electrical neural network processing. The contents involved in this scheme are introduced below:
[0087] 1. Principle of pseudo 3D convolution;
[0088] Convolutional neural networks have achieved excellent performance in many fields such as image processing and face recognition due to their good feature learning and generalization capabilities. However, CNN mainly uses two-dimensional convolution. When processing high-dimensional data inputs such as hyperspectral and video, two-dimensional convolution cannot capture and represent information outside the two-dimensional space, resulting in poor representation in the corresponding tasks. To address this problem, 3D CNN was proposed. 3D CNN can represent and learn information in three dimensions at the same time, so it has outstanding performance in many tasks with three-dimensional data input.
[0089] like Figure 2 As shown in the figure, in 2D convolution, the convolution kernel slides along the width and height of the image (i.e., the input data). Each time it slides, the image elements at the corresponding position and the convolution kernel parameters are multiplied and added to obtain a feature value in the output result (i.e., the convolution result). 3D convolution has one more dimension than 2D convolution. For example, the convolution kernel size of 2D convolution can be expressed as k. h ×k w , the convolution kernel size of 3D convolution can be expressed as k h ×k w ×k d , the corresponding calculation method is similar to 2D convolution. Each time the convolution kernel slides, it performs multiplication and addition operations with the 3D image at the corresponding pixel position (in the input data) to obtain a value in the output feature map (i.e., the convolution result). h Indicates the convolution size in the height direction, k w represents the convolution size in the width direction, k d Indicates the convolution size in the depth direction (which can be understood as how many frames of video are used for each convolution).
[0090] By expanding the convolution kernel of CNN from 2D to 3D, we can get 3D CNN. Although 3D CNN has good results in tasks with high-dimensional information input such as video, the computational cost of 3D CNN training is very high, and the model size is greatly increased compared to 2D CNN. Taking the most commonly used 11-layer 3D CNN as an example, its model size can reach 320M, which is larger than the 152-layer 2D Resnet (residual neural network) network (235M), so it is difficult to train deeper 3D CNN. In this regard, a pseudo 3D convolution method is proposed, such as Figure 3As shown in the figure, 3D convolution can be simulated by serially stacking 2D spatial convolution (i.e. spatial 2D convolution) and 1D temporal convolution (i.e. temporal 1D convolution). For example, a 3×3×3 3D convolution kernel can be simplified to a 1×3×3 spatial 2D convolution kernel and a 3×1×1 temporal 1D convolution kernel. The pseudo 3D CNN obtained by the above simplification method only adds a certain number of 1D temporal convolutions compared to the 2D CNN with the same number of layers and depth, and there is no obvious increase in the number of parameters and the amount of calculation. The simplified P3D (pseudo 3D)-Resnet has better performance than Resnet in video action recognition tasks, and the model size is only slightly increased, while maintaining an extremely high computing speed.
[0091] 2. Optical Convolutional Neural Network;
[0092] With the explosive growth of data volume, the computing speed and energy consumption of electrical neural networks have limited their further development. Accordingly, optical neural networks (ONNs) that use optical computing instead of electrical neural network computing have gradually emerged. Optical computing has parallelism and can change the serial architecture of electrical domain computing while operating at the speed of light, which greatly improves the computing speed of neural networks and reduces computing delays. Optical domain computing does not require energy supply and can reduce the computing energy consumption of the network. In summary, ONN provides a way to increase computing speed and solve the bottleneck of electrical computing bandwidth.
[0093] The optical convolutional neural network used in this scheme for natural incoherent light scenes is mainly based on the 4F system structure: according to the principle of Fourier optics, a plane figure is placed on the front focal plane of a lens, and the Fourier transform of the above figure, that is, its spectrum function, can be obtained on the back focal plane of the lens; conversely, if the spectrum of a plane figure is placed on the front focal plane of a lens, the plane figure can be obtained on the back focal plane of the lens. In addition, according to the principle of convolution operation, the convolution of two continuous functions in the spatial domain can be obtained by the inverse transformation of the product of their two corresponding Fourier transforms. Among them, the 4F system refers to the existence of two lenses with a focal length of f, which are placed on the same optical axis and 2f apart; when the input image is placed on the front focal plane of the first lens, a spatial light modulator is placed on the back focal plane of the first lens, and the Fourier transform of the set convolution kernel is loaded on it, and the feature map after the convolution operation of the input image and the set convolution kernel can be obtained on the back focal plane of the second lens.
[0094] 3. Pseudo 3D optical convolutional neural network module (corresponding to the first optical convolutional neural network mentioned above);
[0095] Based on the principle of pseudo-3D convolution operation and the optical convolutional neural network architecture, this solution specifically provides a method for implementing a pseudo-3D optical convolutional neural network module: using optical devices to implement pseudo-3D convolutional feature extraction operations in the optical domain, achieving parallel operations and improving computing speed, reducing computing energy consumption, and improving feature extraction effects compared to 2D optical convolutional neural networks, thereby improving the accuracy of video-related tasks.
[0096] The optical path diagram of this method can be shown as Figure 4 As shown (taking the detector as an example of the time domain processor), according to the principle of pseudo 3D convolution, the original 3D convolution is split into 2D spatial convolution and 1D time domain convolution. Among them, the 2D spatial convolution can be completed through the above-mentioned 4F system architecture (corresponding to the above-mentioned use of the first spatial light modulator in the first optical convolutional neural network, according to the two-dimensional spatial data of the three-dimensional video data, to obtain two-dimensional spatial convolution data); the input of the 3D video (corresponding to the input layer of the above-mentioned three-dimensional video data) is placed on the front focal plane of the first lens (corresponding to the above-mentioned first lens), a spatial light modulator (corresponding to the above-mentioned first spatial light modulator) is placed on the back focal plane of the first lens, and the detector is placed on the back focal plane of the second lens (corresponding to the above-mentioned second lens). Figure 4 The "spatial light modulator" here may refer to a device that can modulate the spatial light intensity or phase, such as a digital microlens array (DMD), a liquid crystal spatial light modulator (LCOSSLM), a phase mask, etc. The 3D video input can be implemented by inputting 2D images frame by frame. The spatial modulator is loaded with the Fourier transform corresponding to the convolution kernel, and the detector can be a commonly used camera chip, such as CCD (charge coupled device), CMOS (complementary metal oxide semiconductor), etc. According to the above-mentioned 2D optical convolution principle, the image on the detector plane at this time is the feature map of the convolution operation of each frame of the video with the convolution kernel of the set image. Among them, Figure 4 The devices respectively arranged between the 3D video input and the spatial light modulator, and between the spatial light modulator and the detector (shown as elliptical circles in the figure) are lenses, and the focal length of the lens is f.
[0097] In the above optical path, the transmission of light to the detector plane has completed the 2D spatial convolution in the pseudo 3D convolution. Afterwards, in conjunction with the detector exposure process and the subsequent calculation unit, the 1D time domain convolution can be completed (corresponding to the above-mentioned use of the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data, and obtain the pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data). Assuming an N×1×1 time domain convolution kernel (corresponding to the above-mentioned convolution kernel for the one-dimensional time domain data), the convolution process can be regarded as the sum of every N frames of the video 3D input multiplied by N×1×1, sliding on the input according to the step size setting, and repeating the above process to obtain the result after the time domain 1D convolution. The above-mentioned convolution process can be divided into two steps: multiplication and summation. The multiplication step is completed by exposure imaging of the detector, and the summation step is completed by a computing unit (corresponding to the above-mentioned use of the time domain processor in the first optical convolutional neural network to perform multiplication processing in the convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain the first intermediate data; and perform addition processing in the convolution processing on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data).
[0098] Specifically, Figure 5As shown, in this scheme, the same clock signal can be used to unify the frame rate of the video input and the acquisition frame rate of the detector (corresponding to the input frame rate of the above-mentioned three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal), for example, the periods of video input and acquisition are both T (such as one frame of video is input every T, and the large period T of video input and detector exposure is consistent; that is, the period of the video 3D data input control signal (also referred to as the video input control signal) and the detector exposure acquisition control signal (also referred to as the detector exposure time control signal) are both T); the exposure time can be set according to the values of different positions of the convolution kernel (N×1×1) (corresponding to the exposure time of the detector included in the above-mentioned time domain processor is determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data), such as the convolution kernel value is 0.35, that is, the exposure time of the frame is 0.35T. In addition, corresponding clock signals can be generated according to the value of the convolution kernel, the number of video frames N, and the frame rate of the video input to control the detector acquisition and video input (the input control clock signal corresponding to the above-mentioned three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the values of the convolution kernel at different positions for the one-dimensional time domain data, the number of frames of the three-dimensional video data, and the input frame rate of the three-dimensional video data); wherein, the video input can be played by the rising edge trigger (corresponding to the rising edge trigger of the clock signal for the input of the three-dimensional video data), with a period of T; the detector exposure can be bandwidth triggered (corresponding to the acquisition of the detector included in the time domain processor using the bandwidth trigger of the clock signal), that is, the rising edge trigger starts the exposure, and the falling edge trigger ends the exposure. The multiplication link in the time domain 1D convolution can be completed through the above content (the detector acquisition exposure can realize the convolution multiplication).
[0099] Furthermore, after the detector exposure completes the multiplication link, the calculation unit can complete the addition operation according to the size and step size of the convolution kernel; for example, corresponding to the setting of the convolution kernel of N×1×1 and the step size of M, the calculation unit sums and outputs the results of N frames, and slides back M frames, repeating the above operation until the end; at this time, the result output by the calculation unit is the feature map of the video 3D data input after pseudo-3D convolution (corresponding to the above-mentioned addition processing in the convolution processing for the first intermediate data according to the size and step size of the convolution kernel for the one-dimensional time domain data, to obtain the pseudo-3D convolution feature map corresponding to the three-dimensional video data).
[0100] In addition: based on the pseudo 3D convolution operation in the optical domain implemented by the above-mentioned pseudo 3D optical convolution neural network module, multi-convolution kernel operation can be further realized through a spatial light modulator and multiple detectors (corresponding to the number of the above-mentioned detectors being G) (correspondingly, the first lens and the second lens are adjusted to lens arrays, which are deployed and arranged corresponding to the detectors, the video input also corresponds to multiple tiled inputs, and the output of the computing unit is also multiple feature maps); in addition, another spatial light modulator (corresponding to the above-mentioned second spatial light modulator) can be added at the detector position (the position between the detector and the second lens) to directly realize the product operation of 1D time domain convolution (it can be understood that the exposure time is not controlled, and a spatial light modulator is superimposed before the detector, and the product operation is completed by the spatial light modulator, and then the detector captures the signal and transmits it to the computing unit for addition operation). At this time, the multi-convolution kernel operation can be completed by only one detector and using the same control signal as the video input. In addition, the above-mentioned pseudo 3D optical convolutional neural network module can be used as a layer in the entire 3D CNN, and multiple pseudo 3D optical convolutional neural network modules can be added to the network to implement multi-layer pseudo 3D convolution operations, thereby minimizing the energy consumption and computational complexity of electrical domain calculations and improving the computing speed of the overall network, but this is not limited to this.
[0101] Based on the above, the solution provided by the embodiment of the present invention includes the following contents:
[0102] 1) Obtaining a video to be processed (corresponding to the above-mentioned three-dimensional video data); inputting the video to be processed into a pseudo 3D optical convolutional neural network (corresponding to the above-mentioned first optical convolutional neural network), performing feature extraction on the video to be processed based on the pseudo 3D optical convolutional neural network, and obtaining a feature map corresponding to the video to be processed (corresponding to the pseudo three-dimensional convolutional feature map corresponding to the above-mentioned three-dimensional video data), wherein the pseudo 3D optical convolutional neural network includes an input layer (corresponding to the input layer of the above-mentioned three-dimensional video data), a spatial light modulator (corresponding to the above-mentioned first spatial light modulator) and a detection module (corresponding to the above-mentioned time domain processor), and the spatial light modulator is a device for modulating the spatial light intensity or phase.
[0103] 2) Lenses with a focal length of f (corresponding to the first lens and the second lens mentioned above) are respectively arranged between the input layer and the spatial light modulator in the pseudo 3D optical convolutional neural network, and between the spatial modulator and the detection module; the detection module includes a detector and a computing unit. When light is transmitted to the detector plane of the detection module, 2D spatial domain convolution in the pseudo 3D convolution is realized, and 1D time domain convolution is completed based on the detector exposure process and the computing unit to obtain a feature map corresponding to the video to be processed.
[0104] 3) In the pseudo 3D optical convolutional neural network, the frame rate of the video input and the acquisition frame rate of the detector are unified based on the same clock signal, and the exposure time is determined based on the values of the convolution kernel at different positions. The corresponding clock signals are generated based on the values of the convolution kernel at different positions and the number of video frames of the video to be processed. The video input and the acquisition of the detector are controlled based on the clock signal. The video input is triggered by the rising edge, and the detector exposure is triggered by the bandwidth, that is, the exposure starts with the rising edge trigger and ends with the falling edge trigger.
[0105] 4) After the multiplication step is completed based on the detector exposure in 3), the addition operation is completed based on the size and step size of the convolution kernel based on the calculation unit, and the above operation is repeated until the end to obtain the feature map corresponding to the video to be processed.
[0106] 5) The number of spatial light modulators and detectors is one or more, and the detector module may include a detector and a target spatial light modulator (corresponding to the above-mentioned second spatial light modulator), and the target spatial light modulator is added at the detector position for performing a 1D time-domain convolution product operation.
[0107] In summary, this plan:
[0108] 1. A module architecture for implementing pseudo-3D convolution operations in the optical domain is proposed (i.e., a method for implementing pseudo-3D convolution operations in the optical domain is proposed), which changes the original optical network that can only implement 2D spatial domain convolution. This solution can extract spatiotemporal features of videos in the optical domain, which helps to improve the task accuracy of the network in video tasks. Specifically, pseudo-3D convolution can be used to extract features of both temporal and spatial domain information from videos, which helps to improve the representation effect in video tasks.
[0109] Furthermore, compared with 3D convolution, the proposed pseudo-3D convolution scheme can greatly reduce the number of parameters of the network model, and greatly reduce the network training time while achieving similar task effects. At the same time, the pseudo-3D convolution scheme is implemented in the optical domain, which improves the calculation speed compared to the electrical domain calculation, and reduces the amount of calculation and energy consumption of network operation.
[0110] 2. A solution is proposed in which the time domain 1D convolution can be directly realized through the detector in the optical domain pseudo 3D convolution, without the need for additional optical modulation equipment, thus reducing the system complexity.
[0111] 3. An implementation scheme of multi-core and multi-layer pseudo 3D convolution operations in 3D optical convolutional neural networks is proposed, which can minimize the network calculation amount and energy consumption and improve the operation speed.
[0112] In summary, this scheme proposes a scheme for implementing pseudo 3D convolution on video 3D input in the optical domain. Specifically:
[0113] (1) Both this scheme and 3D CNN can achieve feature extraction in the temporal and spatial domains of 3D inputs such as videos through convolution. However, firstly, this scheme implements relevant calculations in the optical domain, which achieves parallel operations compared to the electrical domain 3D CNN, improves the operation speed, and reduces the amount of calculation and energy consumption in the electrical domain; in addition, the pseudo-3D CNN implemented by this scheme in a simplified manner only adds a certain number of 1D temporal convolutions compared to 2D CNN with the same number of layers and depth, while achieving similar effects as 3D CNN, it greatly reduces the number of parameters and the amount of calculation of the network model.
[0114] (2) The difference between this scheme and the current optical convolutional neural network is that the current optical convolutional neural network can only complete 2D spatial domain convolution and cannot complete the convolution operation on the time domain features at the same time. For video input, it can only convert it into multiple frames of images and calculate them frame by frame through the network; while the pseudo 3D convolution calculation method in this scheme performs convolution operations on both spatial domain and time domain features, and can directly input the video and output the calculated 3D video feature map.
[0115] It is explained here that the pseudo 3D photon convolution calculation processor provided by this solution can be used for feature extraction calculation of video data, and can realize convolution operations in both space and time domains in the optical domain, which can improve the task accuracy of video tasks, and greatly improve the computing speed of the network, and reduce the computing amount and energy consumption of the network. The above-mentioned architecture can run in natural incoherent light scenes and can be applied to video task scenes with high data volume, but is not limited to this.
[0116] The embodiment of the present invention also provides a data processing device, such as Figure 6 As shown, including:
[0117] A first processing module 61 is used to obtain two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data using a first spatial light modulator in the first optical convolutional neural network;
[0118] A second processing module 62 is used to use the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data;
[0119] Wherein, the time domain processor comprises: a detector, or a second spatial light modulator;
[0120] The first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
[0121] The data processing device provided by the embodiment of the present invention obtains two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data by using the first spatial light modulator in the first optical convolution neural network; uses the time domain processor in the first optical convolution neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data; wherein the time domain processor includes: a detector, or a second spatial light modulator; the first optical convolution neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolution neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens; it can support the extraction of time domain and spatial domain features of three-dimensional video data by using the optical domain neural network, realize the optical domain equivalent three-dimensional convolution operation processing, reduce the network operation amount, greatly improve the operation speed, reduce the processing energy consumption, and well solve the problem that the optical domain neural network in the prior art cannot support the extraction of time domain and spatial domain features of three-dimensional video data.
[0122] Among them, the use of the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes: using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and performing addition processing in convolution processing on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0123] In an embodiment of the present invention, when the time domain processor includes a second spatial light modulator, the time domain processor in the first optical convolutional neural network is used to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data, including: using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data, and using the detector in the first optical convolutional neural network for sensing to obtain the first intermediate data obtained after the multiplication processing.
[0124] Among them, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data, including: according to the size and step size of the convolution kernel for the one-dimensional time domain data, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0125] In an embodiment of the present invention, the time domain processor satisfies at least one of the following settings: the input frame rate of the three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal; the exposure time of the detector included in the time domain processor is determined according to the value of the convolution kernel at different positions for the one-dimensional time domain data; the input control clock signal of the three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the value of the convolution kernel at different positions for the one-dimensional time domain data, the number of frames of the three-dimensional video data and the input frame rate of the three-dimensional video data; the input of the three-dimensional video data is triggered by the rising edge of the clock signal; the acquisition of the detector included in the time domain processor is triggered by the bandwidth of the clock signal; the input period of the three-dimensional video data, the control period of the second spatial light modulator included in the time domain processor and the acquisition period of the detector in the first optical convolutional neural network are determined according to the same clock signal.
[0126] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.
[0127] The embodiment of the present invention also provides a data processing device, such as Figure 7 As shown, it includes: a processor 71;
[0128] The processor 71 is used to obtain two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data using the first spatial light modulator in the first optical convolutional neural network;
[0129] Using the time domain processor in the first optical convolutional neural network, convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data;
[0130] Wherein, the time domain processor comprises: a detector, or a second spatial light modulator;
[0131] The first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
[0132] In the embodiment of the present invention, the data processing device may further include: a transceiver 72 capable of communicating with the processor 71, but the present invention is not limited thereto.
[0133] The data processing device provided by the embodiment of the present invention obtains two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data by using the first spatial light modulator in the first optical convolution neural network; uses the time domain processor in the first optical convolution neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data; wherein the time domain processor includes: a detector, or a second spatial light modulator; the first optical convolution neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolution neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens; it can support the extraction of time domain and spatial domain features of three-dimensional video data by using the optical domain neural network, realize the optical domain equivalent three-dimensional convolution operation processing, reduce the network operation amount, greatly improve the operation speed, reduce the processing energy consumption, and well solve the problem that the optical domain neural network in the prior art cannot support the extraction of time domain and spatial domain features of three-dimensional video data.
[0134] Among them, the use of the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes: using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and performing addition processing in convolution processing on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0135] In an embodiment of the present invention, when the time domain processor includes a second spatial light modulator, the time domain processor in the first optical convolutional neural network is used to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data, including: using the time domain processor in the first optical convolutional neural network to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data, and using the detector in the first optical convolutional neural network for sensing to obtain the first intermediate data obtained after the multiplication processing.
[0136] Among them, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data, including: according to the size and step size of the convolution kernel for the one-dimensional time domain data, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
[0137] In an embodiment of the present invention, the time domain processor satisfies at least one of the following settings: the input frame rate of the three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal; the exposure time of the detector included in the time domain processor is determined according to the value of the convolution kernel at different positions for the one-dimensional time domain data; the input control clock signal of the three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the value of the convolution kernel at different positions for the one-dimensional time domain data, the number of frames of the three-dimensional video data and the input frame rate of the three-dimensional video data; the input of the three-dimensional video data is triggered by the rising edge of the clock signal; the acquisition of the detector included in the time domain processor is triggered by the bandwidth of the clock signal; the input period of the three-dimensional video data, the control period of the second spatial light modulator included in the time domain processor and the acquisition period of the detector in the first optical convolutional neural network are determined according to the same clock signal.
[0138] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.
[0139] An embodiment of the present invention further provides a data processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, the above-mentioned data processing method is implemented.
[0140] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.
[0141] An embodiment of the present invention further provides a readable storage medium on which a program is stored. When the program is executed by a processor, the steps in the above-mentioned data processing method are implemented.
[0142] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the readable storage medium and can achieve the same technical effects.
[0143] An embodiment of the present invention further provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the above-mentioned data processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0144] It should be noted that many functional components described in this specification are referred to as modules in order to more particularly emphasize the independence of their implementation methods.
[0145] In the embodiment of the present invention, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.
[0146] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0147] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.
[0148] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data processing method, characterized in that: include: Using a first spatial light modulator in a first optical convolutional neural network, two-dimensional spatial domain convolution data is obtained according to the two-dimensional spatial domain data of the three-dimensional video data; Using the time domain processor in the first optical convolutional neural network, convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data; Wherein, the time domain processor comprises: a detector, or a second spatial light modulator; The first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
2. The data processing method according to claim 1, characterized in that: The method of using the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes: Using the time domain processor in the first optical convolutional neural network, a multiplication process in the convolution process is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and an addition process in the convolution process is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
3. The data processing method according to claim 2, characterized in that: In the case where the time domain processor includes a second spatial light modulator, the time domain processor in the first optical convolutional neural network is used to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data, including: Using the time domain processor in the first optical convolutional neural network, multiplication processing in convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data, and sensing is performed using the detector in the first optical convolutional neural network to obtain first intermediate data obtained after the multiplication processing.
4. The data processing method according to claim 2, characterized in that: The performing the addition process in the convolution process on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes: According to the size and step length of the convolution kernel for the one-dimensional time domain data, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
5. The data processing method according to claim 1, characterized in that: The time domain processor satisfies at least one of the following settings: The input frame rate of the three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal; The exposure time of the detector included in the time domain processor is determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data; The input control clock signal of the three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data, the number of frames of the three-dimensional video data and the input frame rate of the three-dimensional video data; The input of the three-dimensional video data is triggered by the rising edge of the clock signal; The acquisition of the detector included in the time domain processor is triggered by the bandwidth of the clock signal; The input period of the three-dimensional video data, the control period of the second spatial light modulator included in the time domain processor, and the acquisition period of the detector in the first optical convolutional neural network are determined according to the same clock signal.
6. A data processing device, characterized in that: include: A first processing module, configured to obtain two-dimensional spatial convolution data according to the two-dimensional spatial data of the three-dimensional video data by using a first spatial light modulator in the first optical convolutional neural network; A second processing module is used to use the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data; Wherein, the time domain processor comprises: a detector, or a second spatial light modulator; The first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
7. The data processing device according to claim 6, characterized in that: The method of using the time domain processor in the first optical convolutional neural network to perform convolution processing on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes: Using the time domain processor in the first optical convolutional neural network, a multiplication process in the convolution process is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data; and an addition process in the convolution process is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
8. The data processing device according to claim 7, characterized in that: In the case where the time domain processor includes a second spatial light modulator, the time domain processor in the first optical convolutional neural network is used to perform multiplication processing in convolution processing on one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain first intermediate data, including: Using the time domain processor in the first optical convolutional neural network, multiplication processing in convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data, and sensing is performed using the detector in the first optical convolutional neural network to obtain first intermediate data obtained after the multiplication processing.
9. The data processing device according to claim 7, characterized in that: The performing the addition process in the convolution process on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data includes: According to the size and step length of the convolution kernel for the one-dimensional time domain data, the addition processing in the convolution processing is performed on the first intermediate data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data.
10. The data processing device according to claim 6, characterized in that: The time domain processor satisfies at least one of the following settings: The input frame rate of the three-dimensional video data and the acquisition frame rate of the detector included in the time domain processor are determined according to the same clock signal; The exposure time of the detector included in the time domain processor is determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data; The input control clock signal of the three-dimensional video data and the acquisition control clock signal of the detector included in the time domain processor are determined according to the values of different positions of the convolution kernel for the one-dimensional time domain data, the number of frames of the three-dimensional video data and the input frame rate of the three-dimensional video data; The input of the three-dimensional video data is triggered by the rising edge of the clock signal; The acquisition of the detector included in the time domain processor is triggered by the bandwidth of the clock signal; The input period of the three-dimensional video data, the control period of the second spatial light modulator included in the time domain processor, and the acquisition period of the detector in the first optical convolutional neural network are determined according to the same clock signal.
11. A data processing device, characterized in that: include: processor; The processor is used to obtain two-dimensional spatial domain convolution data according to the two-dimensional spatial domain data of the three-dimensional video data using the first spatial light modulator in the first optical convolutional neural network; Using the time domain processor in the first optical convolutional neural network, convolution processing is performed on the one-dimensional time domain data corresponding to the three-dimensional video data in the two-dimensional spatial domain convolution data to obtain a pseudo three-dimensional convolution feature map corresponding to the three-dimensional video data; Wherein, the time domain processor comprises: a detector, or a second spatial light modulator; The first optical convolutional neural network is also provided with a first lens and a second lens; the input layer for inputting the three-dimensional video data in the first optical convolutional neural network is located on the front focal plane of the first lens, the first spatial light modulator is located on the back focal plane of the first lens and the front focal plane of the second lens, and the time domain processor is located on the back focal plane of the second lens.
12. A data processing device comprising a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that: When the processor executes the program, the data processing method according to any one of claims 1 to 5 is implemented.
13. A readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the data processing method according to any one of claims 1 to 5 are implemented.
14. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the data processing method according to any one of claims 1 to 5.
