David B
David B

Reputation: 61

Can I input an image into a CNN as a pandas dataframe of pixel values?

I'm working with satellite data and I have a DataFrame of pixel values. The satellite image I'm working with is slightly rotated, so I don't have rows and columns with consistent latitude and longitude information (I could back calculate the slope and assign x and y). Can I input this data into a CNN to analyze the structure? I have only seen examples of CNNs where the inputs are arrays of arrays where the structure is retained in a format easily assigned to and x y plane. (I'm new to CNNs)

My data

index       Gamma0_VV   lat         lon         dist        cell
9355347     0.172325    39.378442   -74.398499  0.003194    0.0
9359296     0.101932    39.378459   -74.398385  0.012222    0.0
9359297     0.116957    39.378549   -74.398407  0.017423    0.0
9359298     0.139411    39.378638   -74.398429  0.025786    0.0

What I've seen

[[0, 0, ... 0, 0,],
 [0, 0, ... 0, 0,],
 [0, 0, ... 0, 0,]]

Upvotes: 1

Views: 383

Answers (1)

M. Liver
M. Liver

Reputation: 121

The sense of CNN is input data to network as matrix. You need to transform this data to matrix and then run CNN network.

You can't use DataFrame as input to CNN

Upvotes: 1

Related Questions