Deconvolution by convolutions
Disclosed herein are apparatus, method, and computer-readable storage device embodiments for implementing deconvolution via a set of convolutions. For example, an apparatus includes a memory and at least one processor, communicatively coupled with the memory, to perform operations including obtaining a tensor representing image data, generating a deconvolution segment of a plurality of deconvolution segments by performing a convolution to transform the tensor based at least in part on a convolution filter and a stride value, and generating a complete deconvolution for image processing by assembling each deconvolution segment of the plurality of deconvolution segments.
1 . An apparatus comprising:
a memory; and
at least one processor, communicatively coupled with the memory, to perform operations comprising:
obtaining a representation of image data;
identifying a set of deconvolution parameters of a complete deconvolution having a set of deconvolution parameters comprising a deconvolution stride value and a deconvolution kernel size of a deconvolution kernel;
dividing the complete deconvolution into a plurality of convolutions, each convolution of the plurality of convolutions having a set of convolution parameters comprising:
a respective convolution kernel size determined based on the deconvolution kernel size, the deconvolution stride value and a respective convolution index value of the convolution; and
a respective convolution kernel coefficient determined based on the deconvolution kernel;
for each convolution of the plurality of convolutions, performing the convolution to transform the representation of image data and generate a convolution output of a plurality of convolution outputs, wherein each convolution output of the plurality of convolution outputs corresponds to a respective position determined based on the deconvolution stride value and the respective convolution index value;
generating the complete deconvolution by interleaving each convolution output of the plurality of convolution outputs; and
causing at least one of an image processing operation or a computer vision operation to be performed using the complete deconvolution.
2 . The apparatus of claim 1 , wherein causing at least one of the image processing operation or a computer vision operation to be performed using the complete deconvolution comprises outputting the complete deconvolution via at least one of: an output file or an output device.
3 . The apparatus of claim 1 , wherein the representation of image data comprises a tensor, and wherein performing the convolution further comprises expanding the tensor by at least one layer of padding elements.
4 . The apparatus of claim 3 , wherein the operations further comprise truncating each convolution of the plurality of convolutions by a truncation value corresponding to the at least one layer of padding elements.
5 . The apparatus of claim 1 , wherein the representation of image data is an output of a separate convolution.
6 . The apparatus of claim 1 , wherein each convolution is performed using a respective convolution filter that comprises a respective subset of a deconvolution filter.
7 . A method comprising:
obtaining, by at least one processing device, a representation of image data;
identifying, by at least one processing device, a set of deconvolution parameters of a complete deconvolution having a set of deconvolution parameters comprising a deconvolution stride value and a deconvolution kernel size;
dividing, by the at least one processing device, the complete deconvolution into a plurality of convolutions, each convolution of the plurality of convolutions having a set of convolution parameters comprising:
a respective convolution kernel size determined based on the deconvolution kernel size, the deconvolution stride value and a respective convolution index value of the convolution; and
a respective convolution kernel coefficient determined from a deconvolution kernel;
for each convolution of the plurality of convolutions, performing the convolution of a plurality of convolutions to transform the representation of image data based at least in part on a kernel size of the complete deconvolution and a stride value of the complete deconvolution, wherein each convolution of the plurality of convolutions corresponds to a respective deconvolution segment of the plurality of deconvolution segments, and wherein the stride value of the complete deconvolution is equal to a number of convolutions of the plurality of convolutions and generate a convolution output of a plurality of convolution outputs, wherein each convolution output of the plurality of convolution outputs corresponds to a respective position determined based on the deconvolution stride value and the respective convolution index value;
generating, by the at least one processing device, the complete deconvolution by interleaving each convolution output of the plurality of convolution outputs; and
causing, by the at least one processing device, at least one of an image processing operation or a computer vision operation to be performed using the complete deconvolution.
8 . The method of claim 7 , wherein causing at least one of the image processing operation or a computer vision operation to be performed using the complete deconvolution comprises outputting, by the at least one processing device, the complete deconvolution via at least one of: an output file or an output device.
9 . The method of claim 7 , wherein the representation of image data comprises a tensor, and wherein performing the convolution further comprises expanding the tensor by at least one layer of padding elements.
10 . The method of claim 9 , further comprising truncating, by the at least one processing device, each convolution of the plurality of convolutions by a truncation value corresponding to the at least one layer of padding elements.
11 . The method of claim 7 , wherein the representation of image data is an output of a separate convolution.
12 . The method of claim 7 , wherein each convolution is performed using a respective convolution filter that comprises a respective subset of a deconvolution filter.
13 . A non-transitory computer-readable medium having instructions stored thereon, wherein the instructions, when executed by at least one computer processor, cause the at least one computer processor to perform operations comprising:
obtaining a representation of image data;
identifying a set of deconvolution parameters of a complete deconvolution having a set of deconvolution parameters comprising a deconvolution stride value and a deconvolution kernel size;
dividing the complete deconvolution into a plurality of convolutions, each convolution of the plurality of convolutions having a set of convolution parameters comprising:
a respective convolution kernel size determined based on the deconvolution kernel size, the deconvolution stride value and a respective convolution index value of the convolution; and
a respective convolution kernel coefficient determined from a deconvolution kernel;
for each convolution of the plurality of convolutions, performing the convolution to transform the representation of image data and generate a convolution output of a plurality of convolution outputs, wherein each convolution output of the plurality of convolution outputs corresponds to a respective position determined based on the deconvolution stride value and the respective convolution index value;
generating the complete deconvolution by interleaving each convolution output of the plurality of convolution outputs; and
causing at least one of an image processing operation or a computer vision operation to be performed using the complete deconvolution.
14 . The non-transitory computer-readable medium of claim 13 , wherein causing at least one of image processing operation or a computer vision operation to be performed using the complete deconvolution comprises outputting the complete deconvolution via at least one of: an output file or an output device.
15 . The non-transitory computer-readable medium of claim 13 , wherein the representation of image data comprises a tensor, wherein performing the convolution further comprises expanding the tensor by at least one layer of padding elements, and wherein the operations further comprise truncating each convolution of the plurality of convolutions by a truncation value corresponding to the at least one layer of padding elements.
16 . The non-transitory computer-readable medium of claim 13 , wherein the representation of image data is an output of a separate convolution.
17 . The non-transitory computer-readable medium of claim 13 , wherein each convolution is performed using a respective convolution filter that comprises a respective subset of a deconvolution filter, and wherein the stride value further defines a number of convolution results of a set of convolution results generated by performing the convolution.
18 . The apparatus of claim 1 , wherein the set of convolution parameters further comprises a convolution stride value of 1.
19 . The method of claim 7 , wherein the set of convolution parameters further comprises a convolution stride value of 1.
20 . The non-transitory computer-readable medium of claim 13 , wherein the set of convolution parameters further comprises a convolution stride value of 1.