{"id":20373511,"url":"https://github.com/megengine/yolox","last_synced_at":"2025-09-24T15:43:23.078Z","repository":{"id":40390743,"uuid":"389483331","full_name":"MegEngine/YOLOX","owner":"MegEngine","description":"MegEngine implementation of YOLOX","archived":false,"fork":false,"pushed_at":"2022-08-13T12:51:03.000Z","size":5893,"stargazers_count":110,"open_issues_count":5,"forks_count":15,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T06:51:57.120Z","etag":null,"topics":["megengine","object-detection","yolox"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MegEngine.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}},"created_at":"2021-07-26T02:10:23.000Z","updated_at":"2025-02-17T13:29:28.000Z","dependencies_parsed_at":"2022-07-20T12:32:28.808Z","dependency_job_id":null,"html_url":"https://github.com/MegEngine/YOLOX","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MegEngine/YOLOX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FYOLOX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FYOLOX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FYOLOX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FYOLOX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MegEngine","download_url":"https://codeload.github.com/MegEngine/YOLOX/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FYOLOX/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276777992,"owners_count":25703151,"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","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["megengine","object-detection","yolox"],"created_at":"2024-11-15T01:18:46.419Z","updated_at":"2025-09-24T15:43:23.034Z","avatar_url":"https://github.com/MegEngine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003cimg src=\"assets/logo.png\" width=\"350\"\u003e\u003c/div\u003e\n\u003cimg src=\"assets/demo.png\" \u003e\n\n## Introduction\nYOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and industrial communities.\nFor more details, please refer to our [report on Arxiv](https://arxiv.org/abs/2107.08430).\n\nThis repo is an implementation of [MegEngine](https://github.com/MegEngine/MegEngine) version YOLOX, there is also a [PyTorch implementation](https://github.com/Megvii-BaseDetection/YOLOX).\n\n\u003cimg src=\"assets/git_fig.png\" width=\"1000\" \u003e\n\n## Updates!!\n* 【2021/08/05】 We release MegEngine version YOLOX.\n\n## Comming soon\n- [ ] Faster YOLOX training speed.\n- [ ] More models of megEngine version.\n- [ ] AMP training of megEngine.\n\n## Benchmark\n\n#### Light Models.\n| Model                                      | size | mAP\u003csup\u003eval\u003cbr\u003e0.5:0.95 | Params\u003cbr\u003e(M) | FLOPs\u003cbr\u003e(G) |                           weights                            |\n| ------------------------------------------ | :--: | :---------------------: | :-----------: | :----------: | :----------------------------------------------------------: |\n| [YOLOX-Tiny](./exps/default/yolox_tiny.py) | 416  |          32.2           |     5.06      |     6.45     | [github](https://github.com/MegEngine/YOLOX/releases/download/0.0.1/yolox_tiny.pkl) |\n\n\n#### Standard Models.\nComming soon!\n\n## Quick Start\n\n\u003cdetails\u003e\n\u003csummary\u003eInstallation\u003c/summary\u003e\n\nStep1. Install YOLOX.\n```shell\ngit clone git@github.com:MegEngine/YOLOX.git\ncd YOLOX\npip3 install -U pip \u0026\u0026 pip3 install -r requirements.txt\npip3 install -v -e .  # or  python3 setup.py develop\n```\nStep2. Install [pycocotools](https://github.com/cocodataset/cocoapi).\n\n```shell\npip3 install cython; pip3 install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\nStep1. Download a pretrained model from the benchmark table.\n\nStep2. Use either -n or -f to specify your detector's config. For example:\n\n```shell\npython tools/demo.py image -n yolox-tiny -c /path/to/your/yolox_tiny.pkl --path assets/dog.jpg --conf 0.25 --nms 0.45 --tsize 416 --save_result --device [cpu/gpu]\n```\nor\n```shell\npython tools/demo.py image -f exps/default/yolox_tiny.py -c /path/to/your/yolox_tiny.pkl --path assets/dog.jpg --conf 0.25 --nms 0.45 --tsize 416 --save_result --device [cpu/gpu]\n```\nDemo for video:\n```shell\npython tools/demo.py video -n yolox-s -c /path/to/your/yolox_s.pkl --path /path/to/your/video --conf 0.25 --nms 0.45 --tsize 416 --save_result --device [cpu/gpu]\n```\n\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eReproduce our results on COCO\u003c/summary\u003e\n\nStep1. Prepare COCO dataset\n```shell\ncd \u003cYOLOX_HOME\u003e\nln -s /path/to/your/COCO ./datasets/COCO\n```\n\nStep2. Reproduce our results on COCO by specifying -n:\n\n```shell\npython tools/train.py -n yolox-tiny -d 8 -b 128\n```\n* -d: number of gpu devices\n* -b: total batch size, the recommended number for -b is num-gpu * 8\n\nWhen using -f, the above commands are equivalent to:\n\n```shell\npython tools/train.py -f exps/default/yolox-tiny.py -d 8 -b 128\n```\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eEvaluation\u003c/summary\u003e\n\nWe support batch testing for fast evaluation:\n\n```shell\npython tools/eval.py -n  yolox-tiny -c yolox_tiny.pkl -b 64 -d 8 --conf 0.001 [--fuse]\n```\n* --fuse: fuse conv and bn\n* -d: number of GPUs used for evaluation. DEFAULT: All GPUs available will be used.\n* -b: total batch size across on all GPUs\n\nTo reproduce speed test, we use the following command:\n```shell\npython tools/eval.py -n  yolox-tiny -c yolox_tiny.pkl -b 1 -d 1 --conf 0.001 --fuse\n```\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eTutorials\u003c/summary\u003e\n\n*  [Training on custom data](docs/train_custom_data.md).\n\n\u003c/details\u003e\n\n\n\n## MegEngine Deployment\n\n[MegEngine in C++](./demo/MegEngine/cpp)\n\n\u003cdetails\u003e\n\u003csummary\u003eDump mge file\u003c/summary\u003e\n\n**NOTE**: result model is dumped with `optimize_for_inference` and `enable_fuse_conv_bias_nonlinearity`.\n\n```shell\npython3 tools/export_mge.py -n yolox-tiny -c yolox_tiny.pkl --dump_path yolox_tiny.mge\n```\n\u003c/details\u003e\n\n### Benchmark\n\n* Model Info: yolox-s @ input(1,3,640,640)\n\n* Testing Devices\n\n  * `x86_64 -- Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz`\n  * `AArch64 -- Xiaomi phone mi9`\n  * `CUDA -- 1080TI @ cuda-10.1-cudnn-v7.6.3-TensorRT-6.0.1.5.sh @ Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz`\n\n| megengine@tag1.5 +fastrun +weight\\_preprocess (msec) | 1 thread | 2 thread | 4 thread | 8 thread |\n| ---------------------------------------------------- | -------- | -------- | -------- | -------- |\n| x86\\_64(fp32)                                        | 516.245  | 318.29   | 253.273  | 222.534  |\n| x86\\_64(fp32+chw88)                                  | 362.020  |   NONE   |   NONE   |   NONE   |\n| aarch64(fp32+chw44)                                  | 555.877  | 351.371  | 242.044  |   NONE   |\n| aarch64(fp16+chw)                                    | 439.606  | 327.356  | 255.531  |   NONE   |\n\n| CUDA @ CUDA (msec)  | 1 batch    | 2 batch   | 4 batch   | 8 batch   | 16 batch  | 32 batch | 64 batch |\n| ------------------- | ---------- | --------- | --------- | --------- | --------- | -------- | -------- |\n| megengine(fp32+chw) |   8.137    |  13.2893  |  23.6633  |   44.470  |  86.491   |  168.95  |  334.248 |\n\n\n## Third-party resources\n* The ncnn android app with video support: [ncnn-android-yolox](https://github.com/FeiGeChuanShu/ncnn-android-yolox) from [FeiGeChuanShu](https://github.com/FeiGeChuanShu)\n* YOLOX with Tengine support: [Tengine](https://github.com/OAID/Tengine/blob/tengine-lite/examples/tm_yolox.cpp) from [BUG1989](https://github.com/BUG1989)\n* YOLOX + ROS2 Foxy: [YOLOX-ROS](https://github.com/Ar-Ray-code/YOLOX-ROS) from [Ar-Ray](https://github.com/Ar-Ray-code)\n* YOLOX Deploy DeepStream: [YOLOX-deepstream](https://github.com/nanmi/YOLOX-deepstream) from [nanmi](https://github.com/nanmi)\n* YOLOX ONNXRuntime C++ Demo: [lite.ai](https://github.com/DefTruth/lite.ai/blob/main/ort/cv/yolox.cpp) from [DefTruth](https://github.com/DefTruth)\n* Converting darknet or yolov5 datasets to COCO format for YOLOX: [YOLO2COCO](https://github.com/RapidAI/YOLO2COCO) from [Daniel](https://github.com/znsoftm)\n\n## Cite YOLOX\nIf you use YOLOX in your research, please cite our work by using the following BibTeX entry:\n\n```latex\n @article{yolox2021,\n  title={YOLOX: Exceeding YOLO Series in 2021},\n  author={Ge, Zheng and Liu, Songtao and Wang, Feng and Li, Zeming and Sun, Jian},\n  journal={arXiv preprint arXiv:2107.08430},\n  year={2021}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegengine%2Fyolox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegengine%2Fyolox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegengine%2Fyolox/lists"}