├── demo ├── 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 │ │ │ │ │ └── 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 │ │ └── openvino_inference.py ├── MegEngine │ ├── python │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── yolox.py │ │ │ ├── yolo_fpn.py │ │ │ ├── yolo_pafpn.py │ │ │ └── darknet.py │ │ ├── README.md │ │ ├── dump.py │ │ ├── coco_classes.py │ │ ├── build.py │ │ ├── convert_weights.py │ │ ├── process.py │ │ └── visualize.py │ └── cpp │ │ └── build.sh ├── TensorRT │ ├── cpp │ │ ├── README.md │ │ └── CMakeLists.txt │ └── python │ │ └── README.md └── ONNXRuntime │ ├── onnx_inference.py │ └── README.md ├── assets ├── 100.jpg ├── 89.jpg ├── 99.jpg ├── dog.jpg ├── demo.png ├── logo.png ├── zidane.jpg └── git_fig.png ├── README.md ├── 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__ │ │ ├── ema.cpython-38.pyc │ │ ├── boxes.cpython-38.pyc │ │ ├── dist.cpython-38.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── logger.cpython-38.pyc │ │ ├── metric.cpython-38.pyc │ │ ├── checkpoint.cpython-38.pyc │ │ ├── demo_utils.cpython-38.pyc │ │ ├── setup_env.cpython-38.pyc │ │ ├── visualize.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 ├── core │ ├── __pycache__ │ │ ├── launch.cpython-38.pyc │ │ ├── __init__.cpython-38.pyc │ │ └── trainer.cpython-38.pyc │ └── __init__.py ├── data │ ├── __pycache__ │ │ ├── __init__.cpython-38.pyc │ │ ├── samplers.cpython-38.pyc │ │ ├── dataloading.cpython-38.pyc │ │ ├── data_augment.cpython-38.pyc │ │ └── data_prefetcher.cpython-38.pyc │ ├── datasets │ │ ├── __pycache__ │ │ │ ├── coco.cpython-38.pyc │ │ │ ├── voc.cpython-38.pyc │ │ │ ├── yolo.cpython-38.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── coco_classes.cpython-38.pyc │ │ │ ├── voc_classes.cpython-38.pyc │ │ │ ├── yolo_classes.cpython-38.pyc │ │ │ ├── mosaicdetection.cpython-38.pyc │ │ │ └── datasets_wrapper.cpython-38.pyc │ │ ├── yolo_classes.py │ │ ├── __init__.py │ │ ├── voc_classes.py │ │ ├── coco_classes.py │ │ ├── datasets_wrapper.py │ │ ├── coco.py │ │ └── yolo.py │ ├── __init__.py │ ├── data_prefetcher.py │ └── samplers.py ├── models │ ├── __pycache__ │ │ ├── darknet.cpython-38.pyc │ │ ├── losses.cpython-38.pyc │ │ ├── yolox.cpython-38.pyc │ │ ├── __init__.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 │ ├── yolo_fpn.py │ ├── losses.py │ ├── yolox.py │ └── yolo_pafpn.py ├── evaluators │ ├── __pycache__ │ │ ├── __init__.cpython-38.pyc │ │ ├── voc_eval.cpython-38.pyc │ │ ├── voc_evaluator.cpython-38.pyc │ │ ├── coco_evaluator.cpython-38.pyc │ │ └── yolo_evaluator.cpython-38.pyc │ └── __init__.py ├── __init__.py └── layers │ ├── __init__.py │ ├── csrc │ ├── vision.cpp │ └── cocoeval │ │ └── cocoeval.h │ └── fast_coco_eval_api.py ├── exps ├── example │ └── yolox_voc │ │ ├── __pycache__ │ │ └── yolox_yolo_s.cpython-38.pyc │ │ ├── yolox_voc_s.py │ │ └── yolox_yolo_s.py └── default │ ├── yolox_l.py │ ├── yolox_m.py │ ├── yolox_s.py │ ├── yolox_x.py │ ├── yolox_tiny.py │ ├── nano.py │ └── yolov3.py ├── requirements.txt ├── setup.cfg ├── datasets └── README.md ├── setup.py ├── tools ├── trt.py ├── export_onnx.py └── train.py └── docs └── train_custom_data.md /demo/ncnn/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /assets/100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/assets/100.jpg -------------------------------------------------------------------------------- /assets/89.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/assets/89.jpg -------------------------------------------------------------------------------- /assets/99.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/assets/99.jpg -------------------------------------------------------------------------------- /assets/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/assets/dog.jpg -------------------------------------------------------------------------------- /assets/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/assets/demo.png -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/assets/logo.png -------------------------------------------------------------------------------- /assets/zidane.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/assets/zidane.jpg -------------------------------------------------------------------------------- /assets/git_fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/assets/git_fig.png -------------------------------------------------------------------------------- /demo/OpenVINO/README.md: -------------------------------------------------------------------------------- 1 | ## YOLOX for OpenVINO 2 | 3 | * [C++ Demo](./cpp) 4 | * [Python Demo](./python) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | * 训练数据的格式请参考yolov5-face 2 | * 其它资料请参考yolox原始链接:https://github.com/Megvii-BaseDetection/YOLOX 3 | 4 | -------------------------------------------------------------------------------- /yolox/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/exp/__pycache__/build.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/exp/__pycache__/build.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/ema.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/ema.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/core/__pycache__/launch.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/core/__pycache__/launch.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/boxes.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/boxes.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/dist.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/dist.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/core/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/core/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/core/__pycache__/trainer.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/core/__pycache__/trainer.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/__pycache__/samplers.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/__pycache__/samplers.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/exp/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/exp/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/exp/__pycache__/base_exp.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/exp/__pycache__/base_exp.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/exp/__pycache__/yolox_base.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/exp/__pycache__/yolox_base.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/darknet.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/models/__pycache__/darknet.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/losses.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/models/__pycache__/losses.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/yolox.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/models/__pycache__/yolox.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/logger.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/logger.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/metric.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/metric.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/__pycache__/dataloading.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/__pycache__/dataloading.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/models/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/yolo_fpn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/models/__pycache__/yolo_fpn.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/yolo_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/models/__pycache__/yolo_head.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/checkpoint.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/checkpoint.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/demo_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/demo_utils.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/setup_env.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/setup_env.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/visualize.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/visualize.cpython-38.pyc -------------------------------------------------------------------------------- /demo/ncnn/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/demo/ncnn/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /yolox/data/__pycache__/data_augment.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/__pycache__/data_augment.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/coco.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/coco.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/voc.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/voc.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/yolo.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/yolo.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/evaluators/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/voc_eval.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/evaluators/__pycache__/voc_eval.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/yolo_pafpn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/models/__pycache__/yolo_pafpn.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/lr_scheduler.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/lr_scheduler.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/model_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/model_utils.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/__pycache__/data_prefetcher.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/__pycache__/data_prefetcher.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/models/__pycache__/network_blocks.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/models/__pycache__/network_blocks.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/utils/__pycache__/allreduce_norm.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/utils/__pycache__/allreduce_norm.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/datasets/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/voc_evaluator.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/evaluators/__pycache__/voc_evaluator.cpython-38.pyc -------------------------------------------------------------------------------- /demo/ncnn/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | yoloXncnn 4 | 5 | -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/coco_classes.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/coco_classes.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/voc_classes.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/voc_classes.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/yolo_classes.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/yolo_classes.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/coco_evaluator.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/evaluators/__pycache__/coco_evaluator.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/evaluators/__pycache__/yolo_evaluator.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/evaluators/__pycache__/yolo_evaluator.cpython-38.pyc -------------------------------------------------------------------------------- /exps/example/yolox_voc/__pycache__/yolox_yolo_s.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/exps/example/yolox_voc/__pycache__/yolox_yolo_s.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/mosaicdetection.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/mosaicdetection.cpython-38.pyc -------------------------------------------------------------------------------- /yolox/data/datasets/__pycache__/datasets_wrapper.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xialuxi/yolox-face-landmarks/HEAD/yolox/data/datasets/__pycache__/datasets_wrapper.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/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 | -------------------------------------------------------------------------------- /yolox/data/datasets/yolo_classes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding:utf-8 -*- 3 | # Copyright (c) Megvii, Inc. and its affiliates. 4 | 5 | YOLO_CLASSES = ( 6 | "face", 7 | "mask", 8 | ) 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | from .yolo_evaluator import YOLOEvaluator -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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 | -------------------------------------------------------------------------------- /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 .yolo import YOLODataset 6 | from .yolo_classes import YOLO_CLASSES 7 | from .coco import COCODataset 8 | from .coco_classes import COCO_CLASSES 9 | from .datasets_wrapper import ConcatDataset, Dataset, MixConcatDataset 10 | from .mosaicdetection import MosaicDetection 11 | from .voc import VOCDetection 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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/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/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/TensorRT/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | 3 | project(yolox) 4 | 5 | add_definitions(-std=c++11) 6 | 7 | option(CUDA_USE_STATIC_CUDA_RUNTIME OFF) 8 | set(CMAKE_CXX_STANDARD 11) 9 | set(CMAKE_BUILD_TYPE Debug) 10 | 11 | find_package(CUDA REQUIRED) 12 | 13 | include_directories(${PROJECT_SOURCE_DIR}/include) 14 | # include and link dirs of cuda and tensorrt, you need adapt them if yours are different 15 | # cuda 16 | include_directories(/data/cuda/cuda-10.2/cuda/include) 17 | link_directories(/data/cuda/cuda-10.2/cuda/lib64) 18 | # cudnn 19 | include_directories(/data/cuda/cuda-10.2/cudnn/v8.0.4/include) 20 | link_directories(/data/cuda/cuda-10.2/cudnn/v8.0.4/lib64) 21 | # tensorrt 22 | include_directories(/data/cuda/cuda-10.2/TensorRT/v7.2.1.6/include) 23 | link_directories(/data/cuda/cuda-10.2/TensorRT/v7.2.1.6/lib) 24 | 25 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Ofast -Wfatal-errors -D_MWAITXINTRIN_H_INCLUDED") 26 | 27 | find_package(OpenCV) 28 | include_directories(${OpenCV_INCLUDE_DIRS}) 29 | 30 | add_executable(yolox ${PROJECT_SOURCE_DIR}/yolox.cpp) 31 | target_link_libraries(yolox nvinfer) 32 | target_link_libraries(yolox cudart) 33 | target_link_libraries(yolox ${OpenCV_LIBS}) 34 | 35 | add_definitions(-O2 -pthread) 36 | 37 | -------------------------------------------------------------------------------- /demo/ncnn/android/app/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 |