This repo is a fork of chuanqi305's rscnn, a CNN framework based on RenderScript.
The purpose of this repo is to demonstrate an implementation for deploying prebuilt detection models from Caffe (using MobileNetv1 + SSD) onto an Android device.
-
Android Studio w/ API 28
-
Caffe (w/ssd) : https://github.com/chuanqi305/ssd
-
Anaconda (Recomended)
- Download MobileNet-SSD model.
git clone https://github.com/chuanqi305/MobileNet-SSD
You'll want to download the pretrained MobileNetSSD_deploy.caffemodel and move it to MobileNet-SSD folder.
- Use script/convert_caffe_model.py to convert the model to new format, do not forget to change the caffe root path in the converting script.
python script/convert_caffe_model.py --model MobileNet-SSD/deploy.prototxt --weights MobileNet-SSD/MobileNetSSD_deploy.caffemodel --savedir mobilenet-ssd
- Push the converted model files to src/main/assets folder of your project.
cp -ar mobilenet-ssd demo/src/main/assets/
- Run this demo, and you can select a photo to see the object detection result.
See Wiki for more documentation details of additional errors you might run into and how to correct them.