Who it is forA researcher or engineer with a CUDA GPU who needs a quick ImageNet-style image classifier to test or compare against other backbones.
The problemTraining a visual backbone from scratch takes far more time than a first test, so you need a working pretrained model to start from.
The outcomeYou have a loaded VisionHOPE-S model that returns logits of shape [1, 1000] for an input image tensor, ready for your own preprocessing and labels.
What you need first
- Linux with an NVIDIA GPU, the CUDA toolkit (including nvcc), and a C++ compiler
- Python 3.10 (recommended) and CUDA 12.1
- Pretrained checkpoint from Hugging Face, GitHub Releases, or Baidu Netdisk
- For dataset tasks: ImageNet-1K, COCO 2017, or ADE20K downloaded from their official websites
Steps
- Run
python -m pip install torch==2.1.0 torchvision==0.16.0 --index-url https://download.pytorch.org/whl/cu121from the repository root. (inferred, check the README) - Run
python -m pip install -r requirements/classification.txtand thenpython -m pip install --no-deps -e .. - Run
python -m pip install --upgrade huggingface_huband thenhf download PSRben/VisionHOPE visionhope_small.pth --local-dir weights. - In Python, call
create_model("visionhope_small", checkpoint_path="weights/visionhope_small.pth").cuda().eval()fromvisionhope.models. (inferred, check the README) - Run a forward pass under
torch.inference_mode()on a [1, 3, 224, 224] CUDA tensor and check that the output shape is [1, 1000].
Prompt for your agent
Using the VisionHOPE repo (PSRben/VisionHOPE), install the classification requirements, download visionhope_small.pth into weights/, and load it with create_model. Run one forward pass on <image path> resized to 224 x 224 and report the top-5 ImageNet class indices. Verify the output tensor has shape [1, 1000].
Caveat. The install requires an NVIDIA GPU with CUDA 12.1 and a working nvcc, and the CUDA extensions compile on first use, so setup can be slow on a fresh machine.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for PSRben/VisionHOPE and "Classify images with a pretrained VisionHOPE model"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer