[Manual] [Arxiv] [Dataset] [Forum]
Star to bookmark, fork & cite if you use, and welcome to contribute!
OpenHAIV is a comprehensive framework for open-world object recognition, supporting out-of-distribution detection, novel class discovery, and incremental learning. It is designed to enable robust and flexible object recognition in unconstrained environments.
The framework adopts a modular design overall, which is reflected in two key aspects.
- 🛠️ Functionally: The framework independently incorporates dedicated modules for supervised training, out-of-distribution detection, novel class discovery, and incremental learning.
- ⚙️ Procedurally:The framework divides its operational workflow into distinct stages, including data processing, model construction, training and evaluation, and visualization.
- Easy experimentation with different algorithms
- Seamless integration of new techniques
- Flexible deployment configurations
- Large-scale dataset processing
- Distributed training capabilities
- Efficient memory management
- Parallel processing optimization
- Plugin-based algorithm integration
- Custom loss function support
- Flexible evaluation metrics
- Comprehensive logging and monitoring
- 👋 Welcome to OpenHAIV
- 📑 Table of Contents
- 🎉 News
- 📋 TODO List
- 🚀 Getting Started
- 🤖 Supported Models
- 📚 Supported Methods
- 🛠️ Contributing Guidelines
- 🤝Contributors
- 📖Citation
- 🙏Acknowledgement
- ✉️Contact
[08/2025] 🌟 Our paper "OpenHAIV: A Framework Towards Practical Open-World Learning" is available at [Arxiv]. [08/2025] 🌟 The code repository is is now publicly available. [09/2024] 🌟 The code repository is created.
- Implement core framework structure
- Support basic OOD detection methods
- Support basic class-incremental learning methods
- Complete Novel Class Discovery implementation
- Add comprehensive benchmarks and evaluation metrics
- Add Data Augmentation techniques
- Create detailed documentation and tutorials
- Add visualization tools for analysis
- Support Windows & macOS installation guide
- Create Jupyter notebook examples
- Set up continuous integration for testing
- Add pre-trained model zoo
- Implement unified evaluation protocols
It is recommended to use anaconda3 to manage and maintain the python library environment.
- Download the .sh file from the anaconda3 website
- Install anaconda3 with .sh file
bash Anaconda3-2023.03-Linux-x86_64.shCreate and activate a virtual environment:
conda create -n openhaiv python=3.10 -y
conda activate openhaiv
pip install -r requirements.txt
python setup.py installRequired packages:
- pytorch>=1.12.0 torchvision>=0.13.0 (recommend official torch command)
- numpy>=1.26.4
- scipy>=1.14.0
- scikit-learn>=1.5.1
python ncdia/train.py --cfg configs/pipeline/ood_detection/msp/det_oes_rn50_msp_train.yaml --opts device='cuda:0'bash ./scripts/inc_BM200_lwf.sh# Set required parameters
# - model weight in weight_path
# - id_txt_file and ood_txt_file
# - output_dir
python ncd.pyResNet、ViT、CLIP
CNN-based methods
| Method | Paper | Venue |
|---|---|---|
Joint |
update models using all the data from all classes | |
Finetune |
baseline method which simply updates model using current data | |
LwF |
Learning without Forgetting | ECCV 2016 |
EWC |
Overcoming catastrophic forgetting in neural networks | PNAS 2017 |
iCaRL |
Incremental Classifier and Representation Learning | CVPR 2017 |
BiC |
Large Scale Incremental Learning | CVPR 2019 |
WA |
Maintaining Discrimination and Fairness in Class Incremental Learning | CVPR 2020 |
|GEM|Gradient Episodic Memory for Continual Learning|NIPS 2017|
|SSRE|Self-Sustaining Representation Expansion for Non-Exemplar Class-Incremental Learning|CVPR 2022|
ViT-based methods
| Method | Paper | Venue |
|---|---|---|
Joint |
update models using all the data from all classes | |
Finetune |
baseline method which simply updates model using current data |
CLIP-based methods
| Method | Paper | Venue |
|---|---|---|
Joint |
update models using all the data from all classes | |
Finetune |
baseline method which simply updates model using current data |
Few-shot class-incremental learning
| Method | Paper | Venue |
|---|---|---|
Alice |
Few-Shot Class-Incremental Learning from an Open-Set Perspective | ECCV 2022 |
FACT |
Forward Compatible Few-Shot Class-Incremental Learning | CVPR 2022 |
SAVC |
Semantic-Aware Virtual Contrastive Constraint for Few-Shot Class-Incremental Learning | CVPR 2023 |
CNN-based Methods
| Method | Paper | Venue |
|---|---|---|
MSP |
A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks | ICLR 2017 |
ODIN |
Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks | ICLR 2018 |
MDS |
A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks | NeurIPS 2018 |
MLS |
Scaling Out-of-Distribution Detection for Real-World Settings | ICML 2022 |
ViM |
Out-Of-Distribution with Virtual-logit Matching | CVPR 2022 |
FDBD |
Fast Decision Boundary based Out-of-Distribution Detector | ICML 2024 |
VOS |
Learning What You Don't Know by Virtual Outlier Synthesis | ICLR 2022 |
LogitNorm |
Mitigating Neural Network Overconfidence with Logit Normalization | ICML 2022 |
DML |
Decoupling MaxLogit for Out-of-Distribution Detection | CVPR 2023 |
CLIP-based Methods
| Method | Paper | Venue |
|---|---|---|
MCM |
Delving into Out-of-Distribution Detection with Vision-Language Representations | NeurIPS 2022 |
GLMCM |
Global and Local Maximum Concept Matching for Zero-Shot Out-of-Distribution Detection | IJCV 2025 |
CoOp |
Learning to Prompt for Vision-Language Models | IJCV 2022 |
LoCoOp |
Few-Shot Out-of-Distribution Detection via Prompt Learning | NeurIPS 2023 |
SCT |
Self-Calibrated Tuning of Vision-Language Models for Out-of-Distribution Detection | NeurIPS 2024 |
DPM |
Vision-Language Dual-Pattern Matching for Out-of-Distribution Detection | ECCV 2024 |
TBD
TBD
We welcome contributions to OpenHAIV🤗 If you're interested in improving the project, please follow these guidelines:
This project uses pre-commit to automatically enforce code style and quality before each commit. Please install pre-commit and run:
pip install pre-commit
pre-commit installThe main checks include:
- flake8: PEP8 code style checking
- yapf: automatic Python code formatting
- codespell: spell checking
- docformatter: automatic docstring formatting
- trailing-whitespace, end-of-file-fixer, mixed-line-ending and other basic formatting fixes
See the .pre-commit-config.yaml file for detailed configuration. All these checks and fixes will be run automatically before every commit.
Note: After running pre-commit install, the configured hooks will automatically run on every git commit. It is recommended to run pre-commit run --all-files once to fix and harmonize existing files in the repository before making commits. To skip hooks for a specific commit, use git commit --no-verify (not recommended).
Please note that all contributors are expected to follow our Code of Conduct to foster a welcoming and inclusive community.
- Check existing issues first to avoid duplicates
- Use the issue template when available
- Be specific about the problem:
- Include steps to reproduce
- Provide environment details (OS, Python version, dependencies)
- Add screenshots if applicable
- Describe expected vs. actual behavior
- Create an issue first to discuss major changes
- Fork the repository and create a branch from
main - Follow the coding style used throughout the project:
- Adhere to PEP 8 guidelines
- Use meaningful variable/function names
- Add docstrings for new functions/classes
- Write tests for new features
- Ensure all tests pass before submitting
- Update documentation reflecting your changes
- Make atomic commits with clear messages
Xiang Xiang, Qinhao Zhou, Jing Ma, Zhuo Xu, Jiaxin Dai, Yifan Liang, Hanlin Li, Yao Deng, Zhipeng Chen, Zihan Zhang, Yuwen Tan.
If you find our repository useful for your research, please consider citing these papers:
@article{xiang2025openhaiv,
title={OpenHAIV: A Framework Towards Practical Open-World Learning},
author={Xiang, Xiang and Zhou, Qinhao and Xu, Zhuo and Ma, Jing and Dai, Jiaxin and Liang, Yifan and Li, Hanlin},
journal={arXiv preprint arXiv:2508.07270},
year={2025},
url={https://arxiv.org/abs/2508.07270},
doi={10.48550/arXiv.2508.07270}
}- OpenOOD, an extensible codebase for out-of-distribution detection with Vision Models only.
- OpenOOD-VLM, an extensible codebase for out-of-distribution detection with both Vision Models and Vision-Language Models.
- PyCIL, an extensible codebase for incremental learning.
If there are any questions, please feel free to propose new features by opening an issue or contact with the team leader: Xiang Xiang (xex@hust.edu.cn). Enjoy the code.

