Skip to content

v1.3.3

Latest

Choose a tag to compare

@giswqs giswqs released this 14 Jun 14:46

What's changed

REST API (samgeo.api) robustness fixes, validated end-to-end against the example imagery in docs/examples/ (#535):

  • Model cache mode collision — the cache key now folds in the model-shaping kwargs (automatic, backend, confidence_threshold, points_per_side, pred_iou_thresh, stability_score_thresh), so an automatic mask-generation instance is no longer reused for a prompt-predict request ('SamGeo2' object has no attribute 'predictor'), and requests that differ only by configuration no longer silently reuse a stale instance.
  • SAM3 second-request dtype error — SAM3 mutates its encoded-image state during generate_*, so the image-hash optimization made the 2nd+ SAM3 request fail with expected scalar type BFloat16 but found Float. _set_image_cached now always re-encodes for SAM3 (SAM/SAM2 still cached).
  • Empty-mask vectorizationraster_to_vector now emits a valid empty FeatureCollection instead of raising geopandas' "no active geometry column" when a mask has no foreground.
  • /segment/automatic gained the empty-masks 404 guard the other endpoints have, and now defaults to SAM3.

Added regression tests for all of the above.

Full diff: v1.3.2...v1.3.3