SearchBlox Developer Documentation

Welcome to the SearchBlox developer documentation. Here you will find comprehensive technical documentation to help you start working with SearchBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!


Classify Images with DeepDetect

DeepDetect and SearchBlox together allow you to classify images using machine learning. JSON REST API is used to connect DeepDetect to SearchBlox


DeepDetect is a deep learning API and server written in C++11. It makes state-of-the-art deep learning easy to work with and integrate into existing applications.

For more details on DeepDetect and installation procedure please refer to:

Integrating with SearchBlox

The steps to connect DeepDetect to SearchBlox are provided below:

  1. Create custom collection in SearchBlox.
  1. Follow the steps for setting up an image classifier listed here:
  2. DeepDetect and SearchBlox use the same port 8080, so start DeepDetect with
    ./dede -port 8888
    in order to avoid conflict.
  3. Tag and index a URL image in a single call. There are two options:
    a. indexing categories as keywords:
curl -XPOST "http://localhost:8888/predict" -d '{"service":"imageserv","parameters":{"mllib":{"gpu":true},"input":{"width":224,"height":224},"output":{"best":3,"template":"{\"apikey\":\"D96FB202C5907C6C8488DF2A87CD9182\",\"document\":{\"colname\":\"dd\",{{#body}}{{#predictions}} \"url\":\"{{uri}}\",\"uid\":\"{{uri}}\",\"alpha\":\"string\",\"title\":\"{{uri}}\",\"keywords\": \"{{#classes}} {{cat}}, {{/classes}}\" {{/predictions}}{{/body}},\"meta\":{} }}","network":{"url":"http://localhost:8080/searchblox/rest/v1/api/add","http_method":"POST"}}},"data":[""]}'

b. indexing categories and scores into meta:

curl -XPOST "http://localhost:8888/predict" -d '{"service":"imageserv","parameters":{"mllib":{"gpu":true},"input":{"width":224,"height":224},"output":{"best":3,"template":"{\"apikey\":\"D96FB202C5907C6C8488DF2A87CD9182\",\"document\":{\"colname\":\"dd\",{{#body}}{{#predictions}} \"url\":\"{{uri}}\",\"uid\":\"{{uri}}\",\"alpha\":\"string\",\"title\":\"{{uri}}\",\"meta\":{\"categories\": [ {{#classes}} { \"category\":\"{{cat}}\",\"score\":{{prob}} } {{^last}},{{/last}}{{/classes}} ]} {{/predictions}}{{/body}} }}","network":{"url":"http://localhost:8080/searchblox/rest/v1/api/add","http_method":"POST"}}},"data":[""]}'

Updated 10 months ago

Classify Images with DeepDetect

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.