Module for node.js, based on OpenCV DNN, YOLOv3 and COCO dataset.
- Linux
- OpenCV 4 (with pkgconfig)
- node-gyp
- Initialize project
$ npm init -y
- Install node packages in project
$ npm install bindings node-addon-api
- Configure node-gyp
$ node-gyp configure
- Build module
$ node-gyp build
- Get YOLOv3 pre-trained model
$ chmod 755 getModel.sh
$ sh getModel.sh
see test.js
. It returns the number of people in image and write result image.
- If you want to use model of yolov4, then OpenCV 4.4 or later version is required.