Skip to content

tvanier/sport-visioner

Repository files navigation

Sport Visioner

A sample sport-detection application based on the Sport Vision API from Decathlon.

The application allows the user to take a photo or pick a local image, and predict what sport(s) are included in the picture. The user can optionally pre-select a sport to try to match the algorithm prediction.

Application screenshot

Development

First you will need Node.js (latest LTS version recommended, v14 at time of writing). The application is developed with Vite. The UI is built with Svelte and the Decathlon design system (see also github.com/vitamin-web)

After cloning this repository, run npm install to install dependencies, and add your API key as described below.

This application requires a Decathlon API key, you can get one on the Decathlon developers site. Once you have a key, configure it in a git-ignored .env.local file, for example:

VITE_DECATHLON_API_KEY=abcd1234

Available npm commands:

  • npm run dev to run a local dev server
  • npm run serve to run bundled locally
  • npm run test to run unit tests
  • npm run test:watch to run unit tests in watch mode
  • npm run build to bundle for production

Testing

Unit tests are written with Testing Library and Vitest.

License

This project is licensed under the MIT License. See LICENSE for more information.