Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions severe-weather/generate-chips/generating_chip_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## 1. Create Conda Env

All the dependencies for these scripts are in one conda environment, which can be installed and activated with:
All the dependencies for these scripts are in the `severe-weather` conda environment, which can be installed and activated with:

```
conda env create -f environment.yml
Expand All @@ -15,28 +15,27 @@ conda activate severe-weather

## 2. Make Label Rasters

With the conda env activated the rasters can be generated by running:
With the `severe-weather` conda environment activated, the rasters can be generated by running:

```
python generate_severe_weather_rasters.py
```

This script downloads the [hwds_db](https://github.com/jrbell1/hwds_db) dataset and turns all the
damasge swaths during Sentinel 1 into 10m rasters.
This script downloads the [Hail and Wind Damage Swath (HWDS)](https://github.com/jrbell1/hwds_db) dataset and takes all the damage swaths that occurred during Sentinel 1 mission (2015-Present) and turns them into 10m label rasters.

## 3. Generate Label Chips from Rasters

To generate label and data chips from the hwds rasters run:
To generate label and data chips from the hwds rasters, run:

```
python chip_severe_weather_raster.py (tif path)
```

The tifs can be found in the `./data/hwds-rasters/` directory made by `generate_severe_weather_rasters.py`.
One example command would be:
The tifs can be found in the `data/hwds-rasters/` directory made by `generate_hwds_rasters.py`.
For example, you could generate files with the swath ID 1507 acquired on July 6, 2020 with:

```
python chip_severe_weather_raster.py data/severe-weather-rasters/swathID_1507_swathDate_2020-07-06.tif
```

This will generate zarr files for each chip and in the `chips` directory. There will be a directory for the labels, one for the S1RTC chips and one for S2L2A chips.
This will generate 3 zarr files in the `data/zarrs` directory: one for the labeled data (`swathID_1507_swathDate_2020-07-06.zarr.zip`), one for the S1RTC chips (`swathID_1507_swathDate_2020-07-06_S1RTC.zarr.zip`), and one for S2L2A chips (`swathID_1507_swathDate_2020-07-06_S2L2A.zarr.zip`).
2 changes: 1 addition & 1 deletion severe-weather/training/run_severe_weather_segmentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The data are in `zarr` format and prepared using [SatChip](https://github.com/fo
* `S1RTC`: Sentinel-1 Radiometric Terrain Corrected (RTC) data created using [ASF's HyP3 on-demand platform](https://hyp3-docs.asf.alaska.edu/guides/rtc_product_guide/)
* `HYP3S1RTC`: Sentinel-1 Radiometric Terrain Corrected (RTC) data created using [ASF's HyP3 on-demand platform](https://hyp3-docs.asf.alaska.edu/guides/rtc_product_guide/)

SatChip prepares data labels and satellite images into 264x264 sample files that follow the TerraMind extension of the MajorTom specification and are saved as `zarr.zip` files. [Here](generating_chip_data.md) is a tutorial on generating your own chip data.
SatChip prepares data labels and satellite images into 264x264 image arrays that follow the TerraMind extension of the MajorTom specification and are saved as `zarr.zip` files. You can walk through [this tutorial](generating_chip_data.md) to generate your own chip data.

Below is an example of metadata associated with the Sentinel-1 RTC chip `swathID_1260_swathDate_2019-06-17_464U_867L_2_0_S1RTC.zarr.zip`:
```
Expand Down