Package: yolox
IntroductionYOLOX 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.
For more details, please refer to ourreport on Arxiv.This repo is an implementation of PyTorch version YOLOX, there is also aMegEngine implementation.Updates!!【2022/04/14】 We suport jit compile op.【2021/08/19】 We optimize the training process with2xfaster training and~1%higher performance! Seenotesfor more details.【2021/08/05】 We releaseMegEngine version YOLOX.【2021/07/28】 We fix the fatal error ofmemory leak【2021/07/26】 We now supportMegEnginedeployment.【2021/07/20】 We have released our technical report onArxiv.Coming soonYOLOX-P6 and larger model.Objects365 pretrain.Transformer modules.More features in need.BenchmarkStandard Models.ModelsizemAPval0.5:0.95mAPtest0.5:0.95Speed V100(ms)Params(M)FLOPs(G)weightsYOLOX-s64040.540.59.89.026.8githubYOLOX-m64046.947.212.325.373.8githubYOLOX-l64049.750.114.554.2155.6githubYOLOX-x64051.151.517.399.1281.9githubYOLOX-Darknet5364047.748.011.163.7185.3githubLegacy modelsModelsizemAPtest0.5:0.95Speed V100(ms)Params(M)FLOPs(G)weightsYOLOX-s64039.69.89.026.8onedrive/githubYOLOX-m64046.412.325.373.8onedrive/githubYOLOX-l64050.014.554.2155.6onedrive/githubYOLOX-x64051.217.399.1281.9onedrive/githubYOLOX-Darknet5364047.411.163.7185.3onedrive/githubLight Models.ModelsizemAPval0.5:0.95Params(M)FLOPs(G)weightsYOLOX-Nano41625.80.911.08githubYOLOX-Tiny41632.85.066.45githubLegacy modelsModelsizemAPval0.5:0.95Params(M)FLOPs(G)weightsYOLOX-Nano41625.30.911.08githubYOLOX-Tiny41632.85.066.45githubQuick StartInstallationStep1. Install YOLOX from source.gitclonegit@github.com:Megvii-BaseDetection/YOLOX.gitcdYOLOX
pip3install-v-e.# or  python3 setup.py developDemoStep1. Download a pretrained model from the benchmark table.Step2. Use either -n or -f to specify your detector's config. For example:pythontools/demo.pyimage-nyolox-s-c/path/to/your/yolox_s.pth--pathassets/dog.jpg--conf0.25--nms0.45--tsize640--save_result--device[cpu/gpu]orpythontools/demo.pyimage-fexps/default/yolox_s.py-c/path/to/your/yolox_s.pth--pathassets/dog.jpg--conf0.25--nms0.45--tsize640--save_result--device[cpu/gpu]Demo for video:pythontools/demo.pyvideo-nyolox-s-c/path/to/your/yolox_s.pth--path/path/to/your/video--conf0.25--nms0.45--tsize640--save_result--device[cpu/gpu]Reproduce our results on COCOStep1. Prepare COCO datasetcd<YOLOX_HOME>
ln-s/path/to/your/COCO./datasets/COCOStep2. Reproduce our results on COCO by specifying -n:python-myolox.tools.train-nyolox-s-d8-b64--fp16-o[--cache]yolox-myolox-lyolox-x-d: number of gpu devices-b: total batch size, the recommended number for -b is num-gpu * 8--fp16: mixed precision training--cache: caching imgs into RAM to accelarate training, which need large system RAM.When using -f, the above commands are equivalent to:python-myolox.tools.train-fexps/default/yolox_s.py-d8-b64--fp16-o[--cache]exps/default/yolox_m.pyexps/default/yolox_l.pyexps/default/yolox_x.pyMulti Machine TrainingWe also support multi-nodes training. Just add the following args:--num_machines: num of your total training nodes--machine_rank: specify the rank of each nodeSuppose you want to train YOLOX on 2 machines, and your master machines's IP is 123.123.123.123, use port 12312 and TCP.On master machine, runpythontools/train.py-nyolox-s-b128--dist-urltcp://123.123.123.123:12312--num_machines2--machine_rank0On the second machine, runpythontools/train.py-nyolox-s-b128--dist-urltcp://123.123.123.123:12312--num_machines2--machine_rank1OthersSee more information with the following command:python-myolox.tools.train--helpEvaluationWe support batch testing for fast evaluation:python-myolox.tools.eval-nyolox-s-cyolox_s.pth-b64-d8--conf0.001[--fp16][--fuse]yolox-myolox-lyolox-x--fuse: fuse conv and bn-d: number of GPUs used for evaluation. DEFAULT: All GPUs available will be used.-b: total batch size across on all GPUsTo reproduce speed test, we use the following command:python-myolox.tools.eval-nyolox-s-cyolox_s.pth-b1-d1--conf0.001--fp16--fuseyolox-myolox-lyolox-xTutorialsTraining on custom dataManipulating training image sizeFreezing modelDeploymentMegEngine in C++ and PythonONNX export and an ONNXRuntimeTensorRT in C++ and Pythonncnn in C++ and JavaOpenVINO in C++ and PythonThird-party resourcesIntegrated intoHuggingface Spaces 🤗usingGradio. Try out the Web Demo:The ncnn android app with video support:ncnn-android-yoloxfromFeiGeChuanShuYOLOX with Tengine support:TenginefromBUG1989YOLOX + ROS2 Foxy:YOLOX-ROSfromAr-RayYOLOX Deploy DeepStream:YOLOX-deepstreamfromnanmiYOLOX MNN/TNN/ONNXRuntime:YOLOX-MNN、YOLOX-TNNandYOLOX-ONNXRuntime C++fromDefTruthConverting darknet or yolov5 datasets to COCO format for YOLOX:YOLO2COCOfromDanielCite YOLOXIf you use YOLOX in your research, please cite our work by using the following BibTeX entry:@article{yolox2021,
  title={YOLOX: Exceeding YOLO Series in 2021},
  author={Ge, Zheng and Liu, Songtao and Wang, Feng and Li, Zeming and Sun, Jian},
  journal={arXiv preprint arXiv:2107.08430},
  year={2021}}