Rethinking Underwater Crab Detection via Defogging and Channel Compensation

Yueping Sun, Bingzheng Yuan, Ziqiang Li, Yong Liu, Dean ZhaoFishes 2024 · DOI

TL;DR

This paper introduces a novel two-step image processing technique to enhance underwater crab images, addressing issues like low brightness, fog, and color imbalance. By combining improved dark channel prior defogging with a unique color correction method, they significantly improve image quality. This enhanced imagery is then fed into an optimized YOLOv5s model, achieving a remarkable 90.78% detection rate for crabs, paving the way for automated aquaculture management.

What Problem Does This Paper Address?

Crab aquaculture is a major industry in China, but current methods for monitoring crab populations rely on inefficient manual counting. Underwater images, crucial for automated monitoring, are often plagued by poor visibility due to depth, low light, and water turbidity, resulting in low contrast, fog, and color distortion. These issues make it difficult for even advanced machine vision systems to accurately detect and count crabs. This paper aims to overcome these challenges by developing a robust underwater image processing pipeline that enhances image quality, enabling more accurate and efficient automated crab detection.

Methods

The proposed solution involves a two-stage approach:

  1. Underwater Image Enhancement:
    • Improved Dark Channel Prior (DCP): The standard DCP algorithm is enhanced by optimizing its parameters (transmittance and atmospheric light) using guided filtering and quadtrees. This helps to remove fog while preserving image details and mitigating issues caused by artificial lighting.
  2. Two-Step Color Correction: * First Step: Combines the "gray world assumption" and "perfect reflection assumption" to correct the red channel, aiming to balance colors.
  3. Second Step: Employs a "strong channel compensation for weak channel" strategy, specifically using the green channel to enhance the red and blue channels. This further refines color balance and enriches image information.
  4. Optimized Target Detection:
    • Lightweight Backbone: The original YOLOv5s backbone is replaced with ShuffleNetV2. This significantly reduces model size and computational cost, leading to faster inference speeds without a substantial loss in accuracy.
  5. Anchor Box Optimization: A K-means++ clustering algorithm is used to generate custom anchor boxes tailored to the underwater crab dataset, improving the initial bounding box predictions.
  6. Loss Function: DIoU loss is employed to enhance bounding box regression, leading to more accurate localization.

Datasets

The study utilized a custom dataset of 3000 underwater crab images collected from a crab farming demonstration base in Changzhou City, Jiangsu Province, China. These images were captured using underwater cameras with auxiliary low-light lighting. The dataset was divided into training and testing sets in a 7:3 ratio.

Key Insights and Ideas

  • DCP isn't enough for underwater: The paper highlights that standard DCP, while effective for general fog removal, struggles with the unique challenges of underwater environments, particularly artificial lighting and color casts.
  • Green channel as a savior: The innovative use of the green channel to compensate for deficiencies in the red and blue channels is a key insight for correcting underwater color imbalance.
  • Lightweight models are crucial for real-time applications: Replacing the YOLOv5s backbone with ShuffleNetV2 demonstrates that achieving high detection rates doesn't necessarily require massive models, making real-time deployment feasible.
  • Custom anchor boxes matter: Tailoring anchor boxes to the specific dataset (underwater crabs) significantly improves detection performance compared to generic datasets like COCO.

Key Results

  • Detection Rate: The proposed method achieved a detection rate of 90.78%. This is a significant improvement over the original image detection rate of 74.72%.
  • Average Confidence Level: The average confidence level was 0.75, a substantial increase from 0.51 in the original images.
  • Performance Gains: Compared to the original YOLOv5s detection, the proposed method showed a 21.41% increase in detection rate and a 47.06% increase in average confidence level.
  • Objective Metrics: The proposed method consistently ranked first in objective evaluations like SSIM (mean value of 0.864) and PSNR, indicating superior image quality preservation and enhancement.
  • Speed: The optimized YOLOv5s model with ShuffleNetV2 achieved 50 FPS, a significant improvement for real-time applications.

Limitations and Future Work

The authors acknowledge a few limitations:

  • Dataset Specificity: The algorithm was developed and tested on a specific crab dataset. Its generalization to other underwater environments or species might be limited.
  • Artificial Light Artifacts: While addressed, the influence of artificial light sources can still lead to "too-vivid color blocks" in some processed images, affecting visual experience.

Future work suggested includes:

  • Expanding the Dataset: To improve robustness and handle variations in crab morphology and shooting angles, a larger and more diverse dataset is needed.
  • Building a Real-time System: The ultimate goal is to deploy this image processing and detection algorithm on an embedded board for an automated baiting boat, enabling real-time monitoring and intelligent aquaculture management.
  • Integrating Environmental Data: Combining crab distribution maps with other environmental data (water quality, pond area) for more precise baiting strategies.

Summary updated

Abstract

Crab aquaculture is an important component of the freshwater aquaculture industry in China, encompassing an expansive farming area of over 6000 km2 nationwide. Currently, crab farmers rely on manually monitored feeding platforms to count the number and assess the distribution of crabs in the pond. However, this method is inefficient and lacks automation. To address the problem of efficient and rapid detection of crabs via automated systems based on machine vision in low-brightness underwater environments, a two-step color correction and improved dark channel prior underwater image processing approach for crab detection is proposed in this paper. Firstly, the parameters of the dark channel prior are optimized with guided filtering and quadtrees to solve the problems of blurred underwater images and artificial lighting. Then, the gray world assumption, the perfect reflection assumption, and a strong channel to compensate for the weak channel are applied to improve the pixels of red and blue channels, correct the color of the defogged image, optimize the visual effect of the image, and enrich the image information. Finally, ShuffleNetV2 is applied to optimize the target detection model to improve the model detection speed and real-time performance. The experimental results show that the proposed method has a detection rate of 90.78% and an average confidence level of 0.75. Compared with the improved YOLOv5s detection results of the original image, the detection rate of the proposed method is increased by 21.41%, and the average confidence level is increased by 47.06%, which meets a good standard. This approach could effectively build an underwater crab distribution map and provide scientific guidance for crab farming.
BibTeX
@inproceedings{sun2024rethinking,
  author = {Yueping Sun and Bingzheng Yuan and Ziqiang Li and Yong Liu and Dean Zhao},
  title = {{Rethinking Underwater Crab Detection via Defogging and Channel Compensation}},
  booktitle = {Fishes},
  year = {2024},
  doi = {10.3390/fishes9020060},
}
Figure