Skip to content

Commit

Permalink
update Android readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtjhl committed May 4, 2023
1 parent aff8dd8 commit 258dd0a
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions deploy/NCNN/Android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@ The yolov6 object detection in `Android` .

This is a sample ncnn android project, it depends on ncnn library and opencv

https://github.com/Tencent/ncnn
- [ncnn](https://github.com/Tencent/ncnn)

https://github.com/nihui/opencv-mobile
- [opencv-mobile](https://github.com/nihui/opencv-mobile)


## how to build and run
### step1
https://github.com/Tencent/ncnn/releases

* Download ncnn-YYYYMMDD-android-vulkan.zip or build ncnn for android yourself
* Extract ncnn-YYYYMMDD-android-vulkan.zip into **app/src/main/jni** and change the **ncnn_DIR** path to yours in **app/src/main/jni/CMakeLists.txt**
* Download [ncnn-YYYYMMDD-android-vulkan.zip](https://github.com/Tencent/ncnn/releases) or build ncnn for android yourself
* Extract `ncnn-YYYYMMDD-android-vulkan.zip` into `app/src/main/jni` and change the `ncnn_DIR` path to yours in `app/src/main/jni/CMakeLists.txt`

### step2
https://github.com/nihui/opencv-mobile

* Download opencv-mobile-XYZ-android.zip
* Extract opencv-mobile-XYZ-android.zip into **app/src/main/jni** and change the **OpenCV_DIR** path to yours in **app/src/main/jni/CMakeLists.txt**
* Download [opencv-mobile-XYZ-android.zip](https://github.com/nihui/opencv-mobile)
* Extract `opencv-mobile-XYZ-android.zip` into `app/src/main/jni` and change the `OpenCV_DIR` path to yours in `app/src/main/jni/CMakeLists.txt`

### step3
* download [AndroidAssets.zip
](https://github.com/meituan/YOLOv6/releases/download/0.4.0/AndroidAssets.zip)
* Unzip `AndroidAssets.zip`, you will get a directory named as `assets`, move it
into `app/src/`.

### step4
* Open this project with Android Studio, build it and enjoy!

## some notes
Expand All @@ -33,5 +37,5 @@ https://github.com/nihui/opencv-mobile
* FPS may be lower in dark environment because of longer camera exposure time

## Reference:
https://github.com/nihui/ncnn-android-nanodet
https://github.com/Tencent/ncnn
- [ncnn-android-nanodet](https://github.com/nihui/ncnn-android-nanodet)
- [ncnn](https://github.com/Tencent/ncnn)

0 comments on commit 258dd0a

Please sign in to comment.