|
Download README.md from Max-Ploter/DePerceiver: direct link, hf CLI and curl.
- Browser
- Download file 952 Bytes
-
https://huggingface.co/Max-Ploter/DePerceiver/resolve/main/README.md
- Command line
-
hf download hf://Max-Ploter/DePerceiver/README.md
-
curl -L -o README.md https://huggingface.co/Max-Ploter/DePerceiver/resolve/main/README.md
952 Bytes
metadata
license: apache-2.0
pipeline_tag: object-detection
Detection Perceiver Model
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