aws-samples / aws-samples/sample-geospatial-foundation-models-on-aws
Enhancement: Improve Sentinel-2 tile selection logic in demo config generation
- Dominant language
- Python
- Stars
- 79
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
### Description
The current implementation of [generate_config_json](https://github.com/aws-samples/sample-geospatial-foundation-models-on-aws/blob/main/sagemaker_pipelines/embedding_generation/scripts/consolidate.py#L178) function in the demo config generation needs enhancement in how it selects Sentinel-2 tiles. The function currently doesn't optimally select tiles based on quality metrics.
### Current Behavior
The function at [sagemaker_pipelines/embedding_generation/scripts/consolidate.py](https://github.com/aws-samples/sample-geospatial-foundation-models-on-aws/blob/main/sagemaker_pipelines/embedding_generation/scripts/consolidate.py#L207) (lines 207-231) doesn't properly consider:
- Cloud coverage metrics
- NoData properties
- Different monthly variations
### Proposed Enhancement
Improve the tile selection logic to:
Better utilize cloud_cover property from Sentinel-2 tiles
Consider NoData metrics in the selection process
Implement proper handling of different months for better temporal coverage
Select best image per month when choosing images from different years
Select tiles that provide optimal quality for the demo
### Expected Outcome
More reliable and higher quality tile selection for demo configuration generation, resulting in better demonstration of change detection captured by foundation models.
### Type
* [x] Enhancement
* [ ] Bug
* [ ] Documentation
This enhancement will improve the overall quality of demonstrations by ensuring the best available Sentinel-2 tiles are selected.
Contributor guide
Research direction
Start in sagemaker_pipelines/embedding_generation/scripts/consolidate.py, especially generate_config_json and lines 207-231. Review how Sentinel-2 tiles are currently selected, then trace the available cloud_cover, NoData, month, and year values. Done means the generated demo configuration selects higher-quality tiles with one best image per month when comparing years and improves temporal coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- data, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100