automated analysis of wild fish behavior in a natural habitat · automated analysis of wild fish...

6
Automated Analysis of Wild Fish Behavior in a Natural Habitat Nancy Xin Ru Wang University of Washington [email protected] Sarika Cullis-Suzuki University of York [email protected] Alexandra Branzan Albu University of Victoria [email protected] ABSTRACT This paper proposes a novel approach for the analysis of movement and behavior of the Plainfin midshipman (Porich- thys notatus) in the wild. It is based on underwater video recordings of the fish in their natural habitat taken inside their nests during reproductive months. During this time, alpha male Plainfin midshipmen rarely leave their nests as they are guarding their eggs, so the proposed approach ad- dresses the issue of detecting subtle motion and nesting be- havior as the fish remains relatively sedentary. To the best of our knowledge, this is the first paper to propose an au- tomated method to analyze subtle movements of a highly territorial animal in its natural habitat. Motion detection uses the displacement of SURF (Inter- est point algorithm) key-point movements from frame to frame to analyze the amount of movement by the fish. K- means clustering and other outlier removal techniques are then used to differentiate fish motion from small moving objects in the background and foreground. The analysis of fish behavior uses similarity-based periodicity detection combined with the K-neighbors classifier. Experimental val- idation with respect to expert-annotated ground truth shows excellent performance for both motion and behavior detec- tion approaches. 1. INTRODUCTION Recently, there has been growing interest in using com- puter vision techniques for the in situ analysis of various aspects of marine life. Examples include fish counting, size measurement, species identification, and behavioral analysis [1, 7, 9, 12, 13, 18, 24, 20, 27, 25, 26]. Most computer vision techniques for the analysis of fish motion are designed for controlled environments, such as tanks with clear backgrounds [27]. Natural environments are much harder to analyze, due to variable and non-uniform lighting conditions, as well as to the presence of other moving objects such as algae, plankton and sand. In rare cases where computer vision approaches do work with natural habitats, Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full cita- tion on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re- publish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. EMR’15, June 23–26, 2015, Shanghai, China. Copyright c 2015 ACM 978-1-4503-3558-4/15/06 ...$15.00. DOI: http://dx.doi.org/10.1145/2764873.2764875. the species of interest are usually pelagic [7]. Pelagic fish are mostly always in motion, thus the behavioral analysis of such fish usually consists of tracking the fish as whole objects and analyzing their swim trajectories. As the use of video technology for underwater ecologi- cal studies becomes more widely adopted, automated algo- rithms for behavioral analysis and classification of fish in their natural habitats should be pursued. In our study, we analyzed the movement and behavior of Porichthys notatus, commonly known as the Plainfin midshipman using video recordings of the fish in its natural habitat. During nest- ing periods, alpha male Porichthys notatus rarely leaves its small confined nest [5]. Therefore, we need an algorithm for detecting more subtle, stationary movements involving fins and mouth, which correspond to nesting-related behaviors. Such needs are not met by current techniques developed for fish motion and behavior analysis [7]. Along the Pacific Northwest midshipmen’s habitat range, boats are the primary source of noise [23]. Boat noise can cause increased movement in fish [19]. Such a response to noise or other changes in behaviour, such as its aeration rate, could prove energetically costly to alpha male midshipmen in particular, who provide all parental care to developing eggs, and who are often energy-depleted during nesting periods [2]. Our experimental dataset, provided by the biologist on our team, contains videos acquired in three environmental conditions, namely boat, ambient, and control. Boat de- scribes a live boat (with noise) being driven in the vicin- ity of the nest. Ambient conditions indicate that a boat is present but not running. Control conditions have no boat present. Traditionally, studies investigating wild animal be- haviors often involve hours of manual video analysis, which can be prone to human error and bias. Therefore, it would be highly efficient to develop automated methods to measure behaviors, e.g., amount of fish movement, or categorize be- havior types, such as aeration. Aeration can be an important part of egg tending in parental fish care. It usually consists of egg ”fanning”, whereby the fish circulates water with its fins and body, thereby oxygenating eggs [28]. To our knowl- edge, this is the first paper detailing an automated method to analyze the subtle movements of a relatively sedentary fish in its natural habitat. As well, we believe we are the first to attempt developing a method to automatically clas- sify aeration and non-aeration related behavior. The main contributions of this work include a novel auto- mated underwater fish movement analysis method that uses SURF key-points to track all visible parts of the fish body, including fins and mouth. As well, we propose a method to 21

Upload: others

Post on 11-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automated Analysis of Wild Fish Behavior in a Natural Habitat · Automated Analysis of Wild Fish Behavior in a Natural Habitat Nancy Xin Ru Wang University of Washington wangnxr@cs.washington.edu

Automated Analysis of Wild Fish Behavior in a NaturalHabitat

Nancy Xin Ru WangUniversity of Washington

[email protected]

Sarika Cullis-SuzukiUniversity of York

[email protected]

Alexandra Branzan AlbuUniversity of Victoria

[email protected]

ABSTRACTThis paper proposes a novel approach for the analysis ofmovement and behavior of the Plainfin midshipman (Porich-thys notatus) in the wild. It is based on underwater videorecordings of the fish in their natural habitat taken insidetheir nests during reproductive months. During this time,alpha male Plainfin midshipmen rarely leave their nests asthey are guarding their eggs, so the proposed approach ad-dresses the issue of detecting subtle motion and nesting be-havior as the fish remains relatively sedentary. To the bestof our knowledge, this is the first paper to propose an au-tomated method to analyze subtle movements of a highlyterritorial animal in its natural habitat.

Motion detection uses the displacement of SURF (Inter-est point algorithm) key-point movements from frame toframe to analyze the amount of movement by the fish. K-means clustering and other outlier removal techniques arethen used to differentiate fish motion from small movingobjects in the background and foreground. The analysisof fish behavior uses similarity-based periodicity detectioncombined with the K-neighbors classifier. Experimental val-idation with respect to expert-annotated ground truth showsexcellent performance for both motion and behavior detec-tion approaches.

1. INTRODUCTIONRecently, there has been growing interest in using com-

puter vision techniques for the in situ analysis of variousaspects of marine life. Examples include fish counting, sizemeasurement, species identification, and behavioral analysis[1, 7, 9, 12, 13, 18, 24, 20, 27, 25, 26].

Most computer vision techniques for the analysis of fishmotion are designed for controlled environments, such astanks with clear backgrounds [27]. Natural environmentsare much harder to analyze, due to variable and non-uniformlighting conditions, as well as to the presence of other movingobjects such as algae, plankton and sand. In rare cases wherecomputer vision approaches do work with natural habitats,

Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full cita-tion on the first page. Copyrights for components of this work owned by others thanACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re-publish, to post on servers or to redistribute to lists, requires prior specific permissionand/or a fee. Request permissions from [email protected]’15, June 23–26, 2015, Shanghai, China.Copyright c© 2015 ACM 978-1-4503-3558-4/15/06 ...$15.00.DOI: http://dx.doi.org/10.1145/2764873.2764875.

the species of interest are usually pelagic [7]. Pelagic fishare mostly always in motion, thus the behavioral analysisof such fish usually consists of tracking the fish as wholeobjects and analyzing their swim trajectories.

As the use of video technology for underwater ecologi-cal studies becomes more widely adopted, automated algo-rithms for behavioral analysis and classification of fish intheir natural habitats should be pursued. In our study, weanalyzed the movement and behavior of Porichthys notatus,commonly known as the Plainfin midshipman using videorecordings of the fish in its natural habitat. During nest-ing periods, alpha male Porichthys notatus rarely leaves itssmall confined nest [5]. Therefore, we need an algorithm fordetecting more subtle, stationary movements involving finsand mouth, which correspond to nesting-related behaviors.Such needs are not met by current techniques developed forfish motion and behavior analysis [7].

Along the Pacific Northwest midshipmen’s habitat range,boats are the primary source of noise [23]. Boat noise cancause increased movement in fish [19]. Such a response tonoise or other changes in behaviour, such as its aeration rate,could prove energetically costly to alpha male midshipmen inparticular, who provide all parental care to developing eggs,and who are often energy-depleted during nesting periods[2]. Our experimental dataset, provided by the biologist onour team, contains videos acquired in three environmentalconditions, namely boat, ambient, and control. Boat de-scribes a live boat (with noise) being driven in the vicin-ity of the nest. Ambient conditions indicate that a boat ispresent but not running. Control conditions have no boatpresent. Traditionally, studies investigating wild animal be-haviors often involve hours of manual video analysis, whichcan be prone to human error and bias. Therefore, it wouldbe highly efficient to develop automated methods to measurebehaviors, e.g., amount of fish movement, or categorize be-havior types, such as aeration. Aeration can be an importantpart of egg tending in parental fish care. It usually consistsof egg ”fanning”, whereby the fish circulates water with itsfins and body, thereby oxygenating eggs [28]. To our knowl-edge, this is the first paper detailing an automated methodto analyze the subtle movements of a relatively sedentaryfish in its natural habitat. As well, we believe we are thefirst to attempt developing a method to automatically clas-sify aeration and non-aeration related behavior.

The main contributions of this work include a novel auto-mated underwater fish movement analysis method that usesSURF key-points to track all visible parts of the fish body,including fins and mouth. As well, we propose a method to

21

Page 2: Automated Analysis of Wild Fish Behavior in a Natural Habitat · Automated Analysis of Wild Fish Behavior in a Natural Habitat Nancy Xin Ru Wang University of Washington wangnxr@cs.washington.edu

classify between aeration and non-aeration behavior usingperiodicity detection.

The remainder of this paper is structured as follows. Sec-tion 2 summarizes related work. Section 3 describes ourproposed approach, while section 4 provides details aboutthe experimental results and validation. Finally, Section 4draws conclusions and describes related work.

2. RELATED WORKAs mentioned before, most tracking and movement detec-

tion algorithms for fish work with carefully controlled under-water environments (tanks) [7, 9, 12, 13, 18, 20]. Moreover,none of the above-mentioned studies measure specific move-ments of fish body parts, while the fish remains stationary.Examples of such movements include flapping of the fins,tail, or opening or closing of the mouth. Therefore, thisstudy is more similar to previous studies on human motionanalysis that focus on specific limb motions, like hand wav-ing [14], or gesture recognition [3].

SURF feature points [4] have been widely used for track-ing [11, 16, 17], as well as for self-similarity measurements[14] and classification tasks [3]. However, none of the stud-ies using SURF points deals with noisy underwater environ-ments which include non-fish moving targets, and where fishare partially occluded for most of the time.

For the detection of aeration behavior using periodicitycues, human motion analysis was our greatest inspiration.Detecting periodic movement has been of interest to manystudies in human motion and activity analysis [21, 22]. In[10], periodicity is used for behavior classification with ap-plication to pornography filtering. Using self-similarity todetermine periodicity was first proposed in [6] for the pur-pose of repetitive human action recognition, such as walking.Improvements to this method were later proposed in [14];their approach worked with pre-detected regions of interestand with an optimal reference frame for similarity compari-son.

Due to the uncontrolled nature of the underwater envi-ronment in our study and to the highly deformable natureof fish bodies, we encounter a much greater variety of fishmotions than what one may find in periodic human actions.Consider, for instance, the video dataset used for detectingperiodic hand waving in [14]. While a person may be able torepeat this gesture with great consistency, a fish in its natu-ral habitat might move its fins in a slightly different mannereach time, causing movements with imperfect periodicity.

3. PROPOSED APPROACHThis section is structured as follows. Subsection 3.1 de-

scribes our proposed approach for motion detection, whichserves to automatically identify all motion events in a givenvideo. The output of this approach serves as a raw indicatorof the overall activity of the fish, which allows us to com-pare activity levels for each of the three environmental con-ditions (boat, ambient, control). Subsection 3.2 describes amethod for a more detailed behavioral analysis. We focuson the analysis of the aeration behavior, which was brieflydescribed in Section 1. The results of this method will allowfor a direct comparison of aeration behaviors for each of thethree considered environmental conditions.

3.1 Movement DetectionOur dataset contains highly variable background, as shown

in Figure 1. Moreover, the appearance of the foreground(fish) varies a lot, as only various parts of the fish bodyare visible for most of the time.Therefore, we decided on amodel-free motion detection approach. The pseudo-code ofour approach is given in Algorithm 4.1, while the remainderof this subsection provides a detailed description of the pro-posed method. Our main assumption is that the foreground(fish) moves more than other objects in the background,such as algae, seaweed, sand, and marine snow.

Algorithm 3.1: mvmtDetect(prevFrame, currFrame)

prevMarkers← SURFofprevFramecurrMarkers← SURFofcurrFramematches← findMatches(prevMarkers, currMarkers)for all match ∈ matches

do

if match.dist > µ(nearbys)± 2 ∗ σ(nearbys) ormatch.dist > 40pixelsthen Remove(match)

if numNearbys(match) < 1 andmatch.dist > 3pixelsthen Remove(match)

classes← kmeans([matches.dist,matches.loc])mvmt← maxMedian(classes,minSize > 5)if !exist(mvmt)then mvmt← maxMedian(classes,minSize > 1)

if mvmt < 2 or !exist(mvmt)then mvmt = 0

return (mvmt)

To start, SURF key-points are detected on the currentframe n and the previous frame n-1. In this method, weuse the extended version of the SURF descriptors (128-Dvector) available in the OpenCV library. Similar to [11] , wematch feature points between frames based on the Euclideandistance between the descriptor sets. A point in frame n ismatched to its closest point in frame n-1 only if its distanceto its second closest point is at least 1.25 times greater; thiseliminates ambiguous matches. Example of motion profilesare shown in Figure 1, where the length of the line shows theamount of movement since the last frame at a given featurepoint.

Fish motion is highly deformable. Thus, we are not able toassume simple motion models and work with methods suchas RANSAC for outlier elimination. Instead, we eliminateoutlier matches by assuming that there is a maximum speedthat the fish can have, that is 40 pixels per frame (given theapproximate pixel size of 0.1 mm2). We also request thatnearby matches should have similar movement magnitudes.Each match needs to be located within 2 standard devia-tions of the mean of all neighbours within a 50 pixel radius.If no neighbours are present, we lower the maximum dis-tance tolerance from 40 pixels down to 3 pixels. This outlierelimination process is repeated three times to remove mul-tiple outliers located close together.

To eliminate small background motion, such as marinesnow, algae, and sand, we cluster the feature points with k-means based on the current location and the distance moved.We used five clusters. The clusters are represented by dif-ferent colours in Figure 1. The cluster corresponding to fishmotion is selected to be the one with the largest median

22

Page 3: Automated Analysis of Wild Fish Behavior in a Natural Habitat · Automated Analysis of Wild Fish Behavior in a Natural Habitat Nancy Xin Ru Wang University of Washington wangnxr@cs.washington.edu

Figure 1: Sample frames of movement from various videos showing a variety of backgrounds and partially-occluded foregrounds(fish). Coloured lines correspond to the k-means clusters of SURF key-points. The length of lines indicate amount of movementsince previous frame.

movement and containing at least 5 feature points. Themedian operator is preferred to the mean since it is robustagainst outliers. For some motions, such as for instancewhen the fish comes very close to the camera, there areno clusters containing 5 feature points or more. If this isthe case, only 2 feature points are required and the meanmovement of the selected cluster represents the estimatedmovement of the fish. Finally, if the movement found isfewer than 2 pixels, we disregard this movement as it couldbe noise. In order to detect slow true movements below 2pixels, we downsample the video 2 and 4 times and repeatthe procedure above.

3.2 Aeration ClassificationThis subsection describes our proposed method for the

detection of aeration-related movements using periodicityanalysis. When a fish aerates its nest, it undulates its finsrhythmically, which causes its body to sway back and forthwith the movement. This motion is periodic, and most ofthe periodic fish motions are aeration-related. This is why

periodicity was chosen to detect this important nesting be-havior.

Inspired by early work in [6], we use a frame-based sim-ilarity score to detect periodicity in the fish motion. For agiven frame, the raw similarity score is defined as the num-ber of SURF key-points belonging to that frame that arespatially close (within a 5 pixel radius) to their correspond-ing matches in the frame of reference. This raw similarityscore is very sensitive to the number of SURF key-pointspresent in the frame of reference. Consider, for instance,a ’crisp’ reference frame, with the fish in-focus; this framemay contain 100 SURF key-points, while a blurry one, withthe fish very close to the camera might have only 20 SURFkey-points. The similarity score is also sensitive to noise. Toaddress these sensitivities, we perform a temporal smoothingof all the raw similarity scores computed for a given windowusing a Gaussian filter with σ = 5.

Next, we perform a temporal normalization of the rawsimilarity scores by imposing an average score of 100 acrosseach offset window. This normalization process does not af-fect the periodicity of the sequence of similarity scores; how-

23

Page 4: Automated Analysis of Wild Fish Behavior in a Natural Habitat · Automated Analysis of Wild Fish Behavior in a Natural Habitat Nancy Xin Ru Wang University of Washington wangnxr@cs.washington.edu

ever, it enables us to compare similarity score values com-puted for reference frames with a variable number of SURFkey-points. Examples of sequences of normalized similarityscores for non-aeration (aperiodic) and aeration (periodic)motion are shown in Figure 3 A,B; one may note that thesesequences capture well the periodic and aperiodic nature oftheir corresponding motions.

Figure 2: Primary and secondary windows. The 10 secondwindow represents the primary window with the referenceframe located at t = 0. The 6 second window representsa secondary window located within that primary window.Another primary window will start at an offset of 7 seconds,and end off-figure 10 seconds later.

Since the fish may aerate at any time during a video se-quence, and the start of an aeration event can be difficultto pinpoint, we are not able to directly estimate the begin-ning of the periodic motion. So, unlike [14] we cannot easilyfind an optimal frame of reference. Therefore, we define aprimary window of 10 seconds, with the frame of referencebeing the first frame of the primary window. The 10 secondduration was experimentally found to be the best consider-ing the average period and duration of aeration movements.For every video, we consider primary windows at every 10seconds, as well as at 8 additional different frame offsets (0,7, 17, 29, 47, 71, 101, 203).

A

D C

B

Figure 3: A) Sequence of normalized similarity scores com-puted within a secondary window for a non-aeration mo-tion. B) Sequence of normalized similarity scores computedwithin a secondary window for a non-aeration motion. C)Frequency spectrum of A. D) Frequency spectrum of B.

Primary windows provide a temporal delineation of thecurrent interval of interest. For periodicity analysis pur-poses, within each primary window, we further consider sec-ondary windows of 6 seconds length, starting at every 0.3seconds from the beginning of the primary window. We setthe length of secondary windows to 6 seconds in order tosatisfy the Nyquist criterion (since the period of aerationis at most 3 seconds). Only secondary windows containingmotion (as detected with the algorithm described in 3.1)are considered. The relationship between primary and sec-ondary windows is illustrated in Figure 2.

The Fourier Transform is applied on secondary windowsso that we gather information about the spectral contentof the movement confined in that window (see Figure 3 C,D). The simplest method would be to compute the peri-odicity information directly from the frequency spectrumby comparing the magnitude of the largest frequency to therest. However, fish movements are often only quasi-periodic.There may be several frequencies that are larger than therest. While aeration events account for the majority of pe-riodic fish motions, there are other events-such as cleaningof nest with tail- that can be periodic as well; the frequencyof nest cleaning is much higher than in the case of aera-tion. Similarly, waves may move the fish in a periodic way,with a frequency that is generally lower than in the case ofaeration. To address these issues, we characterize each sec-ondary window by its frequency content. More specifically,a feature vector containing 90 frequency magnitudes is com-puted for every secondary window. A k-neighbours classifier(k = 50, with distance weighting in the vote) is trained withlabelled exemplars of secondary windows containing aera-tion and non-aeration respectively. Once secondary win-dows are classified, they will vote for each frame that theycontain. Therefore, a given frame is classified as ’aeration’if the number of secondary windows containing that frameand classified as ’aeration’ is greater than the number ofsecondary windows containing that frame and classified as’non-aeration’.

4. EXPERIMENTAL RESULTSOur experimental dataset consists of videos of 13 distinct

alpha male midshipmen in 13 separate nests. Each fish wasfilmed in all three conditions (control, ambient, and boatnoise), resulting in a total of 39 videos approximately 15minutes in length. The videos were filmed using a stationaryMicrocam, a small underwater camera. The camera washeld in place by rocks near the nest of the fish. The nestswere between 15 and 30 centimeters in diameter and theMicrocam focus was set to 30 centimeters. The videos havea spatial resolution of 640 by 480 pixels and a frame rate of30 frames per second.

4.1 Movement DetectionOur dataset also contains manual expert annotations for

9 videos (3 in each condition), provided by the biologist onour team. The annotations indicate all types of fish move-ment present and any possible extraneous environmental dis-tractors, such as heavy current. To validate our proposedmethod, we applied the movement detection algorithm onthese 9 videos and measured the precision and recall rateson a frame-by-frame basis.

It is important to note that the manual annotation is pre-cise only to the level of 1 second.Therefore, in the experi-

24

Page 5: Automated Analysis of Wild Fish Behavior in a Natural Habitat · Automated Analysis of Wild Fish Behavior in a Natural Habitat Nancy Xin Ru Wang University of Washington wangnxr@cs.washington.edu

mental validation, a temporal tolerance of 1.5 seconds withrespect to the manual annotation was allowed.

With all errors considered, the average precision rate is85.3% and the recall rate is 81.3% (See Table 1, column1). However, two systematic types of errors (those causedby ocean current and those caused by aeration behavior)need some special attention. Ocean current can cause falsepositives as it can significantly move the fish; it is some-times difficult even for human annotators to determine ifa movement originates from the fish itself or from the cur-rent. Aeration events can be very subtle (e.g. when the fishsways slowly from side to side). Once current and aerationrelated errors are not considered, the performance increasesto 96.5% and 92.7% respectively (See Table 1, column 4).This shows that our proposed method for automated motiondetection is highly accurate. Additional errors occur whenthe fish is located in dark areas of the nest, which results in alimited number of SURF key-points for tracking. Also, falsepositives are sometimes caused by large moving seaweeds.

After validating the proposed method, we applied it to all39 videos in the experimental set and compared the totalmovement in different conditions. For a given video, the to-tal movement is measured as the percentage of frames withfish movement. A paired analysis was performed in order tostudy differences in total movement for each individual fishunder the three experimental conditions. Figure 4 shows thedifferences in total movement averaged over our entire pop-ulation of 13 fish. One may note that there was significantlymore movement under boat noise condition than under am-bient or control conditions, demonstrating that our methodfor motion detection has direct and important applicationsin ecological research.

Figure 4: Average difference in total movement betweenconditions. Paired t-tests (n = 13 individual fish). Sta-tistical significance: boat - control p < 0.05; boat - ambientp < 0.05; ambient - control p > 0.05. Please see introductionfor description of environmental conditions.

All errors EC EA EC & APrecision 0.85 0.96 0.85 0.96Recall 0.81 0.82 0.92 0.93F-1 0.80 0.87 0.88 0.94

Table 1: Average precision, recall, and F-1 performanceacross all annotated videos. EC = Excludes current relatederror, EA = Excludes aeration related error, EC & A =Excludes current and aeration related error.

4.2 Aeration DetectionAeration-related movement events were manually anno-

tated by the biologist on our team in 20 of the 39 videos. Wetrained and validated our method with the leave-one-video-out protocol. Since the start and end of aeration-relatedbehaviors are difficult to extract from manual annotations,we decided to use an event-based validation protocol. Anaeration event is defined as 3 seconds or more of continuousaeration-related behavior, with at most 0.3 seconds of in-terruption. Any such event detected by the algorithm thatdoes not have a manually labeled counterpart is considereda false positive. Two thresholds were used for consideringan event to be a true positive, as shown in Table 2. Morespecifically, we refer to 25% detection as partial event detec-tion and 75% as full event detection. The percentages (25%and 75%) represent the ratio between the number of framesthat have been classified as aeration over the total numberof frames in the event.

Since the manually annotated set had an average of 1 : 10aeration to non-aeration frames, random chance for a frameto be considered aeration is at 10%, well below the partialdetection threshold.

25 % 50% 75%TPR 0.84 0.80 0.55TNR 0.93 0.93 0.93MCC 0.77 0.74 0.53

Table 2: Overall accuracy rates for all annotated videos atvarious detection thresholds. TPR = True Positive Rate,TNR = True Negative Rate, MCC = Matthews CorrelationCoefficient.

Since aeration events occur 10 times less often than non-aeration events, recall and precision measures do not rep-resent well the performance of our algorithm. Instead, wemeasure the true positive and true negative accuracy rates[8] as well as the Matthews Correlation Coefficient [15].

Although the full detection positive accuracy rates are low(Table 2, column 3), the partial detection (Table 2, column1) accuracy is much higher. Detection at 50% (an inter-mediate value in between 25 and 75%) also has quite highaccuracy, which may signify that the detection rate has asharp non-linear decrease which starts after 50%. This ismost likely because the motions involved in aeration (for in-stance flapping of the fins) are only quasi-periodic, and notrepeated in the exact same manner over time.

5. CONCLUSIONOur paper proposes automated techniques to study the

amount of movement and the aeration behavior of a territo-rial and relatively stationary fish. Each technique has directapplications to biologists studying animals ”in the wild”.

Motion detection uses the displacement of SURF key-point movements from frame to frame to detect movement.K-means clustering and other outlier removal techniques arethen used to differentiate fish motion from small movingobjects in the background and foreground. The analysisof fish behavior uses similarity-based periodicity detectioncombined with the K-neighbors classifier. Experimental val-idation with respect to expert-annotated ground truth showsexcellent performance for both motion and behavior detec-tion approaches.

25

Page 6: Automated Analysis of Wild Fish Behavior in a Natural Habitat · Automated Analysis of Wild Fish Behavior in a Natural Habitat Nancy Xin Ru Wang University of Washington wangnxr@cs.washington.edu

Future work includes the automatic detection of othernesting-related behaviors in the plainfish midshipmen. Wealso plan on enhancing our motion detection method forother species of fish, and for applications such as fish count-ing and estimation of species abundance.

6. REFERENCES

[1] M. Amer, E. Bilgazyev, S. Todorovic, S. S.I. Kakadiaris, and L. Cianelli. Fine-grainedcategorization of fish motion patterns in underwatervideos. In ICCV, pages 1488–1495, Nov 2014.

[2] H. Arora. Observations on the habits and early lifehistory of the batrachoid fish, porichthys notatusgirard. Copeia, 2:89 – 93, 1948.

[3] J. Bao, A. Song, Y. Guo, and H. Tang. Dynamic handgesture recognition based on surf tracking. In ElectricInformation and Control Engineering (ICEICE),pages 338–341, April 2011.

[4] H. Bay, A. Ess, T. Tuytelaars, and L. V. Gool.Speeded-up robust features (surf). Computer Visionand Image Understanding, 110(3):346–359, 2008.

[5] S. Cullis-Suzuki. Singing fish in an ocean of noise:effects of boat noise on the plainfin midshipman(porichthys notatus) in a natural ecosystem. In TheEffects of Noise on Aquatic Life II. Springer, NewYork, In press.

[6] R. Cutler and L. Davis. Robust real-time periodicmotion detection, analysis, and applications. TPAMI,22(8):781–796, Aug 2000.

[7] S. Duarte, L. Reig, and J. Oca. Measurement of soleactivity by digital image analysis. AquaculturalEngineering, 41:22–27, 2009.

[8] T. Fawcett. An introduction to roc analysis. PatternRecognition Letters, 27:861 – 874, 2006.

[9] X. Huan and Z. Wei. Fish tracking. Master’s thesis,Cornell University, May 2012.

[10] C. Jansohn, A. Ulges, and T. Breuel. Detectingpornographic video content by combining imagefeatures with motion information. In ACM MM, pages601–604, October 20009.

[11] F. Jean, A. B. Albu, and C. Dumoulin. Feature-basedtracking of urethral motion in low-resolutiontrans-preineal ultrasound. In EMBS, 2011.

[12] A. Kane, J. Salierno, G. Gipson, T. Molteno andC. Hunter. A video-based movement analysis systemto quantify behavioral stress responses of fish. WaterResearch, 38:3993–4001, 2004.

[13] S. Kato, T. Nakagawa, M. Ohkawa, K. Muramoto,O. Oyama, A. Watanabe, H. Nakashima T. Nemoto,and K. Sugitani. A computer image processing systemfor quantification of zebrafish behavior. Journal ofNeuroscience Methods, 134(1):1–7, 2004.

[14] G. Li, X. Han, W. Lin, and H. Wei. Periodic motiondetection with roi-based similarity measure andextrema-based reference selection. In ConsumerElectronics, IEEE Transactions on, volume 58, pages947–954, August 2012.

[15] B. W. Matthews. Comparison of the predicted andobserved secondary structure of t4 phage lysozyme.BBA Protein. Struct., 405(2):442–451, 1975.

[16] G. Nebehay and R. Pflugfelder. Consensus-basedmatching and tracking of keypoints for objecttracking. In WACV, 2014.

[17] J. Pan, W. Chen, and W. Peng. A new moving objectsdetection method based on improved surf algorithm.In Control and Decision Conference (CCDC), pages901–906, May 2013.

[18] V. M. Papadakis, I. E. P. and Fani Lamprianidou,A. Glaropoulos, and M. Kentouri. A computer-visionsystem and methodology for the analysis of fishbehavior. Aquacultural Engineering, 46(0):53–59, 2012.

[19] R. Pereira, S. Rismond, M. Caiano, S. P. P.J.P. Fonseca, and M. Amorim. The role of agonisticsounds in male nest defence in the painted gobypomatoschistus pictus. Ethology, 120(1):53–63, 2014.

[20] T. Pinkiewicz, G. Purser, and R. Williams. Acomputer vision system to analyse the swimmingbehavior of farmed fish in commercial aquaculturefacilities: A case study using cage-held atlanticsalmon. Aquacultural Engineering, 45(1):20 – 27, 2011.

[21] R. Polana and R. Nelson. Detection and recognition ofperiodic, nonrigid motion. International Journal ofComputer Vision, 23(3):261 – 282, 1997.

[22] R. Poppe. A survey on vision-based human actionrecognition. Image and Vision computing, 28:976 –990, 2010.

[23] A. Popper. Effects of anthropogenic sounds on fishes.Fisheries, 28(10):24 – 31, 2003.

[24] M. Shortis, M. Ravanbakskh, F. Shaifat, E. Harvey,A. Mian, J. Seager, P. Culverhouse, D. Cline, andD. Edgington. A review of techniques for theidentification and measurement of fish in underwaterstereo-video image sequences. In Proc. SPIE, volume8791, 2013.

[25] C. Spampinato, E. Beauxis-Aussalet, S. Palazzo,C. Beyan J. van Ossenbruggen, J. He, B. Boom, andX. Huang. A rule-based event detection system forreal-life underwater domain. Machine Vision andApplications, 25(1), 2014.

[26] C. Spampinato, D. Giordano, R. D. Salvo,Y. Chen-Burger, R. Fisher, and G. Nadarajan.Automatic fish classification for underwater speciesbehavior understanding. In ARTEMIS, pages 45–50,2010.

[27] C. Spampinato, S. Palazzo, B. Boom, J. vanOssenbruggen I. Kavasidis, R. D. Salvo, F. Lin,D. Giordano L. Hardman, and R. Fisher.Understanding fish behavior during typhoon events inreal-life underwater environments. Multimedia Toolsand Applications, 70(1):199–236, 2014.

[28] T. Takegaki and A. Nakazano. Responses of theegg-tending gobiid fish valenciennea longipinnis to thefluctuation of dissolved oxygen in the burrow. Bulletinof Marine Science, 65(3):815 – 823, 1999.

26