I am building a model which generates new image from an imput image. I have a training set of input images and desired generated images and I also have some categorical data for each pixel of an image which I want to use as aditional features for the model. Currently I am jusut converting categorical features to have a float value on the interval between 0 - 1 for each category in even spaced intervals:
- Feature 1: 1/n
- Feature 2: 2/n
- Feature 3: 3/n …
- Feature n: n/n
Where n is the number of features. I then add this categorical feature matrix as a separate channel to the input image. I am wondering what are other aproaches for incorporating categorical data to CNN based models? How does one hot encoding work with CNNs? I have doubts because then I would essentiially create n sparse input channels and I have no experience with CNNs and sparse data.
I have asked same quyestion on CrossValidated cross validated link