1
$\begingroup$

After transforming timeseries into an image format, I get a width-height ratio of ~135. Typical image CNN applications involve either square or reasonably-rectangular proportions - whereas mine look nearly like lines:

Example dimensions: (16000, 120, 16) = (width, height, channels).

Are 2D CNNs expected to work well with such aspect ratios? What hyperparameters are appropriate - namely, in Keras/TF terms, strides, kernel_size (is 'unequal' preferred, e.g. strides=(16, 1))? Relevant publications would help.


Clarification: width == timesteps. The images are obtained via a transform of the timeseries, e.g. Short-time Fourier Transform. channels are the original channels. height is the result of the transform, e.g. frequency information. The task is binary classification of EEG data (w/ sigmoid output).

Relevant thread

$\endgroup$
7
  • $\begingroup$ Are the spatial correlations in the vertical (height) dimension relevant? I.e. does the vertical distance have physical meaning? $\endgroup$
    – MPA
    Commented Apr 6, 2020 at 11:51
  • $\begingroup$ @MPA Question updated $\endgroup$ Commented Apr 6, 2020 at 11:58
  • $\begingroup$ What is the type of the desired output? A class label (e.g. for detection), a time series (e.g. for filtering), etc.? $\endgroup$
    – MPA
    Commented Apr 6, 2020 at 12:07
  • $\begingroup$ @MPA Binary classification, updated again $\endgroup$ Commented Apr 6, 2020 at 12:09
  • $\begingroup$ Depending on the physical nature of the input data, you could first perform 1D convolutions with dimensionality reduction along the time axis to extract the most relevant features for each frequency band, and then combine the features of each frequency band into a class prediction. Or if the data are sufficiently smooth, you could try an auto-encoder to compress the time axis into a smaller latent space representation, and perform additional analysis on the latent space. $\endgroup$
    – MPA
    Commented Apr 6, 2020 at 14:00

1 Answer 1

0
$\begingroup$

I had recently used a slightly unorthodox method to process such images, which involved using RNNs.

Assume the image dimensions to be (16000, 120, 16) = (width, height, channels), as in the question.

Apply a 2D convolution (or multiple such convolutions) of shape(1, k, c), such that the output of the convolutions becomes (16000, 1, c). So if you only use a single convolutional layer, k=120.

Then, squeeze the extra dimension, to get the shape (16000, c).

The problem has now been transformed back into a sequence problem! You can use RNN variants for further processing.

$\endgroup$
1
  • $\begingroup$ This defeats the purpose of the transform; see updated question. $\endgroup$ Commented Apr 6, 2020 at 11:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .