{"id":21384660,"url":"https://github.com/imoonlab/hyper-yolo","last_synced_at":"2025-04-05T12:01:55.680Z","repository":{"id":252331376,"uuid":"822444072","full_name":"iMoonLab/Hyper-YOLO","owner":"iMoonLab","description":"The source code of IEEE TPAMI 2025 \"Hyper-YOLO: When Visual Object Detection Meets Hypergraph Computation\".","archived":false,"fork":false,"pushed_at":"2024-12-16T01:44:28.000Z","size":5548,"stargazers_count":153,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T11:03:23.197Z","etag":null,"topics":["computer-vision","deep-learning","hypergraph-neural-networks","object-detection","yolo"],"latest_commit_sha":null,"homepage":"https://www.arxiv.org/abs/2408.04804","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iMoonLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-01T07:02:23.000Z","updated_at":"2025-03-28T02:57:28.000Z","dependencies_parsed_at":"2024-08-12T10:58:45.738Z","dependency_job_id":"e044af11-438d-49e9-8cd2-db9ef8e06176","html_url":"https://github.com/iMoonLab/Hyper-YOLO","commit_stats":{"total_commits":41,"total_committers":3,"mean_commits":"13.666666666666666","dds":0.5853658536585367,"last_synced_commit":"2f63ef1d31004bba6d884490549abf71ab52a283"},"previous_names":["imoonlab/hyper-yolo"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FHyper-YOLO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FHyper-YOLO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FHyper-YOLO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FHyper-YOLO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMoonLab","download_url":"https://codeload.github.com/iMoonLab/Hyper-YOLO/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332556,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","deep-learning","hypergraph-neural-networks","object-detection","yolo"],"created_at":"2024-11-22T11:42:28.223Z","updated_at":"2025-04-05T12:01:55.662Z","avatar_url":"https://github.com/iMoonLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyper-YOLO\n\nThis repository contains the source code for the paper \"Hyper-YOLO: When Visual Object Detection Meets Hypergraph Computation\" published in IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) 2025 by [Yifan Feng](https://fengyifan.site/), Jiangang Huang, Shaoyi Du, Shihui Ying, Jun-Hai Yong, Yipeng Li, Guiguang Ding, Rongrong Ji, and Yue Gao*. This paper is available at [here](https://www.arxiv.org/abs/2408.04804).\n\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n  \u003cfont size=\"+1\"\u003eAbstract\u003c/font\u003e\n  \u003c/summary\u003e\nWe introduce Hyper-YOLO, a new object detection method that integrates hypergraph computations to capture the complex high-order correlations among visual features. Traditional YOLO models, while powerful, have limitations in their neck designs that restrict the integration of cross-level features and the exploitation of high-order feature interrelationships. To address these challenges, we propose the Hypergraph Computation Empowered Semantic Collecting and Scattering (HGC-SCS) framework, which transposes visual feature maps into a semantic space and constructs a hypergraph for high-order message propagation. This enables the model to acquire both semantic and structural information, advancing beyond conventional feature-focused learning.\nHyper-YOLO incorporates the proposed Mixed Aggregation Network (MANet) in its backbone for enhanced feature extraction and introduces the Hypergraph-Based Cross-Level and Cross-Position Representation Network (HyperC2Net) in its neck. HyperC2Net operates across five scales and breaks free from traditional grid structures, allowing for sophisticated high-order interactions across levels and positions. This synergy of components positions Hyper-YOLO as a state-of-the-art architecture, as evidenced by its superior performance on the COCO dataset. Hyper-YOLO-N significantly outperforms the advanced YOLOv8-N with 12\\% $\\text{AP}^{val}$ improvements. Compared with SOTA Gold-YOLO-N, Hyper-YOLO-N achieves 5\\% $\\text{AP}^{val}$ improvement with only 72\\% parameters.\n\u003c/details\u003e\n\n## NEWS 🔥\n- 2024/12/14: Our paper has been accepted by TPAMI.\n\n# Performance on MS COCO\n\n\u003cimg src=\"docs/performance_v11.jpg\" width=\"40%\"\u003e\n\n## Hyper-YOLO\n\nOur Hyper-YOLO enhances the YOLOv8 architecture with hypergraph computation. The comparsion of four scale models are provided in the following table.\n\n| Model            | Test Size | $AP^{val}$ | $AP^{val}_{50}$ | Params | FLOPs |\n| ---              | ---       | ---  | ---  | ---    | ---     | \n| YOLOv8-N         | 640       | 37.3 | 52.6 | 3.2 M  | 8.7 G   |\n| YOLOv8-S         | 640       | 44.9 | 61.8 | 11.2 M | 28.6 G  |\n| YOLOv8-M         | 640       | 50.2 | 67.2 | 25.9 M | 78.9 G  |\n| YOLOv8-L         | 640       | 52.9 | 69.8 | 43.7 M | 165.2 G |\n| HyperYOLO-T      | 640       | 38.5 | 54.5 | 3.2M   | 9.6G    |\n| HyperYOLO-N      | 640       | 41.8 | 58.3 | 4.0M   | 11.4G   |\n| HyperYOLO-S      | 640       | 48.0 | 65.1 | 14.8M  | 39.0G   |\n| HyperYOLO-M      | 640       | 52.0 | 69.0 | 33.8M  | 103.3G  |\n| HyperYOLO-L      | 640       | 53.8 | 70.9 | 56.3M  | 211.0G  |\n\n\n## Hyper-YOLO v1.1\nFurthermore, we replace the neck of YOLOv9 with the proposed HyperC2Net of our Hyper-YOLO, termed Hyper-YOLOv1.1. The source codes of Hyper-YOLOv1.1 are avaiable in [here](https://github.com/iMoonLab/Hyper-YOLOv1.1). \n\nClearly, in each scale, the Hyper-YOLOv1.1 outperforms the YOLOv9, which demonstrates the effectiveness of our HyperC2Net in capturing high-order feature correlations. The comparison of four scale models are provided in the following table\n\n| Model            | Test Size | $AP^{val}$ | $AP^{val}_{50}$ | Params | FLOPs |\n| ---              | ---       | ---  | ---  | ---    | ---     | \n| YOLOv9-T         | 640       | 38.3 | 53.1 | 2.0M   | 7.7G    |\n| YOLOv9-S         | 640       | 46.8 | 63.4 | 7.1M   | 26.4G   |\n| YOLOv9-M         | 640       | 51.4 | 68.1 | 20.0M  | 76.3G   |\n| YOLOv9-C         | 640       | 53.0 | 70.2 | 25.3M  | 102.1G  |\n| Hyper-YOLOv1.1-T | 640       | 40.3 | 55.6 | 2.5M   | 10.8G   |\n| Hyper-YOLOv1.1-S | 640       | 48.0 | 64.5 | 7.6M   | 29.9G   |\n| Hyper-YOLOv1.1-M | 640       | 51.8 | 69.2 | 21.2M  | 87.4G   |\n| Hyper-YOLOv1.1-C | 640       | 53.2 | 70.4 | 29.8M  | 115.5G  |\n\n\n# Installation\n\nClone repo and create conda environment (recommended).\nThen install requirements.txt in a Python\u003e=3.8.0 environment, including PyTorch\u003e=1.8.\nThe command is as follows.\n\n```bash\ngit clone https://github.com/iMoonLab/Hyper-YOLO.git  # clone\ncd Hyper-YOLO\nconda create -n Hyper-YOLO python=3.8\nconda activate Hyper-YOLO\npip install -r requirements.txt  # install\n```\nYou can also use the environment.yaml file and the conda command to install the required environment.\n```bash\nconda env create -f environment.yaml\n```\n\n# Datasets\nData Preparation: Download the MS COCO dataset images (training, validation, and test sets) and corresponding labels, or prepare your custom dataset as shown below. Additionally, modify the dataset path in ultralytics/cfg/datasets/coco.yaml to reflect the location of your data.\n```bash\ncoco\n--images\n  --train2017\n  --val2017\n--labels\n  --train2017\n  --val2017\n```\n# Training\nMost of training configurations can change in the \"Train settings\" section of ultralytics/cfg/default.yaml. \nThe key factors are model, data, img, epoches, batch, device and training hyperparameters.\nFor example, you can use \"model: hyper-yolon.yaml\" to train an object detection model.\n```bash\npython ultralytics/models/yolo/detect/train.py \n```\n\n# Evaluation\nMost of evaluation configurations can change in the \"Val/Test settings\" section of ultralytics/cfg/default.yaml. \nThe key factors are model(weight), data, img, batch, conf, iou, half.\n```bash\npython ultralytics/models/yolo/detect/val.py\n```\n## Detection\nMost of predict configurations can change in the \"Predict settings\" section of ultralytics/cfg/default.yaml.\nThe key factors are model(weight), source, img, conf, iou.\n```bash\npython ultralytics/models/yolo/detect/predict.py\n```\n![Detection](docs/vis_det.jpg)\n\n## Segmentation\nHere, our instance segmentation model configuration remains consistent with YOLOv8, by changing the object detection output head to an instance segmentation output head, while the backbone and neck remain unchanged. The model's training and testing process is similar to that of object detection.\nFor example, you can use \"model: hyper-yolon-seg.yaml\" to train an instance segmentation model.\n```bash\npython ultralytics/models/yolo/segment/train.py\npython ultralytics/models/yolo/segment/val.py\npython ultralytics/models/yolo/segment/predict.py \n```\n![Detection](docs/vis_seg.jpg)\n\n\n# Export\nHere is an example code for exporting an ONNX model. If you need to export other formats, please refer to our example code and the YOLOv8 documentation.\n```bash\npython ultralytics/utils/export_onnx.py\n```\n\n# Acknowledgement\nOur code is built based on the [YOLOv8](https://github.com/ultralytics/ultralytics).\nThanks for their great work!\n\n# Citation\nIf you find our work useful in your research, please consider citing:\n\n```bibtex\n@article{feng2024hyper,\n  title={Hyper-YOLO: When Visual Object Detection Meets Hypergraph Computation},\n  author={Feng, Yifan and Huang, Jiangang and Du, Shaoyi and Ying, Shihui and Yong, Jun-Hai and Li, Yipeng and Ding, Guiguang and Ji, Rongrong and Gao, Yue},\n  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},\n  year={2025},\n  publisher={IEEE}\n}\n```\n\n# About Hypergraph Computation\nHypergraph computation is a powerful tool to capture high-order correlations among visual features. Compared with graphs, each hyperedge in a hypergraph can connect more than two vertices, which is more flexible to model complex correlations. Now, learning with high-order correlations still remains a under-explored area in computer vision. We hope our work can inspire more research in this direction. If you are interested in hypergraph computation, please refer to our series of works on hypergraph computation in the follows:\n\n- [Hypergraph Learning: Methods and Practices](https://ieeexplore.ieee.org/abstract/document/9264674)\n- [Hypergraph Nerual Networks](https://arxiv.org/abs/1809.09401)\n- [HGNN+: General Hypergraph Nerual Networks](https://ieeexplore.ieee.org/document/9795251/)\n- [Hypergraph Isomorphism Computation](https://arxiv.org/pdf/2307.14394)\n\n# Contact\nHyper-YOLO is maintained by [iMoon-Lab](http://moon-lab.tech/), Tsinghua University. If you have any questions, please feel free to contact us via email: [Yifan Feng](mailto:evanfeng97@gmail.com) and [Jiangang Huang](mailto:mywhy666@stu.xjtu.edu.cn).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimoonlab%2Fhyper-yolo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimoonlab%2Fhyper-yolo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimoonlab%2Fhyper-yolo/lists"}