Skip to content

Commit

Permalink
Bring ML APIs up to standard. (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Apr 12, 2017
1 parent d1043cd commit 5af5fe4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 21 deletions.
40 changes: 26 additions & 14 deletions packages/google-cloud-vision/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,26 @@ __Usage:__ `node detect.js --help`

```
Commands:
faces <fileName> Detects faces in a local image file.
faces-gcs <bucket> <fileName> Detects faces in an image in Google Cloud Storage.
labels <fileName> Detects labels in a local image file.
labels-gcs <bucket> <fileName> Detects labels in an image in Google Cloud Storage.
landmarks <fileName> Detects landmarks in a local image file.
landmarks-gcs <bucket> <fileName> Detects landmarks in an image in Google Cloud Storage.
text <fileName> Detects text in a local image file.
text-gcs <bucket> <fileName> Detects text in an image in Google Cloud Storage.
logos <fileName> Detects logos in a local image file.
logos-gcs <bucket> <fileName> Detects logos in an image in Google Cloud Storage.
properties <fileName> Detects image properties in a local image file.
properties-gcs <bucket> <fileName> Detects image properties in an image in Google Cloud Storage.
safe-search <fileName> Detects safe search properties in a local image file.
safe-search-gcs <bucket> <fileName> Detects safe search properties in an image in Google Cloud Storage.
faces <fileName> Detects faces in a local image file.
faces-gcs <bucketName> <fileName> Detects faces in an image in Google Cloud Storage.
labels <fileName> Detects labels in a local image file.
labels-gcs <bucketName> <fileName> Detects labels in an image in Google Cloud Storage.
landmarks <fileName> Detects landmarks in a local image file.
landmarks-gcs <bucketName> <fileName> Detects landmarks in an image in Google Cloud Storage.
text <fileName> Detects text in a local image file.
text-gcs <bucketName> <fileName> Detects text in an image in Google Cloud Storage.
logos <fileName> Detects logos in a local image file.
logos-gcs <bucketName> <fileName> Detects logos in an image in Google Cloud Storage.
properties <fileName> Detects image properties in a local image file.
properties-gcs <bucketName> <fileName> Detects image properties in an image in Google Cloud Storage.
safe-search <fileName> Detects safe search properties in a local image file.
safe-search-gcs <bucketName> <fileName> Detects safe search properties in an image in Google Cloud Storage.
crops <fileName> Detects crop hints in a local image file.
crops-gcs <bucketName> <fileName> Detects crop hints in an image in Google Cloud Storage.
web <fileName> Finds similar photos on the web for a local image file.
web-gcs <bucketName> <fileName> Finds similar photos on the web for an image in Google Cloud Storage.
fulltext <fileName> Extracts full text from a local image file.
fulltext-gcs <bucketName> <fileName> Extracts full text from an image in Google Cloud Storage.
Options:
--help Show help [boolean]
Expand All @@ -70,6 +76,12 @@ Examples:
node detect.js properties-gcs my-bucket your-image.jpg
node detect.js safe-search ./resources/wakeupcat.jpg
node detect.js safe-search-gcs my-bucket your-image.jpg
node detect.js crops ./resources/wakeupcat.jpg
node detect.js crops-gcs my-bucket your-image.jpg
node detect.js web ./resources/wakeupcat.jpg
node detect.js web-gcs my-bucket your-image.jpg
node detect.js fulltext ./resources/wakeupcat.jpg
node detect.js fulltext-gcs my-bucket your-image.jpg
For more information, see https://cloud.google.com/vision/docs
```
Expand Down
14 changes: 7 additions & 7 deletions packages/google-cloud-vision/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"test": "cd ..; npm run st -- --verbose vision/system-test/*.test.js"
},
"dependencies": {
"@google-cloud/storage": "0.7.0",
"@google-cloud/vision": "^0.11.0",
"async": "2.1.4",
"natural": "0.4.0",
"redis": "2.6.5",
"yargs": "6.6.0"
"@google-cloud/storage": "1.0.0",
"@google-cloud/vision": "0.11.0",
"async": "2.3.0",
"natural": "0.5.0",
"redis": "2.7.1",
"yargs": "7.0.2"
},
"optionalDependencies": {
"canvas": "1.6.2"
"canvas": "1.6.5"
},
"engines": {
"node": ">=4.3.2"
Expand Down
3 changes: 3 additions & 0 deletions packages/google-cloud-vision/samples/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ visionClient.detectLabels(fileName)

console.log('Labels:');
labels.forEach((label) => console.log(label));
})
.catch((err) => {
console.error('ERROR:', err);
});
// [END vision_quickstart]

0 comments on commit 5af5fe4

Please sign in to comment.