Skip to content

Aliweka2020/Ghost-YOLOv12

Repository files navigation

Ghost-YOLOv12

Bio-Inspired Underwater Robotic Vehicle for Marine Exploration and AI-Powered Fish Detection

Ali Elhenidy1, Ahmed Sameh1

1 Mansoura University , Egypt

Research Square

Abstract Ghost-YOLV12 is proposed, which is an enhanced version of the YOLOv12 deep learning model. Trained on the DeepFish dataset, the proposed model achieved a mean average precision (mAP50) of 97.8 and demonstrated robust performance under occlusion, turbidity, and low-light conditions. All evaluations were conducted in simulation environments, with hydrodynamic testing performed through CFD and fish detection validated through annotated datasets. While no physical prototype has been deployed yet, the design is fully scalable and structured for real-world fabrication.

Main Results

Turbo (default):

Model (det) size
(pixels)
mAPval
50-95
Speed (ms)
T4 TensorRT10
params
(M)
FLOPs
(G)
Ghost-CBAM-YOLO12m 640 97.8.4 1.60 2.5 6.0
YOLO12m 640 97.1 2.42 9.1 19.4
Ghost-YOLO12m 640 95.5 4.27 19.6 59.8
Ghost(Head& Backbone)-YOLOv12 640 91.8 5.83 26.5 82.4

Installation

wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu11torch2.2cxx11abiFALSE-cp311-cp311-linux_x86_64.whl
conda create -n yolov12 python=3.11
conda activate yolov12
pip install -r requirements.txt
pip install -e .

Training

from ultralytics import YOLO

model = YOLO('yolov12n.yaml')

# Train the model
results = model.train(
  data='fish.yaml',
  epochs=600, 
  batch=256, 
  imgsz=640,
  scale=0.5,  # S:0.9; M:0.9; L:0.9; X:0.9
  mosaic=1.0,
  mixup=0.0,  # S:0.05; M:0.15; L:0.15; X:0.2
  copy_paste=0.1,  # S:0.15; M:0.4; L:0.5; X:0.6
  device="0,1,2,3",
)

# Evaluate model performance on the validation set
metrics = model.val()

# Perform object detection on an image
results = model("path/to/image.jpg")
results[0].show()

Acknowledgement

The code is based on ultralytics. Thanks for their excellent work!

Citation

Ahmed Sameh, Ali Elhenidy. Bio-Inspired Underwater Robotic Vehicle for Marine Exploration and AI-Powered Fish Detection, 13 May 2025, PREPRINT (Version 1) available at Research Square [https://doi.org/10.21203/rs.3.rs-6538108/v1]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published