The Visual-Recognition-Tile-Localization application leverages the Watson Visual Recognition service with image pre-processing techniques to deliver localized image classification. For example, "show me where there is rust on the bridge".
You can view a demonstration of this application in action in the video here:
The user drags & drops an image onto the applicaiton within the browser, and the image is uploaded to the Node.js application. Once uploaded, the image is "chopped up" into smaller images (tiles) and each individual tile is analyzed by the Watson Visual Recognition service. Once complete, all results are visualized within the browser in a heatmap-like visualization, where colorization is based on the confidence scores being returned by the Visual Recognition service's custom classifier.
- Node.js on IBM Bluemix
- Watson Visual Recognition API Reference
- Watson Visual Recognition Custom Classifiers
- [Best Practices Creating Custom Classifiers] (https://www.ibm.com/blogs/bluemix/2016/10/watson-visual-recognition-training-best-practices/)
- Install Node.js
- Download the code
- Edit
app.js
and add your Watson Visual Recognition Key and Customer Classifier ID - cd into the app directory
- Run
npm install
to install the app's dependencies - Run
npm start
to start the app - Access the running app in a browser at http://localhost:6001
The app will also run as-is (with Watson key and classifier id) in the default Node.js buildpack on Bluemix. Once you have modified app.js
and updated the WATSON_KEY
and WATSON_CLASSIFIER
values, then you can deploy using the Bluemix CLI push
command.
The sample web application includes code to track deployments to Bluemix and other Cloud Foundry platforms. The following information is sent to a [Deployment Tracker] deploy_track_url service on each deployment:
- Application Name (
application_name
) - Space ID (
space_id
) - Application Version (
application_version
) - Application URIs (
application_uris
)
This data is collected from the VCAP_APPLICATION
environment variable in IBM Bluemix and other Cloud Foundry platforms. This data is used by IBM to track metrics around deployments of sample applications to IBM Bluemix. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.
Deployment tracking can be disabled by removing require("cf-deployment-tracker-client").track();
from the app.js
main server file.