HyperVision
Lightweight anchor-free object detection model. Real-time on mobile devices.
Premium Edition by Myndlabs.tech
HyperVision is an anchor-free one-stage object detection model based on Generalized Focal Loss. It is designed for efficient on-device inference across CPU, GPU, and mobile NPU backends.
Repository Contents
This repository provides:
- Source code for training and inference
- Python demo for image, video, and webcam inference
- Android demo (
demo_android_ncnn/) using ncnn - NCNN C++ demo (
demo_ncnn/) - MNN C++ demo (
demo_mnn/) - OpenVINO C++ demo (
demo_openvino/) - LibTorch C++ demo (
demo_libtorch/) - Jupyter notebook walkthrough (
demo/demo-inference-with-pytorch.ipynb) - Multi-backend model export tools (ONNX, TorchScript)
- Training pipeline using PyTorch Lightning
Install
Requirements
- Linux, macOS, or Windows
- Python >= 3.7
- PyTorch >= 1.10.0, < 2.0.0
Quick Start
# Clone the repository
git clone https://github.com/Yethikrishna/hypervision.git
cd hypervision
# Install dependencies
pip install -r requirements.txt
# Setup HyperVision
python setup.py develop
Demo
PyTorch Inference
# Image inference
python demo/demo.py image --config CONFIG_PATH --model MODEL_PATH --path IMAGE_PATH
# Video inference
python demo/demo.py video --config CONFIG_PATH --model MODEL_PATH --path VIDEO_PATH
# Webcam inference
python demo/demo.py webcam --config CONFIG_PATH --model MODEL_PATH --camid YOUR_CAMERA_ID
A Jupyter notebook is also available at demo/demo-inference-with-pytorch.ipynb.
Android
See demo_android_ncnn/README.md.
NCNN, MNN, OpenVINO, LibTorch
See the respective README files in demo_ncnn/, demo_mnn/, demo_openvino/, and demo_libtorch/.
Training
- Prepare your dataset in COCO, Pascal VOC XML, or YOLO format.
- Copy and modify a config file from
config/. - Run training:
python tools/train.py CONFIG_FILE_PATH
TensorBoard logs are saved to the directory specified in the config file.
Model Export
# Export to ONNX
python tools/export_onnx.py --cfg_path CONFIG_PATH --model_path MODEL_PATH
# Export to TorchScript
python tools/export_torchscript.py --cfg_path CONFIG_PATH --model_path MODEL_PATH
Citation
If you use this project in your research, please cite:
@misc{hypervision,
title={HyperVision: Lightweight anchor-free object detection model},
author={Yethikrishna R},
howpublished = {\url{https://github.com/Yethikrishna/hypervision}},
year={2025},
note={Premium edition published by Myndlabs.tech}
}
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Premium Edition published by Myndlabs.tech โ Enterprise-grade object detection solutions.