Imaging device and electronic device
An imaging device with reduced power consumption is provided. The imaging device includes an imaging portion and an encoder. First image data obtained by the imaging portion is transmitted to the encoder. The encoder includes a first circuit that forms a neural network, and the first circuit conducts feature extraction by the neural network on a first image to generate second image data. Note that since the first circuit has a function of performing convolution processing using a weight filter, the encoder can perform computation with a convolutional neural network.
1. An electronic device comprising:
an imaging device; and
a peripheral circuit, wherein the imaging device comprises:
an imaging portion comprising pixels arranged in n rows and m columns, wherein n and m are each an integer greater than or equal to 1;
a circuit including a shift register, the shift register comprising a plurality of retention circuits, an input terminal, and a plurality of output terminals; and
an encoder comprising a memory cell array and a first circuit that forms a first neural network,
wherein the peripheral circuit comprises:
a decoder comprising a second circuit that forms a second neural network; and
an image processing circuit,
wherein the imaging portion is configured to generate first image data by imaging and input the first image data to the input terminal of the shift register pixel by pixel,
wherein the output terminals of the shift register are electrically connected to the memory cell array,
wherein the first circuit comprises a plurality of first programmable logic elements and a plurality of first programmable switches,
wherein the first circuit is configured to conduct feature extraction on the first image data to generate second image data by sequentially switching connection state between the plurality of first programmable logic elements and the plurality of first programmable switches,
wherein the second circuit is electrically connected to the first circuit and configured to conduct decompression processing on the second image data to generate third image data,
wherein the image processing circuit is electrically connected to the second circuit,
wherein a number of wirings electrically connecting the first circuit and the second circuit is smaller than a number of wirings electrically connecting the second circuit and the image processing circuit,
wherein the first neural network is configured to perform convolution processing using a weight filter and the first image data, and
wherein the memory cell array is configured to store a filter value of the weight filter.
2. The electronic device according to claim 1 ,
wherein the shift register is configured to output the first image data to the memory cell array sequentially for every pixel region of the imaging portion,
wherein the pixel region comprises pixels arranged in t rows and s columns, and
wherein tis an integer greater than or equal to 1 and less than or equal to n, and s is an integer greater than or equal to 1 and less than or equal to m.
3. The electronic device according to claim 1 ,
wherein the memory cell array comprises a first transistor, and
wherein the first transistor comprises a metal oxide in a channel formation region.
4. The electronic device according to claim 1 , further comprising a display device electrically connected to the image processing circuit.
5. The electronic device according to claim 1 , wherein the image processing circuit is configured to perform at least one of dimming processing and toning processing on the third image data.
6. An electronic device comprising:
an imaging device; and
a peripheral circuit,
wherein the imaging device comprises:
an imaging portion comprising pixels arranged in n rows and m columns, wherein n and m are each an integer greater than or equal to 1;
a circuit including a shift register, the shift register comprising a plurality of retention circuits; and
an encoder comprising a memory cell array and a first circuit that forms a first neural network,
wherein the peripheral circuit comprises:
a decoder comprising a second circuit that forms a second neural network; and
an image processing circuit,
wherein the imaging portion is configured to generate first image data by imaging and input the first image data to the shift register pixel by pixel,
wherein a plurality of output terminals of the shift register are electrically connected to the memory cell array,
wherein the first circuit is configured to conduct feature extraction on the first image data to generate second image data,
wherein the second circuit is electrically connected to the first circuit and configured to conduct decompression processing on the second image data to generate third image data,
wherein the image processing circuit is electrically connected to the second circuit,
wherein a number of wirings electrically connecting the first circuit and the second circuit is smaller than a number of wirings electrically connecting the second circuit and the image processing circuit,
wherein the first neural network is configured to perform convolution processing using a weight filter and the first image data, and
wherein the memory cell array is configured to store a filter value of the weight filter.
7. The electronic device according to claim 6 ,
wherein the shift register is configured to output the first image data to the memory cell array sequentially for every pixel region of the imaging portion,
wherein the pixel region comprises pixels arranged in t rows and s columns, and
wherein t is an integer greater than or equal to 1 and less than or equal to n, and s is an integer greater than or equal to 1 and less than or equal to m.
8. The electronic device according to claim 6 ,
wherein the memory cell array comprises a first transistor, and
wherein the first transistor comprises a metal oxide in a channel formation region.
9. The electronic device according to claim 6 , further comprising a display device electrically connected to the peripheral circuit.