Skip to content

Commit

Permalink
Merge pull request #1136 from e-sensing/dev
Browse files Browse the repository at this point in the history
Pre-realease 1.5.0-1
  • Loading branch information
gilbertocamara committed May 22, 2024
2 parents e3205de + 69e50bf commit 9a5a16b
Show file tree
Hide file tree
Showing 66 changed files with 2,001 additions and 829 deletions.
18 changes: 13 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sits
Type: Package
Version: 1.5.0
Version: 1.5.0-1
Title: Satellite Image Time Series Analysis for Earth Observation Data Cubes
Authors@R: c(person('Rolf', 'Simoes', role = c('aut'), email = '[email protected]'),
person('Gilberto', 'Camara', role = c('aut', 'cre'), email = '[email protected]'),
Expand All @@ -17,7 +17,7 @@ Description: An end-to-end toolkit for land use and land cover classification
applied to satellite image data cubes, as described in Simoes et al (2021) <doi:10.3390/rs13132428>.
Builds regular data cubes from collections in AWS, Microsoft Planetary Computer,
Brazil Data Cube, and Digital Earth Africa using the Spatio-temporal Asset Catalog (STAC)
protocol (<https://stacspec.org/> and the 'gdalcubes' R package
protocol (<https://stacspec.org/>) and the 'gdalcubes' R package
developed by Appel and Pebesma (2019) <doi:10.3390/data4030092>.
Supports visualization methods for images and time series and
smoothing filters for dealing with noisy time series.
Expand All @@ -28,10 +28,12 @@ Description: An end-to-end toolkit for land use and land cover classification
temporal convolutional neural networks proposed by Pelletier et al (2019) <doi:10.3390/rs11050523>,
residual networks by Fawaz et al (2019) <doi:10.1007/s10618-019-00619-1>, and temporal attention encoders
by Garnot and Landrieu (2020) <doi:10.48550/arXiv.2007.00586>.
Supports GPU processing of deep learning models using torch <https://torch.mlverse.org/>.
Performs efficient classification of big Earth observation data cubes and includes
functions for post-classification smoothing based on Bayesian inference, and
methods for uncertainty assessment. Enables best
practices for estimating area and assessing accuracy of land change as
methods for active learning and uncertainty assessment. Supports object-based
time series analysis using package supercells <https://jakubnowosad.com/supercells/>.
Enables best practices for estimating area and assessing accuracy of land change as
recommended by Olofsson et al (2014) <doi:10.1016/j.rse.2014.02.015>.
Minimum recommended requirements: 16 GB RAM and 4 CPU dual-core.
Encoding: UTF-8
Expand All @@ -58,7 +60,7 @@ Imports:
sysfonts,
slider (>= 0.2.0),
stats,
terra (>= 1.7-71),
terra (>= 1.7-65),
tibble (>= 3.1),
tidyr (>= 1.2.0),
torch (>= 0.11.0),
Expand Down Expand Up @@ -130,7 +132,9 @@ Collate:
'api_cube.R'
'api_data.R'
'api_debug.R'
'api_detect_changes.R'
'api_download.R'
'api_dtw.R'
'api_environment.R'
'api_factory.R'
'api_file_info.R'
Expand All @@ -146,6 +150,7 @@ Collate:
'api_mosaic.R'
'api_opensearch.R'
'api_parallel.R'
'api_patterns.R'
'api_period.R'
'api_plot_time_series.R'
'api_plot_raster.R'
Expand Down Expand Up @@ -215,6 +220,9 @@ Collate:
'sits_cube_copy.R'
'sits_clean.R'
'sits_cluster.R'
'sits_detect_change.R'
'sits_detect_change_method.R'
'sits_dtw.R'
'sits_factory.R'
'sits_filters.R'
'sits_geo_dist.R'
Expand Down
3 changes: 1 addition & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ S3method(.tile_ncols,raster_cube)
S3method(.tile_nrows,default)
S3method(.tile_nrows,raster_cube)
S3method(.tile_path,default)
S3method(.tile_path,derived_cube)
S3method(.tile_path,raster_cube)
S3method(.tile_paths,default)
S3method(.tile_paths,raster_cube)
Expand Down Expand Up @@ -274,8 +275,6 @@ S3method(.view_add_overlay_grps,class_cube)
S3method(.view_add_overlay_grps,derived_cube)
S3method(.view_add_overlay_grps,raster_cube)
S3method(.view_add_overlay_grps,vector_cube)
S3method(.view_adjust_palette,default)
S3method(.view_adjust_palette,sar_cube)
S3method(plot,class_cube)
S3method(plot,class_vector_cube)
S3method(plot,geo_distances)
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# SITS Release History

# What's new in SITS version 1.5

### Hotfix version 1.5.0-1
* Add multicores processing support for active learning sampling methods
* Remove tapply from `.reg_cube_split_assets()` for R 4.X compatibility
* Fix `sits_merge()` function that was not merging `SAR` and `OPTICAL` cubes
* Rename n_input_pixels back to input_pixels for compatibility with models trained in old versions of the package
* Fix torch usage in Apple M3 by turning off MPS technology
* Fix date parameter usage in `sits_view()`
* Improve `plot()` performance using raster overviews
* Include support for PLANET Mosaic product

### New features in SITS version 1.5.0
* Support for SENTINEL-1-RTC and SENTINEL-2-L2A in CDSE
* Include support for DEA products SENTINEL-1-RTC, LS5-SR, LS7-SR, LS9-SR, ALOS-PALSAR-MOSAIC, NDVI ANOMALY, DAILY CHIRPS, MONTHLY CHIRPS and DEM-30
Expand Down
4 changes: 4 additions & 0 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ weighted_uncert_probs <- function(data_lst, unc_lst) {
.Call(`_sits_weighted_uncert_probs`, data_lst, unc_lst)
}

dtw_distance <- function(ts1, ts2) {
.Call(`_sits_dtw_distance`, ts1, ts2)
}

C_kernel_median <- function(x, ncols, nrows, band, window_size) {
.Call(`_sits_C_kernel_median`, x, ncols, nrows, band, window_size)
}
Expand Down
6 changes: 3 additions & 3 deletions R/api_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -1364,14 +1364,14 @@
#' @title Does the result have the same number of pixels as the input values?
#' @name .check_processed_values
#' @param values a matrix of processed values
#' @param n_input_pixels number of pixels in input matrix
#' @param input_pixels number of pixels in input matrix
#' @return Called for side effects.
#' @keywords internal
#' @noRd
.check_processed_values <- function(values, n_input_pixels) {
.check_processed_values <- function(values, input_pixels) {
.check_set_caller(".check_processed_values")
.check_that(
!(is.null(nrow(values))) && nrow(values) == n_input_pixels
!(is.null(nrow(values))) && nrow(values) == input_pixels
)
return(invisible(values))
}
Expand Down
4 changes: 2 additions & 2 deletions R/api_classify.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
# Fill with zeros remaining NA pixels
values <- C_fill_na(values, 0)
# Used to check values (below)
n_input_pixels <- nrow(values)
input_pixels <- nrow(values)
# Log here
.debug_log(
event = "start_block_data_classification",
Expand All @@ -127,7 +127,7 @@
# Are the results consistent with the data input?
.check_processed_values(
values = values,
n_input_pixels = n_input_pixels
input_pixels = input_pixels
)
# Log
.debug_log(
Expand Down
8 changes: 4 additions & 4 deletions R/api_combine_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@
# Average probability calculation
comb_fn <- function(values, uncert_values = NULL) {
# Check values length
n_input_pixels <- nrow(values[[1]])
input_pixels <- nrow(values[[1]])
# Combine by average
values <- weighted_probs(values, weights)
# get the number of labels
n_labels <- length(sits_labels(cubes[[1]]))
# Are the results consistent with the data input?
.check_processed_values(values, n_input_pixels)
.check_processed_values(values, input_pixels)
.check_processed_labels(values, n_labels)
# Return values
values
Expand All @@ -244,13 +244,13 @@
# Average probability calculation
comb_fn <- function(values, uncert_values) {
# Check values length
n_input_pixels <- nrow(values[[1]])
input_pixels <- nrow(values[[1]])
# Combine by average
values <- weighted_uncert_probs(values, uncert_values)
# get the number of labels
n_labels <- length(sits_labels(cubes[[1]]))
# Are the results consistent with the data input?
.check_processed_values(values, n_input_pixels)
.check_processed_values(values, input_pixels)
.check_processed_labels(values, n_labels)
# Return values
values
Expand Down
Loading

0 comments on commit 9a5a16b

Please sign in to comment.