Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/infinitered/ai-lab
Library of components for TensorFlow.js in web frameworks.
https://github.com/infinitered/ai-lab
hacktoberfest react react-native react-web tensorflow tensorflowjs
Last synced: 3 months ago
JSON representation
Library of components for TensorFlow.js in web frameworks.
- Host: GitHub
- URL: https://github.com/infinitered/ai-lab
- Owner: infinitered
- License: mit
- Created: 2020-03-24T17:50:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-28T03:57:41.000Z (over 1 year ago)
- Last Synced: 2024-10-06T07:36:57.559Z (4 months ago)
- Topics: hacktoberfest, react, react-native, react-web, tensorflow, tensorflowjs
- Language: TypeScript
- Homepage:
- Size: 19.2 MB
- Stars: 46
- Watchers: 11
- Forks: 6
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![Docs Working](https://github.com/infinitered/ai-lab/actions/workflows/storybook.yml/badge.svg)](https://infinitered.github.io/ai-lab/) ![CodeQL](https://github.com/infinitered/ai-lab/actions/workflows/codeql-analysis.yml/badge.svg?branch=master)
# ![AI-Lab](assets/images/ai-lab.jpg) Bring the power of AI to Web easily. (currently in _ALPHA_).
This project wires together frameworks for Artificial Intelligence on the edge. The current focus is popular computer vision models in TensorFlow.js on React. The goal is to support React Native, and multiple web frameworks.
## Quick Look
To play with AI-Lab, check out the latest [storybook build](https://infinitered.github.io/ai-lab/).
| React Native (broken for now) | React |
| --------------------------------------------- | --------------------------------------------- |
| ![app example](assets/images/app-example.png) | ![web example](assets/images/web-example.png) |## Install
```
yarn add ai-lab @tensorflow/tfjs
```Then add it
```tsx
import React from 'react';
import { AILabImage } from 'ai-lab';
```## Dev Requirements
The packages in this repository require Node v14+ and `pnpm`.
## Examples
### π· _AILabImage_
The following code automatically runs the SSD model and places bounding boxes for detections.
```tsx
```### πΊ _AILabLocalVideo_
This code runs the model on the supplied video and logs the results
```tsx
```### πΈπ₯ _AILabWebCam_
This code runs the model on the webcam feed and logs the results
```tsx
```## Installation
### Check Requirements
_Assure Node > v14 Installed_
```shell
node -v
```_Assure TypeScript Installed_
```shell
tsc -v
```_Assure/Install PNPM_
```shell
npm install -g pnpm
```If you ran yarn/npm - delete all `node_modules` from those and start fresh.
**Install project code at project root**
```shell
pnpm install
```> **Windows Users**: The package tsconfig files are symlinks. If you're looking for a quick fix, you can copy the contents of the `shared/tsconfig.json` to these files as a temporary fix. These should not be committed like this, and should be reverted or linked in Windows.
```shell
pnpm build
```Now you can run example projects that are depending on
_E.G. of running the `ai-lab-example` example_
```shell
cd examples/ai-lab-example
pnpm start
```
## Contributing
Working within this repository requires Node v14. A Node Version Manager is recommended, such as [`nvm`](https://github.com/nvm-sh/nvm#installing-and-updating).
This repository is a monorepo, and managed by [`pnpm`](https://pnpm.io). To install it, run:
```console
$ npm install pnpm -g
```From the repository root directory, run the following command to install all dependencies:
```console
$ pnpm install
```Once install completes, development can begin.
### _Stacks we use_ :
[tsdx](https://tsdx.io/)
[storybook](https://storybook.js.org/)
[pnpm](https://pnpm.io/)
#### βοΈ If you run into problems, first search the issues in this repository. Otherwise you can report the bug.