1D Image Recongnition

(John) #1

I’m trying to classify spectra for medical purposes using the Fast ai library. I thought originally about storing them as tabular data, but that limits you to a TabularModel style model. The data is structured so as to look like an image, continuous floating point values which a CNN would work well with due to the specific features in the data (e.g stretching the peak would give the same classification)
Here’s an example
untitled
Where x is the index and y is the value at that index.

Creating a 1D CNN using the Tabular type is my plan, but I can’t find solid documentation on how to do this / any pre-trained models.

Any help or pointers would be appreciated

3 Likes

(Claus Trost) #2

Hi John,

First question what is this data all about? What are the important features you would use to classify it?

If you wanna have an Introduction to the tabular learner have a look here: https://confusedcoders.com/data-science/deep-learning/how-to-apply-deep-learning-on-tabular-data-with-fastai

From my point of view you should calulate the full width at half max (FWHM), the intensity of the peak (max y value) and the point of the peak in x direction and use them as continuous variables in your tabular learner, this should work pretty fine. Maybe try to exclude the noise of your data beforehand.
If you have any categorical features (male, female, crystall structure etc.) that you know of use them too as input. (you can see how to do that in the provided example)

If you need more help you can also write me any time I’m happy to contribute.

If you were able to do it please tell me if it worked, I work with similar spectras in an other field of science and would be happy if we could work together.

Best regards,

Claus

1 Like