@dialpad/vi-cv v0.0.1
Vi-Cv
A Javascript computer vision library for Dialpad Meetings.
Installation
Clone the
talkiq/cvrepository.Go to the package directory :
cd cv/vi-cv.Install the package and its dependencies :
npm install.Build for production :
npm run build.Webpack <https://webpack.js.org/>will bundle theTypescript <https://www.typescriptlang.org/>source files insrc. The minified output files are generated in thedistfolder using the production configuration inwebpack.prod.ts.
Usage
For development, use npm start to launch a web server with live reloading provided by webpack-dev-server.
The output files are bundled using the development configuration in webpack.dev.ts.
They are available under http://localhost:8080.
After launching the server, the local demo is available at http://localhost:8080/local_demo/index.html.
Work in Progress : generate an HTML documentation of the library API, through TypeDoc <https://typedoc.org/>_ : npm run doc.
The documentation will be created under doc.
Testing
Use npm test to start the Jest <https://jestjs.io/>_-based tests in tests/unit.tests.ts. It will :
Launch a headless Chrome browser environment supporting Webgl and WASM based on
Puppeteer <https://developers.google.com/web/tools/puppeteer>, using thejest-puppeteer <https://github.com/smooth-code/jest-puppeteer>library.Start an
Express <https://expressjs.com/>server (gs-server.ts) to load the test dataset from thegs://deeplearning-cvGoogle Cloud storage bucket. You must be authenticated by setting the environment variableGOOGLE_APPLICATION_CREDENTIALS(Reference <https://cloud.google.com/storage/docs/reference/libraries#setting_up_authentication>) to get access to the bucket.Execute the tests content (
tests/test.htmlandtests/main.js) in the browser environment : assert that the models are correctly loaded and verify the models accuracy on the test dataset. Tests take around 2 minutes to run.
Outside of the Jest automatic testing framework, the test page can be accessed by opening tests/test.html.
The Express server has to be manually launched first : npx ts-node ./tests/gs-server.ts.
Dependencies
Mediapipe Selfie Segmentation <https://google.github.io/mediapipe/solutions/selfie_segmentation>_ : segmentation model and inference files.
Twgl <https://twgljs.org/>_ : A WebGL helper.
4 years ago