Scene Recognition

The scene recognition api classifies an image into one of 365 scenes

To use this API, you need to enable the scene API when starting DeepStack

Starting DeepStack on Docker

Below we start DeepStack with only the Scene API enabled.

CPU Version
GPU Version
CPU Version
sudo docker run -e VISION-DETECTION=True -v localstorage:/datastore -p 80:5000 \
GPU Version
sudo docker run --rm --runtime=nvidia -e VISION-DETECTION=True -v localstorage:/datastore \
-p 80:5000 deepquestai/deepstack:gpu

Basic Parameters

-e VISION-DETECTION=True This enables the object detection API, all apis are disabled by default.

-v localstorage:/datastore This specifies the local volume where deepstack will store all data.

-p 80:5000 This makes deepstack accessible via port 80 of the machine.

Starting DeepStack on Raspberry PI

sudo deepstack start "VISION-SCENE=True"

Starting DeepStack on Windows

Start the DeepStack App, Click Start Server, Select the SCENE API and click Start Now


using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
namespace app
class App {
static HttpClient client = new HttpClient();
public static async Task makeRequest(){
var request = new MultipartFormDataContent();
var image_data = File.OpenRead("test-image5.jpg");
request.Add(new StreamContent(image_data),"image",Path.GetFileName("test-image5.jpg"));
var output = await client.PostAsync("http://localhost:80/v1/vision/scene",request);
var jsonString = await output.Content.ReadAsStringAsync();
static void Main(string[] args){


Label: conference_room
{'success': True, 'confidence': 0.7373981, 'label': 'conf