Image Segmentation
Transformers
Safetensors
remote-sensing
earth-observation
open-vocabulary
clip
sam3
semantic-segmentation
Instructions to use BiliSakura/SegEarth-OV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BiliSakura/SegEarth-OV with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="BiliSakura/SegEarth-OV")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("BiliSakura/SegEarth-OV", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| #!/usr/bin/env python3 | |
| """Simple OV-3 test. Run: conda activate rsgen && python test_ov3_simple.py | |
| Requires: sam3, pycocotools (pip install pycocotools if missing).""" | |
| from pathlib import Path | |
| from PIL import Image | |
| from pipeline import SegEarthPipeline | |
| if __name__ == "__main__": | |
| repo = Path(__file__).resolve().parent | |
| img_path = repo / "demo_YESeg-OPT-SAR" / "sar.png" | |
| if not img_path.exists(): | |
| img_path = repo / "demo.png" | |
| if not img_path.exists(): | |
| print("No demo image found") | |
| exit(1) | |
| print("Loading OV-3...") | |
| pipe = SegEarthPipeline(variant="OV-3", device="cuda") | |
| print("Running inference...") | |
| img = Image.open(img_path).convert("RGB") | |
| pred = pipe(img) | |
| print(f"OK shape={pred.shape} classes={pred.unique().tolist()}") | |