WO2024095692A1 - 撮像装置および撮像装置の制御方法 - Google Patents

撮像装置および撮像装置の制御方法 Download PDF

Info

Publication number
WO2024095692A1
WO2024095692A1 PCT/JP2023/036403 JP2023036403W WO2024095692A1 WO 2024095692 A1 WO2024095692 A1 WO 2024095692A1 JP 2023036403 W JP2023036403 W JP 2023036403W WO 2024095692 A1 WO2024095692 A1 WO 2024095692A1
Authority
WO
WIPO (PCT)
Prior art keywords
machine learning
processing
learning model
imaging device
image
Prior art date
Application number
PCT/JP2023/036403
Other languages
English (en)
French (fr)
Inventor
総一 松田
拓之 徳永
けい 山橋
Original Assignee
LeapMind株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by LeapMind株式会社 filed Critical LeapMind株式会社
Publication of WO2024095692A1 publication Critical patent/WO2024095692A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof

Definitions

  • the present invention relates to an imaging apparatus and a control method for the imaging apparatus.
  • This application claims priority based on Japanese Patent Application No. 2022-174141 filed on October 31, 2022, and incorporates all of the contents of that application by reference.
  • CNNs convolutional neural networks
  • Convolutional neural networks have a multi-layer structure with convolutional layers and pooling layers, and require a large number of parallel calculations.
  • Various calculation methods have been devised to speed up calculations using convolutional neural networks (e.g., Patent Document 1).
  • the present invention aims to provide an imaging device that can acquire images as an IoT device and performs machine learning-related calculations on acquired images with high efficiency and speed, and a method for controlling the imaging device to operate circuits and models that perform machine learning-related calculations with high efficiency and speed.
  • An imaging device is an imaging device having an image sensor with a plurality of pixels for converting an image of a subject into an electrical signal, and is equipped with a first machine learning calculation means for processing a signal obtained from the plurality of pixels using a first machine learning model including a plurality of calculation layers, a decision means for deciding whether to execute processing using the first machine learning calculation means, and a second machine learning calculation means for processing based on the signal or a processing result by the first machine learning calculation means using a second machine learning model different from the first machine learning model, and is characterized in that the first machine learning model includes at least a quantization calculation layer that performs a quantization calculation on the calculation result of a convolution calculation layer that performs a convolution calculation.
  • the imaging device and control method for the imaging device of the present invention can provide an imaging device that is capable of acquiring images as an IoT device, and performs machine learning-related calculations on acquired images with high efficiency and high speed, and a control method for the imaging device that allows a circuit or model that performs machine learning-related calculations to operate with high efficiency and high speed.
  • FIG. 1 is a functional block diagram of an imaging apparatus according to a first embodiment.
  • FIG. 2 is a functional block diagram of a sensor according to the first embodiment.
  • FIG. 2 is a functional block diagram of a first machine learning calculation unit according to the first embodiment.
  • 4 is a timing chart for explaining an operation of the buffer according to the first embodiment.
  • FIG. 2 is a diagram showing a network structure of a machine learning model according to the first embodiment.
  • FIG. 2 is a functional block diagram of a second machine learning calculation unit according to the first embodiment.
  • FIG. 1 is a functional block diagram of an imaging apparatus according to a first embodiment.
  • FIG. 2 is a functional block diagram of a sensor according to the first embodiment.
  • FIG. 2 is a functional block diagram of a first machine learning calculation unit according to the first
  • FIG. 11 is a functional block diagram of an imaging apparatus according to a second embodiment. 10 is a timing chart for explaining the operation of a buffer and an ISP according to a second embodiment. FIG. 11 is a functional block diagram of an imaging device according to a third embodiment. FIG. 13 is a functional block diagram of an imaging apparatus according to a fourth embodiment.
  • Fig. 1 is a diagram showing an image pickup apparatus 1000 according to this embodiment.
  • Imaging device 1000 1 is a functional block diagram of an imaging device according to this embodiment.
  • the imaging device 1000 according to this embodiment will be described with reference to the same figure.
  • the imaging device 1000 is a device for acquiring a subject image generated by a predetermined light collecting device such as an optical member such as a lens, and examples thereof include a digital camera, a surveillance camera, and an in-vehicle camera, but the present invention can be applied to any device equipped with an imaging means such as a smartphone or a robot.
  • the invention according to this embodiment is preferably applied to products such as embedded devices with limited power consumption, such as battery-powered devices.
  • the imaging device 1000 of this embodiment includes a sensor 100, a first machine learning calculation unit 200, a sensor I/F 300, an ISP 400, an input/output unit 500, a display unit 600, a CPU 700, a memory 800, and a second machine learning calculation unit 900.
  • the sensor 100 is a solid-state imaging element that converts a subject image formed by an optical means (not shown) into an electrical signal by photoelectric conversion.
  • One example is a CMOS image sensor.
  • the sensor 100 of this embodiment has a plurality of pixels 110, the number of pixels being at least greater than 2000 ⁇ 1500 pixels.
  • Each pixel 110 has a predetermined color filter, and the sensor 100 of this embodiment has color filters in a so-called Bayer array.
  • the sensor 100 also has an analog-to-digital conversion circuit (ADC) 120 that converts an analog-like electrical signal acquired by photoelectric conversion into a digital value based on the timing of a synchronization signal generated by a sensor control unit (not shown) controlled by a CPU 700 (described later).
  • ADC analog-to-digital conversion circuit
  • the sensor 100 has a multi-channel high-speed I/F 130 that can output a multi-bit digital signal converted by the analog-to-digital conversion circuit 120 at high speed.
  • the analog-digital conversion circuit 120 of the sensor 100 has a resolution capable of converting each pixel value into a digital value of 12 bits or more, and operates in multiple drive modes under the control of a sensor control unit (not shown).
  • the sensor may have a mode in which signals from all pixels 110 of the sensor 100 are read by a rolling shutter operation and a 12-bit digital value is output, or a mode in which signals from some of the pixels 110 of the sensor 100 are partially added or thinned out and read and a 10-bit digital value is output.
  • a mode in which 30 or 60 frames of 4K or 8K format pixels are output per second may be provided as a high-quality video mode.
  • the signal of each pixel 110 output by the sensor 100 is so-called RAW image data, and includes information with a bit precision of 12 bits or 14 bits.
  • the first machine learning calculation unit 200 is a calculation unit that receives raw image data, which is a multi-bit digital value that is the output of the sensor 100, as input and executes calculations on this input using a predetermined machine learning model.
  • FIG. 3 is a functional block diagram of the first machine learning calculation unit 200.
  • the first machine learning calculation unit 200 includes a buffer 210, a pre-processing unit 220, a first inference unit 230, and a post-processing unit 240.
  • the buffer 210 is a buffer that receives the output of the sensor 100 and temporarily holds it.
  • the sensor 100 of this embodiment repeatedly outputs pixel values of a predetermined unit pixel at the cycle of the horizontal synchronization signal (HD).
  • the sensor 100 sequentially outputs pixel values for one row at one horizontal synchronization signal cycle.
  • the sensor 100 has 1500 rows of pixels 110, it outputs 1500 pixel values of 12 bits or 14 bits, which is more than 8 bits, at one horizontal synchronization.
  • one frame's worth of pixel values is output during a period of 1500 horizontal synchronization signal cycles.
  • the buffer 210 has a capacity capable of holding pixel values for three or more rows.
  • FIG. 4 is a timing chart for explaining the operation of the buffer 210.
  • the sensor 100 outputs pixel values for one screen at the period of the vertical synchronization signal VD.
  • the period of the vertical synchronization signal VD is divided into multiple periods of the horizontal synchronization signal HD, and the sensor 100 outputs pixel values of a predetermined unit (for example, one row) based on the period of the horizontal synchronization signal HD.
  • FIG. 4A shows the data output timing of pixel values output from the sensor 100.
  • the sensor 100 outputs pixel value data sequentially, such as pixel A, pixel B, and pixel C, in the period Ta in synchronization with the timing of the horizontal synchronization signal HD.
  • the sensor 100 performs a power saving operation, such as turning off the power of each block. Therefore, by performing high-speed data transfer using multiple output CHs, the shorter the period Ta, the more power the sensor 100 can reduce.
  • FIG. 4B shows the data output timing of pixel values output from the buffer 210. Pixel value data is sequentially read out during period Tb in synchronization with the timing of the horizontal synchronization signal HD.
  • the slower the peak value of the processing data rate the more power can be reduced. For this reason, it is preferable to convert the data rate when reading from the buffer 210. In other words, by making the data rate when reading in the buffer 210 slower than the peak data rate at the time of input within the period of the horizontal synchronization signal HD, the effect of improving processing efficiency can be obtained.
  • the buffer 210 holds pixel values for one row, but this is not limited thereto, and multiple rows may be held if multiple rows of data are required by the first inference unit 230 described below.
  • the first inference unit 230 when a 3 ⁇ 3 weight is used in the calculation, at least three rows may be held. Note that the unit of storage in the buffer 210 does not have to be rows, and when the sensor 100 outputs pixel values in units of a specified area, the unit of storage may be the area.
  • the pre-processing unit 220 performs a predetermined process using the output of the buffer 210 as input.
  • Examples of the process performed by the pre-processing unit 220 include rearranging the pixel values held in the buffer 210, correcting defective pixels, black level correction, and fixed pattern noise correction.
  • the predetermined process in the pre-processing unit 220 is rule-based, and the correction of defective pixels is performed based on a comparison with surrounding pixels, and the correction of fixed pattern noise is performed based on a correction value calculated from the black level.
  • the first inference unit 230 includes a processing circuit that corrects pixel values by inference processing using a machine learning model.
  • the machine learning model included in the first inference unit 230 is built in after having been trained based on images captured in advance. For example, when training to reduce noise in an image using a machine learning model, it is possible to prepare an image with low noise and a high sensitivity with a lot of noise for the same subject and the same exposure, and to infer the noisy image using the low noise image as training data.
  • the machine learning model may also train to improve image quality by reducing blurring in the image and reducing optical aberrations, etc., in addition to or in addition to training to reduce noise.
  • the machine learning model included in the first inference unit 230 may be, as an example, a neural network having a network structure such as a U-NET structure.
  • the machine learning model included in the first inference unit 230 has a multi-layer structure including multiple calculation layers, and in each layer, a convolution calculation using weights is performed.
  • FIG. 5 is a diagram showing the network structure of the machine learning model included in the first inference unit 230.
  • the machine learning model included in the first inference unit 230 includes an input layer 231, a convolution calculation layer 232, a quantization calculation layer 233, and an output layer 234.
  • the convolution calculation layer 232 and the quantization calculation layer 233 include multiple layers (n layers), and each layer is connected alternately, but some layers may be skipped when connected.
  • the machine learning model may further include layers having other functions, such as a fully connected layer or a pooling layer.
  • the machine learning model included in the first machine learning calculation unit 200 corresponds to the first machine learning model.
  • An input signal IN is input to the input layer 231.
  • the input signal IN is a signal corresponding to multiple pixel values generated based on the output of the pre-processing unit 220, and in this embodiment is a signal with a bit precision of 8 bits or more.
  • the input layer converts each input signal IN into a vector having multiple elements. The converted vector is used as the input to the first convolution operation layer 232-1.
  • the convolution calculation layer 232 performs a convolution calculation using a weight W on an input vector or a tensor combining multiple vectors (hereinafter referred to as activation).
  • the activation or weight W used in the calculation is quantized to 8 bits or less.
  • the activation is performed with a value quantized to 8 bits, and the weight W is performed with a value quantized to 1 bit.
  • the activation may be quantized up to 2 bits in order to reduce the calculation load, etc.
  • the quantization operation layer 233 receives the result of the convolution operation in the convolution operation layer 232 as input and performs a quantization operation using a predetermined function.
  • the quantized result of the convolution operation becomes the input to the next convolution operation layer 232.
  • each element of the matrix that is the result of the convolution operation output from the convolution operation layer 232 is a 16-bit integer, and the quantization result is a lower bit than the input signal IN, for example an 8-bit integer.
  • quantization is performed using the function shown in the following formula 1.
  • the quantization method may use multiple thresholds or a table without using a function. Quantization to 2 bits can be achieved by comparing with three thresholds.
  • multiple convolution operation layers 232 and quantization operation layers 233 perform repeated operations, and the result of the nth convolution operation layer 232-n is input to the output layer 234.
  • the output layer 234 outputs the operation results in the machine learning model.
  • the post-processing unit 240 receives the calculation results of the first inference unit 230, performs a predetermined process, and outputs the calculation result data in synchronization with the horizontal synchronization signal.
  • examples of the processes performed by the post-processing unit 240 include sorting pixel values, adding or thinning pixel values, serial signal conversion, and adding header information and synchronization signals. The processing of the post-processing unit 240 enables high-speed data transfer to subsequent blocks.
  • the first machine learning calculation unit 200 may be realized using hardware such as an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), or an FPGA (Field-Programmable Gate Array).
  • the first machine learning calculation unit 200 can reduce the calculation resources by quantizing the elements in a convolution calculation that requires a large amount of calculation resources. Since the connection between the sensor 100 and the ISP 400 described later is performed by high-speed communication over multiple channels, there was a concern that placing a large-scale calculation circuit would cause a delay in the communication. However, by using quantization technology, it is possible to reduce the size of this calculation circuit, and calculations can be performed using a machine learning model with multiple layers.
  • a processor that executes program processing and an accelerator that executes operations related to a neural network may be combined to configure each function of the first machine learning calculation unit 200.
  • an accelerator for neural network operations that repeatedly executes convolution operations and quantization operations may be combined with a processor.
  • the configuration of the imaging device 1000 will be described in more detail.
  • the sensor I/F 300, ISP 400, input/output unit 500, display unit 600, CPU 700, memory 800, and second machine learning calculation unit 900 are configured on the same silicon chip, and each is connected to a high-speed internal bus IB. Note that when a communication means capable of sufficiently high-speed data communication is used, they do not have to be configured on the same silicon chip.
  • the sensor I/F 300 receives the output of the first machine learning calculation unit 200 and outputs the data to the internal bus IB. As one example, the sensor I/F 300 outputs the data received from the first machine learning calculation unit 200 to the memory 800 so that it can be used in subsequent processing. As another example, the sensor I/F 300 outputs the data received from the first machine learning calculation unit 200 to the ISP 400 (described below) to execute a specified image processing. Note that a buffer may be provided in the sensor I/F 300 to temporarily hold data in order to convert the data format, etc.
  • the ISP 400 is an image processing unit that selectively performs a predetermined image processing on data based on pixel values acquired by the sensor 100 (hereinafter referred to as image data). Examples include demosaic processing, encoding and compression processing, color adjustment processing, and gamma correction processing. Each process is pipelined, and the processing is consistently performed on the input image data and the processing results are output. The processing results in the ISP 400 may be output to the outside via the input/output unit 500, or may be displayed on the display unit 600.
  • the input/output unit 500 communicates image data and the like between the imaging device 1000 and an external device (not shown).
  • the communication method may be a wired means using a cable or the like, or wireless communication without using a cable or the like.
  • the input/output unit 500 may receive commands including operational instructions from the external device, and programs such as machine learning models and various parameters that operate in the imaging device 1000.
  • the display unit 600 includes a display for displaying image data captured by the imaging device 1000, and displays a predetermined UI/UX, notifications, etc. in addition to image data.
  • a touch panel may be provided on the display of the display unit 600 to be used as an operation unit.
  • the CPU 700 is a control unit including a processor that performs overall control of each block of the imaging device 1000.
  • the CPU 700 performs various functions by executing programs that are previously stored in the memory 800. As an example, the CPU 700 performs control to switch the operation mode of the imaging device 1000 based on a user instruction from an operation unit (not shown).
  • the operation modes include a still image mode, a video mode, a night view mode, and the like.
  • the CPU 700 also controls the machine learning calculation by setting a machine learning model previously stored in the memory 800 to the first machine learning calculation unit 200 or the second machine learning calculation unit 900 according to the operation mode.
  • the CPU 700 may also be configured to include a sensor control unit that generates and supplies a clock and a synchronization signal for controlling the imaging device 1000 as a control unit.
  • Memory 800 is composed of DRAM etc., and multiple storage areas store firmware for controlling the entire imaging device 1000, UI data, data related to operation modes, data related to machine learning models, etc.
  • the data related to the machine learning models includes network information, weights, quantization parameters, etc.
  • Memory 800 also includes an area for storing image data, a buffer area during calculation, and a storage area for storing captured still image and video data.
  • memory 800 corresponds to a storage means for storing various data including image data and programs.
  • the second machine learning calculation unit 900 is a calculation unit that receives as input image data after processing by the ISP 400 and executes calculations on this input using a predetermined machine learning model.
  • FIG. 6 is a functional block diagram of the second machine learning calculation unit 900.
  • the second machine learning calculation unit 900 includes a feature extraction unit 910, a second inference unit 920, and an output processing unit 930. Each block performs processing based on a clock signal that is the same as or multiplied by the clock signal of the CPU 700.
  • the machine learning model included in the second machine learning calculation unit 900 may have a network structure other than the U-NET structure, such as a transformer structure or a recurrent neural network structure.
  • the feature extraction unit 910 includes a processing circuit that performs feature extraction processing using a machine learning model.
  • a machine learning model that detects objects in an image to detect an intended object, it is possible to prepare multiple annotated images and use the annotation results as training data to detect objects, thereby enabling learning.
  • the machine learning model may also be trained to improve image quality by detecting posture, recognizing objects, tracking objects, reducing blur in images, and reducing optical aberrations. It is provided with multiple convolution calculation layers L, each of which performs calculations sequentially. The results of the calculations are output as a feature map.
  • FIG. 7 shows each calculation layer L in the feature extraction unit 910 of this embodiment.
  • the feature extraction unit 910 performs repeated calculations on the input image data using a layer that performs a convolution calculation and a layer that performs a pooling calculation.
  • the size corresponding to the vertical and horizontal directions of the original image data decreases. Meanwhile, the size in the depth direction or channel direction increases.
  • the second machine learning calculation unit 900 receives input of image data stored in the memory 800.
  • the second inference unit 920 performs an inference calculation using a machine learning model based on the feature map generated by the feature extraction unit 910 to detect whether a specific subject is captured in the image data. Specifically, it outputs the likelihood for a class that has been learned in advance with the intention of being the detection target. Examples of classes that are the detection target include people and vehicles, and a specific object may be set as the detection target, or multiple types may be detected simultaneously. In addition, it may be possible to output the coordinates of an area in which the detection target exists other than the class as a bounding box.
  • the output processing unit 930 outputs the final detection result based on the likelihood of each class output by the second inference unit 920. Specifically, the class with the highest likelihood is selected from the likelihoods for multiple classes, and this class is taken as the final detection result. Furthermore, if the likelihoods for all classes are lower than a certain value, it is determined that the object to be detected was not included in the image data.
  • the calculations performed by the second machine learning calculation unit 900 have a bit precision of 8 bits or more, and as an example, are calculations using 16-bit floating point numbers. This makes it possible to easily implement a machine learning model that can be used in a general-purpose environment such as a GPU, achieving high versatility.
  • all or part of the functions of the second machine learning calculation unit 900 may be realized using hardware such as an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), or an FPGA (Field-Programmable Gate Array).
  • ASIC Application Specific Integrated Circuit
  • PLD Programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • a processor that executes program processing and an accelerator that executes operations related to a neural network may be combined to configure each function of the second machine learning calculation unit 900.
  • an accelerator for neural network operations for repeatedly executing convolution operations or the like may be used in combination with a processor.
  • FIG. 8 is a flowchart for explaining the imaging operation of the imaging device 1000.
  • Each process in this flowchart is realized by the processor of the CPU 700 executing a predetermined program prestored in the memory 800 and controlling each block of the imaging device 1000.
  • the operation of this flowchart is started when the power button of the imaging device 1000 is pressed or a predetermined camera application is started.
  • step S800 the CPU 700 determines whether or not to start image capture processing. Specifically, the process waits until a user instruction to capture an image is received, such as an instruction to switch to image capture mode or an instruction to start shooting from a shutter button or the like included in an operation unit (not shown). Then, if an instruction to capture an image is received, the process proceeds to the next step.
  • a user instruction to capture an image such as an instruction to switch to image capture mode or an instruction to start shooting from a shutter button or the like included in an operation unit (not shown). Then, if an instruction to capture an image is received, the process proceeds to the next step.
  • step S810 the CPU 700 controls the sensor 100 to start exposure via a sensor control unit (not shown). Specifically, the CPU 700 supplies power and clock signals to the sensor 100, supplies vertical and horizontal synchronization signals, and writes parameters to a control register in the sensor 100.
  • the control register includes registers related to exposure such as exposure time and gain, and registers related to read control such as pixel addition and thinning readout. Then, based on the parameters written to the control register, a reset operation of the charge generated in the pixels 110 of the sensor 100 and an accumulation operation of the photocharge are performed, and signals are read out sequentially from each pixel. After the exposure control in the pixels 110 is completed, the process proceeds to the next step.
  • the reset operation of the charge generated in the pixels 110 of the sensor 100 and the accumulation and readout operations of the photocharge will be further explained.
  • the signal is read out from the sensor 100 by a rolling shutter operation, and the signal is read out from the pixels 110 on a row-by-row basis.
  • the readout method and readout unit are merely examples.
  • the readout method may be a global shutter operation for exposure and readout, and the readout unit may be multiple rows or a specified block area.
  • step S820 the CPU 700 determines the exposure conditions based on the parameters set for the sensor 100 in step S800 and the exposure information acquired in advance. More specifically, it determines whether the ISO sensitivity used for image capture is equal to or higher than a predetermined level. In this embodiment, if the ISO sensitivity used for image capture is greater than ISO 3200, the process proceeds to step S830, and if it is equal to or lower than ISO 3200, the process proceeds to step S840. Note that the subject of determination in this step may be an analog gain value or digital gain value set in the sensor 100, exposure time, or a combination of these, instead of the ISO sensitivity.
  • Each determination condition is a condition for determining whether the amount of noise contained in the signal obtained from each pixel 110 is equal to or higher than a certain level, and as an example, conditions that may increase the amount of noise, such as temperature or type of sensor 100, may be added for the determination.
  • step S830 the CPU 700 controls the first machine learning calculation unit 200 to perform calculation processing using a machine learning model on the signals obtained from each pixel 110.
  • the machine learning model is pre-trained to reduce the amount of noise in the signal, and the CPU 700 controls the calculation by setting the parameters of the machine learning model in registers and the like included in the first machine learning calculation unit 200. Then, after the calculation in the first machine learning calculation unit 200 is completed, the process proceeds to the next step.
  • the parameters of the machine learning model include weight parameters used in the convolution calculation, quantization parameters for quantizing the convolution calculation result, commands for controlling each block included in the first machine learning calculation unit 200, and the like.
  • the first machine learning calculation unit 200 is controlled to improve the signal quality of each signal, making it possible to obtain more appropriate image data.
  • post-processing can be performed without processing in the first machine learning calculation unit 200, thereby improving response speed and saving power.
  • the processing in the first machine learning calculation unit 200 may be controlled so that a plurality of machine learning models trained according to the amount of noise or each ISO sensitivity are switched according to the exposure conditions. More specifically, when the ISO sensitivity is between ISO 800 and ISO 3200, a machine learning model trained based on an image on which noise equivalent to ISO 1600 is superimposed may be used, and when the ISO sensitivity is ISO 3200 or higher, a machine learning model trained based on an image on which noise equivalent to ISO 3200 is superimposed may be used.
  • control may be performed according to the exposure time in which blur may occur. For example, when the exposure time is longer than 1/15 seconds, control may be performed so that processing using the machine learning model is performed.
  • step S840 the CPU 700 controls the ISP 400 to perform a predetermined image processing on the image data.
  • a predetermined image processing In this embodiment, at least demosaic processing and encoding compression processing are performed.
  • the ISP 400 processes the RAW image data processed by the first machine learning calculation unit 200 to generate compressed and encoded data for data storage or display, and proceeds to the next step.
  • compressed and encoded data include still image data formats such as JPEG and BMP, as well as video data formats such as MPEG, H.264, and H.265.
  • the ISP 400 may perform processing such as cropping, resizing, transformation, and synthesis on the compressed and encoded data to facilitate the execution of calculation processing in the second machine learning calculation unit 900.
  • step S850 the CPU 700 controls the second machine learning calculation unit 900 to perform calculation processing using a machine learning model on the compressed and encoded data.
  • the machine learning model performs calculations to detect whether a specific detection target is present in the image.
  • the CPU 700 controls the calculation by setting parameters of the machine learning model in registers and the like included in the second machine learning calculation unit 900.
  • the parameters of the machine learning model include weight parameters used in the convolution calculation, commands for controlling each block included in the second machine learning calculation unit 900, and the like.
  • the second machine learning calculation unit 900 processes compressed and encoded data, the amount of data of the image data itself to be processed is reduced, so that the required storage capacity in the memory 800 can be reduced.
  • the second machine learning calculation unit 900 when controlling each block of the imaging device 1000, such as the ISP 400, according to the object contained in the image data, the second machine learning calculation unit 900 is controlled to appropriately detect the object, thereby making it possible to realize more appropriate control. Furthermore, when controlling each block of the imaging device 1000 according to the detection result, control may be performed to switch between multiple machine learning models. As an example, when controlling the focal position of the optical unit (not shown) according to the detection result, a machine learning model that detects the distance to the detection object may be used. Furthermore, when switching image processing in the ISP 400 according to the detection object, a machine learning model that detects the area occupied by the detection object in the image data may be used. Furthermore, when controlling the imaging device 1000 using the posture, etc. of the detection object as a user interface, a machine learning model that detects the posture of the detection object may be used. Furthermore, when authenticating a person, etc., a machine learning model that detects at least a part of the human body may be used.
  • the machine learning model used in the second machine learning calculation unit 900 needs to realize various functions, so the capabilities required of the second machine learning calculation unit 900 include high versatility in addition to calculation accuracy and calculation speed. For this reason, circuit redundancy is also required in the second machine learning calculation unit 900.
  • step S860 the CPU 700 determines whether or not the detection target has been detected as a result of the calculation using the machine learning model in the second machine learning calculation unit 900. If the detection target has been detected, the process proceeds to step S870, where the detection result is displayed on the display unit 600. On the other hand, if the detection target has not been detected, the process proceeds to step S880.
  • step S870 an example has been shown in which the calculation result of the machine learning model in the second machine learning calculation unit 900 is displayed on the display unit 600, but this is not limited to this.
  • the processes in steps S860 and S870 can be replaced. Note that in this embodiment, an example has been shown in which the processes from step S850 to step S870 are performed once, but they may be controlled to be repeated a predetermined number of times.
  • step S880 the CPU 700 determines whether or not to end the imaging operation. More specifically, the CPU 700 determines whether or not to end the processing of this flowchart based on an instruction from the user to end imaging or an instruction to end the application, and repeatedly executes the processing of this flowchart until it determines that the processing should be ended.
  • the imaging device 1000 and the control method thereof according to the present embodiment have been described with reference to the drawings.
  • the first machine learning calculation unit 200 and the second machine learning calculation unit 900 which are specially designed and different calculation means, it is possible to achieve both high speed and versatility of processing.
  • Ordinary machine learning calculations require a large number of multi-bit product-sum calculations to be performed in parallel, so that a large-scale processing device such as a server is required.
  • the first machine learning computation unit 200 which is specialized in processing signals obtained from each pixel on a pixel-by-pixel basis, is arranged between the sensor 100 and the ISP 400 in a pipelined manner to increase computational efficiency, while the second machine learning computation unit, which has even higher versatility, is arranged at the rear of the ISP 400.
  • the first machine learning computation unit 200 performs processing using a machine learning model including a quantization computation in units output from the sensor 100 based on a synchronization signal, thereby performing low-latency and highly efficient computation while suppressing memory consumption.
  • the tasks performed by the machine learning model to pixel-by-pixel processing such as noise reduction, it is possible to suppress the decrease in computation accuracy due to the quantization computation.
  • the signal output from the sensor 100 contains multi-bit information, it is suitable for performing image processing related to image quality improvement.
  • the second machine learning computation unit 900 it is possible to maintain versatility to handle tasks in various machine learning models as a whole.
  • FIG. 9 is a diagram showing a functional block diagram of an image pickup device 1100 according to the second embodiment.
  • the same components as those in the image pickup device 1000 in the first embodiment are indicated by the same reference numerals, and the description thereof may be omitted.
  • the imaging device 1100 differs from the imaging device 1000 of the first embodiment in the connection between the first machine learning calculation unit 200 and the internal bus IB.
  • the sensor 100 and the first machine learning calculation unit 200 are connected in the same manner as in the first embodiment by a high-speed multi-channel communication method via the high-speed I/F 130 in the sensor 100.
  • the first machine learning calculation unit 200 is connected to each functional block of the imaging device 1100 by an internal bus IB capable of high-speed communication.
  • the first machine learning calculation unit 200, ISP 400, input/output unit 500, display unit 600, CPU 700, memory 800, and second machine learning calculation unit 900 are configured on the same silicon chip, and each is connected to the high-speed internal bus IB.
  • FIG. 10 is a timing chart for explaining the operation of the buffer 210 and the ISP 400 according to this embodiment.
  • FIG. 10A shows the data output timing of pixel values output from the sensor 100. Pixel value data is output sequentially in period Ta in synchronization with the timing of the horizontal synchronization signal.
  • FIG. 10B shows the data output timing of pixel values output from the buffer 210. Pixel value data is output sequentially in period Tb in synchronization with the timing of the horizontal synchronization signal.
  • the slower the data rate to be processed the more power can be reduced. Therefore, the data rate read from the buffer 210 is slower than the data rate at the time of input.
  • FIG. 10A shows the data output timing of pixel values output from the sensor 100. Pixel value data is output sequentially in period Ta in synchronization with the timing of the horizontal synchronization signal.
  • FIG. 10B shows the data output timing of pixel values output from the buffer 210. Pixel value data is output sequentially in period Tb in synchronization with the timing of the horizontal synchronization signal
  • FIG. 10C shows the execution timing of image processing on image data in the ISP 400.
  • the results processed in the first machine learning calculation unit 200 are input to the ISP 400 with a delay from the timing shown in FIG. 10B (period Tc1). Then, in period Tc2, the image data input is processed sequentially in a pipeline manner.
  • the buffer 210 holds one row of pixel values, but this is not limited thereto, and multiple rows may be held if multiple rows of data are required in the first inference unit 230 or the ISP 400.
  • the first inference unit 230 when a 3 ⁇ 3 weight is used in the calculation, at least three rows may be held. Also, in the case where seven rows of image data are required in the ISP 400, at least seven rows may be held.
  • Third Embodiment 11 is a functional block diagram of an imaging device 1200 according to the third embodiment.
  • the same components as those of the imaging device 1000 or the imaging device 1100 are indicated by the same reference numerals, and the description thereof may be omitted.
  • the imaging device 1200 according to the third embodiment can be applied to an imaging device having, for example, a stacked CMOS image sensor.
  • the imaging device 1200 differs from the imaging devices 1000 and 1100 in that the sensor 100 and the first machine learning calculation unit 210 are each independently connected to the internal bus IB.
  • the first machine learning calculation unit 210 is a modified version of the first machine learning calculation unit 200.
  • the imaging device 1200 also differs from the imaging devices 1000 and 1100 in that the imaging device 1200 includes a sensor I/F 310 and an I/F 320 instead of the sensor I/F 300.
  • the sensor I/F 310 stores the information (RAW image data) output by the sensor 100 in a specified storage unit via the internal bus IB.
  • the specified storage unit may be, for example, the memory 800.
  • the first machine learning calculation unit 210 receives as input raw image data stored in a predetermined storage unit, for example memory 800, and performs calculations on this input using a predetermined machine learning model.
  • the first machine learning calculation unit 210 may also receive raw image data directly via the sensor I/F 310, without going through memory 800, and perform calculations on this input using a predetermined machine learning model.
  • the internal configuration of the first machine learning calculation unit 210 may be the same as that of the first machine learning calculation unit 200.
  • the I/F 320 outputs the output from the first machine learning calculation unit 210 to the internal bus IB.
  • the data output to the internal bus IB is stored in, for example, the memory 800.
  • the I/F 320 may output the data acquired from the first machine learning calculation unit 210 to the ISP 400 in order to execute a specified image processing.
  • the I/F 320 may include a buffer for temporarily storing data in order to convert the data format, etc.
  • the I/F 320 is configured to connect to the internal bus IB, if it is possible to use a sufficiently high-speed, low-latency communication method, such as a high-speed serial communication standard, it may be configured to connect to the internal bus IB via a specified communication I/F.
  • Integrated circuit IC1 has the functions of a sensor 100 and a sensor I/F 310.
  • Integrated circuit IC2 has the functions of a first machine learning calculation unit 200 and an I/F 320.
  • Integrated circuit IC3 has the functions of an ISP 400, an input/output unit 500, a display unit 600, a CPU 700, a memory 800, and a second machine learning calculation unit 900.
  • Integrated circuit IC1, integrated circuit IC2, and integrated circuit IC3 may be electrically connected to each other so as to be able to communicate data with each other via an internal bus IB.
  • FIG. 12 is a functional block diagram of an imaging device 1300 according to a fourth embodiment.
  • the imaging device 1300 differs from the imaging device 1000 in that it includes a sensor 110, a third machine learning calculation unit 210, a sensor I/F 320, and a sensor control unit 330.
  • the imaging device 1300 according to the fourth embodiment can be applied to, for example, a control device for controlling a vehicle. In a control device for controlling a vehicle, there is a demand for shortening the occupancy time of the internal bus IB as much as possible.
  • Sensor 110 is a sensor that captures images like sensor 100, but is a different sensor from sensor 100. That is, imaging device 1300 has multiple sensors. When imaging device 1300 is applied to a control device that controls a vehicle, sensor 100 may be a sensor that captures an image in front of the vehicle, and sensor 110 may be a sensor that captures an image behind the vehicle, or may have an angle of view that partially overlaps with that captured by sensor 100. Note that imaging device 1300 may also have multiple other sensors not shown. The output data of sensor 110 is output to the third machine learning calculation unit 220 without being output to internal bus IB.
  • the third machine learning calculation unit 220 receives the information (RAW image data) output by the sensor 110 as input and executes calculations using a predetermined machine learning model.
  • the third machine learning calculation unit 220 may have a configuration similar to that of the second machine learning calculation unit 900, for example, and may perform object detection, orientation detection, object recognition, and object tracking based on feature amounts, as well as processing to reduce blurring in images and reduce optical aberrations.
  • the sensor I/F 320 outputs the output result of the third machine learning calculation unit 220 to the sensor control unit 330.
  • the sensor control unit 330 outputs the result of the calculation performed by the third machine learning calculation unit 220 to the internal bus IB.
  • the result of the calculation performed by the third machine learning calculation unit 220 may be information such as class and likelihood, for example, when the third machine learning calculation unit 220 detects an object.
  • only information such as class and likelihood obtained as a result of machine learning is output, so image data is not output to the internal bus IB. Therefore, according to this embodiment, the amount of data output to the internal bus IB can be reduced, and the occupancy time of the internal bus IB can be shortened. Therefore, according to this embodiment, even when multiple sensors are provided, congestion on the internal bus IB and delays can be prevented.
  • the data to be calculated in the first machine learning calculation unit 200 and the second machine learning calculation unit 900 described in the above embodiment is not limited to a single format, and can be composed of still images, moving images, voice, characters, numbers, and combinations thereof.
  • the data input to the first machine learning calculation unit 200 and the second machine learning calculation unit 900 may be combined with measurement results from physical quantity measuring instruments such as optical sensors, thermometers, Global Positioning System (GPS) measuring instruments, angular velocity measuring instruments, and anemometers.
  • GPS Global Positioning System
  • Different information such as peripheral information such as base station information, vehicle/ship information, weather information, and congestion information received from peripheral devices via wired or wireless communication, financial information, and personal information may be combined.
  • the imaging device 1000 or the imaging device 1100 is assumed to be, but is not limited to, a communication device such as a battery-powered mobile phone, a smart device such as a personal computer, a digital camera, a game device, a robot product, etc. It is possible to obtain effects not found in other prior art by using the imaging device 1000 or 1100 in products that have a high demand for peak power limit that can be supplied by Power on Ethernet (PoE), reduction of product heat generation, or long-term operation.
  • PoE Power on Ethernet
  • the first machine learning calculation unit 200 and the second machine learning calculation unit 900 may be realized in part or in whole using one or more processors.
  • the first machine learning calculation unit 200 and the second machine learning calculation unit 900 may realize a part or all of the input layer or the output layer by software processing by a processor.
  • a part of the input layer or the output layer realized by software processing is, for example, data normalization or conversion. This makes it possible to support various input formats or output formats.
  • the software executed by the processor may be configured to be rewritable using a communication means or an external medium.
  • a part of the processing in the second machine learning calculation unit 900 may be realized by combining a graphics processing unit (GPU) or the like on the cloud.
  • the second machine learning calculation unit 900 can realize more complex processing with fewer resources by performing further processing on the cloud in addition to the processing performed by the imaging device 1000 or the imaging device 1100, or by performing processing in addition to the processing on the cloud.
  • the learning method for the machine learning model operating in each may be different.
  • a method hereinafter referred to as the QAT method
  • the QAT method including a learning step in which a network including a quantization operation is generated and then learned in a form including the quantization operation for the machine learning model operating in the first machine learning calculation unit 200.
  • Imaging device 100 Image sensor 200 First machine learning calculation unit 300 Sensor I/F 400 ISP 500 Input/Output Unit 600 Display Unit 700 CPU 800 Memory 900 Second machine learning calculation unit 1000 Imaging device according to the first embodiment 1100 Imaging device according to the second embodiment

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Studio Devices (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Abstract

撮像装置は、被写体像を電気信号に変換するための複数の画素を備えるイメージセンサを備える撮像装置であって、複数の演算層を含む第1の機械学習モデルを用いて前記複数の画素から得られる信号を処理するための第1の機械学習演算手段と、前記第1の機械学習演算手段によって処理を実行するか否かを決定する決定手段と、前記第1の機械学習モデルと異なる第2の機械学習モデルを用いて前記信号または前記第1の機械学習演算手段による処理結果に基づいて処理するための第2の機械学習演算手段とを備え、前記第1の機械学習モデルは少なくとも畳み込み演算を行う畳み込み演算層の演算結果に対して量子化演算を行う量子化演算層を含むことを特徴とする。

Description

撮像装置および撮像装置の制御方法
 本発明は、撮像装置および撮像装置の制御方法に関する。
 本願は、2022年10月31日に、日本に特許出願された特願2022―174141に基づき優先権を主張し、当該出願に記載された全ての記載内容を援用するものである。
 近年、畳み込みニューラルネットワーク(Convolutional Neural Network:CNN)が画像認識等のモデルとして用いられている。畳み込みニューラルネットワークは、畳み込み層やプーリング層を有する多層構造であり、並列的に多数の演算を必要とする。畳み込みニューラルネットワークによる演算を高速化する演算手法が様々考案されている(特許文献1など)。
特開2018-077829号公報
 一方で、IoT機器などの組み込み機器においても畳み込みニューラルネットワークを利用した画像認識や画質改善処理等が行われている。このような畳み込みニューラルネットワークを実現するためには、高速性や省電力性以外にも高い汎用性を備えるアクセラレータが必要となる。しかし、それぞれの性能はトレードオフの関係であり、特に汎用性を高めるためには一定の冗長性が必要であり、回路規模または消費電力に対しての演算効率性の低下につながる。そのため、CNNを処理するアクセラレータには高速性や省電力性に加えて汎用性も望まれている。
 上記事情を踏まえ、本発明は、IoT機器として画像を取得可能な撮像装置であり、取得した画像に対して高効率かつ高速に機械学習に係る演算を行う撮像装置および機械学習に係る演算を行う回路やモデルを高効率かつ高速に動作させるための撮像装置の制御方法を提供することを目的とする。
 上記課題を解決するために、この発明は以下の手段を提案している。
 本発明の実施形態に係る撮像装置は、被写体像を電気信号に変換するための複数の画素を備えるイメージセンサを備える撮像装置であって、複数の演算層を含む第1の機械学習モデルを用いて前記複数の画素から得られる信号を処理するための第1の機械学習演算手段と、前記第1の機械学習演算手段によって処理を実行するか否かを決定する決定手段と、前記第1の機械学習モデルと異なる第2の機械学習モデルを用いて前記信号または前記第1の機械学習演算手段による処理結果に基づいて処理するための第2の機械学習演算手段とを備え、前記第1の機械学習モデルは少なくとも畳み込み演算を行う畳み込み演算層の演算結果に対して量子化演算を行う量子化演算層を含むことを特徴とする。
 本発明の撮像装置および撮像装置の制御方法は、IoT機器として画像を取得可能な撮像装置であり、取得した画像に対して高効率かつ高速に機械学習に係る演算を行う撮像装置および機械学習に係る演算を行う回路やモデルを高効率かつ高速に動作させるための撮像装置の制御方法を提供することができる。
第1の実施形態に係る撮像装置の機能ブロック図である。 第1の実施形態に係るセンサの機能ブロック図である。 第1の実施形態に係る第1機械学習演算部の機能ブロック図である。 第1の実施形態に係るバッファの動作を説明するためのタイミングチャートである。 第1の実施形態に係る機械学習モデルのネットワーク構造を示した図である。 第1の実施形態に係る第2機械学習演算部の機能ブロック図である。 第1の実施形態に係る特徴抽出部における各演算層を示した図である。 第1の実施形態に係る撮像装置の制御方法を説明するためのフローチャートである。 第2の実施形態に係る撮像装置の機能ブロック図である。 第2の実施形態に係るバッファ及びISPの動作を説明するためのタイミングチャートである。 第3の実施形態に係る撮像装置の機能ブロック図である。 第4の実施形態に係る撮像装置の機能ブロック図である。
(第1の実施形態)
 本発明の実施形態について、図1から図8を参照して説明する。図1は、本実施形態に係る撮像装置1000を示す図である。
[撮像装置1000]
 図1は本実施形態に係る撮像装置の機能ブロック図である。同図を参照しながら、本実施形態に係る撮像装置1000について説明する。撮像装置1000はレンズ等の光学部材等の所定の集光装置によって生成される被写体像を取得するための装置で、一例としてデジタルカメラ、監視カメラおよび車載カメラ等であるが、スマートフォンやロボット等であって撮像手段を備える装置であれば本発明を適用することができる。なお、本実施形態に係る発明はバッテリー駆動などの消費電力量が限定されている組み込み機器などの製品に適用することが好適である。
 本実施形態の撮像装置1000は、センサ100、第1機械学習演算部200、センサI/F300、ISP400、入出力部500、表示部600、CPU700、メモリ800、第2機械学習演算部900を含む。
 センサ100は、不図示の光学手段により結像された被写体像を光電変換により電気信号に変換する個体撮像素子である。一例として、CMOSイメージセンサである。本実施形態のセンサ100は図2で示すように、複数の画素110を少なくとも2000×1500画素よりも多い画素数を備える。それぞれの画素には110には所定のカラーフィルターを備えており、本実施形態のセンサ100はいわゆるベイヤー配列のカラーフィルターを備える。また、センサ100は、後述するCPU700が制御する不図示のセンサ制御部が生成する同期信号のタイミングに基づいて、光電変換により取得したアナログ的な電気信号をデジタル値へ変換するアナログデジタル変換回路(ADC)120を備える。さらに、アナログデジタル変換回路120の変換後の多ビットのデジタル信号を高速で出力可能な多チャンネルの高速I/F130を備える。
 ここで、本実施形態においてセンサ100が備えるアナログデジタル変換回路120は、各画素値を12bit以上のデジタル値へ変換可能な分解能を備え、不図示のセンサ制御部からの制御により複数の駆動モードで動作する。一例として、センサ100が備える全ての画素110からの信号をローリングシャッター動作で読み出し12bitのデジタル値を出力するモードや、センサ100が備える一部の画素110からの信号を一部加算または間引きをして読み出し10bitのデジタル値を出力するモードなどを備えてもよい。また、高画質動画モードとして、4Kまたは8Kフォーマットの画素数を1秒間に30フレームまたは60フレームを出力するモードを備えてもよい。なお、センサ100が出力する各画素110の信号はいわゆるRAW画像データであって、12bitまたは14bitのビット精度を備える情報を含む。
 第1機械学習演算部200は、センサ100の出力である多ビットのデジタル値であるRAW画像データを入力とし、この入力に対して所定の機械学習モデルによる演算を実行するための演算部である。図3は、第1機械学習演算部200の機能ブロック図である。第1機械学習演算部200は、バッファ210、前処理部220、第1推論部230、後処理部240を含む。
 バッファ210は、センサ100の出力を受けとり一時的に保持するバッファである。本実施形態のセンサ100は水平同期信号(HD)の周期で所定の単位画素の画素値を繰り返し出力する。一例として、センサ100は一つの水平同期信号周期で1行分の画素値を順次出力する。つまり、センサ100が1500行の画素110を備える場合には、1水平同期において8bitよりも多い12bitまたは14bitの画素値を1500個分出力する。そして、水平同期信号周期の1500周期分の期間で1フレーム分の画素値を出力することになる。特に、機械学習モデルで画像を処理する場合には畳み込み演算を用いるため、複数行分の画素値を保持する必要がある。そのため、バッファ210には3行以上の複数行の画素値を保持することが可能な容量を有する。
 図4は、バッファ210の動作を説明するためのタイミングチャートである。本実施形態においては説明の簡略化のため、1行分の画素値をバッファ210に保持する例を示す。センサ100は垂直同期信号VDの周期で1画面分の画素値を出力する。そして、垂直同期信号VDの周期は複数の水平同期信号HDの周期に分割され、センサ100は水平同期信号HDの周期に基づいて所定の単位(例えば1行分)の画素値を出力する。図4Aにおいて、センサ100から出力される画素値のデータ出力タイミングを示す。センサ100は水平同期信号HDのタイミングに同期して、期間Taにおいて画素A、画素B、画素Cのように画素値データを順次出力する。センサ100は画素値データを出力した期間Taの後は、各ブロックの電源を切るなど省電力動作を行う。そのため、複数の出力CHなどを用いて高速データ転送を行うことで、期間Taが短くなればなるほどセンサ100における電力削減につながる。図4Bにおいて、バッファ210から出力される画素値のデータ出力タイミングを示す。水平同期信号HDのタイミングに同期して、期間Tbにおいて画素値のデータが順次読み出される。なお、バッファ210より後段においては、処理するデータレートのピーク値が遅くなればなるほど電力削減につながる。そのため、バッファ210より読み出す際にデータレートの変換を行うことが好ましい。つまり、バッファ210において、読み出す際のデータレートを、水平同期信号HDの周期の中で入力時のピークのデータレートよりも遅くすることにより、処理効率を向上する効果が得られる。
 図4において、バッファ210は1行分の画素値を保持する例を説明したが、これに限られるものではなく、後述の第1推論部230において複数行のデータが必要な場合には複数行を保持するようにしてもよい。例えば、第1推論部230において、3×3の重みを演算に用いる場合等においては、少なくとも3行分を保持するようにしてもよい。なお、バッファ210に保持する単位は行単位でなくてもよく、センサ100が所定の領域を単位として画素値を出力する場合には、当該領域を保持する単位としてもよい。
 図3において、前処理部220はバッファ210の出力を入力として、所定の処理を行う。前処理部220が行う処理の例としては、バッファ210に保持された画素値の並び替え、欠陥画素の補正、黒レベル補正、固定パターンノイズ補正等である。後述する第1推論部230の前段において所定の処理を実行することにより第1推論部230における処理精度を向上させることができる。前処理部220における所定の処理はルールベースの処理であり、欠陥画素の補正は周辺画素との比較に基づいて行われ、固定パターンノイズの補正は黒レベルから算出される補正値に基づいて行われる。
 第1推論部230は、機械学習モデルを用いた推論処理により画素値の補正を行う処理回路を含む。本実施形態において第1推論部230に含まれる機械学習モデルは、事前に撮像された画像に基づいて学習を済ませた状態で組み込まれる。例えば、機械学習モデルにより画像におけるノイズを低減するように学習する場合には、同一被写体かつ同一露出で、ノイズの少ない低感度での画像と、ノイズの多い高感度の画像を用意し、ノイズの少ない画像を教師データとしてノイズの多い画像を推論することで学習することが可能となる。なお、機械学習モデルはノイズを低減する学習以外にもまたは加えて、画像中のブレの低減や光学的な収差の低減などにおいても画像の品質を向上するように学習を行ってもよい。なお、第1推論部230に含まれる機械学習モデルは一例として、U-NET構造等のネットワーク構造を有するニューラルネットワークであってもよい。
 ここで、第1推論部230に含まれる機械学習モデルには複数の演算層が含まれる多層構造を有し、各層においては重みを用いた畳み込み演算を行う。図5は、第1推論部230に含まれる機械学習モデルのネットワーク構造を示した図である。第1推論部230に含まれる機械学習モデルは入力層231、畳み込み演算層232、量子化演算層233、出力層234を含み、畳み込み演算層232および量子化演算層233については複数層(n個)を含み、各層は交互に接続されているが、一部の層を飛び越して接続されてもよい。また機械学習モデルには、全結合層やプーリング層などの他の機能を有する層をさらに有してもよい。なお、第1機械学習演算部200に含まれる機械学習モデルは第1の機械学習モデルに相当する。
 入力層231には、入力信号INが入力される。入力信号INは、前処理部220の出力に基づき生成される複数の画素値に対応する信号であり、本実施形態においては8bit以上のビット精度を有する信号である。入力層は各入力信号INを複数の要素を備えるベクトルに変換する。変換されたベクトルは1層目の畳み込み演算層232-1の入力とされる。
 畳み込み演算層232は、入力されたベクトルまたは複数のベクトルを結合したテンソル(以下、アクティベーションという。)に対して重みWを用いた畳み込み演算を行う。特に、本実施形態の畳み込み演算層232においては、演算に用いるアクティベーション又は重みWは8bit以下に量子化されている。一例として、アクティベーションは8bit、重みWは1bitに量子化された値で行う。このように、量子化された低ビットで演算を行うことで、パラメータ自体を保持するメモリの小容量化、演算回路の省スペース化、演算速度の向上などの効果を得ることができる。なお、アクティベーションに関しては、演算負荷の低減等を目的として2bitまで量子化するようにしてもよい。
 量子化演算層233は、畳み込み演算層232における畳み込み演算結果を入力として、所定の関数を用いて量子化する演算を行う。量子化された畳み込み演算結果は次の畳み込み演算層232の入力となる。本実施形態において、畳み込み演算層232から出力される畳み込み演算結果である行列の各要素は16bitの整数であり、その量子化結果は入力信号INよりも低ビットであり、一例として8bitの整数である。この場合、以下の式1に示す関数を用いて量子化される。なお、量子化方法としては、関数を用いずに複数の閾値またはテーブル等を用いてもよい。2bitへ量子化する場合には3つの閾値のと比較により実現することができる。
Figure JPOXMLDOC01-appb-M000001
 図5に示されるように、複数の畳み込み演算層232と量子化演算層233により繰り返し演算を実行し、n回目の畳み込み演算層232-nの結果は出力層234に入力される。出力層234は機械学習モデルにおける演算結果の出力を行う。
 図3において、後処理部240は第1推論部230の演算結果を入力として、所定の処理を行い、水平同期信号に同期して演算結果のデータの出力を行う。本実施形態において、後処理部240が行う処理の例としては、画素値の並び替え、画素値の加算や間引き、シリアル信号変換、ヘッダ情報や同期信号の付加等である。後処理部240の処理によって、後段のブロックへ高速なデータ転送が可能となる。
 なお、第1機械学習演算部200の各機能の全てまたは一部は、ASIC(Application Specific Integrated Circuit)、PLD(Programmable Logic Device)又はFPGA(Field-Programmable Gate Array)等のハードウェアを用いて実現されてもよい。第1機械学習演算部200は多くの演算資源が必要になる畳み込み演算において、その要素を量子化することで演算資源を削減することが可能である。センサ100と後述するISP400との接続は多チャンネルの高速通信で行われるため、大規模な演算回路を配置することはその通信の遅延となる懸念があった。しかし量子化技術を用いることにより、この演算回路の小規模化を図ることが可能となり、複数層を備える機械学習モデルでの演算が可能となる。
 例えば、第1機械学習演算部200の各機能を構成するために、プログラム処理を実行するプロセッサと、ニューラルネットワークに関する演算を実行するアクセラレータとを組み合わせてもよい。具体的には、畳み込み演算や量子化演算を繰り返し実行するためのニューラルネットワーク演算用アクセラレータを、プロセッサと組み合わせて用いてもよい。
 図1の説明に戻り、撮像装置1000の構成についてさらに詳細に説明する。本実施形態において、センサI/F300、ISP400、入出力部500、表示部600、CPU700、メモリ800、第2機械学習演算部900は同一のシリコンチップ上に構成され、それぞれは高速の内部バスIBと接続されている。なお、十分に高速なデータ通信が行うことができる通信手段を用いる場合には、同一のシリコンチップ上に構成されていなくてもよい。
 センサI/F300は、第1機械学習演算部200の出力を受けて、内部バスIBにデータを出力する。一例として、センサI/F300は、第1機械学習演算部200から受け付けたデータを、後段の処理に用いられるようにメモリ800に出力する。また、別の例として、センサI/F300は、第1機械学習演算部200から受け付けたデータに対して、所定の画像処理を実行するために後述するISP400に出力する。なお、センサI/F300においてデータ形式の変換等を行うために一時的にデータを保持するためのバッファを設けるようにしてもよい。
 ISP400は、センサ100で取得された画素値に基づくデータ(以下、画像データという。)に対して所定の画像処理を選択的に実施する画像処理部である。一例としては、デモザイク処理、符号化圧縮処理、色調整処理、ガンマ補正処理などを行う。それぞれの処理はパイプライン化されており、入力される画像データに対して一貫して処理を実行し、処理結果を出力する。ISP400における処理結果は、入出力部500を介して外部に出力されてもよいし、表示部600に表示されてもよい。
 入出力部500は、撮像装置1000と不図示の外部装置との間で画像データ等の通信を行う。通信方法としては、ケーブル等を用いる有線手段であってもよいし、ケーブル等を用いない無線通信であってもよい。また、入出力部500は画像データ以外に外部装置から動作指示等を含むコマンドや撮像装置1000において動作する機械学習モデルや各種パラメータ等のプログラムを受信するようにしてもよい。
 表示部600は、撮像装置1000で撮像した画像データ等を表示するためのディスプレイを含み、画像データ以外にも所定のUI/UXや通知等を表示する。また、表示部600のディスプレイ上にタッチパネルを設けることにより操作部として利用してもよい。
 CPU700は、撮像装置1000の各ブロックを統括的に制御するプロセッサを含む制御部である。CPU700は、メモリ800に事前に保存されているプログラムを実行することで、様々な機能を実現する。一例として、不図示の操作部からのユーザー指示に基づいて、撮像装置1000の動作モードを切り替える制御を行う。動作モードには静止画モード、動画モード、夜景モード等が含まれる。また、CPU700は動作モードに応じて、メモリ800に事前に保持された機械学習モデルを第1機械学習演算部200または第2機械学習演算部900に設定をすることで、機械学習演算の制御を行う。また、CPU700は制御部として撮像装置1000を制御するためのクロックや同期信号の生成及び供給を行うセンサ制御部を含む構成としてもよい。
 メモリ800は、DRAM等で構成され、複数の保存領域には撮像装置1000の全体を制御するためのファームウェア、UIデータ、動作モードに関するデータ、機械学習モデルに関するデータ等を保持する。本実施形態において、機械学習モデルに関するデータには、ネットワーク情報、重み、量子化パラメータ等が含まれる。また、メモリ800は画像データを保持するための領域を含み、演算途中のバッファ領域および撮像された静止画や動画のデータを保持する記憶領域等も含まれる。本実施形態においてメモリ800は画像データを含む各種データやプログラムを保持する保持手段に相当する。
 第2機械学習演算部900は、ISP400によって処理された後の画像データを入力とし、この入力に対して所定の機械学習モデルによる演算を実行するための演算部である。図6は、第2機械学習演算部900の機能ブロック図である。第2機械学習演算部900は、特徴抽出部910、第2推論部920、出力処理部930を含む。各ブロックはCPU700と同じか又は逓倍されたクロック信号に基づいて処理を行う。第2機械学習演算部900に含まれる機械学習モデルはU-NET構造とは異なる、例えばTransformer構造、再帰型ニューラルネットワーク構造等のネットワーク構造を有してもよい。
 特徴抽出部910は、機械学習モデルを用いた特徴抽出処理を行う処理回路を含む。本実施形態においては、事前に撮像された画像に基づいて学習を済ませた状態で組み込まれている。例えば、画像中の物体検出を行う機械学習モデルにより意図した物体を検出するように学習する場合には、アノテーションされた複数の画像を用意し、アノテーション結果を教師データとして物体を検出することで学習することが可能となる。なお、機械学習モデルは物体検出以外にも、姿勢検知、物体認識、物体追跡、画像中のブレの低減や光学的な収差の低減する画像の品質を向上する学習をするようにしてもよい。畳み込み演算層Lを複数備え、それぞれにおいて順次演算を実行する。演算を実行した結果は特徴量マップとして出力する。
 図7は、本実施形態の特徴抽出部910における各演算層Lを示した図である。特徴抽出部910には、入力される画像データに対して畳み込み演算を行う層とプーリング演算を行う層とにより繰り返し演算が行われる。本実施形態における特長量抽出部910においては、演算が行われるにつれ、元の画像データの縦横方向に対応するサイズは減少する。一方で、奥行き方向またはチャンネル方向のサイズは増加する。このような演算を実行する場合に、適切に特徴量を抽出するためには数行の画像データでは十分ではなく、画面全体の画像データが必要となる。そのため、第2機械学習演算部900は、メモリ800に保持された画像データを入力とすることが好ましい。
 第2推論部920は、特徴抽出部910によって生成された特徴マップに基づいて、機械学習モデルを用いて画像データ内に所定の被写体が写っているかを検出する推論演算を行う。具体的には、事前に検出対象を意図して学習をしたクラスに対する尤度を出力する。検出対象であるクラスの一例としては、人物や車両等があり、特定の物体を検出対象としてもよいし、同時に複数種類を検出できるようにしてもよい。また、クラス以外にも検出対象が存在する領域の座標をバウンディングボックスとして出力できるようにしてもよい。
 出力処理部930は、第2推論部920が出力した各クラスの尤度に基づいて最終的な検出結果を出力する。具体的には、複数のクラスに対する尤度から最も高いクラスを選択し、当該クラスを最終的な検出結果とする。また、全てのクラスに対しての尤度が一定値よりも低い場合には検出する対象が画像データ中に含まれていなかったとする。
 なお、第2機械学習演算部900で行う演算は8bit以上のビット精度を有し、一例として16bitの浮動少数による演算である。このため、GPU等の汎用的な環境で利用できる機会学習のモデルを容易に実装することが可能となり高い汎用性を実現できる。
 なお、第2機械学習演算部900の各機能の全てまたは一部は、ASIC(Application Specific Integrated Circuit)、PLD(Programmable Logic Device)又はFPGA(Field-Programmable Gate Array)等のハードウェアを用いて実現されてもよい。
 例えば、第2機械学習演算部900の各機能を構成するために、プログラム処理を実行するプロセッサと、ニューラルネットワークに関する演算を実行するアクセラレータとを組み合わせてもよい。具体的には、畳み込み演算等を繰り返し実行するためのニューラルネットワーク演算用アクセラレータを、プロセッサと組み合わせて用いてもよい。
 図8は撮像装置1000の撮像動作を説明するためのフローチャートである。本フローチャートの各処理は、CPU700が備えるプロセッサがメモリ800に事前に記憶されている所定のプログラムを実行し、撮像装置1000の各ブロックを制御することで実現される。撮像装置1000において電源ボタンが押下されるまたは、所定のカメラアプリケーションが起動することで本フローチャートの動作が開始される。
 処理が開始されるとステップS800においてCPU700は、撮像処理を開始するか否かの判定を行う。具体的には撮像モードへの遷移指示または不図示の操作部に含まれるシャッターボタン等の撮影開始指示の有無などにより、撮像を行うためのユーザー指示を受け付けるまで待機する。そして、撮像を行う指示を受け付けた場合において、次のステップへ処理を進める。
 ステップS810においてCPU700は、センサ100に対して不図示のセンサ制御部を経由して露光を開始するように制御を行う。具体的には、センサ100への電源及びクロック信号の供給、垂直同期信号又は水平同期信号の供給、及びセンサ100内の制御レジスタへのパラメータの書き込み等を行う。ここで、制御レジスタには露光時間やゲイン等の露出に関するレジスタ、画素加算や間引き読み出し等の読み出し制御に関するレジスタを含む。そして、制御レジスタに書き込まれたパラメータに基づいてセンサ100の画素110で発生した電荷のリセット動作及び光電荷の蓄積動作を行い、各画素から順次信号の読み出しが行われる。画素110での露光制御が終了した後に、次のステップへ処理を進める。
 センサ100の画素110で発生した電荷のリセット動作及び光電荷の蓄積動作及び読み出し動作についてさらに説明を行う。本実施形態において、説明のためセンサ100からの信号読み出しはローリングシャッター動作で読み出されるとし、画素110からは1行単位で信号が読み出されるものとする。なお、読み出し方法及び読み出し単位は一例にすぎない。異なる例として、読み出し方式としてはグローバルシャッター動作で露光及び読み出しが行われてもよいし、読み出し単位として複数行または所定のブロック領域を一単位としてもよい。
 ステップS820においてCPU700は、ステップS800においてセンサ100に対して設定したパラメータ及び事前に取得した露出情報に基づいて、露出条件を判定する。より詳細には撮像に用いたISO感度が所定以上か否かを判定する。本実施形態においては、撮像に用いたISO感度がISO3200よりも大きい場合にはステップS830に処理を進め、ISO3200以下の場合にはステップS840に処理を進める。なお、本ステップにおける判定対象として、ISO感度ではなくセンサ100に設定したアナログゲイン値もしくはデジタルゲイン値、露光時間またはこれらの組み合わせとしてもよい。それぞれの判定条件は各画素110から得られる信号に含まれるノイズ量が一定以上か否かを判定するための条件であり、一例として温度やセンサ100の種類などノイズ量が増加する可能性がある条件を追加して判定してもよい。
 ステップS830においてCPU700は、第1機械学習演算部200を制御し、各画素110から得た信号に対して機械学習モデルを用いた演算処理を行う。本実施形態における機械学習モデルは信号のノイズ量を低減するように事前に学習されており、CPU700は当該機械学習モデルのパラメータを第1機械学習演算部200に含まれるレジスタ等に設定することで演算を制御する。そして、第1機械学習演算部200での演算が終了した後に、次のステップへ処理を進める。なお、本実施形態において、機械学習モデルのパラメータには畳み込み演算に用いる重みパラメータ、畳み込み演算結果を量子化するための量子化パラメータ、第1機械学習演算部200に含まれる各ブロックを制御するためのコマンド等が含まれる。
 本実施形態において、各画素110から得る信号にノイズが多く含まれる露出条件などの場合において第1機械学習演算部200を制御し各信号の信号品質の改善を行い、より適切な画像データを得ることが可能となる。一方で、信号に含まれるノイズ成分が少ない露出条件などの場合において、第1機械学習演算部200において信号品質の改善を行う必要がない場合には、第1機械学習演算部200での処理を行わずに後段処理を行うことで、応答速度の向上や省電力化を行うことができる。
 なお、本実施形態においては説明のためにISO感度が一定以上か否かに基づいて第1機械学習演算部200での処理を行うか否かを制御する例を示したが、これに限られるものではない。別の例として、ノイズ量又は各ISO感度に応じて学習された複数の機械学習モデルを露出条件に応じて切り替えるように第1機械学習演算部200での処理を制御してもよい。より詳細にはISO感度がISO800からISO3200の間の場合には、ISO1600相当のノイズが重畳された画像に基づいて学習された機械学習モデルを用い、ISO感度がISO3200以上の場合にはISO3200相当のノイズが重畳された画像に基づいて学習された機械学習モデルを用いるように制御するようにしてもよい。なお、3つ以上の機械学習モデルを切り替えてもよいし、機械学習モデルを切り替えるのではなく学習パラメータなどのパラメータの一部のみを切り替えるようにしてもよい。
 また、機械学習モデルにおいてブレを低減するように学習した場合には、ブレが発生する可能性がある露光時間に応じて制御するようにしてもよい。一例として、露光時間が1/15秒よりも長い場合には機械学習モデルを用いた処理を行うように制御するようにしてもよい。
 ステップS840においてCPU700は、ISP400を制御して画像データに対して所定の画像処理を実施する。本実施形態においては、少なくともデモザイク処理および符号化圧縮処理を実行する。当該処理によりISP400は、第1機械学習演算部200で処理されたRAW画像データを処理してデータ保存用又は表示用の圧縮符号化されたデータを生成し、次のステップへ処理を進める。圧縮符号化されたデータの例としてはJPEG形式、BMP形式等の静止画用のデータフォーマットだけでなく、MPEG形式、H.264形式またはH.265形式等の動画用のデータフォーマットであってもよい。なお、ISP400の処理として第2機械学習演算部900における演算処理を実行しやすくするために圧縮符号化されたデータに対して、切り出し、サイズ変更、変形、合成などの加工処理を実行するようにしてもよい。
 ステップS850においてCPU700は、第2機械学習演算部900を制御し、圧縮符号化されたデータに対して機械学習モデルを用いた演算処理を行う。本実施形態における機械学習モデルは画像内に所定の検出対象が存在するか否かを検出するための演算を行う。CPU700は当該機械学習モデルのパラメータを第2機械学習演算部900に含まれるレジスタ等に設定することで演算を制御する。そして、第2機械学習演算部900での演算が終了した後に、次のステップへ処理を進める。なお、本実施形態において、機械学習モデルのパラメータには畳み込み演算に用いる重みパラメータ、第2機械学習演算部900に含まれる各ブロックを制御するためのコマンド等が含まれる。また、本実施形態において示したように、圧縮符号化されたデータに対して第2機械学習演算部900が処理を行う場合には、処理対象である画像データ自体のデータ量が削減されているためメモリ800における必要な記憶容量を抑えることができる。
 本実施形態において、画像データに含まれる対象に応じてISP400など撮像装置1000の各ブロックの制御を行う場合において、第2機械学習演算部900を制御し適切に対象の検出を行い、より適切な制御を実現することが可能となる。また、検出結果に応じて撮像装置1000の各ブロックを制御する場合において、複数の機械学習モデルを切り替えるように制御してもよい。一例として、検出結果に応じて不図示の光学部の焦点位置を制御する場合には、検出対象までの距離を検出する機械学習モデルを用いてもよい。また、検出対象に応じてISP400における画像処理を切り替える場合には、画像データ中の検出対象が占める領域を検出する機械学習モデルを用いてもよい。また、検出対象の姿勢等をユーザーインターフェースとして撮像装置1000を制御する場合には、検出対象の姿勢を検知する機械学習モデルを用いてもよい。また、人物等の認証を行う場合には人体の少なくとも一部を検出する機械学習モデルを用いてもよい。
 本実施形態において、第2機械学習演算部900において用いられる機械学習モデルは様々な機能を実現する必要があるため、第2機械学習演算部900に対して求められる能力としては、演算精度や演算速度に加えて高い汎用性が挙げられる。このため、第2機械学習演算部900においては、回路の冗長性も必要になる。
 ステップS860においてCPU700は、第2機械学習演算部900における機械学習モデルを用いた演算の結果として検出対象を検出したか否かを判定する。検出対象を検出した場合には、ステップS870に処理を進め、検出結果を表示部600に表示する。一方で、検出対象を検出できなかった場合には、ステップS880に処理を進める。本実施形態においては、第2機械学習演算部900における機械学習モデルの演算結果を表示部600に表示する例を示したが、これに限られるものではない。第2機械学習演算部900における機械学習モデルの演算結果を撮像装置1000のいずれのブロックの制御に用いるかによって、ステップS860及びステップS870における処理を置き換えることが可能である。なお、本実施形態においては、ステップS850乃至ステップS870までの処理を1度行う例を示したが、所定回数を繰り返すように制御してもよい。
 ステップS880においてCPU700は、撮像動作を終了するか否かを判定する。より詳細には、CPU700はユーザーによる撮像終了指示やアプリケーションの終了指示に基づいて本フローチャートの処理を終了するか否かを判定し、終了判定がなされるまでは本フローチャートの処理を繰り返し実行する。
 以上、本実施形態の撮像装置1000及びその制御方法について各図面を用いて説明した通り、それぞれ特製の異なる演算手段である第1機械学習演算部200及び第2機械学習演算部900を備えることにより、処理の高速性及び汎用性について両立させることができる。通常の機械学習に関する演算は、サーバー等の大規模な処理装置が必要なほど大量な多ビットの積和演算を並列に実行することが必要である。演算量を低減するための手法として量子化処理を行う手法があるが、量子化によってビット精度が低下すれば、それに伴って演算精度が低下するという新たな課題が生じる。また、機械学習の演算において、実行するタスクを特定の内容や範囲に限定することで量子化による演算精度の低下が抑えられる場合もある。言い換えればこれらは、組み込み機器等の消費電力量や演算資源に制限があるエッジデバイスにおいて、機械学習に関する様々な演算を高精度に実行可能である汎用性の要求と、回路規模や消費電力量を抑えるための高い演算効率の要求の両方を満たすことが非常に難しい課題であることを示している。
 本実施形態の撮像装置1000は汎用性と演算効率の両立の課題に対して、各画素から得られる信号を画素ごとに処理することに特化した第1機械学習演算部200をパイプライン的にセンサ100とISP400の間に配置して演算の効率性を高めつつ、さらに高い汎用性を備える第2機械学習演算部をISP400の後段に配置している。言い換えれば、第1機械学習演算部200は、同期信号に基づいてセンサ100から出力される単位で量子化演算を含む機械学習モデルによる処理を実行することで、メモリ消費量を抑えつつ低遅延かつ高効率な演算を実行している。さらに機械学習モデルが実行するタスクをノイズ低減等の画素単位の処理に限定することで量子化演算による演算精度低下を抑えることが可能となる。また、センサ100から出力された信号には多ビットの情報が含まれるため、画質改善に係る画像処理を実行するために好適である。そして、第2機械学習演算部900をさらに備えることにより、全体として様々な機械学習モデルにおけるタスクに対応するべく汎用性も維持することが可能となる。
(第2の実施形態)
 第1の実施形態においては、第1機械学習演算部200と内部バスIBとをセンサI/F300を介して接続する例を示した。図9は第2の実施形態に係る撮像装置1100の機能ブロック図を示した図である。第1の実施形態における撮像装置1000と同一の構成については同一の符号を用いて示しており、その説明は省略する場合がある。
 撮像装置1100において第1の実施形態の撮像装置1000と異なる個所は、第1機械学習演算部200と内部バスIBとの接続形態である。センサ100と第1機械学習演算部200とは、センサ100における高速I/F130を介する高速多チャンネル通信方式により第1の実施形態と同様に接続されている。一方で、第1機械学習演算部200撮像装置1100の各機能ブロックとは高速通信可能な内部バスIBにより接続されている。言い換えれば、本実施形態において、第1機械学習演算部200、ISP400、入出力部500、表示部600、CPU700、メモリ800、第2機械学習演算部900は同一のシリコンチップ上に構成され、それぞれは高速の内部バスIBと接続されている。
 図10は、本実施形態係るバッファ210及びISP400の動作を説明するためのタイミングチャートである。本実施形態においては1行分の画素値をバッファする例を示す。図10Aにおいて、センサ100から出力される画素値のデータ出力タイミングを示す。水平同期信号のタイミングに同期して、期間Taにおいて画素値データを順次出力する。そして、図10Bにおいて、バッファ210から出力される画素値のデータ出力タイミングを示す。水平同期信号のタイミングに同期して、期間Tbにおいて画素値データを順次出力する。バッファ210より後段においては、処理するデータレートが遅くなればなるほど電力削減につながる。そのため、バッファ210より読み出すデータレートは入力時のデータレートよりも遅くなっている。図10Cにおいて、ISP400における画像データに対する画像処理の実行タイミングを示す。第1機械学習演算部200において処理された結果は図10Bで示したタイミングより遅延してISP400に入力される(期間Tc1)。そして、期間Tc2において入力された画像データより順次パイプライン的に処理が行われる。
 図10において、バッファ210は1行分の画素値を保持する例を説明したが、これに限られるものではなく、第1推論部230やISP400において複数行のデータが必要な場合には複数行を保持するようにしてもよい。例えば、第1推論部230において、3×3の重みを演算に用いる場合等においては、少なくとも3行分を保持するようにしてもよい。また、ISP400において7行分の画像データが必要な場合等においては、少なくとも7行分を保持するようにしてもよい。
 図10に示した通り、第1機械学習演算部200を内部バスIBへ直接接続することにより、画像データをパイプライン的に処理することが可能となる。これにより撮像装置1100における全体の処理レートを向上させることができる。
 以上、本発明の第二実施形態について図面を参照して詳述したが、具体的な構成はこの実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。また、上述の実施形態および変形例において示した構成要素は適宜に組み合わせて構成することが可能である。
(第3の実施形態)
 図11は第3の実施形態に係る撮像装置1200の機能ブロック図を示した図である。撮像装置1200の説明において、撮像装置1000又は撮像装置1100と同様の構成については同様の符号を用いて示しており、その説明は省略する場合がある。なお、第3の実施形態に係る撮像装置1200は、例えば、積層型CMOSイメージセンサ等を有する撮像装置等に適用することができる。
 撮像装置1200は、センサ100及び第1機械学習演算部210が、それぞれ独立して内部バスIBと接続されている点において、撮像装置1000及び撮像装置1100とは異なる。第1機械学習演算部210とは、第1機械学習演算部200の変形例である。また、撮像装置1200は、センサI/F300に代えて、センサI/F310及びI/F320を備える点において、撮像装置1000及び撮像装置1100とは異なる。
 センサI/F310は、センサ100が出力する情報(RAW画像データ)を、内部バスIBを介して、所定の記憶部に記憶させる。所定の記憶部とは、例えば、メモリ800であってもよい。
 第1機械学習演算部210は、所定の記憶部、例えばメモリ800に記憶されたRAW画像データを入力とし、この入力に対して所定の機械学習モデルによる演算を実行する。また、第1機械学習演算部210は、センサI/F310を経由でメモリ800などを介さずに直接的にRAW画像データを入力とし、この入力に対して所定の機械学習モデルによる演算を実行するようにしてもよい。第1機械学習演算部210の内部構成は、第1機械学習演算部200と同様であってもよい。
 I/F320は、第1機械学習演算部210による出力を、内部バスIBに出力する。内部バスIBに出力されたデータは、例えば、メモリ800に格納される。I/F320は、第1機械学習演算部210から取得したデータに対して、所定の画像処理を実行するために、ISP400に出力してもよい。なお、I/F320は、データ形式の変換等を行うために一時的にデータを保持するためのバッファを備えていてもよい。なお、I/F320は内部バスIBに接続する構成としているが、高速シリアル通信規格など十分に高速で低遅延の通信方式を用いることが可能であれば、所定の通信I/F経由で内部バスIBと接続する構成であってもよい。
 ここで、本実施形態に係る構成の具体的な実現手段としては、図示するような3つのIC(Integrated Circuit)に分けて実装されていてもよい。集積回路IC1は、センサ100及びセンサI/F310の機能を有する。集積回路IC2は、第1機械学習演算部200及びI/F320の機能を有する。集積回路IC3は、ISP400、入出力部500、表示部600、CPU700、メモリ800、及び第2機械学習演算部900の機能を有する。集積回路IC1、集積回路IC2及び集積回路IC3は、互いに内部バスIBを介してデータ通信可能なよう電気的に接続されていてもよい。
(第4の実施形態)
 図12は第4の実施形態に係る撮像装置1300の機能ブロック図を示した図である。撮像装置1300の説明において、撮像装置1000と同様の構成については同様の符号を用いて示しており、その説明は省略する場合がある。撮像装置1300は、センサ110、第3機械学習演算部210、センサI/F320及びセンサ制御部330を備える点において、撮像装置1000とは異なる。なお、第4の実施形態に係る撮像装置1300は、例えば、車両を制御する制御装置等に適用することができる。車両を制御する制御装置等においては、内部バスIBの占有時間を可能な限り短くしたいという要望がある。
 センサ110はセンサ100と同様に画像を撮像するセンサであるが、センサ100とは異なるセンサである。すなわち、撮像装置1300は、複数のセンサを有する。撮像装置1300が車両を制御する制御装置に適用される場合、センサ100は車両の前方を撮像するセンサであり、センサ110は車両の後方を撮像するセンサであってもよいし、センサ100が撮像する画角と一部が重なりあってもよい。なお、撮像装置1300は、その他、図示しない複数のセンサを有していてもよい。センサ110の出力データは、内部バスIBに出力されることなく、第3機械学習演算部220に出力される。
 第3機械学習演算部220は、センサ110が出力する情報(RAW画像データ)を入力とし、所定の機械学習モデルによる演算を実行する。第3機械学習演算部220は、例えば第2機械学習演算部900と同様の構成を有していてもよく、特徴量などに基づく物体検出、姿勢検知、物体認識、物体追跡や、画像中のブレの低減や光学的な収差の低減処理等を行うものであってもよい。
 センサI/F320は、第3機械学習演算部220の出力結果を、センサ制御部330に出力する。センサ制御部330は、第3機械学習演算部220により演算が行われた結果を、内部バスIBに出力する。ここで、第3機械学習演算部220により演算が行われた結果とは、例えば第3機械学習演算部220が物体検知を行う場合、クラス及び尤度等の情報であってもよい。すなわち、本実施形態によれば、機械学習を行った結果として得られたクラス及び尤度等の情報のみを出力することになるため、画像データを内部バスIBに出力することがない。したがって、本実施形態によれば、内部バスIBに出力するデータの容量を低減することができ内部バスIBの占有時間を短縮することが可能となる。したがって、本実施形態によれば、複数のセンサを備える場合であっても、内部バスIBが混雑し、遅延が発生することを抑止することができる。
(変形例1)
 例えば、上記実施形態に記載の第1機械学習演算部200及び第2機械学習演算部900において演算対象となるデータは単一の形式に限定されず、静止画像、動画像、音声、文字、数値およびこれらの組み合わせで構成することが可能である。なお、第1機械学習演算部200及び第2機械学習演算部900に入力されるデータは、光センサ、温度計、Global Positioning System(GPS)計測器、角速度計測器、風速計などの物理量測定器における測定結果などと組み合わせてもよい。周辺機器から有線または無線通信経由で受信する基地局情報、車両・船舶等の情報、天候情報、混雑状況に関する情報などの周辺情報や金融情報や個人情報等の異なる情報を組み合わせてもよい。
(変形例2)
 撮像装置1000または撮像装置1100は、バッテリー等で駆動する携帯電話などの通信機器、パーソナルコンピュータなどのスマートデバイス、デジタルカメラ、ゲーム機器、ロボット製品などのモバイル機器を想定するが、これに限られるものではない。Power on Ethernet(PoE)などでの供給可能なピーク電力制限、製品発熱の低減または長時間駆動の要請が高い製品に利用することでも他の先行例にない効果を得ることができる。
例えば、車両や船舶などに搭載される車載カメラや、公共施設や路上などに設けられる監視カメラ等に適用することで長時間の撮影を実現できるだけでなく、軽量化や高耐久化にも寄与する。また、テレビやディスプレイ等の表示デバイス、医療カメラや手術ロボット等の医療機器、製造現場や建築現場で使用される作業ロボットなどにも適用することで同様の効果を奏することができる。
(変形例3)
 第1機械学習演算部200及び第2機械学習演算部900は、その一部または全部を一つ以上のプロセッサを用いて実現してもよい。例えば、第1機械学習演算部200及び第2機械学習演算部900は、入力層または出力層の一部または全部をプロセッサによるソフトウェア処理により実現してもよい。ソフトウェア処理により実現する入力層または出力層の一部は、例えば、データの正規化や変換である。これにより、様々な形式の入力形式または出力形式に対応できる。なお、プロセッサで実行するソフトウェアは、通信手段や外部メディアを用いて書き換え可能に構成してもよい。
(変形例4)
 第2機械学習演算部900における処理の一部をクラウド上のGraphics Processing Unit(GPU)等を組み合わせることで実現してもよい。第2機械学習演算部900は、撮像装置1000または撮像装置1100で行った処理に加えて、クラウド上でさらに処理を行ったり、クラウド上での処理に加えて処理を行ったりすることで、より複雑な処理を少ないリソースで実現できる。
(変形例5)
 第1機械学習演算部200と第2機械学習演算部900とでは、量子化演算を含むか否かにおいて差分があるため、それぞれで動作する機械学習モデルについて学習方法を異ならせるようにしてもよい。一例として、第1機械学習演算部200において動作する機械学習モデルは量子化演算を含むネットワークを生成した後に量子化演算を含んだ形で学習する学習ステップを含む方法(以下、QAT方式という。)を採用することが好適である。このようにQAT方式で学習することにより、量子化による演算精度の低下を低減することが可能となる。一方で、QAT方式は学習方法や学習パラメータの設計などが必要になるため、汎用性が低下する場合がある。そのため、第2機械学習演算部900において動作する機械学習モデルにおいてはQAT方式を用いずに学習することが好ましい。このように第1機械学習演算部200および第2機械学習演算部900のいずれかで用いるかどうかで機械学習モデルの学習方法を決定することが好ましい。
 また、本明細書に記載された効果は、あくまで説明的または例示的なものであって限定的ではない。つまり、本開示に係る技術は、上記の効果とともに、または上記の効果に代えて、本明細書の記載から当業者には明らかな他の効果を奏しうる。
100 イメージセンサ
200 第1機械学習演算部
300 センサI/F
400 ISP
500 入出力部
600 表示部
700 CPU
800 メモリ
900 第2機械学習演算部
1000 第1の実施形態に係る撮像装置
1100 第2の実施形態に係る撮像装置

Claims (16)

  1.  被写体像を電気信号に変換するための複数の画素を備えるイメージセンサを備える撮像装置であって、
     複数の演算層を含む第1の機械学習モデルを用いて前記複数の画素から得られる信号を処理するための第1の機械学習演算手段と、
     前記第1の機械学習演算手段によって処理を実行するか否かを決定する決定手段と、
     前記第1の機械学習モデルと異なる第2の機械学習モデルを用いて前記信号または前記第1の機械学習演算手段による処理結果に基づいて処理するための第2の機械学習演算手段とを備え、
     前記第1の機械学習モデルは少なくとも畳み込み演算を行う畳み込み演算層の演算結果に対して量子化演算を行う量子化演算層を含むことを特徴とする撮像装置。
  2.  前記第2の機械学習モデルは前記第1の機械学習モデルとは異なるネットワーク構造を備え、少なくとも畳み込み演算を行う畳み込み演算層と畳み込み演算結果に対してプーリング演算を行うプーリング層とを含むことを特徴とする請求項1に記載の撮像装置。
  3.  前記イメージセンサを制御するための同期信号を生成するための制御手段をさらに備え、
     前記第1の機械学習演算手段における処理は前期同期信号に同期して行われることを特徴とする請求項1に記載の撮像装置。
  4.  前記第1の機械学習モデルに含まれる量子化演算層は畳み込み演算層の演算結果を8bit以下の値に量子化することを特徴とする請求項1に記載の撮像装置。
  5.  前記イメージセンサは前記複数の画素におけるアナログ信号をデジタル信号に変換する変換手段をさらに備え、
     前記第1の機械学習モデルに含まれる量子化演算層は畳み込み演算層の演算結果を前記変換手段による分解能以下の値に量子化することを特徴とする請求項1に記載の撮像装置。
  6.  前記第1の機械学習演算手段によって処理された信号に対して所定の画像処理を行う画像処理手段を更に備え、
     前記画像処理手段において行う所定の画像処理には少なくともデモザイク処理及び符号化圧縮処理を含むことを特徴とする請求項1に記載の撮像装置。
  7.  前記第1の機械学習モデルは前記複数の画素の信号に含まれるノイズを低減するための推論演算を行い、
     前記第2の機械学習モデルは前記画像処理手段の結果である画像データにおいて所定の検出対象を検出する処理を行うことを特徴とする請求項6に記載の撮像装置。
  8.  前記画像処理手段の結果である画像データを表示するための表示手段をさらに備え、
     前記表示手段は前記表示手段に表示する画像データに対応する前記第2の機械学習モデルにおける検出対象の検出結果を表示することを特徴とする請求項7に記載の撮像装置。
  9.  前記画像処理手段の結果である画像データを保持するための保持手段を更に備え、
     前記第1の機械学習演算手段は前記イメージセンサが出力する所定の単位で前記複数の画素の信号に対する推論演算を行い、
     前記第2の機械学習演算手段は前記保持手段に保持された画像データの単位で所定の検出対象を検出する処理を行うことを特徴とする請求項6に記載の撮像装置。
  10.  前記所定の単位には8bit以上の画素値が1500以上含まれ、
     前記第1の機械学習演算手段及び前記画像処理手段は前記単位に基づいてパイプライン的に順次処理を行うことを特徴とする請求項9に記載の撮像装置。
  11.  前記第1の機械学習演算手段は前記イメージセンサが出力する所定の単位で前記複数の画素の信号を一時的に保持するバッファ手段をさらに備え、
     前記第1の機械学習演算手段が前記バッファ手段に一時的に保持された前記複数の画素の信号に対して第1の機械学習モデルを用いた処理を行うために読み出すデータレートは、前記バッファ手段に入力する際の前記複数の画素の信号のデータレートより遅いことを特徴とする請求項9または10に記載の撮像装置。
  12.  前記第1の機械学習演算手段は複数の機械学習モデルを切り替えるための切り替え手段をさらに備え、
     前記第1の機械学習演算手段は前記イメージセンサにおける露出条件に基づいて機械学習モデルを切り替えることを特徴とする請求項1に記載の撮像装置。
  13.  前記第2の機械学習演算手段は複数の機械学習モデルを切り替えるための切り替え手段をさらに備え、
     前記第2の機械学習演算手段において切り替える複数の機械学習モデルは人体の少なくとも一部を検出する機械学習モデルを含むことを特徴とする請求項12に記載の撮像装置。
  14.  前記第1の機械学習演算手段における前記第1の機械学習モデルは、前記第2の機械学習モデルとは異なる学習方法を用いて外部装置において事前に学習された学習済みの機械学習モデルであって、
     前記学習方法には前記第1の機械学習モデルに量子化演算を含んだ形で行う学習ステップが含まれていることを特徴とする請求項1に記載の撮像装置。
  15.  画像を取得するセンサと、
     前記センサにより取得された前記画像に基づく所定の検出処理を行う第三の機械学習演算手段とを更に備え、
     前記第三の機械学習演算手段は、検出結果を出力する、
     請求項1に記載の撮像装置。
  16.  被写体像を電気信号に変換するための複数の画素を備えるイメージセンサを備える撮像装置の制御方法であって、
     複数の演算層を含む第1の機械学習モデルを用いて前記複数の画素の信号を処理するための第1の機械学習演算ステップと、
     前記第1の機械学習演算ステップによって処理を実行するか否かを決定する決定ステップと、
     前記第1の機械学習モデルと異なる第2の機械学習モデルを用いて前記信号または前記第1の機械学習演算ステップによる処理結果に基づいて処理するための第2の機械学習演算ステップとを備え、
     前記第1の機械学習モデルは少なくとも畳み込み演算を行う畳み込み演算層の演算結果に対して量子化演算を行う量子化演算ステップを含むことを特徴とする撮像装置の制御方法。
PCT/JP2023/036403 2022-10-31 2023-10-05 撮像装置および撮像装置の制御方法 WO2024095692A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022174141A JP7387104B1 (ja) 2022-10-31 2022-10-31 撮像装置および撮像装置の制御方法
JP2022-174141 2022-10-31

Publications (1)

Publication Number Publication Date
WO2024095692A1 true WO2024095692A1 (ja) 2024-05-10

Family

ID=88917957

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/036403 WO2024095692A1 (ja) 2022-10-31 2023-10-05 撮像装置および撮像装置の制御方法

Country Status (2)

Country Link
JP (1) JP7387104B1 (ja)
WO (1) WO2024095692A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170278546A1 (en) * 2016-03-25 2017-09-28 Samsung Electronics Co., Ltd. Method and device for processing multimedia information
JP2019129169A (ja) * 2018-01-22 2019-08-01 株式会社日立ハイテクノロジーズ 画像評価方法及び画像評価装置
CN112532892A (zh) * 2019-09-19 2021-03-19 华为技术有限公司 图像处理方法及电子装置
CN113206929A (zh) * 2020-01-30 2021-08-03 三星电子株式会社 图像数据处理方法和传感器装置
JP2022501982A (ja) * 2018-09-13 2022-01-06 スペクトル オプティックス インコーポレイテッド ニューラルネットワークを使用した写真の露出不足補正

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170278546A1 (en) * 2016-03-25 2017-09-28 Samsung Electronics Co., Ltd. Method and device for processing multimedia information
JP2019129169A (ja) * 2018-01-22 2019-08-01 株式会社日立ハイテクノロジーズ 画像評価方法及び画像評価装置
JP2022501982A (ja) * 2018-09-13 2022-01-06 スペクトル オプティックス インコーポレイテッド ニューラルネットワークを使用した写真の露出不足補正
CN112532892A (zh) * 2019-09-19 2021-03-19 华为技术有限公司 图像处理方法及电子装置
CN113206929A (zh) * 2020-01-30 2021-08-03 三星电子株式会社 图像数据处理方法和传感器装置

Also Published As

Publication number Publication date
JP7387104B1 (ja) 2023-11-28
JP2024065329A (ja) 2024-05-15

Similar Documents

Publication Publication Date Title
TWI656799B (zh) 用於影像中低功率物件偵測之硬體內掃描窗口
US20160379075A1 (en) Image recognition device and image recognition method
KR100997619B1 (ko) 소형 또는 대형 화상의 처리를 위한 소형 라인 버퍼의 사용을 용이하게 하는 기술
US20190287024A1 (en) Low latency image processing using byproduct decompressed images
CN113132612B (zh) 一种图像稳像处理方法、终端拍摄方法、介质及系统
US20060274177A1 (en) Image processing apparatus
JPWO2018003124A1 (ja) 撮像装置、撮像方法及び撮像プログラム
US20170243326A1 (en) Pixel decimation for an imaging system
US20140161357A1 (en) Image processing apparatus with function of geometrically deforming image, image processing method therefor, and storage medium
JP2017188760A (ja) 画像処理装置、画像処理方法、コンピュータプログラム及び電子機器
JP2015053644A (ja) 撮像装置
JP2008028500A (ja) 画像処理装置、方法、およびプログラム
JP2003189186A (ja) 撮像装置
KR20170034299A (ko) 자세 추정 장치, 자세 추정 방법 및 기록 매체에 저장된 컴퓨터 프로그램
WO2024095692A1 (ja) 撮像装置および撮像装置の制御方法
KR20220030877A (ko) 다양한 인트라-프레임 아날로그 비닝을 사용하는 이미지 센서
US11302035B2 (en) Processing images using hybrid infinite impulse response (TTR) and finite impulse response (FIR) convolution block
US20230105329A1 (en) Image signal processor and image sensor including the image signal processor
KR20190064882A (ko) 딥러닝 기반 차량용 영상 처리 방법
JP4547321B2 (ja) 動きベクトル検出装置及び撮像装置
US11270412B2 (en) Image signal processor, method, and system for environmental mapping
JP2001145012A (ja) 画像歪補正装置
CN115734091A (zh) 图像传感器、图像处理方法、终端及计算机存储介质
JP4556803B2 (ja) 画像処理装置及びプログラム
CN216649832U (zh) 图像传感器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23885455

Country of ref document: EP

Kind code of ref document: A1