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

Run the command below as it applies to the version you have installed

docker run -e VISION-SCENE=True -v localstorage:/datastore -p 80:5000 deepquestai/deepstack

Example

../_images/office.jpg
import requests

image_data = open("office.jpg","rb").read()

response = requests.post("http://localhost:80/v1/vision/scene",files={"image":image_data}).json()
print("Label:",response["label"])
print(response)

Response

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