Computer vision system for counting crustacean larvae by detection

Chen Rothschild, Eliahu David Aflalo, Inbar Kedem, Guy Farjon, Yitzhak Yitzhaky, Amir Sagi, Yael Edan

Research output: Contribution to journalArticlepeer-review


To meet the increasing demand for aquacultural products, it is necessary to increase cultured fish production and to ensure that the fish species grow with maximum efficiency. A significant component of aquacultural production is the counting process, a task that is time and labor intensive. To address this problem for the crustacean species Macrobrachium rosenbergii, two computer vision systems that automatically detect and count larvae were developed. In the first system, images were acquired from an indoor recirculating system under two different illumination conditions—room lighting or illumination over the top of the growth tanks. Two experiments were performed with this system. In the first experiment, 200 images were acquired in a single day of larvae in developmental stages Z9-Z10 (length of 6.07–7.05 mm) with an iPhone 11 camera. In the second experiment, a larviculture recirculating system was photographed along 11 distinct days (representing the 11 developmental stages from hatching to metamorphosis into post larvae) with two different devices, an iPhone 11 camera and a SONY DSC–HX90V camera. For the iPhone 11 camera, two different illumination conditions were tested, and in each condition, 110 images were acquired. In the second system, a DSLR Nikon D3500 camera was used to acquire a total of 700 images of day-1 larvae held in petri dishes at seven different larval densities. An algorithm that automatically detects and counts the number of larvae was developed for both systems based on the YOLOv5s convolution neural network model. The first experiment in the first system was used to find the best hyperparameters and network weights for the data set. These were used as is in the second experiment with no additional training. With the same algorithm, the second system was trained from scratch and new hyperparameters were derived. Results of the first experiment that included larvae from a single day for the indoor recirculating system gave 97% accuracy with a mean average precision (mAP) of 0.961 in object detection resulting with a mean absolute error (MAE) of 1.45 in counting in the first experiment (one day). Results of the second experiment that include larva from 11 larval stages yielded an accuracy of 88.4% with a mAP of 0.855 in object detection and a MAE of 4.288 in counting. The second system for counting one-day-old larvae in petri dishes gave an accuracy of 86% with a mAP of 0.801 and a MAE of 4.35.

Original languageEnglish
Article number100289
JournalSmart Agricultural Technology
StatePublished - 1 Oct 2023


  • Aquaculture
  • Computer vision
  • Counting system
  • Larvae
  • Machine learning

ASJC Scopus subject areas

  • Computer Science (miscellaneous)
  • Agricultural and Biological Sciences (all)
  • Artificial Intelligence


Dive into the research topics of 'Computer vision system for counting crustacean larvae by detection'. Together they form a unique fingerprint.

Cite this