- Python Language
- Visual Studio Code [https://code.visualstudio.com/download]
- Google Colaboratory [https://colab.research.google.com/]
- Git [https://git-scm.com/downloads]
- Github [https://github.com]
- Terminal (Powershell, Iterm, Command Prompt (CMD), Bash, Zsh, Fish, etc)
If you want a dataset like mine, you can download it at the following link: 'Dataset'.
- I assume you have Python language installed and a dataset on your device. The first step is that you have to install the library in the terminal by typing this command:
pip install ultralytic
- If you already have the ultralytics library in your working folder. You can confirm the directory where the .yaml file is located.
- Next, you have to adjust the contents of the .yaml file, such as the dataset directory and class label naming.
- If you have completed steps one to three, run the train.py file or write the following command in the terminal:
python train_data.py
- I assume you already have a dataset that matches the example. The first step is to upload the dataset file to Google Drive.
- Next, upload the .yaml file and adjust the contents of the file in Google Drive.
- Then, create a Google Colab file or copy the .ipnyb file to your drive.
- If so, execute each command in the Google Colab file.
$ gcc main -o main.c && ./main
I assume you have finished training the data so you already have a YOLOv8 model. If you want to detect photos or videos, adjust the contents of the file source directory and execute the following command in the terminal:
python predict_foto.py
python predict_video.py
The following is the project structure that must be used in local.
.
├── README.md
├── detectObjectClassificationWithYolov8
│ ├── Dataset
│ │ ├── Train
│ │ │ ├── images (.jpeg/.jpg/.png)
│ │ │ ├── label (.txt)
│ │ ├── Validasi
│ │ └── Test
│ ├── config.yaml
│ ├── train.py or train_data.ipnyb
│ ├── predict_foto.py
│ ├── predict_video.py
│ ├── Video or Photo or Data
│ ...
...