Skip to content

Instantly share code, notes, and snippets.

View saketkunwar's full-sized avatar

saket kunwar saketkunwar

  • kathmandu,nepal
View GitHub Profile
@saketkunwar
saketkunwar / spk.js
Last active February 23, 2023 15:52
Google Earth Engine Speckle Noise Reduction
var sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD');
var poly = ee.Geometry.Polygon(
[[[-95.83648681640625, 29.561512529746743],
[-95.042724609375, 29.57345707301757],
[-95.02899169921875, 30.099989515377835],
[-95.82275390625, 30.10711788709236]]]);
var spatialFiltered = sentinel1.filter(ee.Filter.eq('instrumentMode', 'IW')).filterBounds(poly)
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
.select('VV');
var image = spatialFiltered.filterDate('2017-08-25', '2017-09-05').mosaic().clip(poly);
# Augmentation routine, for both response and predictor
def myaug(X_train_org,y_train_org):
x=[]
y=[]
halves=64
for i in range(0,len(X_train_org)):
r=random.randint(0,4)
posneg=random.randint(0,1)
if posneg==1:
rpx=random.randint(5,20)