Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nvsriram/keepervision

ECE Final Year Design Project: Using computer vision, image processing, and machine learning, KeeperVision physically guides goalkeepers in real-time to the best position to defend against any incoming shots.
https://github.com/nvsriram/keepervision

aws-rds-mysql aws-s3 computer-vision flask machine-learning yolov8

Last synced: 5 days ago
JSON representation

ECE Final Year Design Project: Using computer vision, image processing, and machine learning, KeeperVision physically guides goalkeepers in real-time to the best position to defend against any incoming shots.

Awesome Lists containing this project

README

        

![banner](https://github.com/nvsriram/KeeperVision/assets/50625504/56e69ee3-a7d9-413a-85f4-f73253c34675)

## πŸ’‘Motivation

Soccer is the most popular sport with hundreds of millions of players and fans around the world. Many times, a key save can be the difference between winning and losing a game. KeeperVision is a training tool which aims to help goalkeepers in tackling their greatest hurdle - positioning. Using computer vision, image processing, and machine learning, KeeperVision physically guides goalkeepers in real-time to the best position to defend against any incoming shots.

## πŸš€ Demo

https://github.com/nvsriram/KeeperVision/assets/50625504/f4d87b97-4a0c-4a7a-9e95-1bd64e781f94

## 🌐 API Reference

### `api/register/`


GET


Response
OK
Code
Content


βœ…
200

{"id": <player_id>}




❌
404

{"message": "Player <username> does not exist."}



POST


Body

{"email": <email>}




Response
OK
Code
Content


βœ…
200

{"id": <player_id>}




❌
400

{"message": "<some error message like duplicate key Integrity error>"}



### `api/session/`


GET


Response
OK
Code
Content


βœ…
200

{"player_id": <player_id>, "session_stats": <list of session_stats in desc order of session_end>}




❌
404

{"message": "Player <username> does not exist."}



POST


Body

{"session_stats": <session_stats JSON with all the fields>}




Files
File Name
Description


initial_image
Image file containing goalkeeper's initial position before session starts


final_image
Image file containing goalkeeper's final position at the end of session


Response
OK
Code
Content


βœ…
200

{"id": <session_id>}




❌
400

{"message": "<some error message like duplicate key Integrity error>"}




❌
404

{"message": "Player <username> does not exist."}



### `api/predict`


POST


Files
File Name
Description


image
Image file to be processed


Response
OK
Code
Content


βœ…
200

{"idx": <idx corresponding to direction to move>, "x": <offset in x direction>, "y": <offset in y direction>}



## πŸ“ˆ Block Diagram

![Block Diagram 2](https://github.com/nvsriram/KeeperVision/assets/50625504/b5c1cec2-a9f0-4b01-8828-41b061232a9e)

## πŸ’» Instructions on running locally

1. Ensure python is installed
2. Run `pip install -r requirements.txt` to install all dependencies

**NOTE:** Recommended to use venv before installing dependencies. See below for details on how to set it up
3. Run the Flask app using `python app.py`. This will run the app on debug mode on the server's IP

**NOTE**: Ensure the Flask app and the client are in the same WLAN to be able to connect to the server's IP as it is otherwise considered a private IP address

**[Optional]** To use venv:

1. Run `python -m venv ` to create virtual environment
2. To activate the virtual environment:

- If on Windows, run: `/Scripts/activate`
- If on MacOS, run: `source /bin/activate`

3. Run Step 2 to install all dependencies