├── demo ├── TensorRT │ ├── cpp │ │ ├── .idea │ │ │ ├── .name │ │ │ ├── cpp.iml │ │ │ ├── misc.xml │ │ │ ├── .gitignore │ │ │ └── modules.xml │ │ ├── cmake-build-debug │ │ │ ├── CMakeFiles │ │ │ │ ├── progress.marks │ │ │ │ ├── yolox.dir │ │ │ │ │ ├── objects1.rsp │ │ │ │ │ ├── progress.make │ │ │ │ │ ├── objects.a │ │ │ │ │ ├── yolox.cpp.obj │ │ │ │ │ ├── CXX.includecache │ │ │ │ │ ├── includes_CXX.rsp │ │ │ │ │ ├── cmake_clean.cmake │ │ │ │ │ ├── flags.make │ │ │ │ │ ├── link.txt │ │ │ │ │ ├── DependInfo.cmake │ │ │ │ │ ├── linklibs.rsp │ │ │ │ │ └── build.make │ │ │ │ ├── clion-environment.txt │ │ │ │ ├── cmake.check_cache │ │ │ │ ├── 3.20.2 │ │ │ │ │ ├── CompilerIdC │ │ │ │ │ │ └── a.exe │ │ │ │ │ ├── CompilerIdCXX │ │ │ │ │ │ └── a.exe │ │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ │ ├── CMakeRCCompiler.cmake │ │ │ │ │ ├── CMakeSystem.cmake │ │ │ │ │ └── CMakeCCompiler.cmake │ │ │ │ ├── TargetDirectories.txt │ │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ │ ├── clion-log.txt │ │ │ │ ├── Makefile.cmake │ │ │ │ └── Makefile2 │ │ │ ├── yolox.exe │ │ │ ├── Testing │ │ │ │ └── Temporary │ │ │ │ │ └── LastTest.log │ │ │ ├── cmake_install.cmake │ │ │ └── Makefile │ │ ├── README.md │ │ └── CMakeLists.txt │ └── python │ │ └── README.md ├── ncnn │ ├── android │ │ ├── settings.gradle │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── app │ │ │ ├── src │ │ │ │ └── main │ │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ └── strings.xml │ │ │ │ │ └── layout │ │ │ │ │ │ └── main.xml │ │ │ │ │ ├── jni │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── megvii │ │ │ │ │ └── yoloXncnn │ │ │ │ │ └── yoloXncnn.java │ │ │ └── build.gradle │ │ ├── build.gradle │ │ ├── README.md │ │ ├── gradlew.bat │ │ └── gradlew │ └── cpp │ │ └── README.md ├── OpenVINO │ ├── README.md │ ├── cpp │ │ ├── CMakeLists.txt │ │ └── README.md │ └── python │ │ └── README.md ├── MegEngine │ ├── python │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── yolox.py │ │ │ ├── yolo_fpn.py │ │ │ └── yolo_pafpn.py │ │ ├── README.md │ │ ├── dump.py │ │ ├── coco_classes.py │ │ ├── build.py │ │ ├── convert_weights.py │ │ ├── process.py │ │ └── visualize.py │ └── cpp │ │ └── build.sh └── ONNXRuntime │ ├── onnx_inference.py │ └── README.md ├── .gitattributes ├── assets ├── demo.png ├── dog.jpg ├── logo.png └── git_fig.png ├── yolox ├── __pycache__ │ └── __init__.cpython-38.pyc ├── exp │ ├── __pycache__ │ │ ├── build.cpython-38.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── base_exp.cpython-38.pyc │ │ └── yolox_base.cpython-38.pyc │ ├── __init__.py │ ├── build.py │ └── base_exp.py ├── utils │ ├── __pycache__ │ │ ├── dist.cpython-38.pyc │ │ ├── ema.cpython-38.pyc │ │ ├── boxes.cpython-38.pyc │ │ ├── logger.cpython-38.pyc │ │ ├── metric.cpython-38.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── setup_env.cpython-38.pyc │ │ ├── visualize.cpython-38.pyc │ │ ├── checkpoint.cpython-38.pyc │ │ ├── demo_utils.cpython-38.pyc │ │ ├── lr_scheduler.cpython-38.pyc │ │ ├── model_utils.cpython-38.pyc │ │ └── allreduce_norm.cpython-38.pyc │ ├── __init__.py │ ├── checkpoint.py │ ├── setup_env.py │ ├── ema.py │ ├── logger.py │ ├── demo_utils.py │ ├── allreduce_norm.py │ ├── metric.py │ ├── model_utils.py │ ├── visualize.py │ └── boxes.py ├── data │ ├── __pycache__ │ │ ├── __init__.cpython-38.pyc │ │ ├── samplers.cpython-38.pyc │ │ ├── data_augment.cpython-38.pyc │ │ ├── dataloading.cpython-38.pyc │ │ └── data_prefetcher.cpython-38.pyc │ ├── datasets │ │ ├── __pycache__ │ │ │ ├── coco.cpython-38.pyc │ │ │ ├── voc.cpython-38.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── my_classes.cpython-38.pyc │ │ │ ├── voc_classes.cpython-38.pyc │ │ │ ├── coco_classes.cpython-38.pyc │ │ │ ├── datasets_wrapper.cpython-38.pyc │ │ │ └── mosaicdetection.cpython-38.pyc │ │ ├── __init__.py │ │ ├── my_classes.py │ │ ├── voc_classes.py │ │ ├── coco_classes.py │ │ └── datasets_wrapper.py │ ├── __init__.py │ ├── data_prefetcher.py │ └── samplers.py ├── models │ ├── __pycache__ │ │ ├── losses.cpython-38.pyc │ │ ├── yolox.cpython-38.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── darknet.cpython-38.pyc │ │ ├── yolo_fpn.cpython-38.pyc │ │ ├── yolo_head.cpython-38.pyc │ │ ├── yolo_pafpn.cpython-38.pyc │ │ └── network_blocks.cpython-38.pyc │ ├── __init__.py │ ├── yolox.py │ ├── losses.py │ ├── yolo_fpn.py │ └── yolo_pafpn.py ├── __init__.py ├── evaluators │ ├── __pycache__ │ │ ├── __init__.cpython-38.pyc │ │ ├── voc_eval.cpython-38.pyc │ │ ├── coco_evaluator.cpython-38.pyc │ │ └── voc_evaluator.cpython-38.pyc │ └── __init__.py ├── core │ ├── __init__.py │ └── launch.py └── layers │ ├── __init__.py │ └── csrc │ ├── vision.cpp │ └── cocoeval │ └── cocoeval.h ├── exps ├── default │ ├── __pycache__ │ │ ├── yolox_l.cpython-38.pyc │ │ └── yolox_m.cpython-38.pyc │ ├── yolox_l.py │ ├── yolox_m.py │ ├── yolox_s.py │ ├── yolox_x.py │ ├── yolox_tiny.py │ ├── nano.py │ └── yolov3.py └── example │ └── yolox_voc │ └── yolox_voc_s.py ├── .idea ├── misc.xml ├── .gitignore ├── inspectionProfiles │ └── profiles_settings.xml ├── modules.xml └── YOLOX-main.iml ├── requirements.txt ├── setup.cfg ├── generate_data.py ├── datasets └── README.md ├── README.md ├── setup.py ├── tools ├── trt.py └── export_onnx.py └── train.py /demo/TensorRT/cpp/.idea/.name: -------------------------------------------------------------------------------- 1 | yolox_cao -------------------------------------------------------------------------------- /demo/ncnn/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /assets/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/assets/demo.png -------------------------------------------------------------------------------- /assets/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/assets/dog.jpg -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/assets/logo.png -------------------------------------------------------------------------------- /demo/OpenVINO/README.md: -------------------------------------------------------------------------------- 1 | ## YOLOX for OpenVINO 2 | 3 | * [C++ Demo](./cpp) 4 | * [Python Demo](./python) -------------------------------------------------------------------------------- /assets/git_fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/assets/git_fig.png -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/objects1.rsp: -------------------------------------------------------------------------------- 1 | CMakeFiles/yolox.dir/yolox.cpp.obj 2 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | 4 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/.idea/cpp.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/clion-environment.txt: -------------------------------------------------------------------------------- 1 | ToolSet: w64 6.0 (local)@C:\Program Files\mingw64 2 | Options: 3 | 4 | Options: -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /yolox/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/exp/__pycache__/build.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/exp/__pycache__/build.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/dist.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/dist.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/ema.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/ema.cpython-38.pyc -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/yolox.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/TensorRT/cpp/cmake-build-debug/yolox.exe -------------------------------------------------------------------------------- /yolox/data/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/__pycache__/samplers.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/__pycache__/samplers.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/exp/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/exp/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/exp/__pycache__/base_exp.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/exp/__pycache__/base_exp.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/losses.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/models/__pycache__/losses.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/yolox.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/models/__pycache__/yolox.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/boxes.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/boxes.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/logger.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/logger.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/metric.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/metric.cpython-38.pyc -------------------------------------------------------------------------------- /exps/default/__pycache__/yolox_l.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/exps/default/__pycache__/yolox_l.cpython-38.pyc -------------------------------------------------------------------------------- /exps/default/__pycache__/yolox_m.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/exps/default/__pycache__/yolox_m.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/exp/__pycache__/yolox_base.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/exp/__pycache__/yolox_base.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/models/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/darknet.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/models/__pycache__/darknet.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/yolo_fpn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/models/__pycache__/yolo_fpn.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/setup_env.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/setup_env.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/visualize.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/visualize.cpython-38.pyc -------------------------------------------------------------------------------- /demo/ncnn/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/ncnn/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /yolox/data/__pycache__/data_augment.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/__pycache__/data_augment.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/__pycache__/dataloading.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/__pycache__/dataloading.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/coco.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/datasets/__pycache__/coco.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/voc.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/datasets/__pycache__/voc.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/yolo_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/models/__pycache__/yolo_head.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/yolo_pafpn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/models/__pycache__/yolo_pafpn.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/checkpoint.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/checkpoint.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/demo_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/demo_utils.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/lr_scheduler.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/lr_scheduler.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/model_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/model_utils.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | 4 | from .utils import configure_module 5 | 6 | configure_module() 7 | 8 | __version__ = "0.1.0" 9 | -------------------------------------------------------------------------------- /yolox/data/__pycache__/data_prefetcher.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/__pycache__/data_prefetcher.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/evaluators/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/voc_eval.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/evaluators/__pycache__/voc_eval.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/allreduce_norm.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/utils/__pycache__/allreduce_norm.cpython-38.pyc -------------------------------------------------------------------------------- /demo/TensorRT/cpp/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /demo/ncnn/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | yoloXncnn 4 | 5 | -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/datasets/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/network_blocks.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/models/__pycache__/network_blocks.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/my_classes.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/datasets/__pycache__/my_classes.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/voc_classes.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/datasets/__pycache__/voc_classes.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/coco_evaluator.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/evaluators/__pycache__/coco_evaluator.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/voc_evaluator.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/evaluators/__pycache__/voc_evaluator.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/coco_classes.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/datasets/__pycache__/coco_classes.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/core/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | from .launch import launch 6 | from .trainer import Trainer 7 | -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/datasets_wrapper.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/datasets/__pycache__/datasets_wrapper.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/mosaicdetection.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/yolox/data/datasets/__pycache__/mosaicdetection.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/layers/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. 4 | 5 | from .fast_coco_eval_api import COCOeval_opt 6 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/objects.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/objects.a -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/Testing/Temporary/LastTest.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/TensorRT/cpp/cmake-build-debug/Testing/Temporary/LastTest.log -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CompilerIdC/a.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CompilerIdC/a.exe -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/yolox.cpp.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/yolox.cpp.obj -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CompilerIdCXX/a.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CompilerIdCXX/a.exe -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /yolox/evaluators/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | from .coco_evaluator import COCOEvaluator 6 | from .voc_evaluator import VOCEvaluator 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /yolox/exp/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. 4 | 5 | from .base_exp import BaseExp 6 | from .build import get_exp 7 | from .yolox_base import Exp 8 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunanlin13174/YOLOX-train-your-data/HEAD/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | E:/YOLOX-main/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/edit_cache.dir 2 | E:/YOLOX-main/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir 3 | E:/YOLOX-main/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/rebuild_cache.dir 4 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/ncnn/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Aug 25 10:34:48 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # TODO: Update with exact module version 2 | numpy 3 | torch>=1.7 4 | opencv_python 5 | loguru 6 | scikit-image 7 | tqdm 8 | torchvision 9 | Pillow 10 | thop 11 | ninja 12 | tabulate 13 | tensorboard 14 | 15 | # verified versions 16 | onnx==1.8.1 17 | onnxruntime==1.8.0 18 | onnx-simplifier==0.3.5 -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/includes_CXX.rsp: -------------------------------------------------------------------------------- 1 | -IE:/YOLOX-main/demo/TensorRT/cpp/include -IC:/PROGRA~1/NVIDIA~2/CUDA/v11.1/include -IC:/PROGRA~1/NVIDIA~2/CUDA/v11.1/bin -ID:/TensorRT-7.2.3.4/include -isystem D:/opencv/build/x64/MinGW/install/include -isystem D:/opencv/build/x64/MinGW/install/include/opencv 2 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CMakeRCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_RC_COMPILER "C:/Program Files/mingw64/bin/windres.exe") 2 | set(CMAKE_RC_COMPILER_ARG1 "") 3 | set(CMAKE_RC_COMPILER_LOADED 1) 4 | set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC) 5 | set(CMAKE_RC_OUTPUT_EXTENSION .obj) 6 | set(CMAKE_RC_COMPILER_ENV_VAR "RC") 7 | -------------------------------------------------------------------------------- /demo/MegEngine/python/models/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. 4 | 5 | from .darknet import CSPDarknet, Darknet 6 | from .yolo_fpn import YOLOFPN 7 | from .yolo_head import YOLOXHead 8 | from .yolo_pafpn import YOLOPAFPN 9 | from .yolox import YOLOX 10 | -------------------------------------------------------------------------------- /yolox/data/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | from .coco import COCODataset 6 | from .datasets_wrapper import ConcatDataset, Dataset, MixConcatDataset 7 | from .mosaicdetection import MosaicDetection 8 | from .voc import VOCDetection 9 | from .my_classes import MY_CLASSES -------------------------------------------------------------------------------- /yolox/models/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. 4 | 5 | from .darknet import CSPDarknet, Darknet 6 | from .losses import IOUloss 7 | from .yolo_fpn import YOLOFPN 8 | from .yolo_head import YOLOXHead 9 | from .yolo_pafpn import YOLOPAFPN 10 | from .yolox import YOLOX 11 | -------------------------------------------------------------------------------- /yolox/data/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | from .data_augment import TrainTransform, ValTransform 6 | from .data_prefetcher import DataPrefetcher 7 | from .dataloading import DataLoader, get_yolox_datadir 8 | from .datasets import * 9 | from .samplers import InfiniteSampler, YoloBatchSampler 10 | -------------------------------------------------------------------------------- /demo/ncnn/android/app/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(yoloXncnn) 2 | 3 | cmake_minimum_required(VERSION 3.4.1) 4 | 5 | set(ncnn_DIR ${CMAKE_SOURCE_DIR}/ncnn-20210525-android-vulkan/${ANDROID_ABI}/lib/cmake/ncnn) 6 | find_package(ncnn REQUIRED) 7 | 8 | add_library(yoloXncnn SHARED yoloXncnn_jni.cpp) 9 | 10 | target_link_libraries(yoloXncnn 11 | ncnn 12 | 13 | jnigraphics 14 | ) 15 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/yolox.dir/yolox.cpp.obj" 3 | "libyolox.dll.a" 4 | "yolox.exe" 5 | "yolox.exe.manifest" 6 | "yolox.pdb" 7 | ) 8 | 9 | # Per-language clean rules from dependency scanning. 10 | foreach(lang CXX) 11 | include(CMakeFiles/yolox.dir/cmake_clean_${lang}.cmake OPTIONAL) 12 | endforeach() 13 | -------------------------------------------------------------------------------- /demo/ncnn/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | jcenter() 5 | google() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.5.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | jcenter() 15 | google() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /exps/default/yolox_l.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | import os 6 | 7 | from yolox.exp import Exp as MyExp 8 | 9 | 10 | class Exp(MyExp): 11 | def __init__(self): 12 | super(Exp, self).__init__() 13 | self.depth = 1.0 14 | self.width = 1.0 15 | self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] 16 | -------------------------------------------------------------------------------- /exps/default/yolox_m.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | import os 6 | 7 | from yolox.exp import Exp as MyExp 8 | 9 | 10 | class Exp(MyExp): 11 | def __init__(self): 12 | super(Exp, self).__init__() 13 | self.depth = 0.67 14 | self.width = 0.75 15 | self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] 16 | -------------------------------------------------------------------------------- /exps/default/yolox_s.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | import os 6 | 7 | from yolox.exp import Exp as MyExp 8 | 9 | 10 | class Exp(MyExp): 11 | def __init__(self): 12 | super(Exp, self).__init__() 13 | self.depth = 0.33 14 | self.width = 0.50 15 | self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] 16 | -------------------------------------------------------------------------------- /exps/default/yolox_x.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | import os 6 | 7 | from yolox.exp import Exp as MyExp 8 | 9 | 10 | class Exp(MyExp): 11 | def __init__(self): 12 | super(Exp, self).__init__() 13 | self.depth = 1.33 14 | self.width = 1.25 15 | self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] 16 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.20 3 | 4 | # compile CXX with C:/Program Files/mingw64/bin/g++.exe 5 | CXX_DEFINES = 6 | 7 | CXX_INCLUDES = @CMakeFiles/yolox.dir/includes_CXX.rsp 8 | 9 | CXX_FLAGS = -std=c++11 -Wall -Ofast -Wfatal-errors -D_MWAITXINTRIN_H_INCLUDED -g -std=c++11 -O2 -pthread -std=gnu++11 10 | 11 | -------------------------------------------------------------------------------- /yolox/data/datasets/my_classes.py: -------------------------------------------------------------------------------- 1 | MY_CLASSES = ( 2 | 'short_sleeved_shirt', # 0 ~ 38 id 3 | 'long_sleeved_shirt', 4 | 'short_sleeved_outwear', 5 | 'long_sleeved_outwear', 6 | 'vest', 7 | 'sling', 8 | 'shorts', 9 | 'trousers', 10 | 'skirt', 11 | 'short_sleeved_dress','long_sleeved_dress', 12 | 'vest_dress', 13 | 'sling_dress', 14 | 'a0','a1','a2','a3','a4','a5','a6','a7','a8','a9','a10','a11','a12','a13','a14','a15','a16','a17','a18','a19','a20','a21','a22','a23','a24' 15 | ) 16 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/3.20.2/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Windows-10.0.19042") 2 | set(CMAKE_HOST_SYSTEM_NAME "Windows") 3 | set(CMAKE_HOST_SYSTEM_VERSION "10.0.19042") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Windows-10.0.19042") 9 | set(CMAKE_SYSTEM_NAME "Windows") 10 | set(CMAKE_SYSTEM_VERSION "10.0.19042") 11 | set(CMAKE_SYSTEM_PROCESSOR "AMD64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /.idea/YOLOX-main.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /yolox/utils/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. 4 | 5 | from .allreduce_norm import * 6 | from .boxes import * 7 | from .checkpoint import load_ckpt, save_checkpoint 8 | from .demo_utils import * 9 | from .dist import * 10 | from .ema import ModelEMA 11 | from .logger import setup_logger 12 | from .lr_scheduler import LRScheduler 13 | from .metric import * 14 | from .model_utils import * 15 | from .setup_env import * 16 | from .visualize import * 17 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/link.txt: -------------------------------------------------------------------------------- 1 | "D:\CLion 2021.2\bin\cmake\win\bin\cmake.exe" -E rm -f CMakeFiles\yolox.dir/objects.a 2 | C:\PROGRA~1\mingw64\bin\ar.exe cr CMakeFiles\yolox.dir/objects.a @CMakeFiles\yolox.dir\objects1.rsp 3 | C:\PROGRA~1\mingw64\bin\G__~1.EXE -std=c++11 -Wall -Ofast -Wfatal-errors -D_MWAITXINTRIN_H_INCLUDED -g -Wl,--whole-archive CMakeFiles\yolox.dir/objects.a -Wl,--no-whole-archive -o yolox.exe -Wl,--out-implib,libyolox.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\yolox.dir\linklibs.rsp 4 | -------------------------------------------------------------------------------- /yolox/data/datasets/voc_classes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | # VOC_CLASSES = ( '__background__', # always index 0 6 | VOC_CLASSES = ( 7 | "aeroplane", 8 | "bicycle", 9 | "bird", 10 | "boat", 11 | "bottle", 12 | "bus", 13 | "car", 14 | "cat", 15 | "chair", 16 | "cow", 17 | "diningtable", 18 | "dog", 19 | "horse", 20 | "motorbike", 21 | "person", 22 | "pottedplant", 23 | "sheep", 24 | "sofa", 25 | "train", 26 | "tvmonitor", 27 | ) 28 | -------------------------------------------------------------------------------- /exps/default/yolox_tiny.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | import os 6 | 7 | from yolox.exp import Exp as MyExp 8 | 9 | 10 | class Exp(MyExp): 11 | def __init__(self): 12 | super(Exp, self).__init__() 13 | self.depth = 0.33 14 | self.width = 0.375 15 | self.scale = (0.5, 1.5) 16 | self.random_size = (10, 20) 17 | self.test_size = (416, 416) 18 | self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] 19 | self.enable_mixup = False 20 | -------------------------------------------------------------------------------- /yolox/layers/csrc/vision.cpp: -------------------------------------------------------------------------------- 1 | #include "cocoeval/cocoeval.h" 2 | 3 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 4 | m.def("COCOevalAccumulate", &COCOeval::Accumulate, "COCOeval::Accumulate"); 5 | m.def( 6 | "COCOevalEvaluateImages", 7 | &COCOeval::EvaluateImages, 8 | "COCOeval::EvaluateImages"); 9 | pybind11::class_(m, "InstanceAnnotation") 10 | .def(pybind11::init()); 11 | pybind11::class_(m, "ImageEvaluation") 12 | .def(pybind11::init<>()); 13 | } 14 | -------------------------------------------------------------------------------- /demo/OpenVINO/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.4.1) 2 | set(CMAKE_CXX_STANDARD 14) 3 | 4 | project(yolox_openvino_demo) 5 | 6 | find_package(OpenCV REQUIRED) 7 | find_package(InferenceEngine REQUIRED) 8 | find_package(ngraph REQUIRED) 9 | 10 | include_directories( 11 | ${OpenCV_INCLUDE_DIRS} 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ) 15 | 16 | add_executable(yolox_openvino yolox_openvino.cpp) 17 | 18 | target_link_libraries( 19 | yolox_openvino 20 | ${InferenceEngine_LIBRARIES} 21 | ${NGRAPH_LIBRARIES} 22 | ${OpenCV_LIBS} 23 | ) -------------------------------------------------------------------------------- /demo/ncnn/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "29.0.2" 6 | 7 | defaultConfig { 8 | applicationId "com.megvii.yoloXncnn" 9 | archivesBaseName = "$applicationId" 10 | 11 | ndk { 12 | moduleName "ncnn" 13 | abiFilters "armeabi-v7a", "arm64-v8a" 14 | } 15 | minSdkVersion 24 16 | } 17 | 18 | externalNativeBuild { 19 | cmake { 20 | version "3.10.2" 21 | path file('src/main/jni/CMakeLists.txt') 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [isort] 2 | line_length = 100 3 | multi_line_output = 3 4 | balanced_wrapping = True 5 | known_standard_library = setuptools 6 | known_third_party = tqdm,loguru 7 | known_data_processing = cv2,numpy,scipy,PIL,matplotlib,scikit_image 8 | known_datasets = pycocotools 9 | known_deeplearning = torch,torchvision,caffe2,onnx,apex,timm,thop,torch2trt,tensorrt,openvino,onnxruntime 10 | known_myself = yolox 11 | sections = FUTURE,STDLIB,THIRDPARTY,data_processing,datasets,deeplearning,myself,FIRSTPARTY,LOCALFOLDER 12 | no_lines_before=STDLIB,THIRDPARTY,datasets 13 | default_section = FIRSTPARTY 14 | 15 | [flake8] 16 | max-line-length = 100 17 | max-complexity = 18 18 | exclude = __init__.py 19 | -------------------------------------------------------------------------------- /generate_data.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import cv2 4 | 5 | data_dir = '/home/meprint/sunanlin_folder/data_copy' 6 | 7 | with open('data_copy.txt','w') as f: 8 | for folder in os.listdir(data_dir): 9 | folder_path = os.path.join(data_dir,folder) 10 | for img_name in os.listdir(folder_path): 11 | if "(1)" not in img_name: 12 | img_path = os.path.join(folder_path,img_name) 13 | img = cv2.imread(img_path) 14 | h,w,_ = img.shape 15 | if h==0 or w==0: 16 | break 17 | bbox = str(0)+','+str(0)+','+str(w)+','+str(h) 18 | f.write(img_path+' '+bbox+','+folder+'\n') 19 | f.close() -------------------------------------------------------------------------------- /demo/ncnn/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /demo/ncnn/android/app/src/main/java/com/megvii/yoloXncnn/yoloXncnn.java: -------------------------------------------------------------------------------- 1 | // Copyright (C) Megvii, Inc. and its affiliates. All rights reserved. 2 | 3 | package com.megvii.yoloXncnn; 4 | 5 | import android.content.res.AssetManager; 6 | import android.graphics.Bitmap; 7 | 8 | public class YOLOXncnn 9 | { 10 | public native boolean Init(AssetManager mgr); 11 | 12 | public class Obj 13 | { 14 | public float x; 15 | public float y; 16 | public float w; 17 | public float h; 18 | public String label; 19 | public float prob; 20 | } 21 | 22 | public native Obj[] Detect(Bitmap bitmap, boolean use_gpu); 23 | 24 | static { 25 | System.loadLibrary("yoloXncnn"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "MinGW Makefiles" Generator, CMake Version 3.20 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "E:/YOLOX-main/demo/TensorRT/cpp") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "E:/YOLOX-main/demo/TensorRT/cpp/cmake-build-debug") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /datasets/README.md: -------------------------------------------------------------------------------- 1 | # Prepare datasets 2 | 3 | If you have a dataset directory, you could use os environment variable named `YOLOX_DATADIR`. Under this directory, YOLOX will look for datasets in the structure described below, if needed. 4 | ``` 5 | $YOLOX_DATADIR/ 6 | COCO/ 7 | ``` 8 | You can set the location for builtin datasets by 9 | ```shell 10 | export YOLOX_DATADIR=/path/to/your/datasets 11 | ``` 12 | If `YOLOX_DATADIR` is not set, the default value of dataset directory is `./datasets` relative to your current working directory. 13 | 14 | ## Expected dataset structure for [COCO detection](https://cocodataset.org/#download): 15 | 16 | ``` 17 | COCO/ 18 | annotations/ 19 | instances_{train,val}2017.json 20 | {train,val}2017/ 21 | # image files that are mentioned in the corresponding json 22 | ``` 23 | 24 | You can use the 2014 version of the dataset as well. 25 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/clion-log.txt: -------------------------------------------------------------------------------- 1 | "D:\CLion 2021.2\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEPENDS_USE_COMPILER=FALSE -G "CodeBlocks - MinGW Makefiles" E:\YOLOX-main\demo\TensorRT\cpp 2 | CMake Deprecation Warning at CMakeLists.txt:3 (cmake_minimum_required): 3 | Compatibility with CMake < 2.8.12 will be removed from a future version of 4 | CMake. 5 | 6 | Update the VERSION argument value or use a ... suffix to tell 7 | CMake that the project does not need compatibility with older versions. 8 | 9 | 10 | -- OpenCV ARCH: x64 11 | -- OpenCV RUNTIME: mingw 12 | -- OpenCV STATIC: OFF 13 | -- Found OpenCV 3.4.8 in D:/opencv/build/x64/MinGW/install/x64/mingw/lib 14 | -- You might need to add D:/opencv/build/x64/MinGW/install/x64/mingw/bin to your PATH to be able to run your applications. 15 | -- Configuring done 16 | -- Generating done 17 | -- Build files have been written to: E:/YOLOX-main/demo/TensorRT/cpp/cmake-build-debug 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # YOLOX train your data 2 | you need generate one data.txt like follow format **(per line-> one image)**. 3 | ## prepare one data.txt like this:
4 |
img_path1 x1,y1,x2,y2,class_id x1,y1,x2,y2,class_id2
5 |
img_path2 x1,y1,x2,y2,class_id
6 |
img_path3 ..........
7 | ### note:
8 | **
x1,y1,x2,y2 is int type and it belong to 0-img_w ,0-img_h, not 0~1 !!!
9 |
img_path is abs path ;must be careful the sign " " and "," in data.txt, there was an example:
10 |
/home/sal/images/000010.jpg 0,190,466,516,1
11 |
/home/sal/images/000011.jpg 284,548,458,851,7 256,393,369,608,1
** 12 | ## Train 13 | **i.step1** , before train,you need change yolox/exp/yolox_base.py follow you need, i add some explain in it. **such as change data.txt path in it.**
14 | **ii.step2** , change train.py params, just as https://github.com/Megvii-BaseDetection/YOLOX.git ,when you have changed , just run : **python train.py** 15 | 16 | **iii. star** 17 | 18 | -------------------------------------------------------------------------------- /demo/MegEngine/python/README.md: -------------------------------------------------------------------------------- 1 | # YOLOX-Python-MegEngine 2 | 3 | Python version of YOLOX object detection base on [MegEngine](https://github.com/MegEngine/MegEngine). 4 | 5 | ## Tutorial 6 | 7 | ### Step1: install requirements 8 | 9 | ``` 10 | python3 -m pip install megengine -f https://megengine.org.cn/whl/mge.html 11 | ``` 12 | 13 | ### Step2: convert checkpoint weights from torch's path file 14 | 15 | ``` 16 | python3 convert_weights.py -w yolox_s.pth.tar -o yolox_s_mge.pkl 17 | ``` 18 | 19 | ### Step3: run demo 20 | 21 | This part is the same as torch's python demo, but no need to specify device. 22 | 23 | ``` 24 | python3 demo.py image -n yolox-s -c yolox_s_mge.pkl --path ../../../assets/dog.jpg --conf 0.25 --nms 0.45 --tsize 640 --save_result 25 | ``` 26 | 27 | ### [Optional]Step4: dump model for cpp inference 28 | 29 | > **Note**: result model is dumped with `optimize_for_inference` and `enable_fuse_conv_bias_nonlinearity`. 30 | 31 | ``` 32 | python3 dump.py -n yolox-s -c yolox_s_mge.pkl --dump_path yolox_s.mge 33 | ``` 34 | -------------------------------------------------------------------------------- /demo/MegEngine/python/models/yolox.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- encoding: utf-8 -*- 3 | # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. 4 | 5 | import megengine.module as M 6 | 7 | from .yolo_head import YOLOXHead 8 | from .yolo_pafpn import YOLOPAFPN 9 | 10 | 11 | class YOLOX(M.Module): 12 | """ 13 | YOLOX model module. The module list is defined by create_yolov3_modules function. 14 | The network returns loss values from three YOLO layers during training 15 | and detection results during test. 16 | """ 17 | 18 | def __init__(self, backbone=None, head=None): 19 | super().__init__() 20 | if backbone is None: 21 | backbone = YOLOPAFPN() 22 | if head is None: 23 | head = YOLOXHead(80) 24 | 25 | self.backbone = backbone 26 | self.head = head 27 | 28 | def forward(self, x): 29 | # fpn output content features of [dark3, dark4, dark5] 30 | fpn_outs = self.backbone(x) 31 | assert not self.training 32 | outputs = self.head(fpn_outs) 33 | 34 | return outputs 35 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/README.md: -------------------------------------------------------------------------------- 1 | # YOLOX-TensorRT in C++ 2 | 3 | As YOLOX models is easy to converted to tensorrt using [torch2trt gitrepo](https://github.com/NVIDIA-AI-IOT/torch2trt), 4 | our C++ demo will not include the model converting or constructing like other tenorrt demos. 5 | 6 | 7 | ## Step 1: Prepare serialized engine file 8 | 9 | Follow the trt [python demo README](../python/README.md) to convert and save the serialized engine file. 10 | 11 | Check the 'model_trt.engine' file generated from Step 1, which will automatically saved at the current demo dir. 12 | 13 | 14 | ## Step 2: build the demo 15 | 16 | Please follow the [TensorRT Installation Guide](https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html) to install TensorRT. 17 | 18 | Install opencv with ```sudo apt-get install libopencv-dev```. 19 | 20 | build the demo: 21 | 22 | ```shell 23 | mkdir build 24 | cd build 25 | cmake .. 26 | make 27 | ``` 28 | 29 | Then run the demo: 30 | 31 | ```shell 32 | ./yolox ../model_trt.engine -i ../../../../assets/dog.jpg 33 | ``` 34 | 35 | or 36 | 37 | ```shell 38 | ./yolox -i 39 | ``` 40 | -------------------------------------------------------------------------------- /demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Consider dependencies only in project. 3 | set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) 4 | 5 | # The set of languages for which implicit dependencies are needed: 6 | set(CMAKE_DEPENDS_LANGUAGES 7 | "CXX" 8 | ) 9 | # The set of files for implicit dependencies of each language: 10 | set(CMAKE_DEPENDS_CHECK_CXX 11 | "E:/YOLOX-main/demo/TensorRT/cpp/yolox.cpp" "E:/YOLOX-main/demo/TensorRT/cpp/cmake-build-debug/CMakeFiles/yolox.dir/yolox.cpp.obj" 12 | ) 13 | set(CMAKE_CXX_COMPILER_ID "GNU") 14 | 15 | # The include file search paths: 16 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 17 | "../include" 18 | "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/include" 19 | "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/bin" 20 | "D:/TensorRT-7.2.3.4/include" 21 | "D:/opencv/build/x64/MinGW/install/include" 22 | "D:/opencv/build/x64/MinGW/install/include/opencv" 23 | ) 24 | 25 | # The set of dependency files which are needed: 26 | set(CMAKE_DEPENDS_DEPENDENCY_FILES 27 | ) 28 | 29 | # Targets to which this target links. 30 | set(CMAKE_TARGET_LINKED_INFO_FILES 31 | ) 32 | 33 | # Fortran module output directory. 34 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 35 | -------------------------------------------------------------------------------- /demo/ncnn/android/README.md: -------------------------------------------------------------------------------- 1 | # YOLOX-Android-ncnn 2 | 3 | Andoird app of YOLOX object detection base on [ncnn](https://github.com/Tencent/ncnn) 4 | 5 | 6 | ## Tutorial 7 | 8 | ### Step1 9 | 10 | Download ncnn-android-vulkan.zip from [releases of ncnn](https://github.com/Tencent/ncnn/releases). This repo uses 11 | [20210525 release](https://github.com/Tencent/ncnn/releases/download/20210525/ncnn-20210525-android-vulkan.zip) for building. 12 | 13 | ### Step2 14 | 15 | After downloading, please extract your zip file. Then, there are two ways to finish this step: 16 | * put your extracted directory into **app/src/main/jni** 17 | * change the **ncnn_DIR** path in **app/src/main/jni/CMakeLists.txt** to your extracted directory 18 | 19 | ### Step3 20 | Download example param and bin file from [onedrive](https://megvii-my.sharepoint.cn/:u:/g/personal/gezheng_megvii_com/ESXBH_GSSmFMszWJ6YG2VkQB5cWDfqVWXgk0D996jH0rpQ?e=qzEqUh) or [github](https://github.com/Megvii-BaseDetection/storage/releases/download/0.0.1/yolox_s_ncnn.tar.gz). Unzip the file to **app/src/main/assets**. 21 | 22 | ### Step4 23 | Open this project with Android Studio, build it and enjoy! 24 | 25 | ## Reference 26 | 27 | * [ncnn-android-yolov5](https://github.com/nihui/ncnn-android-yolov5) 28 | -------------------------------------------------------------------------------- /demo/ncnn/android/app/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 |