How to use Object Detection API with Python in 5 minutes?
Tags: objectdetection, ai, api, python
Published: 2023-01-10 10:53:03

_In this tutorial, you will learn how to use Object Detection API in 5 minutes using Python and Eden AI Object Detection API. Eden AI provides an easy and developer-friendly API that allows you to detect objects in images._

‍

## What is Object Detection ? 

[Object detection](https://www.edenai.co/feature/object-detection?referral=how-to-object-detection-python) (or object classification) is a [Computer Vision](https://www.edenai.co/technologies/vision?referral=how-to-object-detection-python) technique that aims to identify and locate the presence of an object instance or class of objects in an image. Therefore, it does not require data for model training. Particular attention is paid to the detection of faces and people. Object detection can be found in many domains, such as content-based image search or video surveillance. If you want to learn more about what Computer Vision can offer, check out our selection of [Best Computer Vision APIs](https://www.edenai.co/post/best-computer-vision-apis?referral=how-to-object-detection-python).

![Exemple of Object Detection results on Eden AI platform
‍](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mt1lmzyf6fgxcsbaxew3.PNG)

**[Try these APIs on Eden AI](https://app.edenai.run/bricks/default)**

**Getting Started with Object Detection API**
The first step to using Object Detection API with Python is to install Python's requests package, that will allow you to call Eden AI API.

![Object Detection API with Python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cay75hb20v9qhh4jej7x.png)
Next, you'll need to install Python's JSON package in order to read and print the result of the API request.
![Object Detection API with Python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wko2sohtq55g9hk6pz5i.png)

## How to use Object Detection API with Python

You are now ready to process your images into Eden AI Object Detection API.

### 1. Get an Object Detection API Key on Eden AI

To perform Object Detection, make sure to create an account on [Eden AI](https://app.edenai.run/user/register?referral=how-to-object-detection-python) for free. Then, you will be able to get your API key direclty from the homepage with free credits offered by Eden AI.

![Eden AI platform - Get your API key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1v937lkywj9b3fhqiom.png)

[Get your API key for FREE](https://app.edenai.run/user/register?referral=how-to-object-detection-python)

### 2. Start detecting objects in your images

Now that you have imported packages on Python and gotten your API key, you will be able to detect objects in images.With Eden AI, you can choose from a range of different engines you want for Object Detection. To help you choose the best provider according to your needs and type of project, you can access our [list of Object Detection providers](https://docs.edenai.co/reference/image_object_detection_create?referral=how-to-object-detection-python).

‍

Here is the Python script you need to write on your notebook:
![Example of a Object Detection API response](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rjpy2f14g3frdddzcb1d.png)
As shown above, we have called two different Object Detection engines in the script. Subsequently, Eden AI API will return in its JSON response results of those providers.

Once the request is done, you will be able to get the result with this print :

![Example of a Object Detection API response](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/asr6hy1ce4cxe5asx0ig.png)

Here is an example of a Object Detection API response:

![Example of a Object Detection API response](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rjn0iez6vk2kes44s2px.png)

## Benefits of using Object Detection API with Eden AI
Using Object Detection with Eden AI API is quick and easy.

![Best Object Detection AIs in one API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cinkfbid264nyswsbbp8.gif)

**Save time and cost**

We offer a unified API for all providers: simple and standard to use, with a quick switch between providers and an access to the specificic features of each provider.

**Easy to integrate**

The JSON output format is the same for all suppliers thanks to Eden AI's standardisation work. The response elements are also standardised thanks to Eden AI's powerful matching algorithms.

**Customization**

With Eden AI you have the possibility to integrate a third party platform: we can quickly develop connectors. To go further and customize your Object Detection request with specific parameters, check out our [documentation](https://docs.edenai.co/reference/text_sentiment_analysis_create?referral=how-use-sentiment-analysis).

[Create your Account on Eden AI](https://app.edenai.run/user/register?referral=how-to-object-detection-python)