Skip to content
Draft
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
6 changes: 3 additions & 3 deletions Analyzing_Data/RasterFlow_Bring_Your_Own_Model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
"metadata": {},
"source": [
"```python\n",
"mosaic_index = client.build_gti_mosaic(\n",
"mosaic_index = client.build_gti_mosaics(\n",
" gti = \"s3://wherobots-examples/rasterflow/indexes/naip_index.parquet\",\n",
" aoi = aoi_path,\n",
" bands = [\"red\", \"green\", \"blue\", \"nir\"],\n",
Expand Down Expand Up @@ -534,7 +534,7 @@
"source": [
"```python\n",
"predict_mosaic_output = client.predict_mosaic(\n",
" store=mosaic_store,\n",
" mosaics=mosaic_store,\n",
" **asdict(custom_inference_config)\n",
")\n",
"\n",
Expand Down Expand Up @@ -615,7 +615,7 @@
"- **Define input shape constraints** using `torch.export.Dim` for dynamic batch sizes and fixed spatial dimensions\n",
"- **Export models and transforms** together into a single `.pt2` archive using `package_pt2`\n",
"- **Upload custom models to S3** using Wherobots Managed Storage\n",
"- **Build GTI mosaics** from imagery indexes with `build_gti_mosaic`\n",
"- **Build GTI mosaics** from imagery indexes with `build_gti_mosaics`\n",
"- **Run scalable inference** using `InferenceConfig` and `predict_mosaic`\n",
"\n",
"### Next Steps\n",
Expand Down
10 changes: 5 additions & 5 deletions Analyzing_Data/RasterFlow_Bring_Your_Own_Rasters_NAIP.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"source": [
"# Bring Your Own Rasters (BYOR) with RasterFlow\n",
"\n",
"This notebook demonstrates how to bring your own rasters (BYOR) into RasterFlow by querying a STAC catalog and creating a GTI (GDAL Raster Tile Index). You will learn how to query the NAIP collection, extract Cloud-Optimized GeoTIFF (COG) URLs, and build a mosaic using RasterFlow's `build_gti_mosaic` function.\n",
"This notebook demonstrates how to bring your own rasters (BYOR) into RasterFlow by querying a STAC catalog and creating a GTI (GDAL Raster Tile Index). You will learn how to query the NAIP collection, extract Cloud-Optimized GeoTIFF (COG) URLs, and build a mosaic using RasterFlow's `build_gti_mosaics` function.\n",
"\n",
"## What you will learn\n",
"\n",
"This notebook will teach you to:\n",
"\n",
"- Query a STAC catalog to discover available imagery for an area of interest\n",
"- Create a GTI (GDAL Raster Tile Index) from STAC items\n",
"- Build a seamless mosaic from multiple image tiles using RasterFlow's `build_gti_mosaic`\n",
"- Build a seamless mosaic from multiple image tiles using RasterFlow's `build_gti_mosaics`\n",
"- Visualize the resulting mosaic and inference outputs\n",
"- (Optional) Run road detection using the ChesapeakeRSC model"
]
Expand Down Expand Up @@ -395,7 +395,7 @@
"source": [
"## Building a mosaic with RasterFlow\n",
"\n",
"Now we use RasterFlow's `build_gti_mosaic` function to create a seamless 4-band mosaic from the NAIP tiles.\n",
"Now we use RasterFlow's `build_gti_mosaics` function to create a seamless 4-band mosaic from the NAIP tiles.\n",
"\n",
"> **Note:** The `naip-analytic` S3 bucket is requester-pays, so we set `requester_pays=True`.\n",
"\n",
Expand All @@ -413,7 +413,7 @@
"client = RasterflowClient()\n",
"\n",
"# Build a 4-band mosaic (Red, Green, Blue, NIR)\n",
"mosaic_index = client.build_gti_mosaic(\n",
"mosaic_index = client.build_gti_mosaics(\n",
" # Path to the GTI GeoParquet file\n",
" gti=os.getenv(\"USER_S3_PATH\") + \"naip_gti.parquet\",\n",
" \n",
Expand Down Expand Up @@ -485,7 +485,7 @@
"# MODEL_PATH = \"https://huggingface.co/wherobots/chesapeakersc-pt2/resolve/main/chesapeakersc-ep.pt2\"\n",
"# \n",
"# prediction_store = client.predict_mosaic(\n",
"# store=mosaic_store,\n",
"# mosaics=mosaic_store,\n",
"# model_path=MODEL_PATH,\n",
"# patch_size=512,\n",
"# clip_size=64,\n",
Expand Down
2 changes: 1 addition & 1 deletion Analyzing_Data/RasterFlow_CHM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"metadata": {},
"outputs": [],
"source": [
"model_output_index = rf_client.build_and_predict_mosaic_recipe(\n",
"model_output_index = rf_client.predict_mosaic_recipe(\n",
" # Path to our AOI in GeoParquet or GeoJSON format\n",
" aoi = aoi_path,\n",
"\n",
Expand Down
10 changes: 5 additions & 5 deletions Analyzing_Data/RasterFlow_ChangeDetection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"source": [
"## Building a Mosaic\n",
"\n",
"RasterFlow provides a `build_mosaic` workflow to create analysis-ready imagery for your Area of Interest (AOI). This step:\n",
"RasterFlow provides a `build_mosaics` workflow to create analysis-ready imagery for your Area of Interest (AOI). This step:\n",
"* Ingests Sentinel-2 imagery for the specified AOI across your defined time range (e.g., 2 years)\n",
"* Applies [quality filtering and cloud masking](https://docs.wherobots.com/develop/rasterflow/rasterflow-datasets#cloud-and-quality-filtering) to select valid observations\n",
"* Generates a seamless, temporally-composited mosaic from multiple image tiles\n",
Expand All @@ -131,7 +131,7 @@
"metadata": {},
"outputs": [],
"source": [
"mosaic_index = rf_client.build_mosaic(\n",
"mosaic_index = rf_client.build_mosaics(\n",
" datasets=[DatasetEnum.S2_MED_WINDOWED_PIXEL],\n",
" aoi=aoi_path,\n",
" start=datetime(2023, 1, 1),\n",
Expand Down Expand Up @@ -209,7 +209,7 @@
"\n",
"We'll pass in the band names we want to predict, as well as other inference configs that specify how to run inference.\n",
"\n",
"- `store` is the mosaic we just created for sentinel-2\n",
"- `mosaics` is the mosaic we just created for sentinel-2\n",
"- `model_path` can be a path to a Pytorch 2 Archive file on s3 or Huggingface. In this case we'll use the Fields of the World model from the Wherobots' Huggingface Collection.\n",
"- `patch_size` controls the XY size of the array input to the model\n",
"- `clip_size` in conjunction with `MergeModeEnum`, controls how to run overlapping windowed inference to reduce edge effects relative to non-overlapping inference\n",
Expand Down Expand Up @@ -246,7 +246,7 @@
"outputs": [],
"source": [
"model_output_index = rf_client.predict_mosaic(\n",
" store=input_store,\n",
" mosaics=input_store,\n",
" model_path=\"https://huggingface.co/wherobots/ftw-v1.1-pt2/resolve/main/ftw-v1.1-ep.pt2\",\n",
" patch_size=256,\n",
" clip_size=32,\n",
Expand Down Expand Up @@ -386,7 +386,7 @@
"source": [
"# Note: this should take about 5 minutes to complete\n",
"vectorized_results = rf_client.vectorize_mosaic(\n",
" store = model_output_store,\n",
" mosaic = model_output_store,\n",
" features = vector_features,\n",
" threshold = 0.5,\n",
" vectorize_method = VectorizeMethodEnum.SEMANTIC_SEGMENTATION_RASTERIO,\n",
Expand Down
4 changes: 2 additions & 2 deletions Analyzing_Data/RasterFlow_Chesapeake.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"metadata": {},
"outputs": [],
"source": [
"model_output_index = rf_client.build_and_predict_mosaic_recipe(\n",
"model_output_index = rf_client.predict_mosaic_recipe(\n",
" # Path to our AOI in GeoParquet or GeoJSON format\n",
" aoi = aoi_path,\n",
"\n",
Expand Down Expand Up @@ -190,7 +190,7 @@
"source": [
"# Note: this should take about 5 minutes to complete\n",
"vectorized_results = rf_client.vectorize_mosaic(\n",
" store = model_output_store,\n",
" mosaic = model_output_store,\n",
" features = vector_features,\n",
" threshold = 0.5,\n",
" vectorize_method = VectorizeMethodEnum.SEMANTIC_SEGMENTATION_RASTERIO,\n",
Expand Down
4 changes: 2 additions & 2 deletions Analyzing_Data/RasterFlow_FTW.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"metadata": {},
"outputs": [],
"source": [
"model_output_index = rf_client.build_and_predict_mosaic_recipe(\n",
"model_output_index = rf_client.predict_mosaic_recipe(\n",
" # Path to our AOI in GeoParquet or GeoJSON format\n",
" aoi = aoi_path,\n",
"\n",
Expand Down Expand Up @@ -204,7 +204,7 @@
"source": [
"# Note: this should take about 5 minutes to complete\n",
"vectorized_results = rf_client.vectorize_mosaic(\n",
" store = model_output_store,\n",
" mosaic = model_output_store,\n",
" features = vector_features,\n",
" threshold = 0.5,\n",
" vectorize_method = VectorizeMethodEnum.SEMANTIC_SEGMENTATION_RASTERIO,\n",
Expand Down
4 changes: 2 additions & 2 deletions Analyzing_Data/RasterFlow_S2_Mosaic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"4. Compute a pixel-wise median composite across remaining valid observations\n",
"5. Output the result as a Zarr store\n",
"\n",
"> **Note:** This step will take approximately 10-15 minutes to complete. If you want to skip this build_mosaic step, you can uncomment the next cell and start with a pre-generated mosaic."
"> **Note:** This step will take approximately 10-15 minutes to complete. If you want to skip this build_mosaics step, you can uncomment the next cell and start with a pre-generated mosaic."
]
},
{
Expand All @@ -130,7 +130,7 @@
"metadata": {},
"outputs": [],
"source": [
"mosaic_index = rf_client.build_mosaic(\n",
"mosaic_index = rf_client.build_mosaics(\n",
" # Dataset type for harvest season median mosaic\n",
" datasets=[DatasetEnum.S2_MED_HARVEST],\n",
" \n",
Expand Down
2 changes: 1 addition & 1 deletion Analyzing_Data/RasterFlow_SAM3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"metadata": {},
"outputs": [],
"source": [
"model_output = rf_client.run_geometry_inference_recipe(\n",
"model_output = rf_client.predict_mosaic_geometries_recipe(\n",
" # Path to our AOI in GeoParquet or GeoJSON format\n",
" aoi=aoi_path,\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions Analyzing_Data/RasterFlow_Tile2Net.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"metadata": {},
"outputs": [],
"source": [
"model_output_index = rf_client.build_and_predict_mosaic_recipe(\n",
"model_output_index = rf_client.predict_mosaic_recipe(\n",
" # Path to our AOI in GeoParquet or GeoJSON format\n",
" aoi = aoi_path,\n",
"\n",
Expand Down Expand Up @@ -195,7 +195,7 @@
"source": [
"# Note: this should take about 5 minutes to complete\n",
"vectorized_results = rf_client.vectorize_mosaic(\n",
" store = model_output_store,\n",
" mosaic = model_output_store,\n",
" features = vector_features,\n",
" threshold = 0.05,\n",
" vectorize_method = VectorizeMethodEnum.SEMANTIC_SEGMENTATION_RASTERIO,\n",
Expand Down
Loading