|
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
| 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 | |
| ``` | |