0.0.1 • Published 3 years ago

@dialpad/vi-cv v0.0.1

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

Vi-Cv

A Javascript computer vision library for Dialpad Meetings.

Installation

  1. Clone the talkiq/cv repository.

  2. Go to the package directory : cd cv/vi-cv.

  3. Install the package and its dependencies : npm install.

  4. Build for production : npm run build. Webpack <https://webpack.js.org/> will bundle the Typescript <https://www.typescriptlang.org/> source files in src. The minified output files are generated in the dist folder using the production configuration in webpack.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 the jest-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 the gs://deeplearning-cv Google Cloud storage bucket. You must be authenticated by setting the environment variable GOOGLE_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.html and tests/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.

0.0.1

3 years ago