Image Segmentation
Transformers
Safetensors
remote-sensing
earth-observation
open-vocabulary
clip
sam3
semantic-segmentation
Instructions to use Dingyi111/SegEarth-OV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dingyi111/SegEarth-OV with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="Dingyi111/SegEarth-OV")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Dingyi111/SegEarth-OV", dtype="auto") - Notebooks
- Google Colab
- Kaggle
File size: 790 Bytes
fabc606 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #!/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()}")
|