All Projects → huuuuusy → Yolov3 On Android

huuuuusy / Yolov3 On Android

Build an Android App for deploying YOLO V3 source code on mobile phone directly.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Yolov3 On Android

Typescripttocs2
New version of TypescriptToCS, better than the original. Though, it doesn't support keyof.
Stars: ✭ 38 (-66.37%)
Mutual labels:  cross-compiler
Opam Cross Android
An OCaml cross-toolchain for Android and several useful libraries
Stars: ✭ 93 (-17.7%)
Mutual labels:  cross-compiler
Yolov5
YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
Stars: ✭ 19,914 (+17523.01%)
Mutual labels:  yolov3
Imagenet
Trial on kaggle imagenet object localization by yolo v3 in google cloud
Stars: ✭ 56 (-50.44%)
Mutual labels:  yolov3
Yolox
More Than YOLO(v3, v4, v3-tiny, v4-tiny)
Stars: ✭ 83 (-26.55%)
Mutual labels:  yolov3
Yolov3 Object Detection Tutorial
Stars: ✭ 95 (-15.93%)
Mutual labels:  yolov3
Xgo
Go CGO cross compiler
Stars: ✭ 36 (-68.14%)
Mutual labels:  cross-compiler
Tensorflow Yolov4 Tflite
YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
Stars: ✭ 1,881 (+1564.6%)
Mutual labels:  yolov3
Opam Cross Windows
An OCaml cross-toolchain for Windows and several useful libraries
Stars: ✭ 86 (-23.89%)
Mutual labels:  cross-compiler
Tensorflow2.0 Examples
🙄 Difficult algorithm, Simple code.
Stars: ✭ 1,397 (+1136.28%)
Mutual labels:  yolov3
Facedetector Base Yolov3 Spp
Stars: ✭ 65 (-42.48%)
Mutual labels:  yolov3
Meta Clang
Clang C/C++ cross compiler and runtime for OpenEmbedded/Yocto Project
Stars: ✭ 76 (-32.74%)
Mutual labels:  cross-compiler
Person remover
People removal in images using Pix2Pix and YOLO.
Stars: ✭ 96 (-15.04%)
Mutual labels:  yolov3
Onnx tflite yolov3
A Conversion tool to convert YOLO v3 Darknet weights to TF Lite model (YOLO v3 PyTorch > ONNX > TensorFlow > TF Lite), and to TensorRT (YOLO v3 Pytorch > ONNX > TensorRT).
Stars: ✭ 52 (-53.98%)
Mutual labels:  yolov3
Yolov3 tensorflow
Complete YOLO v3 TensorFlow implementation. Support training on your own dataset.
Stars: ✭ 1,498 (+1225.66%)
Mutual labels:  yolov3
Tensornets
High level network definitions with pre-trained weights in TensorFlow
Stars: ✭ 982 (+769.03%)
Mutual labels:  yolov3
License Plate Detection
This project using yolo3 to detection license plate in street
Stars: ✭ 93 (-17.7%)
Mutual labels:  yolov3
Mobilenet Yolo
MobileNetV2-YoloV3-Nano: 0.5BFlops 3MB HUAWEI P40: 6ms/img, YoloFace-500k:0.1Bflops 420KB🔥🔥🔥
Stars: ✭ 1,566 (+1285.84%)
Mutual labels:  yolov3
Glsl Optimizer
GLSL optimizer based on Mesa's GLSL compiler. Used to be used in Unity for mobile shader optimization.
Stars: ✭ 1,506 (+1232.74%)
Mutual labels:  cross-compiler
Yolov3 Model Pruning
在 oxford hand 数据集上对 YOLOv3 做模型剪枝(network slimming)
Stars: ✭ 1,386 (+1126.55%)
Mutual labels:  yolov3

I. 介绍

本项目将Yolo-v3的源代码在android studio进行开发编译并且部署到android手机上,实现利用手机硬件平台完成对Yolo-v3网络的调用.项目以Yolo-v3-tiny为例子进行开发,其他相关网络可以通过Darknet网站下载权重文件进行复现.

II. 开发环境

OS: Ubuntu 16.04

Android Studio: 3.1.3

Mobile Phone: Xiaomi MI 8

相关教程:

ubuntu下安装AndroidStudio方法

Andorid Studio官网安装教程

请自行查阅教程完成Android Studio安装以及NDK, SDK等相关开发环境的配置.

III. 项目构建

3.1 源码导入

在Andorid Studio构建一个支持C语言的项目,然后从Darknet下载源代码.

在项目工程的cpp文件夹下新建darknet文件夹,将下载的源码中的example, include, src三个文件夹复制到android工程中.

3.2 源码修改

3.2.1 include文件夹

include文件夹下放置的是darknet的头文件,在头文件开头添加log调试功能.

3.2.2 src文件夹

src文件夹放置darknet源码,首先删除其中的compare.c文件(compare.c无头文件,对整个库的编译不起作用.如果不删除,在编译时compare.c会出现指针问题,无法通过编译).然后修改image.c文件,将232行的load_alphabet()函数中的labels路径改为sdcard/yolo/data/labels(这是随后将在手机上放置文件的绝对路径,不做修改的话真机测试时将出现无法导入labels的问题,导致出现闪退现象).

3.2 Cmake文件配置

关于Cmake的格式和用法,请参考:

官方指南

CMake的基本使用

cmake 基本命令 & 交叉编译配置 & 模块的编写

cmake的使用笔记

本项目中Cmake配置信息请参考代码中CMakeLists.txt文件.

3.3 asserts文件夹配置

将darknet源码中的cfg,data文件放置在项目的assert文件夹下.

官网下载YOLOV3-tiny权重文件并放置在weights文件夹下.

3.4 JNI接口配置

关于在Android Studio 3中如何构建JNI项目,请参考Android Jni/NDK 开发入门详解.

本项目主要修改darknetlib.c文件,其中图片测试代码摘自darknet/examples/dector.c Line562~Line626的官方代码示例.详细信息请参考项目代码及注释.

其中datacfg_str和name_list = "/sdcard/yolo/data/coco.names",是因为项目所使用的预训练模型来自于官网,其中yolo-v3-tiny是用coco训练集训练出的80分类模型,因此name_list需要和预训练模型保持一致.

cfgfile_str和weightfile_str放置cfg文件和weight文件的地址,根据下载的文件位置保持一致即可.

3.5 Java配置

对java文件夹下Yolo.java进行修改,完成相关配置.

IV. 项目运行

在小米8上运行项目,在android studio 3的logcat中可以看到读入的文件信息,以及Yolo-v3-tiny网络的配置.

logcat会打印出预测出的物体名称,概率及处理时间.

在不同的图片上测试,使用手机cpu处理约为一张图耗时0.8s.

参考

项目参考Darknet yolo 在 android studio上的移植和实现,原博主实现的是Yolo-v2的移植,本项目进行修改后实现Yolo-v3版本代码的Android端复现.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].