keras icon indicating copy to clipboard operation
keras copied to clipboard

Conv1D on custom shaped data

Open Wasim04 opened this issue 1 year ago • 3 comments

Hi,

Just wondering if there is a way to use Conv1D in a heapix data. That is, it can handle, resolution(nside) and pixel orientation (nested or ring).

Many Thanks Wasim

Wasim04 avatar Jun 21 '24 16:06 Wasim04

Hi @Wasim04 -

Healpix stands for Hierarchical Equal Area isoLatitude Pixelization of a sphere where partitioning sphere at higher resolutions. So this partition of sphere surface has different size pixels and which is represented as 2D array. So it is better to use Conv1D and Conv2D both are not suitable for healpix image data. Conv1D can create convolution on single dimension data while Conv2D can create convolution on two dimensional data.

JAX library is better option to implement spherical CNNs.

Definitely we can do experiment with Conv1D with healpix data(by projecting MNIST dataset onto HEALPix), but it will not generate good result for large spherical data.

Let me know if you required more details. Thanks..!!

mehtamansi29 avatar Jun 25 '24 01:06 mehtamansi29

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Jul 10 '24 01:07 github-actions[bot]

@mehtamansi29 Thanks for your suggestion. Healpix by design is a 1D array of pixels. Each pixel can carry some value to provide a global localised representation of some data (atmospheric or astrophysical etc) since we can use Theta and Phi as pixel coordinates. The problem arises when these pixels are oriented in a particular way. That is, nested or ring, that I was wondering in my first query. Because a Conv1D will construct a kernel which will be 1D array likey in squared pixel shape and the stride will guide the kernel movement.

I am looking for some suggestions if there is a way to address this pixel orientation in the kernel of a traditional Keras Conv1D. Essentially a kernel that follows a nested or ring scheme. Thanks for the jax suggestion, I shall look into it.

Many Thanks Wasim

Wasim04 avatar Jul 10 '24 08:07 Wasim04

Hi @Wasim04 -

Keras doesn't have direct parameter to address pixel orientation in the kernel, but you can use kernel_initializer to specify weights of kernel should be verified(conv1D).

mehtamansi29 avatar Sep 04 '24 17:09 mehtamansi29

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Sep 19 '24 02:09 github-actions[bot]

This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.

github-actions[bot] avatar Oct 03 '24 02:10 github-actions[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Oct 03 '24 02:10 google-ml-butler[bot]