Add SAM 3D Objects Encoder
Author: ghost
Pull request: no
Labels: name: New model

### Model description

## Model Description

SAM 3D Objects is Meta AI's foundation model for 3D object reconstruction from single images. I'm proposing to add the **encoder component** (DINOv2-based Vision Transformer) to Transformers.

**Scope**: Encoder only, not the full 3D generation pipeline (which includes Gaussian Splatting/Mesh decoders better suited for Diffusers).

## Open source status

- [x] The model implementation available
- [x] The model weights are available

## Provide useful links for the implementation

- **Model Card**: https://huggingface.co/facebook/sam-3d-objects
- **Paper**: https://arxiv.org/abs/2511.16624
- **Original Repository**: https://github.com/facebookresearch/sam-3d-objects
- **Blog Post**: https://ai.meta.com/blog/sam-3d/

## Implementation Progress

I have already implemented this model and it's ready for review:

✅ **Implementation Complete:**
- `Sam3DObjectsEncoderConfig` - Configuration with DINO variant support
- `Sam3DObjectsEncoder` - Main encoder model
- `Sam3DObjectsEncoderForMasks` - Variant for mask encoding
- `Sam3DObjectsImageProcessor` - Image preprocessing
- Comprehensive test suite: **28/28 tests passing**
- Full documentation

**Test Results:**
collected 29 items
28 passed, 1 skipped in 4.92s

**Example Usage:**
```python
from transformers.models.sam3d_objects import (
    Sam3DObjectsEncoder,
    Sam3DObjectsEncoderConfig,
    Sam3DObjectsImageProcessor,
)

config = Sam3DObjectsEncoderConfig.from_dino_config("dinov2_vitl14")
model = Sam3DObjectsEncoder(config)
processor = Sam3DObjectsImageProcessor()

inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
embeddings = outputs.last_hidden_state
```

## Questions

1. Is there interest in adding the SAM 3D Objects Encoder to Transformers?
2. Should this be limited to the encoder component (my recommendation)?
3. Should I submit a PR, or are there any requirements I should address first?

## Additional Context

- The encoder is based on DINOv2 and fits naturally in Transformers
- Full 3D generation pipeline would be better suited for Diffusers
- Model is gated on Hub (requires license acceptance)
- Implementation follows Transformers patterns and guidelines

I'm ready to submit a PR and address any feedback.

### Open source status

- [x] The model implementation is available
- [x] The model weights are available

### Provide useful links for the implementation

## Links

- **Model Card**: https://huggingface.co/facebook/sam-3d-objects
- **Paper**: https://arxiv.org/abs/2511.16624 (SAM 3D: 3Dfy Anything in Images)
- **Original Repository**: https://github.com/facebookresearch/sam-3d-objects
- **Blog Post**: https://ai.meta.com/blog/sam-3d/
- **Project Page**: https://ai.meta.com/sam3d/

## Authors

**SAM 3D Team** from Meta AI

For the complete author list and contributions, see:
- [ArXiv Paper](https://arxiv.org/abs/2511.16624)
- [Original Repository](https://github.com/facebookresearch/sam-3d-objects)

*Note: This is a large collaborative project with many contributors from Meta Superintelligence Labs.*

## Implementation Details

**Model Type**: Vision Encoder (DINOv2-based)  
**Architecture**: Vision Transformer (ViT)  
**Variants Supported**: 
- ViT-S/14 (384 dim)
- ViT-B/14 (768 dim)
- ViT-L/14 (1024 dim)
- ViT-G/14 (1536 dim)

**Input**: RGB images (224x224 or 518x518)  
**Output**: Visual embeddings for 3D generation tasks

**License**: SAM License (gated model on HuggingFace Hub)

Comments:
cc @yonigozlan