File size: 952 Bytes
987d165 |
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
---
license: apache-2.0
pipeline_tag: object-detection
---
# Detection Perceiver Model
<img src="https://raw.githubusercontent.com/maxploter/DePerceiver/refs/heads/main/de_perceiver_r50/de_perceiver.png" alt="DePerceiver R50 Image"/>
[GH repository DePerceiver](https://github.com/maxploter/DePerceiver)
## Usage
```python
from huggingface_hub import snapshot_download
import torch
import json
import sys
# Download model
repo_path = snapshot_download(repo_id="Max-Ploter/DePerceiver")
# Add to Python path to access modeling_detection_perceiver.py
sys.path.append(repo_path)
from modeling_detection_perceiver import build_model
# Load config
with open(f"{repo_path}/config.json") as f:
config = json.load(f)
# Build and load model
model = build_model(config)
model.load_state_dict(torch.load(f"{repo_path}/detection_perceiver_model_weights_pytorch.bin"))
```
## Dependencies
```shell
pip install torch torchvision perceiver-pytorch
```
|