Skip to content

Commit a525198

Browse files
authored
update coco-ssd npm to version to 0.1.1 (#107)
* update the version to 0.1.1 and add inline demo * update the tfjs version to 0.13.5
1 parent a9144fa commit a525198

File tree

4 files changed

+59
-36
lines changed

4 files changed

+59
-36
lines changed

coco-ssd/demo/cat.jpg

22.5 KB
Loading

coco-ssd/demo/test_inline.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- Load TensorFlow.js. This is required to use coco-ssd model. -->
2+
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"> </script>
3+
<!-- Load the coco-ssd model. -->
4+
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/coco-ssd"> </script>
5+
6+
<!-- Replace this with your image. Make sure CORS settings allow reading the image! -->
7+
<img id="img" src="cat.jpg"/>
8+
9+
<!-- Place your code in the script tag below. You can also use an external .js file -->
10+
<script>
11+
// Notice there is no 'import' statement. 'cocoSsd' and 'tf' is
12+
// available on the index-page because of the script tag above.
13+
14+
const img = document.getElementById('img');
15+
16+
// Load the model.
17+
cocoSsd.load().then(model => {
18+
// detect objects in the image.
19+
model.detect(img).then(predictions => {
20+
console.log('Predictions: ', predictions);
21+
});
22+
});
23+
</script>

coco-ssd/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tensorflow-models/coco-ssd",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Object detection model (coco-ssd) in TensorFlow.js",
55
"main": "dist/index.js",
66
"unpkg": "dist/coco-ssd.min.js",
@@ -13,10 +13,10 @@
1313
"url": "https://github.com/tensorflow/tfjs-models.git"
1414
},
1515
"peerDependencies": {
16-
"@tensorflow/tfjs": "^0.13.1"
16+
"@tensorflow/tfjs": "^0.13.5"
1717
},
1818
"devDependencies": {
19-
"@tensorflow/tfjs": "^0.13.1",
19+
"@tensorflow/tfjs": "^0.13.5",
2020
"@types/jasmine": "~2.8.8",
2121
"babel-core": "~6.26.0",
2222
"babel-plugin-transform-runtime": "~6.23.0",

coco-ssd/yarn.lock

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -55,37 +55,37 @@
5555
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
5656
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=
5757

58-
"@tensorflow/[email protected].1":
59-
version "0.6.1"
60-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-converter/-/tfjs-converter-0.6.1.tgz#a07ede029434aa54f374fb31b029af9a4e2daa0c"
61-
integrity sha512-Kk3lO7PcnmrNIHc1YSqMXg3htI+LluODvauSYNy6F4s/HmP4X/eB8VKcV8Vii1IidDDbXcBXStiiSaqqrVd2kw==
58+
"@tensorflow/[email protected].7":
59+
version "0.6.7"
60+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-converter/-/tfjs-converter-0.6.7.tgz#d45c5f17c5c3de638ded5354d16d450a8cb97676"
61+
integrity sha512-7hsbLbx0KM1Bew00kVoslrnNMOUTyP9NZLDl03cEkrCbEYsaG7jouLxHVz+B0A6/ZPE1N40xmD2JRnu54VKT8g==
6262
dependencies:
6363
"@types/long" "~3.0.32"
6464
protobufjs "~6.8.6"
6565

66-
"@tensorflow/[email protected].2":
67-
version "0.13.2"
68-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-core/-/tfjs-core-0.13.2.tgz#edb0e4b9e42b04ca113a0ce80f211b22e2c85552"
69-
integrity sha512-0+/Lfjmv+eMibVaYCe2trSqps5+K+b5BZbzJTwbHM2fpV1l1XJpp6PLyZ05A4mhQcAiuIgNgim48H97Yl+yAMw==
66+
"@tensorflow/[email protected].11":
67+
version "0.13.11"
68+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-core/-/tfjs-core-0.13.11.tgz#f5ef7e52c113b74bd3cabd7464c195cac0c302b4"
69+
integrity sha512-jHTD7LbpC3JpsP2mBVD3ZiYV+Xr/l91zpA5HpQVnbdNat5J/IJHabeYwYtukiVyN4amHqyFvGFtX/gjLD82rXg==
7070
dependencies:
71-
"@types/seedrandom" "~2.4.27"
72-
"@types/webgl-ext" "~0.0.29"
73-
"@types/webgl2" "~0.0.4"
74-
seedrandom "~2.4.3"
71+
"@types/seedrandom" "2.4.27"
72+
"@types/webgl-ext" "0.0.30"
73+
"@types/webgl2" "0.0.4"
74+
seedrandom "2.4.3"
7575

76-
"@tensorflow/[email protected].1":
77-
version "0.8.1"
78-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-layers/-/tfjs-layers-0.8.1.tgz#08173c4ef16090821946d37d41a1fd21011afb00"
79-
integrity sha512-2thqZX58E3SmBD6XG8tEFYZ7VTHGMw8Rflq7suTzvi0/ug+bBQYVHfLrStUddk1EcZHzmc/stRTzIYi20OEPkg==
76+
"@tensorflow/[email protected].5":
77+
version "0.8.5"
78+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-layers/-/tfjs-layers-0.8.5.tgz#40808ae9c9cc692ab07020d314822ae92860ee1d"
79+
integrity sha512-yQoVyh5q3Hh3YmLXGvKAkgsLVFe0VQBRmgVxJkxzzWhCB+NrjUXU/IzHzCRoBcgcXKZTY9/XE5IcvPmJw9cIXw==
8080

81-
"@tensorflow/tfjs@^0.13.1":
82-
version "0.13.1"
83-
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs/-/tfjs-0.13.1.tgz#67f5250197bd4da21771ee2d790c057186a6ef20"
84-
integrity sha512-AHbLNrot9JN0qbGStiAotNH6t2jCbU03Ydme8OYIYjNKqkQq3zv1mC77Uy5M3Q8zIex1J2N/E5ZzoZiVfFQitA==
81+
"@tensorflow/tfjs@^0.13.5":
82+
version "0.13.5"
83+
resolved "https://registry.yarnpkg.com/@tensorflow/tfjs/-/tfjs-0.13.5.tgz#421fd96bb02ed87ae145c0d87bbb86cb2862c1f3"
84+
integrity sha512-a0sbY2IShg+hAD+Es8fy1Ey/afoks4fxSi+PVSZc1st51brCnO3qBbqwDDctRNwx/EOfAroS8IWIKgaWTpsflg==
8585
dependencies:
86-
"@tensorflow/tfjs-converter" "0.6.1"
87-
"@tensorflow/tfjs-core" "0.13.2"
88-
"@tensorflow/tfjs-layers" "0.8.1"
86+
"@tensorflow/tfjs-converter" "0.6.7"
87+
"@tensorflow/tfjs-core" "0.13.11"
88+
"@tensorflow/tfjs-layers" "0.8.5"
8989

9090
9191
version "0.0.39"
@@ -112,17 +112,17 @@
112112
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.3.tgz#85f288502503ade0b3bfc049fe1777b05d0327d5"
113113
integrity sha512-DOzWZKUnmFYG0KUOs+9HEBju2QhBU6oM2zeluunQNt0vnJvnkHvtDNlQPZDkTrkC5pZrNx1TPqeL137zciXZMQ==
114114

115-
"@types/seedrandom@~2.4.27":
115+
116116
version "2.4.27"
117117
resolved "https://registry.yarnpkg.com/@types/seedrandom/-/seedrandom-2.4.27.tgz#9db563937dd86915f69092bc43259d2f48578e41"
118118
integrity sha1-nbVjk33YaRX2kJK8QyWdL0hXjkE=
119119

120-
"@types/webgl-ext@~0.0.29":
121-
version "0.0.29"
122-
resolved "https://registry.yarnpkg.com/@types/webgl-ext/-/webgl-ext-0.0.29.tgz#4d479baf1124795f53d54bdc85b386e0f194d90a"
123-
integrity sha512-ZlVjDQU5Vlc9hF4LGdDldujZUf0amwlwGv1RI2bfvdrEHIl6X/7MZVpemJUjS7NxD9XaKfE8SlFrxsfXpUkt/A==
120+
"@types/[email protected].30":
121+
version "0.0.30"
122+
resolved "https://registry.yarnpkg.com/@types/webgl-ext/-/webgl-ext-0.0.30.tgz#0ce498c16a41a23d15289e0b844d945b25f0fb9d"
123+
integrity sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg==
124124

125-
"@types/webgl2@~0.0.4":
125+
126126
version "0.0.4"
127127
resolved "https://registry.yarnpkg.com/@types/webgl2/-/webgl2-0.0.4.tgz#c3b0f9d6b465c66138e84e64cb3bdf8373c2c279"
128128
integrity sha512-PACt1xdErJbMUOUweSrbVM7gSIYm1vTncW2hF6Os/EeWi6TXYAYMPp+8v6rzHmypE5gHrxaxZNXgMkJVIdZpHw==
@@ -1330,10 +1330,10 @@ rollup@~0.60.7:
13301330
"@types/estree" "0.0.39"
13311331
"@types/node" "*"
13321332

1333-
seedrandom@~2.4.3:
1334-
version "2.4.4"
1335-
resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-2.4.4.tgz#b25ea98632c73e45f58b77cfaa931678df01f9ba"
1336-
integrity sha512-9A+PDmgm+2du77B5i0Ip2cxOqqHjgNxnBgglxLcX78A2D6c2rTo61z4jnVABpF4cKeDMDG+cmXXvdnqse2VqMA==
1333+
1334+
version "2.4.3"
1335+
resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-2.4.3.tgz#2438504dad33917314bff18ac4d794f16d6aaecc"
1336+
integrity sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=
13371337

13381338
"semver@2 || 3 || 4 || 5", semver@^5.3.0:
13391339
version "5.5.1"

0 commit comments

Comments
 (0)