Skip to content

Commit

Permalink
fix issue with duplicaet detections and doc
Browse files Browse the repository at this point in the history
  • Loading branch information
favyen2 committed Feb 6, 2025
1 parent 5665ba4 commit c6dc896
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions data/sentinel2_vessels/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ trainer:
path: gs://rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20240927/
output_layer: output
selector: ["detect"]
merger:
class_path: rslp.utils.nms.NMSDistanceMerger
init_args:
grid_size: 64
distance_threshold: 10
property_name: "category" # same as task.property_name
class_agnostic: false
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
save_top_k: 1
Expand Down
3 changes: 2 additions & 1 deletion docs/sentinel2_vessels.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ automatically downloads the scene images from a

mkdir output_crops
mkdir scratch_dir
python -m rslp.main sentinel2_vessels predict '["scene_id": "S2A_MSIL1C_20180904T110621_N0206_R137_T30UYD_20180904T133425", "geojson_path": "out.geojson", "crop_path": "output_crops/"]' scratch_dir/
python -m rslp.main sentinel2_vessels predict '[{"scene_id": "S2A_MSIL1C_20180904T110621_N0206_R137_T30UYD_20180904T133425", "geojson_path": "out.geojson", "crop_path": "output_crops/"}]' scratch_dir/
qgis out.geojson scratch_dir/windows/default/default/layers/sentinel2/R_G_B/geotiff.tif

Then, `out.geojson` will contain a GeoJSON of detected ships while `output_crops` will
contain corresponding crops centered around those ships (showing the RGB B4/B3/B2
Expand Down

0 comments on commit c6dc896

Please sign in to comment.