DePerceiver / README.md
Max-Ploter's picture
Update README.md (#1)
987d165 verified
metadata
license: apache-2.0
pipeline_tag: object-detection

Detection Perceiver Model

DePerceiver R50 Image

GH repository DePerceiver

Usage

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

pip install torch torchvision perceiver-pytorch