Skip to content

Encode "real world" positions of the input data #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JackKelly opened this issue Sep 6, 2021 · 4 comments
Closed

Encode "real world" positions of the input data #9

JackKelly opened this issue Sep 6, 2021 · 4 comments

Comments

@JackKelly
Copy link
Member

As well as (or instead of) Fourier-encoding the pixel position relative to the edge of the image (e.g. 'top left in the image'), it might be interesting to encode:

  • The absolute geospatial position (i.e. the lat, lon) (maybe give the geospatial pos for every pixel?!?)
  • Datetime features:
    • time-of-day
    • day-of-year
  • Angle & azimuth of the sun (maybe this is only relevant for PV data?)

Should these encodings be computed on-the-fly during ML training? Or should the encodings be 'burnt into' the batches on disk produced by nowcasting_dataset? I'd perhaps lean towards the former but keen to hear opinions!

@jacobbieker
Copy link
Member

If the NetCDF data written by nowcasting_dataset includes the geospatial coordinates I'd say compute them on the fly. For satflow I computed them once and saved them alongside the other data, but that's only because I was just using Numpy arrays, so didn't have a simple way to recalculate them on the fly.

@JackKelly
Copy link
Member Author

Yeah, that sounds like a plan: nowcasting_dataset includes the geospatial (and temporal) coordinates on-disk, and then the ML model can compute the embeddings on the fly.

@JackKelly
Copy link
Member Author

JackKelly commented Sep 7, 2021

Maybe converting "real world" positions to position encodings suitable for Perceiver could be done in the proposed thin data loading layer in nowcasting_dataloader: openclimatefix/nowcasting_dataset#97

@JackKelly
Copy link
Member Author

This is implemented by @jacobbieker's absolute position encoding in nowcasting_dataloader: openclimatefix/nowcasting_dataloader#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants