Object Detection
Transformers
Safetensors
locateanything
feature-extraction
locateanything,
custom_code
Instructions to use SD-Next/LocateAnything-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SD-Next/LocateAnything-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="SD-Next/LocateAnything-3B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SD-Next/LocateAnything-3B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
2 days ago
-
Update README.md
Verified signature83b9bf2 -
Create README.md
Verified signature# LocateAnything Full reimplementation of <https://huggingface.co/nvidia/LocateAnything-3B> for compatibility with `transformers>=5` Example code: ```py import argparse from pathlib import Path import torch from PIL import Image from transformers import AutoModel, AutoProcessor repo_id = 'SD-Next/LocateAnything-3B' parser = argparse.ArgumentParser() parser.add_argument("--image", required=True, type=Path) parser.add_argument("--prompt", required=True) args = parser.parse_args() processor = AutoProcessor.from_pretrained(repo_id, trust_remote_code=True) model = AutoModel.from_pretrained(repo_id, trust_remote_code=True, torch_dtype="auto", device_map="auto").eval() image = Image.open(args.image).convert("RGB") messages = [{"role": "user", "content": [ {"type": "image", "image": image}, {"type": "text", "text": args.prompt} ]}] text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) inputs = processor(images=image, text=text, return_tensors…70985d0 -
Upload folder using huggingface_hub
Verified signature1983b12 -
initial commit
Verified signaturef3a5f7c