{'fraction_non_alphanumeric': 0.03448694842145764, 'fraction_numerical': 0.02577914582531743, 'mean_word_length': 4.694418819188192, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Computer vision system to count crustacean larvae

Fish products account for about 16 percent of the human diet worldwide, as of 2017. The counting action is a significant component in growing and producing these products. Growers must count the fish accurately, to do so technological solutions are needed. Two computer vision systems to automatically count crustacean larvae grown in industrial ponds were developed. The first system included an iPhone 11 camera with 3024X4032 resolution which acquired images from an industrial pond in indoor conditions. Two experiments were performed with this system, the first one included 200 images acquired in one day on growth stages 9,10 with an iPhone 11 camera on specific illumination condition. In the second experiment, a larvae industrial pond was photographed for 11 days with two devices an iPhone 11 and a SONY DSCHX90V cameras. With the first device (iPhone 11) two illumination conditions were tested. In each condition, 110 images were acquired. That system resulted in an accuracy of 88.4 percent image detection. The second system included a DSLR Nikon D510 camera with a 2000X2000 resolution with which seven experiments were performed outside the industrial pond. Images were acquired on day 1 of larvae growing stage resulting in the acquisition of a total of 700 images. That system resulted in an accuracy of 86 percent for a density of 50. An algorithm that automatically counts the number of larvae was developed for both cases based on the YOLOv5 CNN model. In addition, in this study, a larvae growth function was developed. Daily, several larvae were taken manually from the industrial pond and analyzed under a microscope. Once the growth stage was determined, images of the larva were acquired. Each larva's length was measured manually from the images. The most suitable model was the Gompertz model with a goodness of fit index of R squared of 0.983.


Problem description
Fish contribute a significant amount of protein to a person's diet. Over the years, the demand for world capture fisheries and aquaculture production increased dramatically -from 20 million tons of fish consumed in 1950, to about 180 million tons in 2018 (FAO, 2020). As of 2017, fish products constitute about 16% of the human diet around the world (Ibrahin et al., 2017). Hence, it is necessary to increase the number of fish for food consumption purposes and to ensure fish species multiply with maximum efficiency .The aquaculture industry can provide increased fish production along with improved quality (Ibrahin et al., 2017).
The counting operation is an important process in automatic fish production (Ibrahin et al., 2017) and a main problem involved in raising small aquatic organisms (Chatain et al., 1996).
The number of fish is an important parameter for fish production to determine exactly the size and quantity of cages/ponds for production; to plan marketing schedules and to manage accurate feeding strategies. In most fisheries, fish counting is done manually, a time consuming process requiring intensive human labor ( Albuquerque et al., 2019). In addition, manual counting is subject to error and omission due to fatigue and inattention ( França Albuquerque et al., 2019).
Furthermore, manual counting can lead to fish stress resulting sometimes even in fish death.
Aquaculture production has been automated using computer vision (Le & Xu, 2017). Digital aquaculture benefits greatly from the application of intelligence technologies to improve product quality and production efficiency (Yang et al., 2021). Fast, accurate, and efficient fish counting is essential (França Albuquerque et al., 2019), and counting based on image processing can meet these need (Le & Xu, 2017). Computer vision in agricultural has been applied to a wide range of applications (provide references) due to its many benefits, such as good accuracy, low expense, and high reliability .
A convolution neural network (CNN) is a popular deep learning technique (Yang et al., 2021). With CNN, fish species can be identified, detected, and located with high accuracy (Yang et al., 2021).
When using neural networks it is important that the network will be train on a sample of the population and generate the correct response to each input (Newbury et al., 1995). In machine learning and computer vision, small objects pose a challenge because they take up less space in the image and contain less information for models to learn from (Babu et al., 2022) (Bochkovskiy et al., 2020. Even so, it is possible for computer vision to count large and small objects (Fan & Liu, 2013). 8 Fish growth reflects the precision and efficiency of aquaculture production (Lugert et al., 2016). An increase in a living system over time is referred to as growth, growing fish in aquaculture production systems differs from growing wild fish, which is why it is crucial to know the limits of growth before breeding (Baer et al., 2011). Macrobrachium rosenbergii growth is primarily affected by temperature, salinity, pH, light intensity, and feeding conditions (Zhang et al., 2006).
The growth performance of organisms in commercial aquaculture facilities is the most important influencing factor regarding economic benefit (Baer et al., 2011).

Objectives
The research objective is to develop a computer vision system that will automatically count the

Background
Agriculture and its sub is a major source of nutrition in daily life for about 60% of the world's population (Mim et al., 2020). Furthermore, agriculture is a major source of livelihood and it is used to increase the income of countries around the world (Gobalakrishnan et al., 2020). Farm crops include vegetables, fruits, fish, and animals, grown to meet these need (Mim et al., 2020).
The world's population is expanding, leading to a reduction in cultivated land and an increase in urbanization (Tian et al., 2020), along with an increasing need for food (Mim et al., 2020). Hence, the need for plots will continue to increase (Tian et al., 2020), as well as the demand for effectual food production methods (Tian et al., 2020).
Fish are an essential source of protein, and as a result, has become a major component of human nutrition all over the world . Aquaculture is the fastest-growing food sector in the world (FAO, 2020). According to the Food and Agriculture Organization of the United Nations (FAO), in 1961 global fish consumption was 9 kg/person per year while in 2016 it increased to 20.3 kg/person per year . Precise aquaculture is a real alternative to the harvesting and consumption of wild fish (Antonucci & Costa, 2020). Due to this fact, it is necessary to increase the number of fish for food consumption purposes and to ensure that fish species multiply with maximum efficiency . To do so and to increase production and ensure fish quality, while maintaining its well-being, it becomes even more important to monitor and control the production process (Antonucci & Costa, 2020). With the development of information and intelligent systems, aquaculture is increasingly prone to industrial culture -  reducing inputs (such as feed), optimizing outputs, and decreasing pollution (Antonucci & Costa, 2020). With the development of new technologies, researchers and practitioners of aquaculture have explored various methods without hand-operated intervention . The basis of precise aquaculture is the application of better control, monitoring, and documentation principles of biological processes in fish (Antonucci & Costa, 2020). Technological developments like robotics, computer vision and, machine learning have proven to improve agriculture production (Redolfi et al., 2020).

Image processing in agriculture
Computer vision uses a camera and a computer instead of the human eye to make a machine "see" (Tian et al., 2020). A computer vision system uses a camera which can be RGB (red-greenblue) for visual inspection, multi-spectral, or hyper-spectral range sensors for geometric estimation (Lu & Young, 2020). Image processing techniques and machine learning technologies are benefiting farmers in varied aspects of agricultural automation production management (Manohar & Gowda, 2020), such as growth monitoring, disease prevention, and fruit harvesting (Tian et al., 2020). By reducing manual labor and production costs, increasing yield and quality, and improving control, agricultural automation has been able to increase productivity many folds Concerned about environmental implications (Kapach et al., 2012).Computer vision helps improve speed and accuracy (Reddy et al., 2020) in a variety of tasks in the life cycle of the plant -from planting to harvest (Lu & Young, 2020). By using image processing methods, we can turn the information into knowledge and use it ( Figure 1) leading to improved decisions (Tombe, 2020).
Figure 1-The management cycle of smart farming (Tombe, 2020) For example, some algorithms accurately identify various infections in plants (Gobalakrishnan et al., 2020), and some classify the type of soil according to sampling (Deorankar & Rohankar, 2020).
Along with the many benefits of computer vision in agricultural, such as good accuracy, a wide range of uses, low expense, high reliability, and unlike the human eye it never gets tired , there are also challenges: • Professionalism -The more widely used image processing technology, the higher the requirements for professionals and professionals in the field. To develop new technologies, explore and integrate solutions from various fields of agriculture (Tian et al., 2020).
• Choosing an algorithm -In the application of computer vision technology, a variety of characteristics must be considered to select the appropriate algorithm. There is no default application of computer vision technology. In any case, the properties depend on the environment and target. which in agriculture are characterized by high variability and are not structured. (Tian et al., 2020).
• Work environment -Most existing technologies and methods are implemented in a laboratory environment or experimental platform. But the data in the natural environment differs from the data in the experimental environment, due to natural factors (Tian et al., 2020) with changes along time and space.
• Image size -When air images are used for example, some images include sizes exceeding 20000 × 30000 pixels. Such sizes are difficult to process in terms of calculation time and memory space (Chiu et al., 2020).

Counting in agriculture base on image processing
Improving crop productivity become a critical task these days, as the world population has grown exponentially (Fuentes-Penailillo et al., 2019). As the population grows, so does the global demand for food security. In addition to food consumption, agricultural produce plays an important role in our daily lives -it is used for chemical or industrial products, cosmetics, furniture, etc. (Errami & Khaldoun, 2018). To achieve this goal, the various activities carried out in the growing area must be monitored efficiently (Fuentes-Penailillo et al., 2019).
While the current methodology involves a manual process and usually takes more than a week, an automatic counting technique can be developed using a camera system and image processing technology (Padilla et al., 2019). Manual counting is tedious work, requiring extensive human resources and cost, and providing low accuracy. Accurate counting helps farmers plan the manpower for harvesting, shipping, sales, and harvest-related operations. Computer vision techniques can help count accurately (Ri & Xvlqj, 2019). Accurate and reliable counting of fruit and vegetable counts from photos, for example in orchards, is a challenging problem that has received significant attention recently. Pre-harvest fruit count assessment provides useful information for logistical planning, enabling farmers to track their current orchard status, plan for optimal utilization of their labor force, and make informed decisions before the harvest process (Häni et al., 2018). In addition the counting is also important for studies dealing with the collection of yield-related phenotype data (Häni et al., 2018). These numbers are now estimated by manually sampling several trees at random and making an assessment based on this, for the entire orchard. This count, of course, is inaccurate (Häni et al., 2018). Precise farming techniques have received much attention as they provide a solution that can maximize yield while reducing economic and environmental costs in production. By applying the exact amount, the yield can be maximized while reducing the application of fertilizers and pesticides (Errami & Khaldoun, 2018).
Therefore, fruit counts has been developed using in-field machine vision (Wang et al., 2017). The following table (Table 1) reviews several studies that present methods for counting using image processing and various algorithms.

Implementation of image processing in aquaculture
Visual . (Antonucci & Costa, 2020) Image analysis has been extensively used in aquaculture inspection of animals can provide a variety of knowledge regarding their health and development (Antonucci & Costa, 2020), For example, their number, size, gender, and quality. Their well-being . In general, computer vision technologies allow for (Zion, 2012) can also be monitored and behavior constant monitoring of animal welfare, conditions, and their environment as part of aquaculture while reducing waste use (Antonucci & Costa, 2020). Generally, a computer vision in aquaculture system starts with collecting, continues with processing and analyzing, and ends with reasoning, as 2 Figure  shown in The application of computer vision technologies in aquaculture involves several complicationsthe tested subjects (fish) are sensitive to touch and movement. They are prone to stress and free to move in their natural environment, an environment where lighting cannot be controlled, and stability in most cases. Finally, the equipment must operate in a wet environment and is therefore likely to be expensive (Zion, 2012). Thus, these technologies must overcome limited visibility, lighting variations, changing distances and directions between cameras and objects, and even physical instability (Antonucci & Costa, 2020).

Fish counting
In recent years, with the rise in popularity of consumers' perception of aquaculture crops, the aquaculture industry has developed rapidly (Le & Xu, 2017). Fish counting is an important and necessary process in the breeding process and should be done quickly, reliably, and efficiently.
Most fishermen use manual fish counting in various forms, which requires intensive human labor which is time-consuming (França Albuquerque et al., 2019). Besides, the count is also used in the sale process itself -in fish farms and shops, nutritious fish, for example, are usually packaged for sale in plastic bags. During the packing process, the fish must be counted to know the exact quantity sold to customers. And as mentioned, as already mentioned this process is timeconsuming and may include human errors (Toh et al., 2009). Compared to manual counting, beyond the fact that automatic counting reduces costs and time, it also improves counting accuracy (França Albuquerque et al., 2019). As technology improves, more and more industries are using computer vision and image processing technology to improve the level of automation of production. Respectively, fish counting based on image processing attracts more attention due to its high efficiency and accuracy (Le & Xu, 2017). ‫נמצא.‬ ‫לא‬ ‫ההפניה‬ ‫מקור‬ ‫שגיאה!‬ below describes fish counting methods based on image processing. Error rate of 1.7%. (Chatain et al., 1996).
weighing methods for fry of a few grams weight.
principle, Cochran (1963 Considering the three tables above, the most common performance metrics are -Accuracy and F1-Score and MAE.

Fish growth models
In aquaculture, fish growth models are crucial (Kim et al., 2017). Several factors can affect shrimp growth, including water quality, feed quality and quantity, and stocking density (Tian et al., 1993), so it is essential to develop these models in order to predict fisheries outcomes, improve fish farms, and analyze the dynamics of fish populations (Kim et al., 2017). Also, stock assessments require representative growth models to be selected (Chang et al., 2022). To describe fish growth, several models have been widely used, including the von Bertalanffy growth model (VBGM) , the Gompertz growth model (Kirkwood, 2015) (Gompertz, 1825), and the logistic model . Von Bertalanffy's growth model (VBGM) is the most studied and commonly applied of all length models (Katsanevakis et al., 2008), as a result of its simplicity as well as its ability to interpret parameters biologically (Baer et al., 2011). Other models, however, better describe growth for many aquatic species (Katsanevakis et al., 2008). Growth curves provide information on how to improve rearing. Exact timing can be determined for increased growth (Baer et al., 2011).
There are 11 growth stages between the hatching of the eggs and the post-larval (PL) stage (Table   4). Along with the change in length and age, there are physical changes in larvae that are mainly expressed in the eyes, rostrum, antennal flagellum, uropod, telson, pleopods, and pereopods.
The data in the table below, represent larvae of the largest freshwater prawn, Macrobrachium Rosenberg. The prawn was reared from egg to post larva under the conditions of 28 ± 0.5℃ in water temperature, 6.58-6.81% CL in salinity, and feeding on Artemia salina nauplii in a filtercirculative aquarium. It metamorphoses to post larva through eleven zoea stages. It should be noted that the number of days is not fixed, and larvae can reach growth stage 11 between 16 and over 30 days (Uno, 1969).

Methods
Two computer vision systems for aquaculture are developed in this thesis focusing on detecting and counting crustacean's larvae in industrial ponds at all larvae's growth stages (chapter 4) and crustacean's larvae outside the industrial ponds for the first larvae's growth stage (chapter 5). In addition, the ability to predict the larvae growth function based on machine vision is presented in chapter 6.

Counting crustacean's larvae in industrial ponds at all larvae's growth stages
A machine vision system to count crustacean's larvae in industrial ponds in controlled lab conditions was developed.
All the images were acquired in controlled illumination conditions in an industrial pond of 100 liters. The research included designing the system and developing algorithms for counting the larvae. An RGB image obtained from an iPhone 11 camera and SONY DSC-HX90V camera was used as input. Each image included several larvae (5-100).
An algorithm was developed to calculate the number of larvae in each image. Two experiments were performed in which a total of 750 images were acquired for the algorithm development along different growth stages. More details are provided in chapter 4.

Counting crustacean's larvae outside the industrial ponds only at day one
A machine vision system was developed to count larvae at day one (when the female lays her eggs). To ensure accurate results which are important for this stage counting was performed by manually removing larvae from the initial growing ponds with a pump and placed in a petri dish 90 millimetres in diameter under the camera. The images were acquired in controlled illumination conditions outside of the industrial ponds.
RGB images were acquired with a DSLR Nikon D510 camera using an AF-S NIKKOR 70-200mm 1:2.5G macro lens. The images were used as an input, and the algorithm output was the larvae's number in each image. Seven experiments were performed in which a total of 700 images were acquired for the algorithm development. More details are provided in chapter 5.

Growth function
It takes 11 growth stages for larvae to become PL from the moment they hatch. Ten larvae were measured at each stage, all from the same container. A Nikon ECLIPSE Ci-S microscope with color camera Nikon DS-Fi3 was used to capture 2048X2880 resolution images. Afterward, a function describing growth data was fitted. More details are provided in chapter 6.

Algorithms
Two object detection models were developed to count the larvae in the images based on 'EfficientDet D4' and 'YOLOv5s'. They are both a one stage detector algorithm. They were selected since they are considered as state-of-the-art networks object detection models. The counting algorithm receives an image as input, detects the objects and outputs the number of objects in a single image. Due to a lack of images to train the network with initial random weights, fine tuning was performed to pre-trained weights on the Common Objects in Context (COCO) dataset.

EfficientDet
As part of the development, the 'EfficientDet D4' object detection algorithm (Figure 2) was chosen.
EfficientDet is an object detection algorithm based on the convolutional neural network (CNN)   (Table 4), in the 9-10 growth stage the larva's length is approximately 7 mm, a very small object. After running the algorithm several times, it turned out that it is necessary to crop the images to obtain a higher accuracy. The images were cropped into 2100 x 2100 resolution, so that only the bottom of the bucket (where the larvae were tagged) were left in each image, as shown in (Figure 3).

YOLOv5s
Our algorithm is based on YOLOv5, an object detection algorithm based on the CNN convolutional neural network written in the Pytorch framework. YOLO stands for "You Only Look Once" and is one of the most popular and versatile object detection models (Plastiras et al., 2018). We selected YOLOv5 since it is much faster than the previous versions of YOLO (Jocher et al., 2020). The network backbone is CSPDarknet with PANet as the network neck. The neck is used to generate the feature pyramid network so that it can perform feature aggregation and pass it to the head for prediction (Jocher et al., 2020). YOLOv5 Head-Layers that generate predictions from the anchor boxes for object detection.
In this research the YOLOv5s was chosen because of the need to get results as quickly as possible (Jocher et al., 2020).

Performance measures
For object detection the concept of Intersection over Union (IoU) is used. IoU is a way to measure if a predicted bounding box is well-located, it computes the intersection over union of two bounding boxes-one for the ground truth and one for the predicted bounding box (Figure

‫נמצא.5‬ ‫לא‬ ‫ההפניה‬ ‫מקור‬ ‫.)שגיאה!‬ A classification is considered as true if it matches the ground truth
with IoU > N. N is the threshold for IoU, it ranges from 0 to 1. A predicted bounding box that has a big overlap with a ground truth bounding box, will have a high value of IoU. The algorithm performance was evaluated with the mAP metric, combining recall and precision indicators. Given an image, an object count can be classified into one of four categories as shown in the confusion matrix ( Figure 6).

Figure 6-Confusion matrix
True Positive (TP) -An object is a larva, and it was counted. It was counted if the ground truth and predicted bounding boxes had an IOU > N.
True Negative (TN) -An object is not a larva, and it was not counted. It is not useful for object detection.
False Positive (FP) -An object is not a larva, but it was counted.
False Negative (FN) -An object is a larva, and it was not counted.
With the help of TP, TN, FN, and FP, the following performance metrics can be calculated: o The overall accuracy is defined as the probability of correctly classifying a test sample:

Growth stage
A growth function was developed to predict the average larvae size along a growth period of 19 days. 10 larvae from each growth stage were tested in controlled indoor illumination conditions, under laboratory conditions. Total of 290 images were acquired along three weeks from using microscope -Nikon ECLIPSE Ci-S with color camera Nikon DS-Fi3 camera. The average size for each larva stage was calculated. Chapter 6 contains more details.

Counting larvae in industrial ponds
This chapter presents the development of a machine vision system for detecting and counting larvae using color images acquired from both an iPhone 11 camera and a SONY DSC-HX90V camera is described. Evaluation of the experiments conducted and results from this study are detailed.

System design
A system using a RGBD camera is supposed to replace manual counting of larvae with an algorithm based on an algorithm that detects and counts them. As the system needs to move between the tanks, a tripod placed on a raised surface with wheels was used to hold the camera. The camera was positioned at a 90-degree angle to allow direct observation of the larvae.

Experimental design
The experiment was performed in larvae industrial ponds in controlled at Ben-Gurion University ( Figure 8). The size of each pond is 600 mm diameter, and 600 mm depth -resulting in approximately 100 liters. The growing ponds have water filters. The room is dark and above the ponds there is illumination (LEDs for white lighting ip65 FLUX 3200lm) to maintain controlled conditions.

Figure 8-Larvae growing ponds at BGU
Before taking the pictures, the water was mixed to create a uniform distribution of the larvae in the pond. The ponds themselves are tightly painted and the color of the larvae is relatively dark, so they are not prominent enough in the picture. To overcome this, a white bucket ( ‫מקור‬ ‫שגיאה!‬

‫נמצא.‬ ‫לא‬ ‫ההפניה‬ ‫נמצא.‬ ‫לא‬ ‫ההפניה‬ ‫מקור‬ ‫שגיאה!‬
) was placed in the pond, the size of the bucket is 20 cm diameter and 19 cm height. To interfere as little as possible with the movement of the water and the larvae's normal living conditions, the bucket was cut on its sides. 200 images were acquired with the iPhone 11 camera. The images were acquired once on a single day during 9-10 larvae's growth stage of total 11 growth stages. The size of the photographed water volume was 20 cm diameter and 19 cm height, rounded to 6 liters. Therefore, the volume of the photographed area is about 6% of the total water's volume. The number of larvae in a pond was calculated by multiplying the number of larvae in a single image by 16.6.
After acquiring the images, they were manually labelled (Figure 10Results

Results
The IoU was selected to be 0.5, implying 50% overlap between the ground truth and the prediction bounding box considered as a correct prediction. Results (  It is important to note that YOLOv5s also yields faster performance than EfficientDet (Figure 11).

Using mask
Since the area of interest in the images is only the bottom of the bucket-the larvae were labeled only there, a circle mask was applied to the images. The mask turns any pixel outside of the bucket radius black. All images in the training, validation, and test set were masked. updated. It is customary to choose batches as numbers that are power of 2. The GPU used in the work (CUDA:0 (Tesla P100-PCIE-16GB, 16281MiB)) had a batch limit for a certain image size.
As can be seen in the table above (Appendix G -Hyper parameters tuning), as the image size increases the object's size also increases. Due to the fact the objects are very small, this helps the algorithm recognize the objects better. Nonetheless, at a size of 1536 pixels, an over-fitting was observed since the mAP index in the training set was higher than the index in the test set in every run. In addition, the higher the number of epochs, the higher the accuracy and mAP as expected However, this increases the training time. Considering both measures (Accuracy and mAP on test set) the best results (Table 6) were for a model developed with 400 epochs, image size of 1504 and 16 batches.    The confusion matrix (Table 7) for IoU=0.5, revealed 92.875% true positive.

Train -test size
The impact of different number of images in the training and test sets was evaluated ( Figure 15) for different train test splits (80-20%, 70-30%, 60-40%). The best performance was achieved in the first group for all indices. Moreover, results of the second and third group revealed over-fitting, the model fit the training set too well and failed on the mAP test set performance. Also, accuracy, precision, recall and F1-Score performance are the best for 80-20% split as expected with performance decreasing as the number of images in the train decreases. the accuracy values of the model decreases (Table 10), as expected, but the model still manages to detect the larvae very well.

Data
In the second experiment, a larvae industrial pond was photographed along 11 days, starting from a few days after the hatching of the eggs until they reached their post-larval stage. In this experiment two devices were used for image acquisition: an iPhone 11 camera and a SONY DSC-HX90V camera. With the first device (iPhone 11) two illumination conditions were tested. In the first condition (L1), the lamps above the growth pond were off, but the room lighting was kept on. In the second illumination condition (L2) the lamps above the growth pond were turned on, but the room lighting was kept off (Figure 7). The second illumination condition is the natural scenario. In each condition, 110 images with a resolution of 3024X4032 were acquired. Like the first experiment before taking the pictures, the water was mixed, and a white bucket ( ‫שגיאה!‬ ‫מקור‬ ‫נמצא.‬ ‫לא‬ ‫)ההפניה‬ was placed in the pond. The photographed water was 20 cm diameter and 19 cm height, resulting in 6 liters.

Weights obtained from first experiment
The network weights were set as the weights obtained from running the images of the first experiment with the best parameters-image sizes of 1504, 150 epochs, and 16 batches. No further training was conducted. The results are presented for the test sets which included data in the different acquisition conditions (cameras, illumination, and growth stages). The metrics tested in each run are mAP, TP, FP (in percentages) as described in chapter 3.5. The best results were obtained for iPhone 11 camera under the second illumination conditions as shown in the table above (Table 11). Upon receiving the results, another 20 images were acquired each day with the iPhone11 camera under illumination conditions 2 (a total of 220 additional photos). The results were recalculated again, this time for 30 images on each day (Table 12). The best results in both measures-accuracy and mAP were obtained for the date 31/10/2021. These results were better by 4.44% in mAP (obtained for the date 27/10/2021) and by 1.676% in accuracy (obtained for the date 29/10/2021) respectively than the next best results, and by 4,211% from the worst results in mAP and in accuracy 1,081% (both obtained for the date 18/10/2021). On both measures the best results were obtained for the iPhone 11 camera under the second illumination conditions also. The results were improved compared to the results without the mask as accepted (Table 11) -better by 14.21% in mAP and by 5.408% in accuracy.

• images with a mask, in the training and the test set
As explain above 30 more images were tagged for the best camera and illumination results. Also, here for iphone11 camera under L2 condition. Indeed, in both parameters -accuracy and mAP the data set with the mask yielded better results.
The best results for iPhone 11 camera under the second illumination conditions accuracy increases by 17.9% and mAP increases by 3.565%.

Training each illumination condition and camera separately (with mask)
Each illumination and camera condition were trained separately with each of the three combinations including all the images from all days. A random sample of 80% of the images was used for training, and 20% for testing. Each combination was run twice -first with the data as-is and then with augmentations (90° Rotate) of the training set added. The best results were obtained for the train and test set of iPhone 11 camera under the second illumination conditions with 30 images per day, no augmentation. The result agrees with the results above for each day as the best results were obtained for the same conditions. The mAP index results were better by 10.895% over the previous best results and by 10.36% over the worst results. Applying augmentations on the images improved the results under SONY-L2 and iphone11-L1 condition, In contrast to iphone11-L1 condition.

Camera effect
A pair of runs with neutral lighting conditions was conducted to determine whether the camera type affected the results. During the first run, the training set was an iPhone11 camera in illumination conditions 2, while the validation and test set was a SONY camera in illumination conditions 2, and vice versa in the second run. The results below (Table17 ) show that using an iPhone11 camera yields more accurate training and better mAP results in both-train and test sets. A pair of runs with neutral camera conditions was conducted to determine whether the illumination condition affected the results. During the first run, the training set was set with the iPhone11 camera in L1, while the validation and test set was with the same camera in L2, and vice versa in the second run. The results below (Table17 ) show that using L2 yields more accurate training and better mAP results on the test set. The difference between the mAP results in the train and test sets in the first run, indicate on over-fitting. It is best to train the algorithm on images that were purchased in the second illumination condition to get the best results. mAP and accuracy improved by 19.59% and 3.49%, respectively compared to results received from training the algorithm on images that purchased in the first illumination condition.

Transfer learning
Transfer learning is popular for building accurate models in a time-saving manner (Rawat & Wang 2017). Instead of starting over from scratch, transfer learning starts with patterns learned from solving similar problems. Transfer learning occurs when a model is trained on a similar problem and applied to another one (Brodzicki et al., 2020), it allows us to build accurate models in a time saving way. The transfer learning technique widely used in computer vision, takes a source task for the training and uses its results as the starting point for a different new task .
Transfer learning based on networks can be classified into two categories-feature extraction and fine-tuning. In feature extraction a new classifier is trained based on the pre-trained base model.
Only the fully connected layer is trained while the convolution layers' weights remain unchanged. The fine-tuning method involves both, retraining the fully connected layer and adjusting a few of the convolution layers as well (Brodzicki et al., 2020). Transfer learning techniques were used to train the model on one camera type and illumination condition, then retrain the convolution layers on the other. A total of 10 images per day were trained, total of 22 images were evaluated using transfer learning methods with the same hyperparameters (image size of 1504, 400 epochs and 16 batches).
• Initial learning rate remains 0.01:  This algorithm was trained with a learning rate of 0.01 in all the previous sections. In these experiments, the best results were obtained when the source task images were purchased using SONY cameras under Illumination condition 2 and the new task images were purchased using iPhone 11 cameras under Illumination condition 1. A 20.128% improvement in mAP and a 11.142% improvement in accuracy were found compared to the next best results (obtained for source task of images purchased with iphone11camera under Illumination condition 1 and the new task's images purchased with the same camera under Illumination condition 1).

Fine-tuning-freeze backbone (10 layers)
Table 19 -Transfer learning. Initial learning rate of 0.01, fine-tuning The best results were obtained with the same camera and illumination conditions as Feature extraction. Since Fine-tuning involves retraining the fully connected layer and adjusting some of the convolution layers as well, it took 0.262 hours more than Feature extraction. However, the results are 7.506% better in mAP and 3.508% better in accuracy.
• Initial learning rate decreased to 0.0001:  The best results were obtained also when the source task images were purchased using SONY cameras under Illumination condition 2 and the new task images were purchased using iPhone 11 cameras under Illumination condition 1. These results are 3.75% less good on mAP index, and 2.05% on accuracy index in compared to the results of Feature extraction with learning rate of 0.01. Fine-tuning-freeze backbone (10 layers)

Counting larvae outside the industrial ponds at day one
This chapter presents the development of a machine vision system for detecting and counting larvae on the day of their hatching, using color images acquired from a DSLR Nikon D510 camera is described. Evaluation of the experiments conducted and results from this study are detailed.

System design
The system developed aims to count larvae automatically on the first day they hatch, which is the most crucial day for production purposes. The images were acquired with a DSLR Nikon D3500 camera with the addition of a Nikon AF-S VR Micro-NIKKOR 105mm f/2.8G IF-ED macro lens. The camera shutter speed is 1: 2000 and the aperture value is 8. A sample of the larvae was manually removed from the growing ponds with a pump and placed in a petri dish 90 millimeters in diameter under the camera. Figure 17-System design. The light high was 9 cm, and the camera distance was 60 cm from the light 9 cm 60 cm 53

Experimental design
The experiment was designed for larvae on the day of their hatching. The hatching of the larvae takes place in the initial industrial pond and immediately after their counting they are transferred to the industrial pond. All the larvae in the experiment were taken from the same initial industrial pond. seven different densities of larvae in the petri dish were tested (50, 100,150, 200, 300, 400, or 500 larvae). The petri dish was placed on a white background Above Lux of flashlight to maximize the quality of the images.

Data
200 images for each density level were acquired. Manual labelling was performed for 100 randomly selected images. The images resolution was 6000X4000. All images were acquired on day 1-at the first larvae's growth stage (Table 4)

Results
The algorithm's results for each density were tested separately. Each density was trained individually with the images randomly divided into 80% images in the training set and 20% in the test set. Ten percent of the training set's images were used for validation. As a result, the object detection algorithm was trained and evaluated by using 72 training images, 8 validation images, and 20 test images. As expected, model performance falls off as larval density increases (Table 22).

Transfer learning
The model was trained on one density, then retrained on the other density using transfer learning techniques. Using the same hyperparameters (640-pixel image size, 300 epochs, 16 batches), 80 images were trained per density and 20 images were evaluated. Transfer learning was performed using fine tuning (freeze backbone) with Initial learning rate of 0.0001.  The model performance was not improved by transfer learning, and in most runs, all 300 epochs were required to reach convergence. Training on density 100 as a source task yields the best results for all other densities. As compared to training the next best density-150, we achieve better results at the lowest density (50) and higher density (500), by 9.925% and 40.38%, respectively. As new tasks -for training and testing -densities of 150 and 200 yield the best results. Furthermore, the results on the lower densities decrease as the density increases in the training set in the source task, while the results on the higher densities increase.

Density combination
There may be a need for more data to obtain better accuracy results. As a result, training was conducted when all images from all densities appeared in the validation, test, and training sets.
The training set included 560 images, with a test set of 140 images. Each density's accuracy percentage was then calculated separately. The experiment in this study was conducted to measure the length of larvae according to their growth stage. All larvae that were used in the experiment were sourced from the same industrial pond located at Ben-Gurion University's life science lab. On a daily basis, several larvae were taken manually from the industrial pond and analyzed under a microscope -Nikon ECLIPSE Ci-S equipped with a Nikon DS-Fi3 RGB camera in resolution of 2880X2048 (10.8Appendix H -Nikon ECLIPSE Ci-S SPECS). The aim was to determine their growth stage. Once the growth stage was determined, an image or several images of the larva were acquired. The larva length was then manually measured based on the camera height and the resolution of each image.
Figure 20-Nikon ECLIPSE Ci-S microscope

Data
A total of 10 larvae were sampled and photographed for each stage. A total of 290 images in resolution of 2880X2048 were acquired. 19 days were required for taking images from the first to the last stages.

Measurement
Each larva's length was measured from the image. Measurement was taken from eyes to the end of their tails. For each growth stage, the maximum, minimum, average, and standard deviation lengths were calculated. Below is a table (Table 32) showing the larvae length in millimeters for each stage in terms of average, standard deviation, maximum and minimum. As larvae progress through the stages, their length increases with an average increase of 0.558 mm between two steps (std =0.41). It seems that in the first (1-3) and last (10-11) stages the increase is more moderate (Figure 21). Their body length ranges from 1.65-7.23 mm, meaning their length increases by 5.58 mm along the growth stages. Growth stage 11 have a smaller minimum length than stage 10 larvae. Since it has the largest standard deviation, with a gap of 0.14 from the next standard deviation (step 9), stage 11 has the largest variation in larval length between the maximum and minimum lengths, which is 1.92 mm. The jump between steps 9 and 10 is 1.2 inches, which is the largest jump between two consecutive steps. The smallest jump between two consecutive steps is 0.12 between steps 2 and 3.

Growth model fitting results
A set of growth models was fitted to the same dataset, and the model that provided the most accurate fit was chosen. Model's selection was based on minimize the residual sum of squares (SSE). Goodness of fit is expressed by the coefficient of determination ( 2 ).
This study adopted five growth models, which are expressed as follows: (1) VBGM-( ) = ∞ (1 − exp (− 1 ( − 0 ))) ( Where, = age, ( ) = Estimated mean length at age t and ∞ = Mean asymptotic length. In model number 1 1 is the Brody growth parameter, which is a relative growth rate parameter (with units yr-1) and 0 is the hypothetical age when mean length is 0 (Zhu et al., 2009). In model 2 2 is the rate of exponential decrease of relative growth rate with age and 3 is the initial stocking age. , , are constants (Tian et al., 1993). For each candidate model a curve was fitted so the data derived from our imaging at its parameters minimized the SSE. The asymptotic length ∞ as estimated by VBGM was greater than that estimated by Gombertz by 17.979 mm.
According to Araya and Cubillos (Araya & Cubillos, 2006), the VBGM tended to estimate larger L values than the two-phase growth model based on length-at-age data sets of elasmobranch fish.
In their view, growth should be analyzed with caution because VBGM does not always apply, and many species appear to function differently (Katsanevakis et al., 2008).
Goodness of fit was expressed by the coefficient of determination 2 = 1 − (Table 33). The closer 2 gets to 1, the better the model. Growth models fit to the length and age data show that the Gombertz model was selected as the best model with high correlation between days and length, followed by the VBGM (0.01% lower than Gombertz model), the linear model (0.004% lower than VBGM), power model (0.034% lower than liner model) and finally the exponential model (0.074% lower than power model). All four models except the exponential yielded 2 greater than 0.9.

Counting crustacean's larvae in industrial ponds at all larvae's growth stages
An entirely new system was developed in this study to count larvae under indoor growing conditions with controlled food, lighting, temperature, and salinity. The method is not dependent on a particular pond's features and can be applied to any pond. A user-friendly and inexpensive system that can potentially be used in different breeding facilities is provided by this system.
Rather than using more advanced and professional cameras, a cell phone camera was deliberately used.
Under different illumination conditions and using different cameras, the system's performance was tested for 20 days in all growth stages of the larvae. Camera type and illumination conditions clearly affect the results. Using the iPhone11 camera under illumination condition number two (The lamps above the growth pond were turned on, but the room lighting was kept off) produced the best results.
Based on all the images from all the days, detection accuracy results of 88.4% and mAP of 0.855 were obtained. With this method, it is difficult to identify and count larvae in the first days of growth due to their small size and light color.

Counting crustacean's larvae outside the industrial ponds only at day one
A system developed in this chapter counts larvae only on the first day of hatching since the number of larvae on this day is most important for maintaining the breeding period. A professional camera is used to take images of larvae through a microscope after they have been manually counted. As larvae density increases, the algorithm's performance decreases.
As part of sensitivity analysis all images from all densities were trained and validated while each density's accuracy percentage was calculated separately. As with the previous chapter, this is a relatively simple system, although it is more expensive.

Growth function
This study developed a growth function for Macrobrachium Rosenberg larvae. In each of the 11 growth stages, 10 larvae were analyzed from specially acquired images acquired with a highresolution camera mounted on a microscope. The image was used to measure the larva's length. A total of five models were fitted to the data and compared by 2 results. To describe Macrobrachium Rosenberg larvae growth, the equation must be biologically reasonable and statistically valid. For the experimental data, the functional forms of Gombertz and Von Bertalanffy provided the most accurate fit, with 2 of 0.983 and 0.973, respectively. Gombertz's model is found to be more appropriate for this species than Von Bertalanffy, which is more commonly used in aquaculture.

Counting crustacean's larvae in industrial ponds at all larvae's growth stages
The developed model inspired by "YOLOv5s" could count larvae in growth ponds. Images were obtained at Ben-Gurion University's life science lab during the 9-10 larval growth stage, when their size was between 6.07 mm and 7.05 mm. In this first experiment our model yielded a mAP metric of 0.961 (with an IoU of 0.5) and accuracy of 97%.
88.4% accuracy and 0.855 mAP were obtained in the second experiment which analyzed all larval growth stages using images acquired in the same lab for 20 days. The biggest challenge was the object's size. The smaller the larva was, the harder it was for the algorithm to identify it.
Future studies should focus on improving the accuracy of larval counts in the first stages of growth and evaluating whether the number of larvae in the bucket is accurate in estimating the total number of larvae in the pond.

Counting crustacean's larvae outside the industrial ponds only at day one
Develop a machine vision-based counting model for larvae on their first day of hatching. Among all densities, the lowest density achieved the best detection accuracy as expected (accuracy of of 81.7 and mAP of 0.75).
The training across all density methods resulted in an average recognition accuracy of 86%, which improved the accuracy of 50 density methods by 5.263%. Model implementation was performed using "YOLOv5s" algorithm with Stochastic Gradient Descent (SGD) loss function.

Growth function
For the first time, a growth function has been developed for Macrobrachium Rosenberg larvae.
Growth is a continuous process influenced by internal and external factors, leading to individual and species-specific curves with different mathematical properties as they progress in their lives.
The common practice among researchers who study fish growth is to a priori adopt the VBGM and base inference on this single model. However, in many cases, VBGM is not supported by the data and many species seem to follow different growth trajectories.
In this study, the performance of R2, was the best with the Gompertz model and achieved a score of 0.983.