This commit is contained in:
Maciej Kotowski committed 2021-12-09 11:02:02 +01:00
1 parent 4cc716cc56
commit 87e920b32a
5 files changed
+99 -2

No files matched your search

+69
View File
@@ -9,6 +9,7 @@
"version": "0.1.0",
"dependencies": {
"@tensorflow-models/mobilenet": "^2.1.0",
"@tensorflow/tfjs-backend-webgl": "^3.12.0",
"@tensorflow/tfjs-converter": "^3.11.0",
"@tensorflow/tfjs-core": "^3.11.0",
"@testing-library/jest-dom": "^5.11.4",
@@ -2585,6 +2586,40 @@
"@tensorflow/tfjs-core": "^3.1.0"
}
},
"node_modules/@tensorflow/tfjs-backend-webgl": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.12.0.tgz",
"integrity": "sha512-nFiPS7AiDZ+H4RXpx8dSYPWzy3B1zC/aRKwH9uz9MUp1WiHHbYr90+E0ut9HFrIz0cMb0sR7vGU+zkjSZ1rLsA==",
"dependencies": {
"@tensorflow/tfjs-backend-cpu": "3.12.0",
"@types/offscreencanvas": "~2019.3.0",
"@types/seedrandom": "2.4.27",
"@types/webgl-ext": "0.0.30",
"@types/webgl2": "0.0.6",
"seedrandom": "2.4.3"
},
"engines": {
"yarn": ">= 1.3.2"
},
"peerDependencies": {
"@tensorflow/tfjs-core": "3.12.0"
}
},
"node_modules/@tensorflow/tfjs-backend-webgl/node_modules/@tensorflow/tfjs-backend-cpu": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.12.0.tgz",
"integrity": "sha512-UMf/OHHCzm/+oKXtTDnanlyYFNNKKU5u2hJooKak1JqSOEKChBOPYKmxf9VWmY7Pos4GbbKH/V1pLzfLnLq+Bg==",
"dependencies": {
"@types/seedrandom": "2.4.27",
"seedrandom": "2.4.3"
},
"engines": {
"yarn": ">= 1.3.2"
},
"peerDependencies": {
"@tensorflow/tfjs-core": "3.12.0"
}
},
"node_modules/@tensorflow/tfjs-converter": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.11.0.tgz",
@@ -3037,6 +3072,11 @@
"resolved": "https://registry.npmjs.org/@types/webgl-ext/-/webgl-ext-0.0.30.tgz",
"integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg=="
},
"node_modules/@types/webgl2": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@types/webgl2/-/webgl2-0.0.6.tgz",
"integrity": "sha512-50GQhDVTq/herLMiqSQkdtRu+d5q/cWHn4VvKJtrj4DJAjo1MNkWYa2MA41BaBO1q1HgsUjuQvEOk0QHvlnAaQ=="
},
"node_modules/@types/webpack": {
"version": "4.41.26",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.26.tgz",
@@ -23006,6 +23046,30 @@
"integrity": "sha512-JjqT9ijHDFA2FEpUGWg7H2lQ0GrMuE2VmiCRBYmUew6b4JKht8LXDjG5HxZh95YH6c/25sZWTpGeHbquloH+hw==",
"requires": {}
},
"@tensorflow/tfjs-backend-webgl": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.12.0.tgz",
"integrity": "sha512-nFiPS7AiDZ+H4RXpx8dSYPWzy3B1zC/aRKwH9uz9MUp1WiHHbYr90+E0ut9HFrIz0cMb0sR7vGU+zkjSZ1rLsA==",
"requires": {
"@tensorflow/tfjs-backend-cpu": "3.12.0",
"@types/offscreencanvas": "~2019.3.0",
"@types/seedrandom": "2.4.27",
"@types/webgl-ext": "0.0.30",
"@types/webgl2": "0.0.6",
"seedrandom": "2.4.3"
},
"dependencies": {
"@tensorflow/tfjs-backend-cpu": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.12.0.tgz",
"integrity": "sha512-UMf/OHHCzm/+oKXtTDnanlyYFNNKKU5u2hJooKak1JqSOEKChBOPYKmxf9VWmY7Pos4GbbKH/V1pLzfLnLq+Bg==",
"requires": {
"@types/seedrandom": "2.4.27",
"seedrandom": "2.4.3"
}
}
}
},
"@tensorflow/tfjs-converter": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.11.0.tgz",
@@ -23416,6 +23480,11 @@
"resolved": "https://registry.npmjs.org/@types/webgl-ext/-/webgl-ext-0.0.30.tgz",
"integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg=="
},
"@types/webgl2": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@types/webgl2/-/webgl2-0.0.6.tgz",
"integrity": "sha512-50GQhDVTq/herLMiqSQkdtRu+d5q/cWHn4VvKJtrj4DJAjo1MNkWYa2MA41BaBO1q1HgsUjuQvEOk0QHvlnAaQ=="
},
"@types/webpack": {
"version": "4.41.26",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.26.tgz",
+1
View File
@@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"@tensorflow-models/mobilenet": "^2.1.0",
"@tensorflow/tfjs-backend-webgl": "^3.12.0",
"@tensorflow/tfjs-converter": "^3.11.0",
"@tensorflow/tfjs-core": "^3.11.0",
"@testing-library/jest-dom": "^5.11.4",
+3
View File
@@ -29,5 +29,8 @@
<div id="app">
<img src="%PUBLIC_URL%/logo192.png" alt="Trash Recognizer logo" />
</div>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-converter"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgl"></script>
</body>
</html>
-1
View File
@@ -1,6 +1,5 @@
import { useState, useEffect, useRef, LegacyRef } from "react";
import * as mobilenet from "@tensorflow-models/mobilenet";
function Ai() {
const [isModelLoading, setIsModelLoading] = useState(false);
const [model, setModel] = useState<mobilenet.MobileNet>();
+26 -1
View File
@@ -1578,12 +1578,32 @@
"resolved" "https://registry.npmjs.org/@tensorflow-models/mobilenet/-/mobilenet-2.1.0.tgz"
"version" "2.1.0"
"@tensorflow/tfjs-backend-cpu@3.12.0":
"integrity" "sha512-UMf/OHHCzm/+oKXtTDnanlyYFNNKKU5u2hJooKak1JqSOEKChBOPYKmxf9VWmY7Pos4GbbKH/V1pLzfLnLq+Bg=="
"resolved" "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.12.0.tgz"
"version" "3.12.0"
dependencies:
"@types/seedrandom" "2.4.27"
"seedrandom" "2.4.3"
"@tensorflow/tfjs-backend-webgl@^3.12.0":
"integrity" "sha512-nFiPS7AiDZ+H4RXpx8dSYPWzy3B1zC/aRKwH9uz9MUp1WiHHbYr90+E0ut9HFrIz0cMb0sR7vGU+zkjSZ1rLsA=="
"resolved" "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.12.0.tgz"
"version" "3.12.0"
dependencies:
"@tensorflow/tfjs-backend-cpu" "3.12.0"
"@types/offscreencanvas" "~2019.3.0"
"@types/seedrandom" "2.4.27"
"@types/webgl-ext" "0.0.30"
"@types/webgl2" "0.0.6"
"seedrandom" "2.4.3"
"@tensorflow/tfjs-converter@^3.1.0", "@tensorflow/tfjs-converter@^3.11.0":
"integrity" "sha512-rTRIKvBoqL0qdPYpm8UXauZycOiaBHZB2E2v3OoXoHnjvle/Xn/09uZJdrixgGhR+Kahs3Vz27BEEFz6RI5j2w=="
"resolved" "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.11.0.tgz"
"version" "3.11.0"
"@tensorflow/tfjs-core@^3.1.0", "@tensorflow/tfjs-core@^3.11.0", "@tensorflow/tfjs-core@3.11.0":
"@tensorflow/tfjs-core@^3.1.0", "@tensorflow/tfjs-core@^3.11.0", "@tensorflow/tfjs-core@3.11.0", "@tensorflow/tfjs-core@3.12.0":
"integrity" "sha512-JOp+1+LCd0Xg3hu7fu6iQPWZnN8Hc6ssfP7B+625XH5GYY1/OhVASa7Ahe2mJr9gZovY2lw8FUejLh1jMmBb1Q=="
"resolved" "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.11.0.tgz"
"version" "3.11.0"
@@ -1884,6 +1904,11 @@
"resolved" "https://registry.npmjs.org/@types/webgl-ext/-/webgl-ext-0.0.30.tgz"
"version" "0.0.30"
"@types/webgl2@0.0.6":
"integrity" "sha512-50GQhDVTq/herLMiqSQkdtRu+d5q/cWHn4VvKJtrj4DJAjo1MNkWYa2MA41BaBO1q1HgsUjuQvEOk0QHvlnAaQ=="
"resolved" "https://registry.npmjs.org/@types/webgl2/-/webgl2-0.0.6.tgz"
"version" "0.0.6"
"@types/webpack-sources@*":
"integrity" "sha512-LXn/oYIpBeucgP1EIJbKQ2/4ZmpvRl+dlrFdX7+94SKRUV3Evy3FsfMZY318vGhkWUS5MPhtOM3w1/hCOAOXcg=="
"resolved" "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.1.0.tgz"