This repository presents a custom implementation of the YOLOv8 object detection model, enhanced with the Squeeze-and-Excitation (SE) attention mechanism. Our adaptation aims to refine the model's focus on salient features, thus improving detection accuracy in complex scenarios.
- Custom YOLOv8: Combines the speed and robustness of YOLOv8 with advanced feature extraction capabilities.
- SE Attention Mechanism: Utilizes channel-wise recalibration to enhance the network's representational power.
- Boosted Accuracy: Prioritizes crucial features for better performance.
- Modular SE Blocks: Allows toggling the attention mechanism as required.
- Pretrained Models: Includes weights trained on standard datasets for quick deployment.
- Real-Time Performance: Maintains YOLOv8's swift detection for immediate application use.
- SE blocks are integrated within the backbone and head of the YOLOv8 architecture.
- The
Squeeze
operation aggregates features globally, whileExcitation
learns to use these global features to emphasize informative features. - Accommodates various input sizes and is adaptable to different computational resources.
- The model is implemented using PyTorch for its user-friendly and flexible environment.
- Clone the repo and set up the environment with the required dependencies.
- Obtain the pretrained weights or train your model with our custom script.
- Run the detection using our inference scripts on your images or video feeds.
- Feel free to adjust the SE blocks or other hyperparameters to suit your task.
Benchmark results and comparisons with the standard YOLOv8 are provided to demonstrate the enhancements brought by the SE mechanism.
We welcome contributions of all forms. You can help by optimizing code, adding features, improving documentation, or extending the example set.
This project is open-sourced under the MIT License. See LICENSE.md for more details.