Elsevier

Aquacultural Engineering

Volume 91, November 2020, 102115
Aquacultural Engineering

An improved YOLOv3 algorithm to detect molting in swimming crabs against a complex background

https://doi.org/10.1016/j.aquaeng.2020.102115Get rights and content

Highlights

  • An improved YOLOv3 algorithm detected molting in crabs cultured in single baskets.

  • Modifying YOLO’s recognition layer and NMS function expedited network recognition.

  • It also overcame occlusion in the early stage of molting.

  • An adaptive dark-channel defogging algorithm countered effects of turbidity.

  • Its strength was adjusted according to the confidence, to restore image details.

Abstract

Traditional methods of breeding soft-shell crabs mainly rely on manual identification, which has high costs regarding manpower and resources. Manual inspection may also interfere with crabs’ molting, causing molting failure, and possibly even death, which is costly and inefficient. This paper combines an improved YOLOv3 algorithm with an adaptive dark-channel defogging algorithm to realize the real-time detection of whether a swimming crab in a single-crab basket-culture system is molting. For learning more features, affine, rotation transformation and local occlusion are used to augment the training data to simulate the difficulty of identification caused by occlusion, in case molting may occur under distorted viewing conditions in real culture environments. A k-means++ clustering algorithm is used to obtain prior boxes matching the size of the carapace throughout the entire breeding cycle, and so improve the Intersection over Union (IOU). The identification network itself can have its network structure pruned and the non-maximum suppression function modified to increase rapidity and accuracy; the improved network can recognize and give early warning of the early stage of molting. The precision of the improved model in clean water reaches 100 %, and the running speed was 31 FPS. In turbid water where the prediction confidence is lower than the cut-in threshold of defogging algorithm set as 0.8, the precision of the improved model was over 91 %, and the speed can still maintain about 7 FPS.

Introduction

The swimming crab (Portunus trituberculatus) is a large marine crab that is economically important in China owing to its rapid growth, favorable taste and high nutrition and economic value. However, the catch of wild swimming crabs is decreasing year by year, and the alternative of traditional pond breeding has a high mortality rate and small output, which means that market demand cannot be met. A newly emerging aquaculture technique is industrial recirculation with single-crab baskets (Wang et al., 2013) that has the crabs isolated, each in its own basket. It can provide stable and predictable production of swimming crabs (Hu et al., 2019) with high yields. A further advantage is for computer vision to observe the individual crabs to detect molting. During its growth, a crab will molt 8–10 times, with each exfoliation lasting for 15–30 min (Kazutoshi, 1992). After exfoliation, the chitinous membrane on the esophagus, stomach, hindgut and gills will be removed, leaving the crab clean, soft-shelled (Feng, 1984) and with higher economic and nutritional value (Benjakul and Sutthipan, 2009; Lei et al., 2013). However, a molting crab is vulnerable and can easy die due to difficulty in shelling. After a successful molt, the new soft shell of the crab will gradually harden within 3 h of water exposure (Shu et al., 2013). Molting crabs are valuable aquatic products and need more and earlier attention than usual. At present, soft-shell crabs in circulating water factory farms are mainly detected manually (Wang et al., 2013; Tian, 2014), which is costly in manpower and resources. Any expansion of intensive culturing will be increasingly affected by these costs. Finding a harmless, fast and automatic method to detect molting therefore represents a significant development in crab culturing and the marketing of soft-shell crabs.

A current trend in farming is to use computer vision to perform tasks previously reliant on human sight. An algorithm can extract information from the visual characteristics of relevant objects for processing and analysis. Example applications include monitoring water quality, biological growth and animal behavior, which can be done economically, remotely without contact and with high accuracy (Zion, 2012). Machine vision must separate the foreground from the background: methods for this fall into the following two categories according to their principles.

  • A

    Traditional image segmentation methods (Ravindraiah and Tejaswini, 2013; Chauhan et al., 2014; Wei, 2015; Jiang et al., 2017; Wang et al., 2014; Lu et al., 2018; Tang et al., 2019). These methods adopt an unsupervised classification scheme, such as corrosion or thresholding. They essentially search for autocorrelation within the image region in a certain way without supervision, with segmentation depending on the difference between the target and the background. The water that swimming crabs inhabit will inevitably include many impurities such as flying insects, residual food and sediment. Images of swimming crabs will have unstable backgrounds, which present a challenge to traditional methods of unsupervised image target detection and segmentation.

  • B

    Classification based methods (Jiang et al., 2017; Yao et al., 2019). These supervised learning algorithms mainly include support vector machines, cascade classifiers and neural networks. Wang et al. (2016) adopted the Haar operator + Adaboost cascade classifier to identify molting in swimming crabs, and achieved a precision rate of 79.5 % in the background with sand. However, the timeliness and accuracy of the algorithm need to be improved. Advancements of computing power are especially beneficial to the development of deep learning (Yao et al., 2019), and semantic segmentation based on convolutional neural networks has shown great advantages. Supervised learning can effectively overcome environmental noise and extract the foreground with improved accuracy. There are currently two main types of deep learning algorithm. First, region-based convolutional networks such as the R-CNN series algorithm (Girshick et al., 2014) divide foreground segmentation and classification into two steps, and achieve high accuracy but at slow speed. The other type is regression-based object detection, with YOLO (Redmon et al., 2015) as the representative example, which uses end-to-end training to directly predict the coordinates of the category and the boundary box at the same time; the high speed comes with reduced accuracy. Zhao et al. (2019) used a YOLO algorithm to detect the distribution of gray crab images under water and achieved good results.

Given the problem of recognizing a target against the complex backgrounds encountered in crab breeding, regression-based YOLOv3 (Redmon and Farhadi, 2018) was selected as the network for the current study of molting detection. It gives an appropriate combination of real-time detection and sufficient accuracy. A mobile camera was used to photograph swimming crabs on complex backgrounds, and the algorithm assessed a number of indices in the field of view to identify molting. In order to improve the real-time processing, the YOLOv3 network was optimized according to the size of the swimming crab shell. To reduce poor recognition or misidentification due to turbid water, the input images were preprocessed through an adaptive dark channel defogging algorithm to improve their detailed information.

Section snippets

Overall strategy for molting detection

This research is applicable to swimming crabs in an industrial, circulating water, single-basket culture farm, in which circulating water frequently cleans the breeding area. Each crab grows in its own basket about 10 cm below the water’s surface. There are no strong waves, leaves or particularly turbid water affecting identification; the environment is shown in Fig. 1. There are multiple cultivation pools in the cultivation facility, each of which has multiple rows of small rectangular

Production of experimental data

During image recognition, the production of a data set is a crucial step. A data set with rich information will increase the robustness of the model’s performance. The production of a data set for the recognition of swimming crab molting includes the following three aspects.

  • (1)

    Image collection. According to the task requirements, the identified objects mainly include the carapaces of swimming crab. The data for the swimming crabs mainly comes from direct photography and video recording. In order

Discussion

The test images were collected in a real breeding environment built in the laboratory, and a total of 135 images were collected as testing data. Among them, 90 had high prediction confidence, and the target label was directly output without the defogging algorithm. The other 45 images had a prediction confidence lower than the set threshold of 0.8. Application of the defogging algorithm improved the recognition efficiency. Table 3 shows that in terms of recognition precision, in a clear

Conclusion

This paper applies deep learning to the practical needs of breeding swimming crabs to develop a real-time target detection algorithm based on an improved YOLOv3 algorithm and an adaptive dark-channel fog-removal algorithm. By means of horizontal and vertical inversion, affine transformation, partial occlusion and other data enlargement methods, the real state of swimming crabs during actual breeding was simulated. Through the application of a k-means clustering ++ algorithm, the size of the

Declaration of Competing Interest

We declare that we do not have any commercial or associative interest that represents a conflict of interest in connection with the work submitted.

Acknowledgements

This work is supported by the Major Agriculture Program of Ningbo (2017C110007), the Key Research & Development Plan of Zhejiang Province (2019C02055), the Zhejiang Public Welfare Technology Project (2017C32014), and the Ningbo Science and Technology Enrichment Project (2017C10006).

References (31)

  • S. Benjakul et al.

    Muscle changes in hard and soft shell crabs during frozen storage

    LWT- Food Sci. Technol.

    (2009)
  • Boaz Zion

    The use of computer vision technologies in aquaculture – a review

    Comput. Electron. Agric.

    (2012)
  • C. Ancuti et al.

    Enhancing underwater images and videos by fusion

  • A.S. Chauhan et al.

    Image Segmentation Methods: A Survey Approach

    (2014)
  • Y.A. Feng

    Shell and exuviation of shrimp and crab

    Fujian fisheries

    (1984)
  • R. Girshick et al.

    Rich feature hierarchies for object detection and semantic segmentation

  • J.X. Guo et al.

    Airport scene aircraft detection method based on YOLO v3

    Laser Optoelectron. Prog.

    (2019)
  • K. He et al.

    Single image haze removal using dark channel prior

  • K. He et al.

    Guided image filtering

    IEEE Trans. Pattern Anal. Mach. Intell.

    (2013)
  • H.G. Hu et al.

    Design of quantitative feeding machine for sea crab cultivation based on volume adjustment of lifting sleeve

    Trans. Chin. Soc. Agric. Eng.

    (2019)
  • G.W. Huo et al.

    Underwater image processing based on dark channel prior and adaptive color correction

    Electron. Opt. Control.

    (2019)
  • J.S. Jaffe

    Computer modeling and the design of optimal underwater imaging systems

    IEEE J. Ocean. Eng.

    (1990)
  • F. Jiang et al.

    Survey on content-based image segmentation methods

    J. Softw.

    (2017)
  • Okamoto Kazutoshi

    Molting and Regeneration of Cheliped of Lithodes Aequispina Benedict. Researches on Crustacea No 21

    (1992)
  • S. Lei et al.

    Variatiors of the common nutritional composition contents of soft shell swimming crab (portunus trituberculatus) after molting

    J. Appl. Oceanogr.

    (2013)
  • Cited by (28)

    View all citing articles on Scopus
    View full text