YANMAR Technical Review

Development of Fish Counting System Using Fish Tracking and Counting Area
Toward Improving Operational Efficiency in Aquaculture

Abstract

Fish counting at aquaculture facilities has traditionally been done by manual counting using video of fish passing through a fishway. However, this process imposes a significant workload on operators, as hundreds or thousands of fish must be manually counted in each video. To address this issue, Yanmar has devised an automated and accurate fish counting system that analyzes video from fishway cameras. When used on videos from eight different aquaculture sites, the system achieved a count accuracy of 99.18%*1. These results demonstrate that this approach substantially reduces the fish counting workload in aquaculture management.

1. Introduction

The aquaculture industry has been growing strongly in recent years amid rising global consumption of seafood at a time when resource depletion is placing significant constraints on maritime fisheries. The total volume of seafood harvested by aquaculture surpassed that of maritime fisheries in 2013 and since then has only continued to grow(1).
Meanwhile, the high cost of obtaining aquaculture sites and expensive labor and feed costs are driving a need for more efficient production management. This includes keeping track of the fish population in holding pens, which is important for optimizing feed quantities and formulating harvesting plans. A variety of different methods for doing so have been tried. Lifting up pens to count the number of fish inside is not practical for routine operation because of the cost involved and the stress it places on the fish. The alternative of using the weight of a pen to estimate how many fish it contains is likewise impractical for pens that are too large to lift or for migratory fish like tuna.
Instead, the practice has been to set up a fishway (a passage made from netting) between two pens. Fish are recorded on video as they pass through this passage, and this video is used to perform a manual count (see Figure 1). Unfortunately, this is very onerous work for the person doing the counting as it requires them to concentrate on the video and count hundreds or thousands of fish as they pass through. Although the video can be slowed down or played frame-by-frame, this only means that the count takes even longer than the duration of the video itself.
In response, Yanmar has developed a fish counting system that replaces this manual process with the automatic collection of fish counts in real time from a camera that monitors the fish passing through the fishway.

Figure 1 Past Practice for Fish Counting
Figure 2 Automatic Fish Counting System

2. System Overview

The fish counting system is intended for use when fish are relocated between pens or released into a pen from a live fish carrier. The system detects and tracks the fish during this process and performs an automatic count in real time. The system hardware is made up of an underwater camera, a controller for configuring the camera, and a computer for performing the count. Once installed, the camera’s field of view can be adjusted remotely using its pan and tilt capability. To perform an automatic count, the underwater camera is first mounted at the exit of the fishway close to where the fish will pass. The controller is then used to adjust camera settings such as its field of view and brightness. Finally, the fish are allowed to start moving through the fishway where the counting software detects and tracks them as they exit to obtain a total count.
Counting is made up of the three steps shown in Figure 3, namely detection, tracking, and counting of individual fish. The initial detection step uses object detection AI to identify the fish visible in each video frame. The tracking step then identifies each fish in the subsequent frame based on how far they move. Finally, the counting step counts the number of fish that pass through the counting area (a predefined region of the video image) in the designated direction.
The system is available in two configurations. The high-speed (H) version performs the count as the video is captured and therefore provides both a running total during the count and a final total shortly thereafter. The standard (S) version, by contrast, performs the count after the video is recorded, a process that takes some time before providing the final total. The real-time counts referred to in this article were obtained using the high-speed (H) version.

Figure 3 Counting Algorithm

2.1. System Operating Conditions

To obtain an accurate automatic count, it is important to use the system under conditions that make counting easier.
A fishway like that shown in Figure 4 is used when counting red seabream. This uses a shutter to regulate the flow of fish during counting so that large numbers will not enter the fishway all at once. The fishway is also tilted to take advantage of the tendency of red seabream to seek deeper water, thereby reducing the number of fish loitering in the fishway or swimming in the wrong direction.

Figure 4 Use of Automatic Fish Counting System to Count Red Seabream

Juvenile tuna are about 0.3 m to 0.5 m in length and grow to more than 1 m as they mature. As the size of the fish varies significantly depending on their life cycle stage, capturing video of adult fish under the same conditions used for juveniles can result in poor count performance because the adults take up too much of the field of view. For this reason, as the fish get larger, it is necessary to provide a larger gap between the camera and the fishway, as shown in Figure 5.
To this end, a camera depth index was devised based on the relationship between fish size and the depth at which the camera is located. Use of this index provides consistent count accuracy by keeping the size of the fish as they appear in the video images roughly constant, thereby ensuring that the detection algorithm operates under conditions where it functions reliably.

Figure 5 Use of Automatic Fish Counting System to Count Tuna

2.2. System Technologies: Highly Accurate Counting

This section describes how counts are obtained with high accuracy.
The factors that impair accuracy can be broadly divided into environmental conditions and the behavior of the fish after counting. By addressing these issues, the system achieved a count accuracy of 99.18%*1.

A) Environmental factors

Impairment due to environmental conditions includes partial white-out due to direct sunlight (e.g., Figure 6 [1]) or the presence of netting in the video image (e.g., Figure 6 [2]). This type of impairment degrades the count accuracy and can result in incorrect or under-counting by interfering with fish detection and tracking.
To overcome this problem, an unaffected region of the image is designated as the counting area (the region within which the count is performed). This avoids any interference from netting or whited-out regions visible around the edges of the image.

Figure 6 Environmental Factors that Impair Counting
  • *1Accuracy relative to visual counting when applied to 30 test videos collected by Yanmar
B) Behavior of fish after counting

Counting errors due to the behavior of the fish after counting can arise if previously counted fish swim back from the pen to the fishway (back-swimming fish; e.g., fish [2] in Figure 7) or circulate around the pen and swim back into the camera’s field of view (circulating fish; e.g., fish [3] in Figure 7).
Back-swimming fish may be recounted when they subsequently return to the pen, resulting in double counting. To prevent this, these fish must be deducted from the count when they swim back into the fishway. Circulating fish may likewise be double counted when they swim through the counting area and pass back into the pen.
To prevent this, the boundary between the counting area and the area on the fishway side plays a role in deciding whether to count a fish. Only those fish (e.g., fish [1] in Figure 7) that enter the counting area from the fishway side and exit into the pen are added to the count. Back-swimming fish (e.g., fish [2] in Figure 7) that enter the counting area and then exit into the fishway are instead deducted. By contrast, fish (e.g., fish [3] in Figure 7) that enter the counting area without passing through the fishway and then swim back out into the pen are deemed to be circulating fish that have already been counted or else artefacts from the misidentification of seaweed, and so are neither added nor deducted from the count. In this way, by keeping track of the fish moving into and out of the fishway and counting areas, it is possible to minimize the miscounting of back-swimming or circulating fish.

Figure 7 Counting Area

3. Count Result Display Screen

After automatic counting, the fish counting system uses the screen shown in Figure 8 to display the results as a video. The playback speed can be changed for faster viewing, and the screen is also equipped with an automatic stop function. When enabled, this function automatically freezes the video on frames where fish are detected while playing the remainder at high speed. This speeds up the task of checking while minimizing the number of fish that are missed.
The count progress is also displayed in time-series format at the bottom of the screen, and this can be used to start playing the video from the corresponding frame by selecting the region of interest. By doing so, the user can quickly work through those video locations where fish are detected.
The screen also provides assistance for users wanting to perform their own manual count, which can be done by clicking with the mouse.

Figure 8 Screen for Displaying Count Results

4. Conclusions

This article has described a fish counting system that uses fish tracking together with a counting area.
The automatic counting algorithm is intended for use with fish that all swim in the same direction through a fishway or other passage. In addition to extending use of the system to species other than the red seabream and tuna for which it has already been deployed, Yanmar is also looking at expanding its use to other applications, not just underwater.

References

  • (1)Annual Report on the Developments in Japan’s Fisheries, Fisheries Agency, https://www.jfa.maff.go.jp/j/kikaku/wpaper/R4/230602.html, (accessed 2025-10-28).

Author

Prototype Development Division
Innovation Center
Innovation & Technology Division
YANMAR HOLDINGS CO.,LTD

Isao Wakabayashi

Catalog Download FAQ Dealer Locator Contact