All Projects → sunkwei → SSD_Demo_Android

sunkwei / SSD_Demo_Android

Licence: other
基于 mxnet, 实现 ssd demo for android

Programming Languages

java
68154 projects - #9 most used programming language
python
139335 projects - #7 most used programming language
Makefile
30231 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to SSD Demo Android

DLARM
DLARM: Dissertation for Computer Science Masters Degree at UFRGS
Stars: ✭ 24 (+71.43%)
Mutual labels:  mxnet
CarND-VehicleDetection
vehicle detection with deep learning
Stars: ✭ 34 (+142.86%)
Mutual labels:  ssd
char-rnn-text-generation
Character Embeddings Recurrent Neural Network Text Generation Models
Stars: ✭ 64 (+357.14%)
Mutual labels:  mxnet
mtomo
Multiple types of NN model optimization environments. It is possible to directly access the host PC GUI and the camera to verify the operation. Intel iHD GPU (iGPU) support. NVIDIA GPU (dGPU) support.
Stars: ✭ 24 (+71.43%)
Mutual labels:  mxnet
gluon2pytorch
Gluon to PyTorch deep neural network model converter
Stars: ✭ 72 (+414.29%)
Mutual labels:  mxnet
OpSummary.MXNet
A tool to count operators and parameters of your MXNet-Gluon model.
Stars: ✭ 19 (+35.71%)
Mutual labels:  mxnet
Dog-Breed-Identification-Gluon
Kaggle 120种狗分类,Gluon实现
Stars: ✭ 45 (+221.43%)
Mutual labels:  mxnet
mxnet-cpp-scratch
Some deep learning models written with mxnet and C++11.
Stars: ✭ 14 (+0%)
Mutual labels:  mxnet
sfd.gluoncv
Reproduce SFD face detector using gluon-cv
Stars: ✭ 23 (+64.29%)
Mutual labels:  mxnet
deepspeech.mxnet
A MXNet implementation of Baidu's DeepSpeech architecture
Stars: ✭ 82 (+485.71%)
Mutual labels:  mxnet
Real-Time-Object-Detection-API-using-TensorFlow
A Transfer Learning based Object Detection API that detects all objects in an image, video or live webcam. An SSD model and a Faster R-CNN model was pretrained on Mobile net coco dataset along with a label map in Tensorflow. This model were used to detect objects captured in an image, video or real time webcam. Open CV was used for streaming obj…
Stars: ✭ 50 (+257.14%)
Mutual labels:  ssd
python cv AI ML
用python做计算机视觉,人工智能,机器学习,深度学习等
Stars: ✭ 73 (+421.43%)
Mutual labels:  mxnet
softmaxfocalloss
the loss function in Aritcal ‘Focal Loss for Dense Object Detection‘’
Stars: ✭ 16 (+14.29%)
Mutual labels:  mxnet
DL.EyeSight
Mainly use SSD, YOLO and other models to solve the target detection problem in image and video !
Stars: ✭ 48 (+242.86%)
Mutual labels:  ssd
People-Counting-in-Real-Time
People Counting in Real-Time with an IP camera.
Stars: ✭ 233 (+1564.29%)
Mutual labels:  ssd
sentiment-analysis2
Sentiment ananlysis in keras and mxnet
Stars: ✭ 37 (+164.29%)
Mutual labels:  mxnet
shinTB
Textboxes : Image Text Detection Model : python package (tensorflow)
Stars: ✭ 90 (+542.86%)
Mutual labels:  ssd
gsmartcontrol
GSmartControl - Hard disk drive and SSD health inspection tool
Stars: ✭ 183 (+1207.14%)
Mutual labels:  ssd
mloperator
Machine Learning Operator & Controller for Kubernetes
Stars: ✭ 85 (+507.14%)
Mutual labels:  mxnet
capsnet.mxnet
MXNet implementation of CapsNet
Stars: ✭ 30 (+114.29%)
Mutual labels:  mxnet

SSD_Demo_Android

基于 mxnet, 实现 ssd demo for android

准备

需要编译 openblas, mxnet amalgamation, 参见 [https://github.com/apache/incubator-mxnet/tree/master/amalgamation]

需要注意的是, ssd 依赖更多的 operator, 在 mxnet_predict0.cc 中加上即可.

另外生成的 mxnet_predict-all.cc 中有一个 #include <x86intrin.h> 需要删除, 修改为 #include <endian.h>, 当然也可以将 x86intrin.h 加到 amalgamation.py 的 blacklist 中, 并将 endian.h 加入到 sysheaders 变量中.

我测试了 ssd_mobilenet1.0_voc, yolo3_darknet53_voc, 发现至少需要在 mxnet_predict0.cc 中增加以下 .cc 文件:

#include "src/operator/slice_channel.cc"
#include "src/operator/nn/softmax.cc"
#include "src/operator/tensor/elemwise_binary_scalar_op_logic.cc"
#include "src/operator/tensor/control_flow_op.cc"
#include "src/operator/contrib/multibox_detection.cc"
#include "src/operator/contrib/multibox_prior.cc"
#include "src/operator/contrib/bounding_box.cc"
#include "src/storage/storage.cc"

通过 GluonCV model_zoo 下载模型

gluoncv 提供了大量可直接使用的模型, 可以简单的导出为 libmxnet_predict.so 使用的 .json + .params 格式.

from gluoncv import model_zoo, data
import mxnet as mx
import cv2

model_zoo.get_model_list()
net = model_zoo.get_model("ssd_512_mobilenet1_0_voc", pretrained=True)
net.hybridize()

data, img = data.transforms.presets.ssd.load_test("P9297176.JPG", short=512)
r = net(data)
net.export("ssd_mobile_voc")    # 生成 ssd_mobile_voc-symbol.json 和 ssd_mobile_voc-0000.params

classnames = net.classes
catalogs, scores, boxes = r

for i, score in scores:
    if score < 0.4:
        continue

    catalog = int(catalogs[i])
    x1, y1 = int(boxes[4*i]), int(boxes[4*i+1])
    x2, y2 = int(boxes[4*i+2]), int(boxes[4*i+3])
    
    cv2.rectangle(img, (x1,y1), (x2,y2), (0,0,255))
    cv2.putText(img, classnames[catalog], (x1,y1), cv2.FONT_HERSHEY_COMPLEX_SMALL, 1.0, (0,255,255))

cv2.imshow("debug", img)
cv2.waitKey(0)

将生成的 .json 和 .params 放到 assets 目录中

运行实例

Alt text Alt text

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].