basketball_detector
:basketball: BasketballDetector implementation using a segmentation approach
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.7%) to scientific vocabulary
Keywords
Repository
:basketball: BasketballDetector implementation using a segmentation approach
Basic Info
- Host: GitHub
- Owner: peiva-git
- License: gpl-3.0
- Language: Python
- Default Branch: master
- Homepage: https://peiva-git.github.io/basketball_detector/
- Size: 131 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
Basketball Detector
:basketball: BasketballDetector is a deep-learning based tool that enables automatic ball detection in basketball broadcasting videos.

The complete video is available here.
Table of contents
Description
This project uses the BasketballTrainer package to train a BasketballDetector model. This repository provides all the necessary tools to perform inference on the trained model using the FastDeploy API. In the following sections, you will find detailed instructions on how to set up a working environment and how to use one a trained model to predict the ball location.
Project requirements
- Python 3.8/3.9/3.10/3.11
- CUDA >= 11.2, cuDNN >= 8.0
A GPU with CUDA capabilities is recommended. Depending on your hardware and/or your OS, you might need different drivers: check out Nvidia's official website.
Project setup
The recommended approach is to use one of the two provided
conda environments made available here,
one CPU based and the second GPU based.
Please note that, if you're installing the dependencies directly with pip,
an additional index source needs to be specified.
That is, you need to run the following command to install the package in development mode:
shell
pip install -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html -e .
By default, the GPU based environment uses the cudatoolkit=11.2 and cudnn=8.2 conda-forge packages.
If you want to use a different CUDA version,
refer to the official documentation.
All the requirements are listed in the
requirements.txt file.
To create a new conda environment meeting all the required dependencies, run the following command:
shell
conda create --name myenv-fd --file fd-[gpu|cpu].yml
In case you're using the GPU version, don't forget to set up the required environment variables as well:
shell
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/:$LD_LIBRARY_PATH
You can automate the process of adding the environment variables
to execute automatically each time you activate your
conda environment by running the following commands:
shell
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
These environments have been tested under the following conditions: - Ubuntu 22.04 LTS - NVIDIA driver version 535.104.05 (installed from the CUDA toolkit repository) - Driver API CUDA version 12.2 (installed automatically along with the driver)
Making predictions
For information on how to use the package to make predictions with the model, refer to the official documentation.
Credits
This project uses pdoc to generate its documentation. All credits go to its authors.
Owner
- Name: Ivan Pelizon
- Login: peiva-git
- Kind: user
- Location: Italy
- Repositories: 1
- Profile: https://github.com/peiva-git
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Pelizon"
given-names: "Ivan"
title: "BasketballDetector"
version: 0.1
date-released:
url: "https://github.com/peiva-git/basketball_detector"
GitHub Events
Total
Last Year
Dependencies
- actions/checkout v3 composite
- actions/deploy-pages v2 composite
- actions/setup-python v4 composite
- actions/upload-pages-artifact v2 composite
- fastdeploy-gpu-python *
- numpy *
- opencv-python ==4.8.
- pdoc *
- scikit-image ==0.21.
- statistics *
- vidgear ==0.3.
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite