Optics and Precision Engineering, Volume. 33, Issue 12, 1984(2025)

Improved lightweight garbage detection method for YOLOv8n in complex environments

Shizheng SUN1、*, Lingling HE1, Shuai ZHENG2, and Zeyin HE1
Author Affiliations
  • 1School of Mechatronics and Vehicle Engineering, Chongqing Jiaotong University, Chongqing400074, China
  • 2School of Shipping and Naval Architecture, Chongqing Jiaotong University, Chongqing400074, China
  • show less
    Figures & Tables(20)
    YOLOv8n network structure
    MCO-YOLOv8n network structure
    Bneck module
    ECA module
    Context Anchor Attention(CAA) mechanism
    ODConv structure
    ODConv Calculation process
    Some sample images of the dataset
    Number of samples per category in the dataset
    Comparison of ablation experiment results
    Comparison of model accuracy and positioning loss curve before and after improvemen
    Detection result comparision
    • Table 1. MobileNet V3-Small network structure

      View table
      View in Article

      Table 1. MobileNet V3-Small network structure

      操作输入通道输入大小激活函数SE
      Conv2d, 3×33224×224HS-
      Bneck, 3×316112×112RE
      Bneck, 3×31656×56RE-
      Bneck, 3×32428×28RE
      Bneck, 5×52428×28HS
      Bneck, 5×54014×14HS
      Bneck, 5×54014×14HS
      Bneck, 5×54014×14HS
      Bneck, 5×54814×14HS
      Bneck, 5×54814×14HS
      Bneck, 5×5967×7HS
      Bneck, 5×5967×7HS
      Conv2d, 1×1967×7HS
      Pool, 7×75767×7--
      Conv2d, 1×1, NBN5761×1HS-
      Conv2d, 1×1, NBN1 0241×1--
    • Table 2. Distribution of images across different scenes

      View table
      View in Article

      Table 2. Distribution of images across different scenes

      背景环境室内环境室外环境
      草地沙滩道路
      图像数量/张823749159811
    • Table 3. Experimental results of different backbone networks

      View table
      View in Article

      Table 3. Experimental results of different backbone networks

      ModelsP/%R/%Params/MSize/MBFLOPs/GmAP@0.5/%

      FPS/

      (frame‧s-1

      YOLOv8n(Baseline)88.778.43.016.28.285.1120
      Baseline+GhostNet91.176.62.304.96.382.9128
      Baseline+ShuffleNet V282.572.71.843.95.178.8153
      Baseline+EfficientNet V288.7712.505.32.779.9125
      Baseline+MobileNet V385.475.51.192.72.881.7131
      Baseline+MobileNet V3_ECA88.6750.741.72.582.3149
      Baseline+MobileNet V3_CA86.773.20.832.02.681.1133
      Baseline+MobileNet V3_CAA87.178.92.615.64.883.5121
      Baseline+MobileNet V3_EMA89.673.50.882.03.981.5140
    • Table 4. Comparison of attention mechanisms with experimental results

      View table
      View in Article

      Table 4. Comparison of attention mechanisms with experimental results

      ModelsP/%R/%Params/MSize/MBFLOPs/GmAP@0.5/%
      YOLOv8n+MobileNet V3_ECA(Baseline)88.6750.741.72.582.3
      Baseline+GAM86.773.20.751.82.581.1
      Baseline+CA89.773.10.741.82.582.5
      Baseline+CBAM89.178.62.615.64.883.3
      Baseline+SE89.673.50.741.82.581.5
      Baseline+EMA87.776.60.741.82.583.4
      Baseline+CAA82.579.90.741.82.584.1
    • Table 5. Experimental results of the loss function

      View table
      View in Article

      Table 5. Experimental results of the loss function

      ModelsP/%R/%Param/MmAP@0.5/%
      CIoU88.778.43.0185.1
      SIoU88.6783.0184.5
      WIoU v190.578.13.0184.7
      WIoU v289.376.83.0184.9
      WIoU v387.779.33.0185.6
    • Table 6. Ablation experiments

      View table
      View in Article

      Table 6. Ablation experiments

      ModelsBaselineMobileNet V3_ECACAAODConvWIoUP/%R/%Params/MFLOPs/GSize/MB

      mAP@0.5

      /%

      FPS/

      (frame‧s-1

      Baseline88.778.43.018.26.285.1120
      A88.6750.742.51.782.3149
      B82.579.90.742.51.884.1118
      C88.6780.882.42.084.5121
      D87.180.80.882.42.186131
      Ours87.8800.882.42.186.2134
    • Table 7. Comparison between the original model and the improved model for the detection of various types of garbage

      View table
      View in Article

      Table 7. Comparison between the original model and the improved model for the detection of various types of garbage

      CategoryYOLOv8nImproved-YOLOv8n
      P/%R/%mAP@0.5/%P/%R/%mAP@0.5/%
      Lunch boxes73.464.369.372.465.772.8↑
      Can92.18186.788.88188.1↑
      Peel88.981.688.290.981.588.3↑
      Garbage bags91.571.883.592.474.480.8
      Butt93.680.384.997.478.287↑
      Plastic bottles94.983.291.993.383.592↑
      Caps87.366.774.787.271.679.4↑
      Plastic bags8392.393.27392.393.3↑
      Carton93.584.293.394.492.194.4↑
    • Table 8. Comparison of experimental results of different models

      View table
      View in Article

      Table 8. Comparison of experimental results of different models

      ModelsP/%R/%Params/MSize/MBFLOPs/GmAP@0.5/%
      YOLOv5s87.779.37.0414.415.885.6
      YOLOv5n85.680.21.773.84.385.1
      YOLOv10n92.880.92.75.68.285.3
      YOLOv7-tiny86.179.26.0312.313.284.7
      Faster R-CNN47.379.4137.1108.5370.274.6
      SSD82.471.926.394.762.776.9
      YOLOv8s90.875.511.122.628.785.2
      YOLOv8n88.778.43.016.28.185.1
      Ours87.8800.882.12.486.2
    Tools

    Get Citation

    Copy Citation Text

    Shizheng SUN, Lingling HE, Shuai ZHENG, Zeyin HE. Improved lightweight garbage detection method for YOLOv8n in complex environments[J]. Optics and Precision Engineering, 2025, 33(12): 1984

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category:

    Received: Dec. 4, 2024

    Accepted: --

    Published Online: Aug. 15, 2025

    The Author Email: Shizheng SUN (ssz091011@163.com)

    DOI:10.37188/OPE.20253312.1984

    Topics