Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
C++ Addon for fast and efficient facial analytics on Nodejs/TypeScript.
Nodoface is the backbone of Poor Man's Rekognition being developed under Google Summer of Code 2019 for CCExtractor Development.
This Addon provides bindings to all OpenFace 2.0 features except the visualization utilities and FaceAnalyser class. Face detection can be easily run in realtime on any modern CPU. The Addon is built using node-addon-api.
CLNF also provides HOG-based and Haar Cascades face detector. GazeAnalysis is a namespace with static classes in OpenFace but GazeAnalyser is a class in Nodoface.
cv::Mat
)cv::Mat_<int>
)cv::Mat_<float>
)cv::rectangle()
)cv::putText()
) (not working)cv::imshow()
)cv::imread()
)cv::imwrite
)cv::destroyWindow()
)cv::destroyAllWindows()
)cv::waitKey()
)cv::VideoCapture
)cv::VideoWriter
)
Note: All methods return RGB image instead of BGR unlike OpenCV
OpenCV classes are partial bindings just sufficient for passing underlying Mat to/from nodejs and C++.Step 1: Install OpenCV 3.4.x.
If opencv is already installed, ensure it is recognised by pkg-config by executing:
$ pkg-config --modversion opencv
Step 2: Install dlib 19.13 or greater as a shared library (default is static).
Check this answer by DavisKing for compiling it as shared library.
Ensure it is recognised by pkg-config:
$ pkg-config --modversion dlib
Step 3: Install OpenFace. The original repo has some issues. It can only compile as static library. So use my OpenFace fork instead. I have modified CMakelists.txt to compile OpenFace as shared lib.
$ git clone https://github.com/sziraqui/OpenFace.git && cd OpenFace
$ git checkout dynamic-compile
$ ./download_models.sh
$ mkdir build && cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE CMAKE_CXX_FLAGS="-std=c++11" -D CMAKE_EXE_LINKER_FLAGS="-std=c++11"
$ make -j2
$ sudo make install
Step 4: Compile the bindings.
$ git clone https://github.com/sziraqui/nodoface.git && cd nodoface
$ npm install
Step 5 (Optional): Run tests
$ npm test
This will execute mocha tests. Some tests generate image outputs which can be checked in ./tests/outputs directory
To clear all files generated by tests, execute npm run clean:test
If you encounter errors, see my gsoc notes for some assistance. The addon is exported from ./api/nodoface.js
Run some samples to test if everything is working.
$ node examples/mtcnn_on_video.js path/to/a/video/file <OpenFace_REPO_DIR>/lib/local/LandmarkDetector/model/mtcnn_detector/MTCNN_detector.txt
GNU General Public License 3.0 (GPL-v3.0)
Please carefully read OpenFace 2.0 license. You must also respect opencv and dlib license.
FAQs
C++ Addon for fast and efficient face analytics
The npm package nodoface receives a total of 6 weekly downloads. As such, nodoface popularity was classified as not popular.
We found that nodoface demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.