This project was intended to detect and count palm tree image with top-down view using YOLOv8 Architecture. I used YOLOv8 architecture because of its ability that are proven in the industry with well-documented project. YOLOv8 developed by Ulralytics also have good integration API to pytorch which can easly be deployed to a released product
I am using conda 24.11.3 with Linux Mint 21.1 system and YOLOv8 model.
Before continuing the process I would like to setting up the environment with conda, but I also put some adjustment if you want to run the program from jupyter. Make suere you have already install the miniconda or anaconda in your machine. By following this step you will creating project environment:
-
Clone the project
git clone https://github.com/FauzanNR/palm-tree-detection.git
-
Create conda environment in normal way
conda create --name detection-with-yolov8 python=3.11 -y
Due to my Linux's storage limit, I would like to make my conda env specific in my project folder. This line will create a hiden folder for the env
conda create --prefix=.conda-detection-with-yolov8 python=3.11 -y
-
after that, activate the environment
conda activate detection-with-yolov8
Or if you are using Vscode or Jupyter:
install thisconda install ipykernel
from here you can already select the kernel in Vscode.
if you want to use jupyter notebook, install the package inside this environmentconda install jupyter
Then run jupyter with this line. But don't go to fast, we need to install the Ultralytics library first.
jupyter notebook
-
Install the Ultralytics library with CUDA
conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=11.8 ultralytics
If you are only use CPU:
conda install -c conda-forge ultralytics
and then, in each
ipynb
filemodel.train(data=data, epochs=10, imgsz=640, batch=9, device=0) <---- REMOVE THE ARGUMENT AND PARAMETER
-
Move the ipynb files to the project folder
palm-tree-detection
.The file provide data gathering instruction in it.
Palm Tree Label 200m Splitted Computer Vision Project by Cryospace