This project aims to detect strategic fruits cards using YOLOv8. It is implemented in Python and uses several libraries for data processing and model training.
The project has the following structure:
src/: Contains the source code of the project.dataset_creation/: Contains the scripts for creating the dataset.model_training/: Contains the scripts for training the YOLOv8 model.
environment.yml: Contains the conda environment configuration.setup.py: Contains the setup configuration for the Python package.
Ensure you have the following installed on your system:
- Python 3.12.3 or higher
- Conda package manager
- Cuda Toolkit 12.3 or higher
- Suggested IDE:
- VSCode with Python and Jupyter extensions
- PyCharm Professional is also a good choice if you have a license
- Clone the repository:
git clone https://github.com/MacMat01/yolo-card-trainer.git- Navigate to the project directory:
cd yolo-card-trainer- Create a new conda environment from the
environment.ymlfile:
conda env create --name <your-environment-name> -f environment.yml- Activate the conda environment:
conda activate <your-environment-name>- Install the
buildandpiptools:
pip install --upgrade build pip- Build a source distribution (sdist) and a binary distribution (wheel) of your package:
python -m build- Install the package from the wheel file:
pip install --user dist/*.whl # If it doesn't work, change </*.whl> to the name of the wheel file generated in step 6- (OPTIONAL) If gpu isn't working for model training, install pytorch-cuda manually (remember to restart pc, it often works):
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidiaFollow the instruction in the following Jupyter notebooks:
Cards Extraction.ipynbDataset Creation.ipynbYOLO Card Trainer.ipynb
This project is licensed under the MIT License—see the LICENSE file for details.