example of using mxnet c api for prediction
(SSD is used in the demo, but other models like yolo can be used too)
(tested on macOS High Sierra with Xcode)
requirements:
- webcam
- opencv 4
- mxnet 1.3 built from source
- (optional) gluoncv(python)
note:
1. frameworks libmxnet, libopencv_imgcodecs.4.x.x, libopencv_imgproc.4.x.x, libopencv_videoio.4.x.x, libopencv_core.4.x.x, libopencv_highgui.4.x.x need to be added to project in Xcode
2. you can either use your own model (for example, some model built and trained in python), or use pretrained models from gluoncv (gluoncv.model_zoo.get_model, gluoncv.utils.export_block)
3. double check input data channel layout and whether it is normalized to make sure they agree with the model