From 0a964dacbdbc8ede5416a485d1123355b76e19d9 Mon Sep 17 00:00:00 2001 From: JulioContrerasH Date: Thu, 24 Oct 2024 14:54:24 +0000 Subject: [PATCH] deploy: 3ec2b17a93c228917d08cd6c719aa68151ed0445 --- CHANGELOG.html | 32 ++++++++++---------------------- search/search_index.json | 2 +- sitemap.xml.gz | Bin 268 -> 268 bytes 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.html b/CHANGELOG.html index 5ecb86d..9041ab8 100644 --- a/CHANGELOG.html +++ b/CHANGELOG.html @@ -395,11 +395,11 @@
  • - - [0.0.4] - 2024-10-22 + + [0.0.5] - 2024-10-24 -
  • - -
  • - - - First public release with support for enhancing Sentinel-2 spatial resolution to 2.5 meters. - -
  • @@ -511,11 +504,11 @@
  • - - [0.0.4] - 2024-10-22 + + [0.0.5] - 2024-10-24 -
  • - -
  • - - - First public release with support for enhancing Sentinel-2 spatial resolution to 2.5 meters. - -
  • @@ -572,9 +558,11 @@

    Fixed

    -

    [0.0.4] - 2024-10-22

    +

    [0.0.5] - 2024-10-24

    Added

    -

    - First public release with support for enhancing Sentinel-2 spatial resolution to 2.5 meters.

    + diff --git a/search/search_index.json b/search/search_index.json index 2dde39d..1f8faa5 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"index.html","text":"A Python package for enhancing the spatial resolution of Sentinel-2 satellite images to 2.5 meters \ud83d\ude80 GitHub : https://github.com/IPL-UV/supers2 \ud83c\udf10 PyPI : https://pypi.org/project/supers2/ \ud83d\udee0\ufe0f Overview \ud83d\udcca supers2 is a Python package designed to enhance the spatial resolution of Sentinel-2 satellite images to 2.5 meters using advanced neural network models. It facilitates downloading (cubo package), preparing, and processing the Sentinel-2 data and applies deep learning models to enhance the spatial resolution of the imagery. Installation \u2699\ufe0f Install the latest version from PyPI: pip install cubo supers2 How to use \ud83d\udee0\ufe0f Basic usage: enhancing spatial resolution of Sentinel-2 images \ud83c\udf0d Load libraries import cubo import supers2 import torch import numpy as np Download Sentinel-2 L2A cube # Create a Sentinel-2 L2A data cube for a specific location and date range da = cubo . create ( lat = 4.31 , lon =- 76.2 , collection = \"sentinel-2-l2a\" , bands = [ \"B02\" , \"B03\" , \"B04\" , \"B05\" , \"B06\" , \"B07\" , \"B08\" , \"B8A\" , \"B11\" , \"B12\" ], start_date = \"2021-06-01\" , end_date = \"2021-10-10\" , edge_size = 128 , resolution = 10 ) Prepare the data (CPU and GPU usage) When converting the NumPy array to a PyTorch tensor, the use of cuda() is optional and depends on whether the user has access to a GPU. Below is the explanation for both cases: GPU: If a GPU is available and CUDA is installed, you can transfer the tensor to the GPU using .cuda() . This improves the processing speed, especially for large datasets or deep learning models. CPU: If no GPU is available, the tensor will be processed on the CPU, which is the default behavior in PyTorch. In this case, simply omit the .cuda() call. Here\u2019s how you can handle both scenarios dynamically: # Convert the data array to NumPy and scale original_s2_numpy = ( da [ 11 ] . compute () . to_numpy () / 10_000 ) . astype ( \"float32\" ) # Check if CUDA is available, use GPU if possible, otherwise fallback to CPU device = torch . device ( \"cuda\" if torch . cuda . is_available () else \"cpu\" ) # Create the tensor and move it to the appropriate device (CPU or GPU) X = torch . from_numpy ( original_s2_numpy ) . float () . to ( device ) Define the resolution enhancement model # Set up the model to enhance the spatial resolution models = supers2 . setmodel ( SR_model_loss = \"l1\" , SR_model_name = \"cnn\" , SR_model_size = \"small\" , Fusionx2_model_size = \"lightweight\" , Fusionx4_model_size = \"lightweight\" ) Apply spatial resolution enhancement # Apply the model to enhance the image resolution to 2.5 meters superX = supers2 . predict ( X , models = models , resolution = \"2.5m\" ) Visualize the results \ud83c\udfa8 Display images import matplotlib.pyplot as plt # Plot the original and enhanced-resolution images fig , ax = plt . subplots ( 1 , 2 , figsize = ( 10 , 5 )) ax [ 0 ] . imshow ( X [[ 2 , 1 , 0 ]] . permute ( 1 , 2 , 0 ) . cpu () . numpy () * 4 ) ax [ 0 ] . set_title ( \"Original S2\" ) ax [ 1 ] . imshow ( superX [[ 2 , 1 , 0 ]] . permute ( 1 , 2 , 0 ) . cpu () . numpy () * 4 ) ax [ 1 ] . set_title ( \"Enhanced Resolution S2\" ) plt . show () Supported features and filters \u2728 Enhance spatial resolution to 2.5 meters: Use advanced CNN models to enhance Sentinel-2 imagery. Neural network-based approach: Integration of multiple model sizes to fit different computing needs (small, lightweight). Python integration: Easily interact with data cubes through the Python API, supporting seamless workflows.","title":"Index"},{"location":"index.html#_1","text":"A Python package for enhancing the spatial resolution of Sentinel-2 satellite images to 2.5 meters \ud83d\ude80 GitHub : https://github.com/IPL-UV/supers2 \ud83c\udf10 PyPI : https://pypi.org/project/supers2/ \ud83d\udee0\ufe0f","title":""},{"location":"index.html#overview","text":"supers2 is a Python package designed to enhance the spatial resolution of Sentinel-2 satellite images to 2.5 meters using advanced neural network models. It facilitates downloading (cubo package), preparing, and processing the Sentinel-2 data and applies deep learning models to enhance the spatial resolution of the imagery.","title":"Overview \ud83d\udcca"},{"location":"index.html#installation","text":"Install the latest version from PyPI: pip install cubo supers2","title":"Installation \u2699\ufe0f"},{"location":"index.html#how-to-use","text":"","title":"How to use \ud83d\udee0\ufe0f"},{"location":"index.html#basic-usage-enhancing-spatial-resolution-of-sentinel-2-images","text":"","title":"Basic usage: enhancing spatial resolution of Sentinel-2 images \ud83c\udf0d"},{"location":"index.html#load-libraries","text":"import cubo import supers2 import torch import numpy as np","title":"Load libraries"},{"location":"index.html#download-sentinel-2-l2a-cube","text":"# Create a Sentinel-2 L2A data cube for a specific location and date range da = cubo . create ( lat = 4.31 , lon =- 76.2 , collection = \"sentinel-2-l2a\" , bands = [ \"B02\" , \"B03\" , \"B04\" , \"B05\" , \"B06\" , \"B07\" , \"B08\" , \"B8A\" , \"B11\" , \"B12\" ], start_date = \"2021-06-01\" , end_date = \"2021-10-10\" , edge_size = 128 , resolution = 10 )","title":"Download Sentinel-2 L2A cube"},{"location":"index.html#prepare-the-data-cpu-and-gpu-usage","text":"When converting the NumPy array to a PyTorch tensor, the use of cuda() is optional and depends on whether the user has access to a GPU. Below is the explanation for both cases: GPU: If a GPU is available and CUDA is installed, you can transfer the tensor to the GPU using .cuda() . This improves the processing speed, especially for large datasets or deep learning models. CPU: If no GPU is available, the tensor will be processed on the CPU, which is the default behavior in PyTorch. In this case, simply omit the .cuda() call. Here\u2019s how you can handle both scenarios dynamically: # Convert the data array to NumPy and scale original_s2_numpy = ( da [ 11 ] . compute () . to_numpy () / 10_000 ) . astype ( \"float32\" ) # Check if CUDA is available, use GPU if possible, otherwise fallback to CPU device = torch . device ( \"cuda\" if torch . cuda . is_available () else \"cpu\" ) # Create the tensor and move it to the appropriate device (CPU or GPU) X = torch . from_numpy ( original_s2_numpy ) . float () . to ( device )","title":"Prepare the data (CPU and GPU usage)"},{"location":"index.html#define-the-resolution-enhancement-model","text":"# Set up the model to enhance the spatial resolution models = supers2 . setmodel ( SR_model_loss = \"l1\" , SR_model_name = \"cnn\" , SR_model_size = \"small\" , Fusionx2_model_size = \"lightweight\" , Fusionx4_model_size = \"lightweight\" )","title":"Define the resolution enhancement model"},{"location":"index.html#apply-spatial-resolution-enhancement","text":"# Apply the model to enhance the image resolution to 2.5 meters superX = supers2 . predict ( X , models = models , resolution = \"2.5m\" )","title":"Apply spatial resolution enhancement"},{"location":"index.html#visualize-the-results","text":"","title":"Visualize the results \ud83c\udfa8"},{"location":"index.html#display-images","text":"import matplotlib.pyplot as plt # Plot the original and enhanced-resolution images fig , ax = plt . subplots ( 1 , 2 , figsize = ( 10 , 5 )) ax [ 0 ] . imshow ( X [[ 2 , 1 , 0 ]] . permute ( 1 , 2 , 0 ) . cpu () . numpy () * 4 ) ax [ 0 ] . set_title ( \"Original S2\" ) ax [ 1 ] . imshow ( superX [[ 2 , 1 , 0 ]] . permute ( 1 , 2 , 0 ) . cpu () . numpy () * 4 ) ax [ 1 ] . set_title ( \"Enhanced Resolution S2\" ) plt . show ()","title":"Display images"},{"location":"index.html#supported-features-and-filters","text":"Enhance spatial resolution to 2.5 meters: Use advanced CNN models to enhance Sentinel-2 imagery. Neural network-based approach: Integration of multiple model sizes to fit different computing needs (small, lightweight). Python integration: Easily interact with data cubes through the Python API, supporting seamless workflows.","title":"Supported features and filters \u2728"},{"location":"CHANGELOG.html","text":"Changelog All notable changes to this project will be documented in this file. The format is based on Keep a Changelog , and this project adheres to Semantic Versioning . [Unreleased] Added Initial release of SuperS2 with core functionalities for Sentinel-2 data processing. Detailed documentation for installation and basic usage examples. Changed Updated README to include new badges and links. Fixed Fixed minor bugs in the data processing module related to edge cases. [0.0.4] - 2024-10-22 Added - First public release with support for enhancing Sentinel-2 spatial resolution to 2.5 meters.","title":"Changelog"},{"location":"CHANGELOG.html#changelog","text":"All notable changes to this project will be documented in this file. The format is based on Keep a Changelog , and this project adheres to Semantic Versioning .","title":"Changelog"},{"location":"CHANGELOG.html#unreleased","text":"","title":"[Unreleased]"},{"location":"CHANGELOG.html#added","text":"Initial release of SuperS2 with core functionalities for Sentinel-2 data processing. Detailed documentation for installation and basic usage examples.","title":"Added"},{"location":"CHANGELOG.html#changed","text":"Updated README to include new badges and links.","title":"Changed"},{"location":"CHANGELOG.html#fixed","text":"Fixed minor bugs in the data processing module related to edge cases.","title":"Fixed"},{"location":"CHANGELOG.html#004-2024-10-22","text":"","title":"[0.0.4] - 2024-10-22"},{"location":"CHANGELOG.html#added_1","text":"","title":"Added"},{"location":"CHANGELOG.html#-first-public-release-with-support-for-enhancing-sentinel-2-spatial-resolution-to-25-meters","text":"","title":"- First public release with support for enhancing Sentinel-2 spatial resolution to 2.5 meters."},{"location":"CODE_OF_CONDUCT.html","text":"Contributor covenant code of conduct \ud83d\udcdc Our pledge \ud83e\udd1d In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. \ud83c\udf0e\ud83e\udd17 Our standards \ud83d\udccf Examples of behavior that contributes to creating a positive environment include: Using welcoming and inclusive language. \ud83d\ude0a Being respectful of differing viewpoints and experiences. \ud83e\udd14\ud83d\udc42 Gracefully accepting constructive criticism. \ud83d\udee0\ufe0f Focusing on what is best for the community. \ud83e\udd32 Showing empathy towards other community members. \ud83e\udd7a\u2764\ufe0f Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or advances. \ud83d\udeab\ud83d\udcac Trolling, insulting/derogatory comments, and personal or political attacks. \ud83d\udeab\ud83d\ude20 Public or private harassment. \ud83d\udeab\ud83d\udc65 Publishing others' private information, such as a physical or electronic address, without explicit permission. \ud83d\udeab\ud83c\udfe1 Other conduct which could reasonably be considered inappropriate in a professional setting. \ud83d\udeab\ud83d\udc54 Our responsibilities \ud83d\udee1\ufe0f Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. Scope \ud83c\udf10 This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. Enforcement \ud83d\udea8 All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. Attribution \ud83d\udc4f This Code of Conduct is adapted from the Contributor Covenant , version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq","title":"Code of conduct"},{"location":"CODE_OF_CONDUCT.html#contributor-covenant-code-of-conduct","text":"","title":"Contributor covenant code of conduct \ud83d\udcdc"},{"location":"CODE_OF_CONDUCT.html#our-pledge","text":"In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. \ud83c\udf0e\ud83e\udd17","title":"Our pledge \ud83e\udd1d"},{"location":"CODE_OF_CONDUCT.html#our-standards","text":"Examples of behavior that contributes to creating a positive environment include: Using welcoming and inclusive language. \ud83d\ude0a Being respectful of differing viewpoints and experiences. \ud83e\udd14\ud83d\udc42 Gracefully accepting constructive criticism. \ud83d\udee0\ufe0f Focusing on what is best for the community. \ud83e\udd32 Showing empathy towards other community members. \ud83e\udd7a\u2764\ufe0f Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or advances. \ud83d\udeab\ud83d\udcac Trolling, insulting/derogatory comments, and personal or political attacks. \ud83d\udeab\ud83d\ude20 Public or private harassment. \ud83d\udeab\ud83d\udc65 Publishing others' private information, such as a physical or electronic address, without explicit permission. \ud83d\udeab\ud83c\udfe1 Other conduct which could reasonably be considered inappropriate in a professional setting. \ud83d\udeab\ud83d\udc54","title":"Our standards \ud83d\udccf"},{"location":"CODE_OF_CONDUCT.html#our-responsibilities","text":"Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.","title":"Our responsibilities \ud83d\udee1\ufe0f"},{"location":"CODE_OF_CONDUCT.html#scope","text":"This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.","title":"Scope \ud83c\udf10"},{"location":"CODE_OF_CONDUCT.html#enforcement","text":"All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.","title":"Enforcement \ud83d\udea8"},{"location":"CODE_OF_CONDUCT.html#attribution","text":"This Code of Conduct is adapted from the Contributor Covenant , version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq","title":"Attribution \ud83d\udc4f"},{"location":"CONTRIBUTING.html","text":"Contributing \ud83e\udd1d We welcome contributions from the community! Every contribution, no matter how small, is appreciated and credited. Here\u2019s how you can get involved: How to contribute \ud83d\udee0\ufe0f Fork the repository: Start by forking the SuperS2 repository to your GitHub account. \ud83c\udf74 Clone your fork locally: cd git clone https://github.com/YOUR_GITHUB_USERNAME/supers2.git cd supers2 Create a branch: Create a new branch for your feature or bug fix: git checkout -b name-of-your-bugfix-or-feature Set up the environment: \ud83c\udf31 If you're using pyenv , select a Python version: pyenv local Install dependencies and activate the environment: poetry install poetry shell Install pre-commit hooks: poetry run pre-commit install Make your changes: \ud83d\udd8b\ufe0f Develop your feature or fix, ensuring you write clear, concise commit messages and include any necessary tests. Check your changes: \u2705 Run formatting checks: make check Run unit tests: make test Optionally, run tests across different Python versions using tox: tox Submit a pull request: \ud83d\ude80 Push your branch to GitHub and submit a pull request to the develop branch of the SuperS2 repository. Ensure your pull request meets these guidelines: Include tests. Update the documentation if your pull request adds functionality. Provide a detailed description of your changes. Types of contributions \ud83d\udce6 Report bugs: \ud83d\udc1b Report bugs by creating an issue on the SuperS2 GitHub repository . Please include your operating system, setup details, and steps to reproduce the bug. Fix bugs: \ud83d\udee0\ufe0f Look for issues tagged with \"bug\" and \"help wanted\" in the repository to start fixing. Implement features: \u2728 Contribute by implementing features tagged with \"enhancement\" and \"help wanted.\" Write documentation: \ud83d\udcda Contribute to the documentation in the official docs, docstrings, or through blog posts and articles. Submit feedback: \ud83d\udcac Propose new features or give feedback by filing an issue on GitHub. Use the SuperS2 GitHub issues page for feedback.","title":"Contributing"},{"location":"CONTRIBUTING.html#contributing","text":"We welcome contributions from the community! Every contribution, no matter how small, is appreciated and credited. Here\u2019s how you can get involved:","title":"Contributing \ud83e\udd1d"},{"location":"CONTRIBUTING.html#how-to-contribute","text":"Fork the repository: Start by forking the SuperS2 repository to your GitHub account. \ud83c\udf74 Clone your fork locally: cd git clone https://github.com/YOUR_GITHUB_USERNAME/supers2.git cd supers2 Create a branch: Create a new branch for your feature or bug fix: git checkout -b name-of-your-bugfix-or-feature Set up the environment: \ud83c\udf31 If you're using pyenv , select a Python version: pyenv local Install dependencies and activate the environment: poetry install poetry shell Install pre-commit hooks: poetry run pre-commit install Make your changes: \ud83d\udd8b\ufe0f Develop your feature or fix, ensuring you write clear, concise commit messages and include any necessary tests. Check your changes: \u2705 Run formatting checks: make check Run unit tests: make test Optionally, run tests across different Python versions using tox: tox Submit a pull request: \ud83d\ude80 Push your branch to GitHub and submit a pull request to the develop branch of the SuperS2 repository. Ensure your pull request meets these guidelines: Include tests. Update the documentation if your pull request adds functionality. Provide a detailed description of your changes.","title":"How to contribute \ud83d\udee0\ufe0f"},{"location":"CONTRIBUTING.html#types-of-contributions","text":"Report bugs: \ud83d\udc1b Report bugs by creating an issue on the SuperS2 GitHub repository . Please include your operating system, setup details, and steps to reproduce the bug. Fix bugs: \ud83d\udee0\ufe0f Look for issues tagged with \"bug\" and \"help wanted\" in the repository to start fixing. Implement features: \u2728 Contribute by implementing features tagged with \"enhancement\" and \"help wanted.\" Write documentation: \ud83d\udcda Contribute to the documentation in the official docs, docstrings, or through blog posts and articles. Submit feedback: \ud83d\udcac Propose new features or give feedback by filing an issue on GitHub. Use the SuperS2 GitHub issues page for feedback.","title":"Types of contributions \ud83d\udce6"}]} \ No newline at end of file +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"index.html","text":"A Python package for enhancing the spatial resolution of Sentinel-2 satellite images to 2.5 meters \ud83d\ude80 GitHub : https://github.com/IPL-UV/supers2 \ud83c\udf10 PyPI : https://pypi.org/project/supers2/ \ud83d\udee0\ufe0f Overview \ud83d\udcca supers2 is a Python package designed to enhance the spatial resolution of Sentinel-2 satellite images to 2.5 meters using advanced neural network models. It facilitates downloading (cubo package), preparing, and processing the Sentinel-2 data and applies deep learning models to enhance the spatial resolution of the imagery. Installation \u2699\ufe0f Install the latest version from PyPI: pip install cubo supers2 How to use \ud83d\udee0\ufe0f Basic usage: enhancing spatial resolution of Sentinel-2 images \ud83c\udf0d Load libraries import cubo import supers2 import torch import numpy as np Download Sentinel-2 L2A cube # Create a Sentinel-2 L2A data cube for a specific location and date range da = cubo . create ( lat = 4.31 , lon =- 76.2 , collection = \"sentinel-2-l2a\" , bands = [ \"B02\" , \"B03\" , \"B04\" , \"B05\" , \"B06\" , \"B07\" , \"B08\" , \"B8A\" , \"B11\" , \"B12\" ], start_date = \"2021-06-01\" , end_date = \"2021-10-10\" , edge_size = 128 , resolution = 10 ) Prepare the data (CPU and GPU usage) When converting the NumPy array to a PyTorch tensor, the use of cuda() is optional and depends on whether the user has access to a GPU. Below is the explanation for both cases: GPU: If a GPU is available and CUDA is installed, you can transfer the tensor to the GPU using .cuda() . This improves the processing speed, especially for large datasets or deep learning models. CPU: If no GPU is available, the tensor will be processed on the CPU, which is the default behavior in PyTorch. In this case, simply omit the .cuda() call. Here\u2019s how you can handle both scenarios dynamically: # Convert the data array to NumPy and scale original_s2_numpy = ( da [ 11 ] . compute () . to_numpy () / 10_000 ) . astype ( \"float32\" ) # Check if CUDA is available, use GPU if possible, otherwise fallback to CPU device = torch . device ( \"cuda\" if torch . cuda . is_available () else \"cpu\" ) # Create the tensor and move it to the appropriate device (CPU or GPU) X = torch . from_numpy ( original_s2_numpy ) . float () . to ( device ) Define the resolution enhancement model # Set up the model to enhance the spatial resolution models = supers2 . setmodel ( SR_model_loss = \"l1\" , SR_model_name = \"cnn\" , SR_model_size = \"small\" , Fusionx2_model_size = \"lightweight\" , Fusionx4_model_size = \"lightweight\" ) Apply spatial resolution enhancement # Apply the model to enhance the image resolution to 2.5 meters superX = supers2 . predict ( X , models = models , resolution = \"2.5m\" ) Visualize the results \ud83c\udfa8 Display images import matplotlib.pyplot as plt # Plot the original and enhanced-resolution images fig , ax = plt . subplots ( 1 , 2 , figsize = ( 10 , 5 )) ax [ 0 ] . imshow ( X [[ 2 , 1 , 0 ]] . permute ( 1 , 2 , 0 ) . cpu () . numpy () * 4 ) ax [ 0 ] . set_title ( \"Original S2\" ) ax [ 1 ] . imshow ( superX [[ 2 , 1 , 0 ]] . permute ( 1 , 2 , 0 ) . cpu () . numpy () * 4 ) ax [ 1 ] . set_title ( \"Enhanced Resolution S2\" ) plt . show () Supported features and filters \u2728 Enhance spatial resolution to 2.5 meters: Use advanced CNN models to enhance Sentinel-2 imagery. Neural network-based approach: Integration of multiple model sizes to fit different computing needs (small, lightweight). Python integration: Easily interact with data cubes through the Python API, supporting seamless workflows.","title":"Index"},{"location":"index.html#_1","text":"A Python package for enhancing the spatial resolution of Sentinel-2 satellite images to 2.5 meters \ud83d\ude80 GitHub : https://github.com/IPL-UV/supers2 \ud83c\udf10 PyPI : https://pypi.org/project/supers2/ \ud83d\udee0\ufe0f","title":""},{"location":"index.html#overview","text":"supers2 is a Python package designed to enhance the spatial resolution of Sentinel-2 satellite images to 2.5 meters using advanced neural network models. It facilitates downloading (cubo package), preparing, and processing the Sentinel-2 data and applies deep learning models to enhance the spatial resolution of the imagery.","title":"Overview \ud83d\udcca"},{"location":"index.html#installation","text":"Install the latest version from PyPI: pip install cubo supers2","title":"Installation \u2699\ufe0f"},{"location":"index.html#how-to-use","text":"","title":"How to use \ud83d\udee0\ufe0f"},{"location":"index.html#basic-usage-enhancing-spatial-resolution-of-sentinel-2-images","text":"","title":"Basic usage: enhancing spatial resolution of Sentinel-2 images \ud83c\udf0d"},{"location":"index.html#load-libraries","text":"import cubo import supers2 import torch import numpy as np","title":"Load libraries"},{"location":"index.html#download-sentinel-2-l2a-cube","text":"# Create a Sentinel-2 L2A data cube for a specific location and date range da = cubo . create ( lat = 4.31 , lon =- 76.2 , collection = \"sentinel-2-l2a\" , bands = [ \"B02\" , \"B03\" , \"B04\" , \"B05\" , \"B06\" , \"B07\" , \"B08\" , \"B8A\" , \"B11\" , \"B12\" ], start_date = \"2021-06-01\" , end_date = \"2021-10-10\" , edge_size = 128 , resolution = 10 )","title":"Download Sentinel-2 L2A cube"},{"location":"index.html#prepare-the-data-cpu-and-gpu-usage","text":"When converting the NumPy array to a PyTorch tensor, the use of cuda() is optional and depends on whether the user has access to a GPU. Below is the explanation for both cases: GPU: If a GPU is available and CUDA is installed, you can transfer the tensor to the GPU using .cuda() . This improves the processing speed, especially for large datasets or deep learning models. CPU: If no GPU is available, the tensor will be processed on the CPU, which is the default behavior in PyTorch. In this case, simply omit the .cuda() call. Here\u2019s how you can handle both scenarios dynamically: # Convert the data array to NumPy and scale original_s2_numpy = ( da [ 11 ] . compute () . to_numpy () / 10_000 ) . astype ( \"float32\" ) # Check if CUDA is available, use GPU if possible, otherwise fallback to CPU device = torch . device ( \"cuda\" if torch . cuda . is_available () else \"cpu\" ) # Create the tensor and move it to the appropriate device (CPU or GPU) X = torch . from_numpy ( original_s2_numpy ) . float () . to ( device )","title":"Prepare the data (CPU and GPU usage)"},{"location":"index.html#define-the-resolution-enhancement-model","text":"# Set up the model to enhance the spatial resolution models = supers2 . setmodel ( SR_model_loss = \"l1\" , SR_model_name = \"cnn\" , SR_model_size = \"small\" , Fusionx2_model_size = \"lightweight\" , Fusionx4_model_size = \"lightweight\" )","title":"Define the resolution enhancement model"},{"location":"index.html#apply-spatial-resolution-enhancement","text":"# Apply the model to enhance the image resolution to 2.5 meters superX = supers2 . predict ( X , models = models , resolution = \"2.5m\" )","title":"Apply spatial resolution enhancement"},{"location":"index.html#visualize-the-results","text":"","title":"Visualize the results \ud83c\udfa8"},{"location":"index.html#display-images","text":"import matplotlib.pyplot as plt # Plot the original and enhanced-resolution images fig , ax = plt . subplots ( 1 , 2 , figsize = ( 10 , 5 )) ax [ 0 ] . imshow ( X [[ 2 , 1 , 0 ]] . permute ( 1 , 2 , 0 ) . cpu () . numpy () * 4 ) ax [ 0 ] . set_title ( \"Original S2\" ) ax [ 1 ] . imshow ( superX [[ 2 , 1 , 0 ]] . permute ( 1 , 2 , 0 ) . cpu () . numpy () * 4 ) ax [ 1 ] . set_title ( \"Enhanced Resolution S2\" ) plt . show ()","title":"Display images"},{"location":"index.html#supported-features-and-filters","text":"Enhance spatial resolution to 2.5 meters: Use advanced CNN models to enhance Sentinel-2 imagery. Neural network-based approach: Integration of multiple model sizes to fit different computing needs (small, lightweight). Python integration: Easily interact with data cubes through the Python API, supporting seamless workflows.","title":"Supported features and filters \u2728"},{"location":"CHANGELOG.html","text":"Changelog All notable changes to this project will be documented in this file. The format is based on Keep a Changelog , and this project adheres to Semantic Versioning . [Unreleased] Added Initial release of SuperS2 with core functionalities for Sentinel-2 data processing. Detailed documentation for installation and basic usage examples. Changed Updated README to include new badges and links. Fixed Fixed minor bugs in the data processing module related to edge cases. [0.0.5] - 2024-10-24 Added First public release with support for enhancing Sentinel-2 spatial resolution to 2.5 meters.","title":"Changelog"},{"location":"CHANGELOG.html#changelog","text":"All notable changes to this project will be documented in this file. The format is based on Keep a Changelog , and this project adheres to Semantic Versioning .","title":"Changelog"},{"location":"CHANGELOG.html#unreleased","text":"","title":"[Unreleased]"},{"location":"CHANGELOG.html#added","text":"Initial release of SuperS2 with core functionalities for Sentinel-2 data processing. Detailed documentation for installation and basic usage examples.","title":"Added"},{"location":"CHANGELOG.html#changed","text":"Updated README to include new badges and links.","title":"Changed"},{"location":"CHANGELOG.html#fixed","text":"Fixed minor bugs in the data processing module related to edge cases.","title":"Fixed"},{"location":"CHANGELOG.html#005-2024-10-24","text":"","title":"[0.0.5] - 2024-10-24"},{"location":"CHANGELOG.html#added_1","text":"First public release with support for enhancing Sentinel-2 spatial resolution to 2.5 meters.","title":"Added"},{"location":"CODE_OF_CONDUCT.html","text":"Contributor covenant code of conduct \ud83d\udcdc Our pledge \ud83e\udd1d In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. \ud83c\udf0e\ud83e\udd17 Our standards \ud83d\udccf Examples of behavior that contributes to creating a positive environment include: Using welcoming and inclusive language. \ud83d\ude0a Being respectful of differing viewpoints and experiences. \ud83e\udd14\ud83d\udc42 Gracefully accepting constructive criticism. \ud83d\udee0\ufe0f Focusing on what is best for the community. \ud83e\udd32 Showing empathy towards other community members. \ud83e\udd7a\u2764\ufe0f Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or advances. \ud83d\udeab\ud83d\udcac Trolling, insulting/derogatory comments, and personal or political attacks. \ud83d\udeab\ud83d\ude20 Public or private harassment. \ud83d\udeab\ud83d\udc65 Publishing others' private information, such as a physical or electronic address, without explicit permission. \ud83d\udeab\ud83c\udfe1 Other conduct which could reasonably be considered inappropriate in a professional setting. \ud83d\udeab\ud83d\udc54 Our responsibilities \ud83d\udee1\ufe0f Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. Scope \ud83c\udf10 This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. Enforcement \ud83d\udea8 All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. Attribution \ud83d\udc4f This Code of Conduct is adapted from the Contributor Covenant , version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq","title":"Code of conduct"},{"location":"CODE_OF_CONDUCT.html#contributor-covenant-code-of-conduct","text":"","title":"Contributor covenant code of conduct \ud83d\udcdc"},{"location":"CODE_OF_CONDUCT.html#our-pledge","text":"In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. \ud83c\udf0e\ud83e\udd17","title":"Our pledge \ud83e\udd1d"},{"location":"CODE_OF_CONDUCT.html#our-standards","text":"Examples of behavior that contributes to creating a positive environment include: Using welcoming and inclusive language. \ud83d\ude0a Being respectful of differing viewpoints and experiences. \ud83e\udd14\ud83d\udc42 Gracefully accepting constructive criticism. \ud83d\udee0\ufe0f Focusing on what is best for the community. \ud83e\udd32 Showing empathy towards other community members. \ud83e\udd7a\u2764\ufe0f Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or advances. \ud83d\udeab\ud83d\udcac Trolling, insulting/derogatory comments, and personal or political attacks. \ud83d\udeab\ud83d\ude20 Public or private harassment. \ud83d\udeab\ud83d\udc65 Publishing others' private information, such as a physical or electronic address, without explicit permission. \ud83d\udeab\ud83c\udfe1 Other conduct which could reasonably be considered inappropriate in a professional setting. \ud83d\udeab\ud83d\udc54","title":"Our standards \ud83d\udccf"},{"location":"CODE_OF_CONDUCT.html#our-responsibilities","text":"Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.","title":"Our responsibilities \ud83d\udee1\ufe0f"},{"location":"CODE_OF_CONDUCT.html#scope","text":"This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.","title":"Scope \ud83c\udf10"},{"location":"CODE_OF_CONDUCT.html#enforcement","text":"All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.","title":"Enforcement \ud83d\udea8"},{"location":"CODE_OF_CONDUCT.html#attribution","text":"This Code of Conduct is adapted from the Contributor Covenant , version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq","title":"Attribution \ud83d\udc4f"},{"location":"CONTRIBUTING.html","text":"Contributing \ud83e\udd1d We welcome contributions from the community! Every contribution, no matter how small, is appreciated and credited. Here\u2019s how you can get involved: How to contribute \ud83d\udee0\ufe0f Fork the repository: Start by forking the SuperS2 repository to your GitHub account. \ud83c\udf74 Clone your fork locally: cd git clone https://github.com/YOUR_GITHUB_USERNAME/supers2.git cd supers2 Create a branch: Create a new branch for your feature or bug fix: git checkout -b name-of-your-bugfix-or-feature Set up the environment: \ud83c\udf31 If you're using pyenv , select a Python version: pyenv local Install dependencies and activate the environment: poetry install poetry shell Install pre-commit hooks: poetry run pre-commit install Make your changes: \ud83d\udd8b\ufe0f Develop your feature or fix, ensuring you write clear, concise commit messages and include any necessary tests. Check your changes: \u2705 Run formatting checks: make check Run unit tests: make test Optionally, run tests across different Python versions using tox: tox Submit a pull request: \ud83d\ude80 Push your branch to GitHub and submit a pull request to the develop branch of the SuperS2 repository. Ensure your pull request meets these guidelines: Include tests. Update the documentation if your pull request adds functionality. Provide a detailed description of your changes. Types of contributions \ud83d\udce6 Report bugs: \ud83d\udc1b Report bugs by creating an issue on the SuperS2 GitHub repository . Please include your operating system, setup details, and steps to reproduce the bug. Fix bugs: \ud83d\udee0\ufe0f Look for issues tagged with \"bug\" and \"help wanted\" in the repository to start fixing. Implement features: \u2728 Contribute by implementing features tagged with \"enhancement\" and \"help wanted.\" Write documentation: \ud83d\udcda Contribute to the documentation in the official docs, docstrings, or through blog posts and articles. Submit feedback: \ud83d\udcac Propose new features or give feedback by filing an issue on GitHub. Use the SuperS2 GitHub issues page for feedback.","title":"Contributing"},{"location":"CONTRIBUTING.html#contributing","text":"We welcome contributions from the community! Every contribution, no matter how small, is appreciated and credited. Here\u2019s how you can get involved:","title":"Contributing \ud83e\udd1d"},{"location":"CONTRIBUTING.html#how-to-contribute","text":"Fork the repository: Start by forking the SuperS2 repository to your GitHub account. \ud83c\udf74 Clone your fork locally: cd git clone https://github.com/YOUR_GITHUB_USERNAME/supers2.git cd supers2 Create a branch: Create a new branch for your feature or bug fix: git checkout -b name-of-your-bugfix-or-feature Set up the environment: \ud83c\udf31 If you're using pyenv , select a Python version: pyenv local Install dependencies and activate the environment: poetry install poetry shell Install pre-commit hooks: poetry run pre-commit install Make your changes: \ud83d\udd8b\ufe0f Develop your feature or fix, ensuring you write clear, concise commit messages and include any necessary tests. Check your changes: \u2705 Run formatting checks: make check Run unit tests: make test Optionally, run tests across different Python versions using tox: tox Submit a pull request: \ud83d\ude80 Push your branch to GitHub and submit a pull request to the develop branch of the SuperS2 repository. Ensure your pull request meets these guidelines: Include tests. Update the documentation if your pull request adds functionality. Provide a detailed description of your changes.","title":"How to contribute \ud83d\udee0\ufe0f"},{"location":"CONTRIBUTING.html#types-of-contributions","text":"Report bugs: \ud83d\udc1b Report bugs by creating an issue on the SuperS2 GitHub repository . Please include your operating system, setup details, and steps to reproduce the bug. Fix bugs: \ud83d\udee0\ufe0f Look for issues tagged with \"bug\" and \"help wanted\" in the repository to start fixing. Implement features: \u2728 Contribute by implementing features tagged with \"enhancement\" and \"help wanted.\" Write documentation: \ud83d\udcda Contribute to the documentation in the official docs, docstrings, or through blog posts and articles. Submit feedback: \ud83d\udcac Propose new features or give feedback by filing an issue on GitHub. Use the SuperS2 GitHub issues page for feedback.","title":"Types of contributions \ud83d\udce6"}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index d5fc83ca2dfe51969ecf7ab30e1bafe8b9b8cb35..4a7fa83fb182f3ed41d4531685018fa51c50eb18 100644 GIT binary patch delta 15 WcmeBS>S1D&@8;l`AHR`}jS&DI-UFEc delta 15 WcmeBS>S1D&@8;l`8M~2