yolov8-apple
An improved YOLOv8 model, termed YOLOv8-Apple, aimed at effectively detecting small-scale apples and handling severe occlusions
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 (9.1%) to scientific vocabulary
Repository
An improved YOLOv8 model, termed YOLOv8-Apple, aimed at effectively detecting small-scale apples and handling severe occlusions
Basic Info
- Host: GitHub
- Owner: Embracely
- License: agpl-3.0
- Language: Python
- Default Branch: main
- Size: 7.95 MB
Statistics
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
YOLOv8-Apple
Introduction
YOLOv8-Apple is an improved YOLOv8 model designed to effectively detect small-scale apples and handle severe occlusions. A backbone network was constructed by replacing traditional stride convolutions and pooling layers with SPD-Conv to minimize the loss of fine-grained information, using SEAM to enhance feature representations of unoccluded regions and compensate for occluded ones at the neck, and integrating a lightweight CBAM attention mechanism to strengthen the representation capability of small targets. The results of comprehensive experiments on the MinneApple dataset demonstrate that the mAP of YOLOv8-Apple increases by 3.8%, and MAE and RMSE of counting tasks decrease by 11.8% and 28.8%, respectively.
Frame Structure

Evaluation
Apple Detection and Counting
Below are the detection and counting results under different improvement configurations.
| SPD-Conv | SEAM | CBAM | mAP0.5 | F1 Score | Precision | Recall | MAE | RMSE | |:--------:|:----:|:----:|:------:|:--------:|:---------:|:------:|:----:|:-----:| | | | | 0.725 | 0.709 | 0.753 | 0.670 | 2.97 | 13.28 | | ✔ | | | 0.759 | 0.724 | 0.769 | 0.686 | 2.65 | 11.08 | | | ✔ | | 0.744 | 0.704 | 0.755 | 0.659 | 2.54 | 9.49 | | | | ✔ | 0.738 | 0.722 | 0.758 | 0.688 | 2.89 | 12.24 | | ✔ | ✔ | | 0.763 | 0.730 | 0.761 | 0.704 | 2.77 | 9.29 | | | ✔ | ✔ | 0.747 | 0.710 | 0.754 | 0.670 | 2.98 | 12.80 | | ✔ | | ✔ | 0.764 | 0.717 | 0.766 | 0.673 | 2.95 | 9.29 | | ✔ | ✔ | ✔ | 0.763 | 0.726 | 0.768 | 0.688 | 2.62 | 9.45 |
Environmental Requirements
Create a Python Virtual Environment
```bash conda create -n {name} python==3.8**Activate the Virtual Environment ```bash conda activate {name}
Install Pytorch
```bash pip install torch==1.10.0+cu111 torchvision==0.11.0+cu111 torchaudio==0.10.0 \-f https://download.pytorch.org/whl/torch_stable.html
Step-Through Example
Installation
- Clone this repository
```bash git clone https://github.com/Embracely/YOLOv8-Apple.git
Dataset
Download the MinneApple Dataset into the data folder
Convert the dataset’s mask tags YOLO annotation files ```bash
python mask2yolo.py
Pretrained Model
You can download the pretrained weights at yolov8-apple.pt.
Training
Data Pre-processing
- Split the data set
bash
python split_dataset.py
2. Converting the format of data set
bash
python voc_label.py
Train your model on MinneApple
bash
python train.py
Test
bash
python test_counting.py
Owner
- Login: Embracely
- Kind: user
- Repositories: 1
- Profile: https://github.com/Embracely
Citation (CITATION.cff)
# This CITATION.cff file was generated with https://bit.ly/cffinit
cff-version: 1.2.0
title: Ultralytics YOLO
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Glenn
family-names: Jocher
affiliation: Ultralytics
orcid: 'https://orcid.org/0000-0001-5950-6979'
- family-names: Qiu
given-names: Jing
affiliation: Ultralytics
orcid: 'https://orcid.org/0000-0003-3783-7069'
- given-names: Ayush
family-names: Chaurasia
affiliation: Ultralytics
orcid: 'https://orcid.org/0000-0002-7603-6750'
repository-code: 'https://github.com/ultralytics/ultralytics'
url: 'https://ultralytics.com'
license: AGPL-3.0
version: 8.0.0
date-released: '2023-01-10'
GitHub Events
Total
- Watch event: 8
- Delete event: 6
- Issue comment event: 24
- Public event: 1
- Push event: 33
- Pull request event: 13
- Create event: 11
Last Year
- Watch event: 8
- Delete event: 6
- Issue comment event: 24
- Public event: 1
- Push event: 33
- Pull request event: 13
- Create event: 11
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 8
- Average time to close issues: N/A
- Average time to close pull requests: about 2 months
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 2.38
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 8
Past Year
- Issues: 0
- Pull requests: 8
- Average time to close issues: N/A
- Average time to close pull requests: about 2 months
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 2.38
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 8
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (8)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- astral-sh/setup-uv v4 composite
- astral-sh/setup-uv v3 composite
- codecov/codecov-action v5 composite
- conda-incubator/setup-miniconda v3 composite
- slackapi/slack-github-action v2.0.0 composite
- ultralytics/actions/cleanup-disk main composite
- contributor-assistant/github-action v2.6.1 composite
- actions/checkout v4 composite
- docker/login-action v3 composite
- docker/setup-buildx-action v3 composite
- docker/setup-qemu-action v3 composite
- slackapi/slack-github-action v2.0.0 composite
- ultralytics/actions/cleanup-disk main composite
- ultralytics/actions/retry main composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- astral-sh/setup-uv v4 composite
- ultralytics/actions main composite
- actions/checkout v4 composite
- ultralytics/actions/retry main composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- pypa/gh-action-pypi-publish release/v1 composite
- slackapi/slack-github-action v2.0.0 composite
- actions/stale v9 composite
- pytorch/pytorch 2.5.0-cuda12.4-cudnn9-runtime build
- matplotlib >=3.3.0
- numpy <2.0.0; sys_platform == 'darwin'
- numpy >=1.23.0
- opencv-python >=4.6.0
- pandas >=1.1.4
- pillow >=7.1.2
- psutil *
- py-cpuinfo *
- pyyaml >=5.3.1
- requests >=2.23.0
- scipy >=1.4.1
- seaborn >=0.11.0
- torch >=1.8.0
- torch >=1.8.0,!=2.4.0; sys_platform == 'win32'
- torchvision >=0.9.0
- tqdm >=4.64.0
- ultralytics-thop >=2.0.0