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.
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 servernpm run serve
to run bundled locallynpm run test
to run unit testsnpm run test:watch
to run unit tests in watch modenpm run build
to bundle for production
Unit tests are written with Testing Library and Vitest.
This project is licensed under the MIT License. See LICENSE for more information.