# ES-YOLO
**Repository Path**: bai-hexiang/es-yolo
## Basic Information
- **Project Name**: ES-YOLO
- **Description**: The code for the ES-YOLO model.
- **Primary Language**: Unknown
- **License**: AGPL-3.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2023-07-02
- **Last Updated**: 2023-12-27
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
##
ES-YOLO
Shallow information is crucial in small object detection. Based on YOLOv5, an efficient small object detection algorithm (ES-YOLO) is proposed to improve identification accuracy using novel shallow feature extraction strategies. First of all, a detection head corresponding to shallow features is used to replace the original detection head corresponding to the deepest features in YOLOv5. Secondly, an attention module is directly added to the output layers of the backbone to filter redundant information and select representative original shallow features. Next, half of the inputs to the SPPF module are processed by the cross-stage partial connection method to reduce model parameters. Finally, the SIoU (SCYLLA-IoU) loss is used during the training stage to ensure fast convergence. Ablation studies are performed on two publicly available small object datasets. Results show that all the proposed models increase the model detection accuracy. Compared with the YOLOv5, the proposed model increases the identification accuracy by 2.4\% and 3.5\% on the BDD100K and VisDrone datasets, respectively. In addition, compared with the other 8 commonly used or up-to-date one-stage models, the proposed model achieves the best performance in identification accuracy.
## Documentation
Install
Clone repo and install [requirements.txt](https://gitee.com/bai-hexiang/es-yolo/blob/master/requirements.txt) in a
[**Python>=3.7.0**](https://www.python.org/) environment, including
[**PyTorch>=1.7**](https://pytorch.org/get-started/locally/).
```bash
git clone https://gitee.com/bai-hexiang/es-yolo.git # clone
cd es-yolo
pip install -r requirements.txt # install
```
Training
The commands below reproduce ES-YOLO training results.
```bash
python train.py --data VisDrone.yaml --cfg yolov5l.yaml --weights '' --batch-size 16
```
Testing
The commands below reproduce ES-YOLO test results.
```bash
python val.py --data VisDrone.yaml --weights weights/best.pt --batch-size 1
```
Inference with detect.py
`detect.py` runs inference on a variety of sources.
```bash
python detect.py --data VisDrone.yaml --weights weights/best.pt --source img.jpg # image
vid.mp4 # video
path/ # directory
```
## Contact
If you have any questions, please feel free to ask directly or contact us via WeChat (YMH1552035834).