TechTactics is a web application designed to predict football player talent and value based on video input and player attributes. This tool is ideal for scouts, coaches, and analysts to evaluate football players.
FrontendApp/
├── Styles0.css
├── event-optimization.html
├── index.html
├── login.html
├── player-value.html
├── scout.html
├── script.js
└── talent.html
models/
├── detect_talent_football.ipynb
├── football_talent_model.pkl
├── finalized_model.sav
└── player_value.ipynb
flask_backend.py
player_value.py
server.js
test.py
.gitignore
README.md
desktop.ini
The project uses Flask to serve the backend for both the talent prediction and player value prediction functionalities.
If you want to set up a virtual environment for Python dependencies, run the following commands:
python -m venv venv
# On Mac/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activateInstall the necessary Python packages using pip:
pip install flask flask-cors joblib numpy pandas opencv-python mediapipeMake sure the following model files exist in the models/ directory:
models/football_talent_model.pklmodels/football_talent_model.sav
These files contain the pre-trained machine learning models used for talent classification and player value prediction.
To start the backend for both football talent prediction and player value prediction, run the following:
python flask_backend.pyThis will run the Flask server at http://localhost:5001.
To start the backend for player value prediction, run:
python player_value.pyThis server will run at http://localhost:5002.
The frontend is built using HTML, CSS, and JavaScript. It includes the following pages:
- Talent Prediction (
talent.html): Allows users to upload a football video, which will be analyzed to determine if the player is "Talented" or "Not Talented". - Player Value Prediction (
player-value.html): Allows users to input player attributes like age, height, weight, etc., to predict the player's market value.
To view the frontend:
- Open the
FrontendApp/index.htmlfile directly in a browser. - Use an extension like Live Server to serve the pages if you prefer dynamic reloading during development.
If you're using Node.js for additional server features, install the dependencies:
npm install dotenv express multer mongooseCreate a .env file in the root directory and add the following:
PORT=5000
MONGO_URI=your_mongodb_connection_string
node server.js- Football Talent Prediction: Upload and analyze football videos to classify a player's talent based on AI-powered classification.
- Player Value Prediction: Input player attributes (e.g., age, height, weight) and get a predicted market value.
- Pose Estimation: The system uses MediaPipe Pose to extract the football player's movements from video for talent prediction.
- Scalable: This system can be extended to support more functionalities such as user accounts, scouting dashboards, and detailed player history.
- User Accounts & Scouting Dashboards: Allow scouts and coaches to create accounts and track player evaluation history.
- Player Statistics History: Add a feature to store and display player statistics over time.
- Pose Visualization: Improve the visual feedback of the pose estimation process for better understanding.
- Multilingual Support: Extend the UI to support multiple languages (Arabic/English).
- Ensure that all backend servers are running before using the frontend for full functionality.
- If you encounter issues with the Flask or Node.js servers, check if the necessary model files (
.pklor.sav) are present in themodels/folder and that the correct paths are referenced in the backend scripts.
To test the talent prediction system via CURL, you can use the following command to send a video file directly to the backend:
curl -X POST -F "video=@/path/to/your/football_video.mp4" http://localhost:5001/predictFor the player value prediction:
curl -X POST -H "Content-Type: application/json" -d '{"age": 24, "height_cm": 180, "weight_kgs": 75, "overall_rating": 85, "potential": 90}' http://localhost:5002/predict-value- Python 3.6 or higher
- Node.js (optional for advanced features)
- Dependencies: Flask, MediaPipe, OpenCV, etc.