GithubHelp home page GithubHelp logo

ee-dynamic-time-warping's People

Contributors

magosilvain avatar wouellette avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ee-dynamic-time-warping's Issues

Memory Limits exceeded

Hey,

I'm trying to implement this library for dtw and am encountering memory issues within GEE.
Are there any hard limits in terms of the amount of images in the time-series, or number of sample points, number of labels, or overall region size that you are aware of?

Just as a test I'm trying to export dtw_class and the task does run for a long while

Everything before this step is fine, however the output from this function can't be printed or exported.
`var dtw_min_dist = function(key, val){
key = ee.Number.parse(key);
// Function to format the signatures to a DTW-ready EE array
var training_data_list = DTW.prepareSignatures(reference_signatures,
CLASS_NAME,
key,
BAND_NO,
PATTERNS_LEN,
band_names);

// Compute the class-wise DTW distance
return ee.ImageCollection(DTW.DTWDist(training_data_list,
s2_input_asset.select("d_0_NDVI"),
{patterns_no: val,
band_no: BAND_NO,
timeseries_len: TIMESERIES_LEN,
patterns_len: PATTERNS_LEN,
constraint_type: 'time-weighted',
distance_type: 'angular',
beta: BETA,
alpha: ALPHA
})
).min()
.rename('dtw')
// Add class band corresponding to the land cover/crop class computed.
// This is useful/necessary to generate the hard classification map from the dissimilarity values
.addBands(ee.Image(key).toByte().rename('band'));
};`

For the variables:
// Input data parameters var CLASS_NAME = 'labelno'; var AGG_INTERVAL = 5; var TIMESERIES_LEN = 37; var PATTERNS_LEN = 37; var CLASS_NO = 6; var S2_BAND_LIST = ["d_0_NDVI"]; var BAND_NO = S2_BAND_LIST.length; var DOY_BAND = 'doy';
Where the number of number of signatures is 331
AOI size is ~3700 km2

Layer error: Array.reshape: Shape incompatible with array's existing dimensions.

Dear William Ouellette,

I am trying to adapt the code for my dataset and I am getting the following error:

DTW classification: Layer error: Array.reshape: Shape incompatible with array's existing dimensions: [-1, 8, 6] vs. [268, 40].

DTW dissimilarity score: Layer error: Array.reshape: Shape incompatible with array's existing dimensions: [-1, 8, 6] vs. [268, 40].

I am a beginner in google earth engine, could you help me find where I am going wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.