Package d'analyse des touches de balle au football
Project description
FootAP
FootAP (FOOTball Analysis Package) is a Python package for analyzing ball touches in football videos.
Installation
pip install footap
Usage
You can use FootAP in two ways:
1. Command Line Interface
The simplest way to use FootAP is through the command line:
# Basic analysis (generates only results file)
footap video.mp4
# Analysis with real-time display
footap video.mp4 --display
# Analysis with video output
footap video.mp4 --save-video
# Full analysis with all options
footap video.mp4 --save-video -o output.mp4 -r results.txt --orientation 90 --display
# Display version
footap -v
# or
footap --version
Available options:
--save-video: Generate an annotated output video--display: Show real-time processing-o, --output: Specify output video name (only with --save-video)-r, --results: Specify results file name--orientation: Video orientation in degrees (0, 90, 180, 270)-v, --version: Display version
2. Python API
from footap import analyze_ball_touch
# Basic analysis
analyze_ball_touch("video.mp4")
# Full analysis with all options
analyze_ball_touch(
input_video_path="video.mp4",
display_processing=True, # Show real-time processing
generate_video=True, # Generate output video
video_orientation=90 # Rotate video if needed
)
# Get version
from footap import __version__
print(__version__)
Output
The program generates two files:
-
Results file (always generated):
Left Foot Touches: 5 Right Foot Touches: 12 -
Details file (CSV format):
Time,Touch 00:00:01.233,Left Foot 00:00:02.567,Right Foot 00:00:03.100,Right Foot
-
Annotated video (optional, with --save-video):
- Ball detection
- Feet tracking
- Real-time touch counter
Dependencies
- OpenCV (opencv-contrib-python)
- MediaPipe
- NumPy
- Ultralytics (YOLO)
- Pillow
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file footap-1.4.tar.gz.
File metadata
- Download URL: footap-1.4.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d25b3b4b10075949afacd816a8ac463779295bf87090c96ee62a9e9951c8b122
|
|
| MD5 |
4e2b910d78760684d17f8e5d635b609f
|
|
| BLAKE2b-256 |
f1205f6bc6447eafb66c7a0ac571d8e1b005793d08e3e0d07609ecd7429131f4
|
File details
Details for the file footap-1.4-py3-none-any.whl.
File metadata
- Download URL: footap-1.4-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf4fdd393ae1f70343e811fae03e37e5716175c73a0b6469a765d5b239e5e352
|
|
| MD5 |
8451d7d3a92aab88784a908ac80eaedf
|
|
| BLAKE2b-256 |
52ae311315bb7aa64b1d7f712b4de1a91227cd85531be7ea8fe3320cfd8b0de4
|