{"id":19578389,"url":"https://github.com/infinitered/ai-lab","last_synced_at":"2025-04-27T06:33:21.650Z","repository":{"id":43722317,"uuid":"249778372","full_name":"infinitered/ai-lab","owner":"infinitered","description":"Library of components for TensorFlow.js in web frameworks.","archived":false,"fork":false,"pushed_at":"2023-10-28T03:57:41.000Z","size":20164,"stargazers_count":46,"open_issues_count":18,"forks_count":6,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-06T07:36:57.559Z","etag":null,"topics":["hacktoberfest","react","react-native","react-web","tensorflow","tensorflowjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infinitered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-24T17:50:03.000Z","updated_at":"2023-10-09T07:15:59.000Z","dependencies_parsed_at":"2022-08-22T01:40:33.532Z","dependency_job_id":null,"html_url":"https://github.com/infinitered/ai-lab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitered%2Fai-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitered%2Fai-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitered%2Fai-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitered%2Fai-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infinitered","download_url":"https://codeload.github.com/infinitered/ai-lab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224062742,"owners_count":17249291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","react","react-native","react-web","tensorflow","tensorflowjs"],"created_at":"2024-11-11T07:10:59.987Z","updated_at":"2024-11-11T07:11:00.811Z","avatar_url":"https://github.com/infinitered.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"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)\n\n# ![AI-Lab](assets/images/ai-lab.jpg) Bring the power of AI to Web easily.  (currently in _ALPHA_).\n\n\nThis 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.\n\n## Quick Look\n\nTo play with AI-Lab, check out the latest [storybook build](https://infinitered.github.io/ai-lab/).\n\u003ccenter\u003e\n\n| React Native (broken for now)                 | React                                         |\n| --------------------------------------------- | --------------------------------------------- |\n| ![app example](assets/images/app-example.png) | ![web example](assets/images/web-example.png) |\n\n\u003c/center\u003e\n\n## Install\n\n```\nyarn add ai-lab @tensorflow/tfjs\n```\n\nThen add it\n\n```tsx\nimport React from 'react';\nimport { AILabImage } from 'ai-lab';\n```\n\n## Dev Requirements\n\nThe packages in this repository require Node v14+ and `pnpm`.\n\n## Examples\n\n### 📷 _AILabImage_\n\nThe following code automatically runs the SSD model and places bounding boxes for detections.\n```tsx\n  \u003cAILabImage\n    model={SSD_MODEL_HERE}\n    modelConfig={{\n      modelType: 'ssd'\n    }}\n    src={require('./cat.jpeg')}\n    visual\n  /\u003e  \n```\n\n### 📺 _AILabLocalVideo_\n\nThis code runs the model on the supplied video and logs the results\n\n```tsx\n  \u003cAILabLocalVideo\n    model={ClassificationModel}\n    onInference={console.log}\n    modelConfig={{\n      modelType: 'classification',\n    }}\n    src={theVideo}\n  /\u003e\n```\n\n### 🕸🎥 _AILabWebCam_\n\nThis code runs the model on the webcam feed and logs the results\n\n```tsx\n    \u003cAILabWebCam\n      model={BlazePoseModel}\n      onInference={console.log}\n      modelConfig={{\n        modelType: 'pose',\n      }}\n    /\u003e\n```\n\n## Installation\n\n### Check Requirements\n\n_Assure Node \u003e v14 Installed_\n\n```shell\nnode -v\n```\n\n_Assure TypeScript Installed_\n\n```shell\ntsc -v\n```\n\n_Assure/Install PNPM_\n\n```shell\nnpm install -g pnpm\n```\n\nIf you ran yarn/npm - delete all `node_modules` from those and start fresh.\n\n**Install project code at project root**\n\n```shell\npnpm install\n```\n\n\u003e **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.\n\n```shell\npnpm build\n```\n\nNow you can run example projects that are depending on\n\n_E.G. of running the `ai-lab-example` example_\n\n```shell\ncd examples/ai-lab-example\npnpm start\n```\n\n\u003cbr\u003e\n\n## Contributing\n\nWorking within this repository requires Node v14. A Node Version Manager is recommended, such as [`nvm`](https://github.com/nvm-sh/nvm#installing-and-updating).\n\nThis repository is a monorepo, and managed by [`pnpm`](https://pnpm.io). To install it, run:\n\n```console\n$ npm install pnpm -g\n```\n\nFrom the repository root directory, run the following command to install all dependencies:\n\n```console\n$ pnpm install\n```\n\nOnce install completes, development can begin.\n\n### _Stacks we use_ :\n\n[tsdx](https://tsdx.io/)\n\n[storybook](https://storybook.js.org/)\n\n[pnpm](https://pnpm.io/)\n\n\u003cbr\u003e\n\n#### ⁉️ If you run into problems, first search the issues in this repository. Otherwise you can \u003ca href=\"https://github.com/infinitered/ai-lab/issues\"\u003ereport the bug\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitered%2Fai-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinitered%2Fai-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitered%2Fai-lab/lists"}