Faster and more convenient way of ordering based on Object detection
Android Live Demo inferenece of Yolov7 using ncnn
Object detection for 21 classes of dishes and ordering pages included
Simply open this project with Android Studio, NCNN and OpenCV libraries are already included in this project
- Download
ncnn-YYYYMMDD-android-vulkan.zip
or build NCNN for android yourself - Extract
ncnn-YYYYMMDD-android-vulkan.zip
intoapp/src/main/jni
and change the ncnn_DIR path to yours inapp/src/main/jni/CMakeLists.txt
- Download
opencv-mobile-XYZ-android.zip
- Extract
opencv-mobile-XYZ-android.zip
intoapp/src/main/jni
and change the OpenCV_DIR path to yours inapp/src/main/jni/CMakeLists.txt
- Training YOLOv7-tiny model
- Convert the model to NCNN format into
app/src/main/assets
. I personally use PNNX
Defined in app/src/main/java/com/tencent/ncnnyolov7/MenuActivity.java
f = new int[]{1, 2, 3, 15, 20, 21, 4, 22, 16, 5, 6, 7, 8, 9, 10, 17, 11, 12, 23, 18, 13};
This array solves the problem that the order page does not correspond to the classes number in the model
The dishes information is locally in the json string named eleme_json
in app/src/main/res/values/strings.xml
, and the picture is obtained by url
For more information please refer to Linkage-RecyclerView
Dataset: https://universe.roboflow.com/skoopin-data/pandadata
YOLOv7: https://github.com/WongKinYiu/yolov7
YOLOv7 for Android: https://github.com/xiang-wuu/ncnn-android-yolov7
Ordering page Architecture: https://github.com/KunMinX/Linkage-RecyclerView