Nav button

Sport Vision API

The Sport Vision API empowers you to transform images into actionable intelligence.

Features

The API allows you to query AI models to extract information from sport or products images.

Sport - identify the sport practiced in a picture, from more than 150 possibilities - generate a caption describing the content of the picture, to build smart search engines (coming soon)

Products - identify the type of sport product found in an image - identify the brand of the product

The Sport Vision API is deeply linked to the Sports API, which provides a comprehensive and up to date list of sports.

The API is currently under heavy development - stay tuned for future features and releases!

Sign up to receive our newsletter update (required)

To keep our users happy, we want to inform everyone about the amazing upgrades and critical changes.

Sign up now by filling in this form: https://mailchi.mp/decathlon/sportvisionapi

Authentication

A token is required for all of the POST requests. The token is a static randomized string of characters associated with your information; it acts as an api key.

Obtain an Auth Token

To obtain a token, please contact sportvisionapi@decathlon.com

Sport

Generating intelligence from images of sport

Sport practiced in an image

curl -X POST 34.74.249.65:5000/sportclassifier/predict/ \
  -H 'Accept: application/json' \
  -H 'Authorization: XXX' \
  -H 'Content-Type: multipart/form-data' \
  -F file=@YOUR_IMG_PATH.JPG

JSON response:

{
    "data": [
        {
            "id": "74",
            "name": "Baseball",
            "probability": 0.9923
            },
        {   
            "id": "76",
            "name": "Cricket",
            "probability": 0.0062
            },
        {   
            "id": "289",
            "name": "Lacrosse",
            "probability": 0.0011
            }
    ]
}

This endpoint returns the sport practiced in an image, along with the probability that the sport has been correctly identified. To get more information about the list of possible sports and their associated information, visit the Sports API

HTTP Request

POST 34.74.249.65:5000/sportclassifier/predict/

Attaching a caption to your image (alpha)

curl -X POST 34.74.249.65:5000/imagecaptioner/predict/ \
  -H 'Accept: application/json' \
  -H 'Authorization: XXX' \
  -H 'Content-Type: multipart/form-data' \
  -F file=@YOUR_IMG_PATH.JPG

JSON response:

{
    "data": "football players scores his team first goal during the match"
}

Use this endpoint to attach a caption to your sport images. This is an early version of the endpoint - processes are in development to increase the captions' accuracy.

HTTP Request

POST 34.74.249.65:5000/imagecaptioner/predict/

Products

Generating intelligence from images of products

List of products (coming soon)

This endpoint, to be released soon, will provide a comprehensive list of products, along with the sports in which they are used.

List of brands (coming soon)

This endpoint, to be released soon, will provide a comprehensive list of the major brands found in sport.

Identify the product in an image

curl -X POST 34.74.249.65:5000/productsclassifier/predict/ \
  -H 'Accept: application/json' \
  -H 'Authorization: XXX' \
  -H 'Content-Type: multipart/form-data' \
  -F file=@YOUR_IMG_PATH.JPG

JSON response:

{
    "data": [
        {
            "name": "skates",
            "probability": 0.9999
            },
        {   
            "name": "boots",
            "probability": 0.0001
            },
        {   
            "name": "helmet",
            "probability": 0.0001
            }
    ]
}

This endpoint returns the product in an image, along with the probability that is has been correctly identified.

HTTP Request

POST 34.74.249.65:5000/productsclassifier/predict/

Identify the brand in an image (alpha)

curl -X POST 34.74.249.65:5000/sportbrandsdetector/predict/ \
  -H 'Accept: application/json' \
  -H 'Authorization: XXX' \
  -H 'Content-Type: multipart/form-data' \
  -F file=@YOUR_IMG_PATH.JPG

JSON response:

{
    "data": [
        {
            "name": "Bauer",
            "probability": 0.9940
            },
        {   
            "name": "CCM",
            "probability": 0.0279
            },
        {   
            "name": "chest",
            "probability": 0.0080
            }
    ]
}

This endpoint returns the brand of the product in the image, along with the probability that is has been correctly identified. The endpoint is currently limited to brands selling hockey products, but will be expended to all major sports of the Sports API in a next release.

HTTP Request

POST 34.74.249.65:5000/sportbrandsdetector/predict/

Errors

The Sport Vision API renders the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid - check the JSON format of your request.
401 Unauthorized -- There's a problem with your credentials.
500 Internal Server Error -- We had a problem with our server. Try again later.

Roadmap

This API is currently under heavy developement. Submit your feedback at sportvisionapi@decathlon.com

Upcoming

Q4 2019

Q1 2020

F.A.Q.

How were the sports chosen?

The Sports were selected based on extensive research from our skilled sport experts at Decathlon. See the Sports API documentation for more information.

How were the products and brands chosen?

The products and brand were choosen to cover the practice of all the most popular sports in the Sports API.

The list will be continuously extended over time based on user input. Tags (male/female, player/goaltender, etc.) will also be added to describe in greater accuracy the products in pictures.

How is it supposed to help me?

Our objective is to democratize the application of artificial intelligence to sport. Think of us as the Google vision API specialized to sport. Want to build a smart marketplace of sport products? Get to know your sport users better from the pictures that they post on your platform? Automate the countless hours spent on tagging or describing the pictures in your database? That's what we are here for.

What if a sport, product or brand is missing?

If a sport, product or brand is missing that you feel should be included, send us an email at sportvisionapi@decathlon.com.

How can I make a POST request in Python?

POST requests to our API can be made in Python using the Requests library.

Contributing

Everyone is encouraged to help improve this project.

Here are some ways you can contribute:

Submitting a Pull Request

  1. Fork/Clone the Repository
  2. Create a [new-feature] branch
  3. Implement your feature or bug fix.
  4. Add, commit, and push your changes.
  5. Submit a Pull Request through Github's UI. (Get in touch for access to our repository)

Terms of service