RepositoryCCNChina
DO

dog-qiuqiu/MobileNet-Yolo

MobileNetV2-YoloV3-Nano: 0.5BFlops 3MB HUAWEI P40: 6ms/img, YoloFace-500k:0.1Bflops 420KB:fire::fire::fire:

1.7kstars
277forks
24issues
0views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: yolov3

#1 Repository of the month

1
TINIX TRENDING·Topic: mobilenet-yolo

#1 Repository of the month

1
TINIX TRENDING·Topic: ncnn

#1 Repository of the month

2021.2.6 此项目不再更新,新项目地址: Yolo-Fastest: Faster and stronger https://github.com/dog-qiuqiu/Yolo-Fastest

image

***Darknet Group convolution is not well supported on some GPUs such as NVIDIA PASCAL!!!

针对某些Pascal显卡例如1080ti在darknet上 训练失败/训练异常缓慢/推理速度异常 的可以采用Pytorch版yolo3框架 训练/推理

MobileNetV2-YOLOv3-Lite&Nano Darknet

Mobile inference frameworks benchmark (4*ARM_CPU)

NetworkVOC mAP(0.5)COCO mAP(0.5)ResolutionInference time (NCNN/Kirin 990)Inference time (MNN arm82/Kirin 990)FLOPSWeight size
MobileNetV2-YOLOv3-Lite(our)73.2637.4432028.42 ms18 ms1.8BFlops8.0MB
MobileNetV2-YOLOv3-Nano(our)65.2730.1332010.16 ms5 ms0.5BFlops3.0MB
MobileNetV2-YOLOv370.7&35232.15 ms& ms2.44BFlops14.4MB
MobileNet-SSD72.7&30026.37 ms& ms& BFlops23.1MB
YOLOv5s&56.2416150.5 ms& ms13.2BFlops28.1MB
YOLOv3-Tiny-Prn&33.141636.6 ms& ms3.5BFlops18.8MB
YOLOv4-Tiny&40.241644.6 ms& ms6.9BFlops23.1MB
YOLO-Nano69.1&416& ms& ms4.57BFlops4.0MB
  • Support mobile inference frameworks such as NCNN&MNN
  • The mnn benchmark only includes the forward inference time
  • The ncnn benchmark is the forward inference time + post-processing time(NMS...) of the convolution feature map.
  • Darknet Train Configuration: CUDA-version: 10010 (10020), cuDNN: 7.6.4,OpenCV version: 4 GPU:RTX2080ti

MobileNetV2-YOLOv3-Lite-COCO Test results

image

Application

Ultralight-SimplePose

image

YoloFace-500k: 500kb yolo-Face-Detection

NetworkResolutionInference time (NCNN/Kirin 990)Inference time (MNN arm82/Kirin 990)FLOPSWeight size
UltraFace-version-RFB320x240&ms3.36ms0.1BFlops1.3MB
UltraFace-version-Slim320x240&ms3.06ms0.1BFlops1.2MB
yoloface-500k320x2565.5ms2.4ms0.1BFlops0.52MB
yoloface-500k-v2352x2884.7ms&ms0.1BFlops0.42MB
  • 都500k了,要啥mAP:sunglasses:
  • Inference time (DarkNet/i7-6700):13ms
  • The mnn benchmark only includes the forward inference time
  • The ncnn benchmark is the forward inference time + post-processing time(NMS...) of the convolution feature map.

Wider Face Val

ModelEasy SetMedium SetHard Set
libfacedetection v1(caffe)0.650.50.233
libfacedetection v2(caffe)0.7140.5850.306
Retinaface-Mobilenet-0.25 (Mxnet)0.7450.5530.232
version-slim-3200.770.6710.395
version-RFB-3200.7870.6980.438
yoloface-500k-3200.7280.6820.431
yoloface-500k-352-v20.7680.7290.490
  • yoloface-500k-v2:The SE&CSP module is added
  • V2 does not support MNN temporarily
  • wider_face_val(ap05): yoloface-500k: 53.75 yoloface-500k-v2: 56.69

YoloFace-500k Test results(thresh 0.7)

image

YoloFace-500k-v2 Test results(thresh 0.7)

image

YoloFace-50k: Sub-millisecond face detection model

NetworkResolutionInference time (NCNN/Kirin 990)Inference time (MNN arm82/Kirin 990)Inference time (DarkNet/R3-3100)FLOPSWeight size
yoloface-50k56x560.27ms0.31ms0.5 ms0.001BFlops46kb
  • For the close-range face detection model in a specific scene, the recommended detection distance is 1.5m

YoloFace-50k Test results(thresh 0.7)

image

YoloFace50k-landmark106(Ultra lightweight 106 point face-landmark model)

NetworkResolutionInference time (NCNN/Kirin 990)Inference time (MNN arm82/Kirin 990)Weight size
landmark106112x1120.6ms0.5ms1.4MB
  • Face detection: yoloface-50k Landmark: landmark106

YoloFace50k-landmark106 Test results

image

Reference&Framework instructions&How to Train

  • https://github.com/AlexeyAB/darknet
  • You must use a pre-trained model to train your own data set. You can make a pre-trained model based on the weights of COCO training in this project to initialize the network parameters
  • 交流qq群:1062122604

About model selection

  • MobileNetV2-YOLOv3-SPP: Nvidia Jeston, Intel Movidius, TensorRT,NPU,OPENVINO...High-performance embedded side
  • MobileNetV2-YOLOv3-Lite: High Performance ARM-CPU,Qualcomm Adreno GPU, ARM82...High-performance mobile
  • MobileNetV2-YOLOv3-NANO: ARM-CPU...Computing resources are limited
  • MobileNetV2-YOLOv3-Fastest: ....... Can you do personal face detection???It’s better than nothing

NCNN conversion tutorial

NCNN C++ Sample

NCNN Android Sample

image

DarkNet2Caffe tutorial

Environmental requirements

  • Python2.7
  • python-opencv
  • Caffe(add upsample layer https://github.com/dog-qiuqiu/caffe)
  • You have to compile cpu version of caffe!!!
      cd darknet2caffe/
      python darknet2caffe.py MobileNetV2-YOLOv3-Nano-voc.cfg MobileNetV2-YOLOv3-Nano-voc.weights MobileNetV2-YOLOv3-Nano-voc.prototxt MobileNetV2-YOLOv3-Nano-voc.caffemodel
      cp MobileNetV2-YOLOv3-Nano-voc.prototxt sample
      cp MobileNetV2-YOLOv3-Nano-voc.caffemodel sample
      cd sample
      python detector.py
    

MNN conversion tutorial

  • Benchmark:https://www.yuque.com/mnn/cn/tool_benchmark
  • Convert darknet model to caffemodel through darknet2caffe
  • Manually replace the upsample layer in prototxt with the interp layer
  • Take the modification of MobileNetV2-YOLOv3-Nano-voc.prototxt as an example
	#layer {
	#    bottom: "layer71-route"
	#    top: "layer72-upsample"
	#    name: "layer72-upsample"
	#    type: "Upsample"
	#    upsample_param {
	#        scale: 2
	#    }
	#}
	layer {
	    bottom: "layer71-route"
	    top: "layer72-upsample"
	    name: "layer72-upsample"
	    type: "Interp"
	    interp_param {
		height:20  #upsample h size
		width:20   #upsample w size
	    }
	}

Thanks

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
ultralytics/yolov5

Ultralytics YOLOv5 in PyTorch for object detection, instance segmentation, classification, training, and export.

58.3k
Nov 23, 2026
RepositoryPython
Megvii-BaseDetection/YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/

10.7k
Jun 8, 2025
RepositoryJupyter Notebook
microsoft/AI-For-Beginners

12 Weeks, 24 Lessons, AI for All!

71.5k
Nov 15, 2026
RepositoryPython
ultralytics/ultralytics

Ultralytics YOLO27, YOLO26, YOLO11, YOLOv8 — object detection, instance segmentation, semantic segmentation, image classification, pose estimation, object tracking

63.9k
Dec 1, 2026
RepositoryPython
roboflow/supervision

We write your reusable computer vision tools. 💜

51.7k
Nov 27, 2026
RepositoryPython
ultralytics/yolov3

PyTorch implementation of YOLOv3, YOLOv3-SPP, and YOLOv3-tiny for real-time object detection with training, validation, inference, and multi-format export.

10.7k
Nov 7, 2026
RepositoryC++
cmdbug/YOLOv5_NCNN

🍅 Deploy ncnn on mobile phones. Support Android and iOS. 移动端ncnn部署,支持Android与iOS。

1.6k
May 17, 2022
RepositoryC++
opencv/opencv

Open Source Computer Vision Library

91.8k
Nov 30, 2026
RepositoryPython
d2l-ai/d2l-zh

《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被70多个国家的500多所大学用于教学。

82.9k
Jul 30, 2024