Skip to main content

A PYthon library for basic and eXtended COntinuous Change Detection algorithms

Project description

PYXCCD

GithubActions Pypi Downloads ReadTheDocs

A PYthon library for basic and eXtended COntinuous Change Detection

Author: Su Ye (remotesensingsuy@gmail.com)

The Continuous Change Detection and Classification (CCDC) algorithm has been popular for processing satellite-based time series datasets, particularly for Landsat-based datasets. As a CCDC user, you may already be familiar with the existing CCDC tools such as pyccd and gee ccdc.

Wait.. so why does the pyxccd package still exist?

We developed pyxccd mainly for the below purposes:

  1. Near real-time monitoring: This package provides the unique S-CCD algorithm to recursively update model coefficients and detect changes;

  2. The latest version of CCDC (COLD): The COLD algorithm has the highest breakpoint detection accuracy than the ever, and has been verified with Zhe’s MATLAB version;

  3. Large-scale time-series processing in the desktop environment: the core of pyxccd was coded in C language with the superior computing efficiency and small memory usage;

  4. Using dataset other than Landsat: pyxccd supports the use of any band combination from any sensor (such as Sentinel-2, modis);

  5. Decomposing time-series signals to unveil inter-annual variation: S-CCD allows continuously outputting trend and seasonal signal components as “states”, allowing detecting inter-segment variations such as yearly phenological shifts

1. Installation

pip install pyxccd

Note: it only supports windows and linux system so far. Please contact the author if you wish to install it in the macOS system.

2. Using pyxccd for pixel-based processing (more see jupyter examples)

COLD:

from pyxccd import cold_detect
cold_result = cold_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, thermals, qas)

COLD algorithm for any combination of band inputs from any sensor:

from pyxccd import cold_detect_flex
# input a user-defined array instead of multiple lists
cold_result = cold_detect_flex(dates, np.stack((band1, band2, band3), axis=1), qas, lambda=20,tmask_b1=1, tmask_b2=2)

S-CCD:

# require offline processing for the first time
from pyxccd import sccd_detect, sccd_update
sccd_pack = sccd_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, qas)

# then use sccd_pack to do recursive and short-memory NRT update
sccd_pack_new = sccd_update(sccd_pack, dates, blues, greens, reds, nirs, swir1s, swir2s, qas)

S-CCD for outputting continuous seasonal and trend states:

# open state output (state_ensemble) by setting state_intervaldays as a non-zero value
sccd_result, state_ensemble = sccd_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, qas, state_intervaldays=1)

3. Documentation

API documents: readthedocs

Tutorial: under development

4. Citations

If you make use of the algorithms in this repo (or to read more about them), please cite (/see) the relevant publications from the following list:

[S-CCD] Ye, S., Rogan, J., Zhu, Z., & Eastman, J. R. (2021). A near-real-time approach for monitoring forest disturbance using Landsat time series: Stochastic continuous change detection. Remote Sensing of Environment, 252, 112167.

[COLD] Zhu, Z., Zhang, J., Yang, Z., Aljaddani, A. H., Cohen, W. B., Qiu, S., & Zhou, C. (2020). Continuous monitoring of land disturbance based on Landsat time series. Remote Sensing of Environment, 238, 111116.

The recent applications of S-CCD could be found in CONUS Land Watcher

Q&A

Q1: Has pyxccd been verified with original Matlab codes?

Re: yes, multiple rounds of verification have been done. Comparison based on two testing tiles shows that pyxccd and Matlab version have smaller than <2% differences for breakpoint detection and <2% differences for harmonic coefficients; the accuracy of pyxccd was also tested against the same reference dataset used in the original COLD paper (Zhu et al., 2020), and pyxccd reached the same accuracy (27% omission and 28% commission) showing that the discrepancy doesn’t hurt accuracy. The primary source for the discrepancy is mainly from the rounding: MATLAB uses float64 precision, while pyxccd chose float32 to save the run-time computing memory and boost efficiency.

Q2: how much time for production of a tile-based disturbance map (5000*5000 pixels) using pyxccd?

Re: I tested it in UCONN HPC environment (200 EPYC7452 cores): for processing a 40-year Landsat ARD tile (1982-2021), the stacking typically takes 15 mins; per-pixel COLD processing costs averagely 1 hour, per-pixel S-CCD processing costs averagely 0.5 hour; exporting maps needs 7 mins.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyxccd-0.0.6.dev0-cp313-cp313-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.13Windows x86-64

pyxccd-0.0.6.dev0-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

pyxccd-0.0.6.dev0-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

pyxccd-0.0.6.dev0-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

pyxccd-0.0.6.dev0-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9Windows x86-64

pyxccd-0.0.6.dev0-cp38-cp38-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.8Windows x86-64

File details

Details for the file pyxccd-0.0.6.dev0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.6.dev0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8540c6a7a35002e1e73b9d4a87a88f9c6fae19c1f52d37e84ff1f54a5d95590b
MD5 17ada22cb990f289ffc246561560a0fc
BLAKE2b-256 ccf98b1de7ebc92f7173d88e03de7e46bc58916cfe14b6bace1e149cd4e0d0b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.6.dev0-cp313-cp313-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.6.dev0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.6.dev0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2c46e3e8157f3f3f699f9ba4b75b77b998dea60a255e2d1863393607a2b5a09a
MD5 6b432a3b0c838a9a7ff5ceb2b63222dc
BLAKE2b-256 21006437b576392367dd97e41bdea86ceb53a1665c6e4c7bd7493dbc4a5864d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.6.dev0-cp312-cp312-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.6.dev0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.6.dev0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9fb0a254d7a6c94c7343e38ccb67a915c43370615ca854992a2c328cb89d8f6a
MD5 6b7b18553462515faec0d19b51ec97c8
BLAKE2b-256 815426a38d65d2d80e337092007f56d1608b5bb62fa82786f56fd501fae060a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.6.dev0-cp311-cp311-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.6.dev0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.6.dev0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 520861cf6f729056cebaa1043f6962ee23f55a984dbdd8ee4dfbf0ef1c78c76b
MD5 c057d46d58aaf071c223e4701530a2e3
BLAKE2b-256 ae9e9337673dd1bec883c99ee9eb0ab860652ea986c11b525a66eba782b9be87

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.6.dev0-cp310-cp310-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.6.dev0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyxccd-0.0.6.dev0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.6.dev0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7c14ff5a29615d6bf6d6388699a123f06ad1498b0c1ad986b53b4f1b85cb3479
MD5 50a548c18ea7a20e780efc2ff9388b11
BLAKE2b-256 ea614a38328f65f6cb2786a5bf1ecf471b4aada3066e1564e5a8973b6afc7e03

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.6.dev0-cp39-cp39-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.6.dev0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyxccd-0.0.6.dev0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.6.dev0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 157e6ee8db13b73f7160c959e06de4788f0ab747f6e981fb0dedee7baf7489f7
MD5 eb8f0e61176aad3d6867a9415769d054
BLAKE2b-256 8ead255922e341483667014accb2314d132deb3629c650bb7973fc6caa11f8a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.6.dev0-cp38-cp38-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page