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
| #!/usr/bin/env python3 | |
| """Test all SegEarth pipelines load correctly. Run: conda activate ifedit && python test_pipelines.py [OV|OV-2|OV-3]""" | |
| import sys | |
| def main(): | |
| from pipeline import SegEarthPipeline | |
| device = sys.argv[2] if len(sys.argv) > 2 else "cuda" | |
| variants = [("OV", device), ("OV-2", device), ("OV-3", device)] | |
| if len(sys.argv) > 1: | |
| want = sys.argv[1] | |
| variants = [(v, d) for v, d in variants if v == want] | |
| if not variants: | |
| print(f"Unknown variant: {want}") | |
| sys.exit(1) | |
| for variant, device in variants: | |
| print(f"Loading {variant}...", end=" ", flush=True) | |
| try: | |
| pipe = SegEarthPipeline(variant=variant, device=device) | |
| print("OK") | |
| except ImportError as e: | |
| if "sam3" in str(e) and variant == "OV-3": | |
| print("SKIP (sam3 not installed)") | |
| else: | |
| print(f"FAIL: {e}") | |
| raise | |
| except Exception as e: | |
| print(f"FAIL: {e}") | |
| raise | |
| print("All pipelines loaded successfully.") | |
| if __name__ == "__main__": | |
| main() | |